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 <>
Reported-and-tested-by: default avatarZlatko Calusic <>
Signed-off-by: default avatarJiri Kosina <>
Reviewed-by: default avatarRik van Riel <>
Signed-off-by: default avatarLinus Torvalds <>
parent 36e7a96c
......@@ -135,7 +135,7 @@ do { \
# 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)
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