The patch titled Lockdep treats down_write_trylock like regular down_write has been added to the -mm tree. Its filename is lockdep-treats-down_write_trylock-like-regular-down_write.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: Lockdep treats down_write_trylock like regular down_write From: Pavel Emelianov <xemul@xxxxx> This causes constructions like down_write(&mm1->mmap_sem); if (down_write_trylock(&mm2->mmap_sem)) { ... up_write(&mm2->mmap_sem); } up_write(&mm1->mmap_sem); generate a lockdep warning about circular locking dependence. Call rwsem_acquire() with trylock set to 1. Cc: Ingo Molnar <mingo@xxxxxxx> Cc: Arjan van de Ven <arjan@xxxxxxxxxxxxx> Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/rwsem.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN kernel/rwsem.c~lockdep-treats-down_write_trylock-like-regular-down_write kernel/rwsem.c --- a/kernel/rwsem.c~lockdep-treats-down_write_trylock-like-regular-down_write +++ a/kernel/rwsem.c @@ -60,7 +60,7 @@ int down_write_trylock(struct rw_semapho int ret = __down_write_trylock(sem); if (ret == 1) - rwsem_acquire(&sem->dep_map, 0, 0, _RET_IP_); + rwsem_acquire(&sem->dep_map, 0, 1, _RET_IP_); return ret; } _ Patches currently in -mm which might be from xemul@xxxxx are lockdep-treats-down_write_trylock-like-regular-down_write.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html