]> git.baikalelectronics.ru Git - kernel.git/commit
rhashtable: Lower/upper bucket may map to same lock while shrinking
authorThomas Graf <tgraf@suug.ch>
Mon, 12 Jan 2015 23:58:21 +0000 (23:58 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Jan 2015 05:21:44 +0000 (00:21 -0500)
commit52fe240c110042148497d20fda319e388adb8dcc
treee275dc10e62e28ea8b7f4c25e6a30664974e233f
parent7e613a77e01afa87562d2a18a8056d67eea61516
rhashtable: Lower/upper bucket may map to same lock while shrinking

Each per bucket lock covers a configurable number of buckets. While
shrinking, two buckets in the old table contain entries for a single
bucket in the new table. We need to lock down both while linking.
Check if they are protected by different locks to avoid a recursive
lock.

Fixes: b5e8a412 ("rhashtable: Per bucket locks & deferred expansion/shrinking")
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
lib/rhashtable.c