Skip to content

Commit

Permalink
net: sched: cls_matchall: fix null pointer dereference
Browse files Browse the repository at this point in the history
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: 985538e ("net/sched: remove redundant null check on head")
Signed-off-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
jpirko authored and davem330 committed May 22, 2017
1 parent 499fde6 commit 2d76b2f
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion net/sched/cls_matchall.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2d76b2f

Please sign in to comment.