diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2013-06-28 02:37:42 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-07-01 13:35:32 -0700 |
commit | c9ab4d85de222f3390c67aedc9c18a50e767531e (patch) | |
tree | 6bbd193b81267981efecbd296c39e197e15f0ced /net/dsa | |
parent | 61369d0259a724606f3941a46d2c75155d66cf2c (diff) | |
download | linux-c9ab4d85de222f3390c67aedc9c18a50e767531e.tar.gz linux-c9ab4d85de222f3390c67aedc9c18a50e767531e.tar.bz2 linux-c9ab4d85de222f3390c67aedc9c18a50e767531e.zip |
neighbour: fix a race in neigh_destroy()
There is a race in neighbour code, because neigh_destroy() uses
skb_queue_purge(&neigh->arp_queue) without holding neighbour lock,
while other parts of the code assume neighbour rwlock is what
protects arp_queue
Convert all skb_queue_purge() calls to the __skb_queue_purge() variant
Use __skb_queue_head_init() instead of skb_queue_head_init()
to make clear we do not use arp_queue.lock
And hold neigh->lock in neigh_destroy() to close the race.
Reported-by: Joe Jin <joe.jin@oracle.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa')
0 files changed, 0 insertions, 0 deletions