lkml.org 
[lkml]   [2006]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch] inotify: fix deadlock found by lockdep
From
Date
On Mon, 2006-07-24 at 19:21 +0200, Arjan van de Ven wrote:

> inotify_dev_queue_event schedules a kernel_event which does a
> kmem_cache_alloc( , GFP_KERNEL) which may try to shrink slabs, including
> the inode cache .. which then takes iprune_mutex.
>
> And voila, there is an AB, a BC, a CD relationship (even a direct BCD),
> and also now a DA relationship -> a circular type AB-BA deadlock but
> involving 4 locks.
>
> The solution is simple: kernel_event() is NOT allowed to use GFP_KERNEL,
> but must use GFP_NOFS to not cause recursion into the VFS.
>
> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>

Nice catch.

Signed-off-by: Robert Love <rml@novell.com>

Robert Love


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-07-25 00:11    [W:0.097 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site