locking/lockdep: Add new check to lock_downgrade()
authorJ. R. Okajima <hooanon05g@gmail.com>
Thu, 2 Feb 2017 16:38:17 +0000 (01:38 +0900)
committerIngo Molnar <mingo@kernel.org>
Thu, 16 Mar 2017 08:57:07 +0000 (09:57 +0100)
commit6419c4af777a773a45a1b1af735de0fcd9a7dcc7
tree0f7d44f45b63043b15904ac5f755bbb0abddb7bc
parente969970be033841d4c16b2e8ec8a3608347db861
locking/lockdep: Add new check to lock_downgrade()

Commit:

  f8319483f57f ("locking/lockdep: Provide a type check for lock_is_held")

didn't fully cover rwsems as downgrade_write() was left out.

Introduce lock_downgrade() and use it to add new checks.

See-also: http://marc.info/?l=linux-kernel&m=148581164003149&w=2
Originally-written-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1486053497-9948-3-git-send-email-hooanon05g@gmail.com
[ Rewrote the changelog. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/lockdep.h
kernel/locking/lockdep.c
kernel/locking/rwsem.c