Skip to content
Commit 3f2db250 authored by Pavel Skripkin's avatar Pavel Skripkin Committed by David S. Miller
Browse files

net: sched: fix warning in tcindex_alloc_perfect_hash

Syzbot reported warning in tcindex_alloc_perfect_hash. The problem
was in too big cp->hash, which triggers warning in kmalloc. Since
cp->hash comes from userspace, there is no need to warn if value
is not correct

Fixes: b9a24bb7

 ("net_sched: properly handle failure case of tcf_exts_init()")
Reported-and-tested-by: default avatar <syzbot+1071ad60cd7df39fdadb@syzkaller.appspotmail.com>
Signed-off-by: default avatarPavel Skripkin <paskripkin@gmail.com>
Acked-by: default avatarCong Wang <cong.wang@bytedance.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fade5641
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment