From: Jiri Pirko Date: Mon, 22 May 2017 14:46:13 +0000 (+0200) Subject: net: sched: cls_matchall: fix null pointer dereference X-Git-Tag: v4.14-rc1~859^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2d76b2f8b54abd16225cd80afca36ed43f113c41;p=platform%2Fkernel%2Flinux-rpi3.git net: sched: cls_matchall: fix null pointer dereference Since the head is guaranteed by the check above to be null, the call_rcu would explode. Remove the previously logically dead code that was made logically very much alive and kicking. Fixes: 985538eee06f ("net/sched: remove redundant null check on head") Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller --- diff --git a/net/sched/cls_matchall.c b/net/sched/cls_matchall.c index dee469f..51859b8 100644 --- a/net/sched/cls_matchall.c +++ b/net/sched/cls_matchall.c @@ -203,7 +203,6 @@ static int mall_change(struct net *net, struct sk_buff *in_skb, *arg = (unsigned long) head; rcu_assign_pointer(tp->root, new); - call_rcu(&head->rcu, mall_destroy_rcu); return 0; err_replace_hw_filter: