Commit e65b9ad2 authored by Jiri Kosina's avatar Jiri Kosina Committed by Linus Torvalds
Browse files

lockdep, rwsem: fix down_write_nest_lock() if !CONFIG_DEBUG_LOCK_ALLOC

Commit 1b963c81

 ("lockdep, rwsem: provide down_write_nest_lock()")
contains a bug in a codepath when CONFIG_DEBUG_LOCK_ALLOC is disabled,
which causes down_read() to be called instead of down_write() by mistake
on such configurations.  Fix that.
Reported-and-tested-by: default avatarAndrew Clayton <andrew@digital-domain.net>
Reported-and-tested-by: default avatarZlatko Calusic <zlatko.calusic@iskon.hr>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
Reviewed-by: default avatarRik van Riel <riel@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 36e7a96c
......@@ -135,7 +135,7 @@ do { \
#else
# define down_read_nested(sem, subclass) down_read(sem)
# define down_write_nest_lock(sem, nest_lock) down_read(sem)
# define down_write_nest_lock(sem, nest_lock) down_write(sem)
# define down_write_nested(sem, subclass) down_write(sem)
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment