From: WANG Cong Date: Mon, 15 Sep 2014 21:06:46 +0000 (-0700) Subject: net_sched: fix an allocation bug in tcindex_set_parms() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=a57a65ba47b71e7af67af30466c7e0bd2ec5786d;p=openwrt%2Fstaging%2Fblogic.git net_sched: fix an allocation bug in tcindex_set_parms() Fixes: commit 331b72922c5f58d48fd ("net: sched: RCU cls_tcindex") Cc: John Fastabend Signed-off-by: Cong Wang Signed-off-by: David S. Miller --- diff --git a/net/sched/cls_tcindex.c b/net/sched/cls_tcindex.c index a9f4279fbd69..a02ca7298385 100644 --- a/net/sched/cls_tcindex.c +++ b/net/sched/cls_tcindex.c @@ -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;