]> err.no Git - linux-2.6/commit
[NEIGH]: Fix race between neighbor lookup and table's hash_rnd update.
authorPavel Emelyanov <xemul@openvz.org>
Sun, 24 Feb 2008 03:57:02 +0000 (19:57 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 24 Feb 2008 03:57:02 +0000 (19:57 -0800)
commitbc4bf5f38cf0a623e6a29f52ec80bfcc56a373c6
tree44c9dab22f5d75d797845b54df07bd6da40bcc7e
parent1840bb13c22f5b8fd2e242e36c8d6ea3f312be67
[NEIGH]: Fix race between neighbor lookup and table's hash_rnd update.

The neigh_hash_grow() may update the tbl->hash_rnd value, which
is used in all tbl->hash callbacks to calculate the hashval.

Two lookup routines may race with this, since they call the
->hash callback without the tbl->lock held. Since the hash_rnd
is changed with this lock write-locked moving the calls to ->hash
under this lock read-locked closes this gap.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/neighbour.c