From: Eric Dumazet Date: Fri, 28 Jun 2013 09:37:42 +0000 (-0700) Subject: neighbour: fix a race in neigh_destroy() X-Git-Tag: v3.11-rc1~64^2~71 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9ab4d85de222f3390c67aedc9c18a50e767531e;p=pandora-kernel.git 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 Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- Reading git-diff-tree failed