[Devel] Re: [PATCH][NEIGH]: Fix race between neighbor lookup and table's hash_rnd update.

David Miller davem at davemloft.net
Sat Feb 23 19:57:23 PST 2008


From: Pavel Emelyanov <xemul at openvz.org>
Date: Fri, 22 Feb 2008 12:37:03 +0300

> 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 at openvz.org>

Applied, thanks.




More information about the Devel mailing list