summaryrefslogtreecommitdiffstats
path: root/mm/pagewalk.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2019-04-02 01:07:45 +0200
committerDavid S. Miller <davem@davemloft.net>2019-04-08 04:12:12 +0200
commit149212f07856b25a9d342bfd6d736519b2ef66dc (patch)
treeb2fc4e6c9902041bcdb4c8bfc44d2d5d3040088c /mm/pagewalk.c
parentrhashtable: use bit_spin_locks to protect hash bucket. (diff)
downloadlinux-149212f07856b25a9d342bfd6d736519b2ef66dc.tar.xz
linux-149212f07856b25a9d342bfd6d736519b2ef66dc.zip
rhashtable: add lockdep tracking to bucket bit-spin-locks.
Native bit_spin_locks are not tracked by lockdep. The bit_spin_locks used for rhashtable buckets are local to the rhashtable implementation, so there is little opportunity for the sort of misuse that lockdep might detect. However locks are held while a hash function or compare function is called, and if one of these took a lock, a misbehaviour is possible. As it is quite easy to add lockdep support this unlikely possibility seems to be enough justification. So create a lockdep class for bucket bit_spin_lock and attach through a lockdep_map in each bucket_table. Without the 'nested' annotation in rhashtable_rehash_one(), lockdep correctly reports a possible problem as this lock is taken while another bucket lock (in another table) is held. This confirms that the added support works. With the correct nested annotation in place, lockdep reports no problems. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'mm/pagewalk.c')
0 files changed, 0 insertions, 0 deletions