Skip to content

Commit

Permalink
lockdep, rwsem: fix down_write_nest_lock() if !CONFIG_DEBUG_LOCK_ALLOC
Browse files Browse the repository at this point in the history
Commit 1b963c8 ("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 <[email protected]>
Reported-and-tested-by: Zlatko Calusic <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
Reviewed-by: Rik van Riel <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Jiri Kosina authored and torvalds committed Jan 16, 2013
1 parent 36e7a96 commit e65b9ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/rwsem.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit e65b9ad

Please sign in to comment.