diff options
author | Jiri Kosina <jkosina@suse.cz> | 2013-01-15 14:12:37 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-01-16 15:13:20 -0500 |
commit | e65b9ad222c280c031bc8d3642cc38dd3026fe06 (patch) | |
tree | e1156d88a4fb42d7623e0390469227b6e3f4202b /include/linux/rwsem.h | |
parent | 36e7a96ceb6e9d347d8bf3def689c315131edf10 (diff) |
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>
Diffstat (limited to 'include/linux/rwsem.h')
-rw-r--r-- | include/linux/rwsem.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h index 413cc11e414a..8da67d625e13 100644 --- a/include/linux/rwsem.h +++ b/include/linux/rwsem.h | |||
@@ -135,7 +135,7 @@ do { \ | |||
135 | 135 | ||
136 | #else | 136 | #else |
137 | # define down_read_nested(sem, subclass) down_read(sem) | 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 | # define down_write_nested(sem, subclass) down_write(sem) | 139 | # define down_write_nested(sem, subclass) down_write(sem) |
140 | #endif | 140 | #endif |
141 | 141 | ||