Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

lockdep, rwsem: fix down_write_nest_lock() if !CONFIG_DEBUG_LOCK_ALLOC

Commit 1b963c81b145 ("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: Andrew Clayton <andrew@digital-domain.net>
Reported-and-tested-by: Zlatko Calusic <zlatko.calusic@iskon.hr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Reviewed-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Jiri Kosina and committed by
Linus Torvalds
e65b9ad2 36e7a96c

+1 -1
+1 -1
include/linux/rwsem.h
··· 135 135 136 136 #else 137 137 # define down_read_nested(sem, subclass) down_read(sem) 138 - # define down_write_nest_lock(sem, nest_lock) down_read(sem) 138 + # define down_write_nest_lock(sem, nest_lock) down_write(sem) 139 139 # define down_write_nested(sem, subclass) down_write(sem) 140 140 #endif 141 141