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

2008-02-23 Thread David Miller
From: Pavel Emelyanov <[EMAIL PROTECTED]> 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 with

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

2008-02-22 Thread Pavel Emelyanov
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 th