summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMichel Machado <michel@digirati.com.br>2012-02-21 22:04:13 +0100
committerDavid S. Miller <davem@davemloft.net>2012-02-21 22:28:10 +0100
commit84338a6c9dbb6ff3de4749864020f8f25d86fc81 (patch)
tree100409d99686fa989c64d4f5aa12721a3fafa5d8 /include
parentmlx4: Setting new port types after all interfaces unregistered (diff)
downloadlinux-84338a6c9dbb6ff3de4749864020f8f25d86fc81.tar.xz
linux-84338a6c9dbb6ff3de4749864020f8f25d86fc81.zip
neighbour: Fixed race condition at tbl->nht
When the fixed race condition happens: 1. While function neigh_periodic_work scans the neighbor hash table pointed by field tbl->nht, it unlocks and locks tbl->lock between buckets in order to call cond_resched. 2. Assume that function neigh_periodic_work calls cond_resched, that is, the lock tbl->lock is available, and function neigh_hash_grow runs. 3. Once function neigh_hash_grow finishes, and RCU calls neigh_hash_free_rcu, the original struct neigh_hash_table that function neigh_periodic_work was using doesn't exist anymore. 4. Once back at neigh_periodic_work, whenever the old struct neigh_hash_table is accessed, things can go badly. Signed-off-by: Michel Machado <michel@digirati.com.br> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions