mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-12 21:44:06 +08:00
net_sched: fix an allocation bug in tcindex_set_parms()
Fixes: commit 331b72922c
("net: sched: RCU cls_tcindex")
Cc: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
80dcbd12fb
commit
a57a65ba47
@ -241,7 +241,7 @@ tcindex_set_parms(struct net *net, struct tcf_proto *tp, unsigned long base,
|
||||
* allocate new tcindex data and RCU assign it onto root. Keeping
|
||||
* perfect hash and hash pointers from old data.
|
||||
*/
|
||||
cp = kzalloc(sizeof(cp), GFP_KERNEL);
|
||||
cp = kzalloc(sizeof(*cp), GFP_KERNEL);
|
||||
if (!cp)
|
||||
return -ENOMEM;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user