* [PATCH] lockdep, rwsem: fix down_write_nest_lock() if !CONFIG_DEBUG_LOCK_ALLOC
@ 2013-01-15 19:12 Jiri Kosina
2013-01-15 19:14 ` Rik van Riel
2013-01-15 19:20 ` Zlatko Calusic
0 siblings, 2 replies; 3+ messages in thread
From: Jiri Kosina @ 2013-01-15 19:12 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: linux-kernel, Andrew Clayton, Zlatko Calusic, Rik van Riel
Commit 1b963c81b1 ("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-by: Andrew Clayton <andrew@digital-domain.net>
Reported-by: Zlatko Calusic <zlatko.calusic@iskon.hr>
Tested-by: Andrew Clayton <andrew@digital-domain.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
---
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 413cc11..8da67d6 100644
--- a/include/linux/rwsem.h
+++ b/include/linux/rwsem.h
@@ -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
--
Jiri Kosina
SUSE Labs
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] lockdep, rwsem: fix down_write_nest_lock() if !CONFIG_DEBUG_LOCK_ALLOC
2013-01-15 19:12 [PATCH] lockdep, rwsem: fix down_write_nest_lock() if !CONFIG_DEBUG_LOCK_ALLOC Jiri Kosina
@ 2013-01-15 19:14 ` Rik van Riel
2013-01-15 19:20 ` Zlatko Calusic
1 sibling, 0 replies; 3+ messages in thread
From: Rik van Riel @ 2013-01-15 19:14 UTC (permalink / raw)
To: Jiri Kosina
Cc: Linus Torvalds, Andrew Morton, linux-kernel, Andrew Clayton,
Zlatko Calusic
On 01/15/2013 02:12 PM, Jiri Kosina wrote:
> Commit 1b963c81b1 ("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-by: Andrew Clayton <andrew@digital-domain.net>
> Reported-by: Zlatko Calusic <zlatko.calusic@iskon.hr>
> Tested-by: Andrew Clayton <andrew@digital-domain.net>
> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Reviewed-by: Rik van Riel <riel@redhat.com>
--
All rights reversed
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] lockdep, rwsem: fix down_write_nest_lock() if !CONFIG_DEBUG_LOCK_ALLOC
2013-01-15 19:12 [PATCH] lockdep, rwsem: fix down_write_nest_lock() if !CONFIG_DEBUG_LOCK_ALLOC Jiri Kosina
2013-01-15 19:14 ` Rik van Riel
@ 2013-01-15 19:20 ` Zlatko Calusic
1 sibling, 0 replies; 3+ messages in thread
From: Zlatko Calusic @ 2013-01-15 19:20 UTC (permalink / raw)
To: Jiri Kosina
Cc: Linus Torvalds, Andrew Morton, linux-kernel, Andrew Clayton,
Rik van Riel
On 15.01.2013 20:12, Jiri Kosina wrote:
> Commit 1b963c81b1 ("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-by: Andrew Clayton <andrew@digital-domain.net>
> Reported-by: Zlatko Calusic <zlatko.calusic@iskon.hr>
> Tested-by: Andrew Clayton <andrew@digital-domain.net>
> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Reported-and-tested-by: Zlatko Calusic <zlatko.calusic@iskon.hr>
kvm starts just fine now. Thanks Jiri!
--
Zlatko
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-01-15 19:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-15 19:12 [PATCH] lockdep, rwsem: fix down_write_nest_lock() if !CONFIG_DEBUG_LOCK_ALLOC Jiri Kosina
2013-01-15 19:14 ` Rik van Riel
2013-01-15 19:20 ` Zlatko Calusic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox