net: Potential null skb->dev dereference
authorEric Dumazet <eric.dumazet@gmail.com>
Fri, 19 Mar 2010 04:16:45 +0000 (21:16 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Mar 2010 04:16:45 +0000 (21:16 -0700)
commit0641e4fbf2f824faee00ea74c459a088d94905fd
tree54fdd8bc2e3a928ff0f7621c06e1e604eaf0529c
parent54d259d474e1fee6f6bb8f0f1360d85195199ac5
net: Potential null skb->dev dereference

When doing "ifenslave -d bond0 eth0", there is chance to get NULL
dereference in netif_receive_skb(), because dev->master suddenly becomes
NULL after we tested it.

We should use ACCESS_ONCE() to avoid this (or rcu_dereference())

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
net/8021q/vlan_core.c
net/core/dev.c