lkml.org 
[lkml]   [2007]   [Apr]   [9]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateMon, 09 Apr 2007 08:09:39 -0700
FromArjan van de Ven <>
SubjectRe: [PATCH] Lockdep treats down_write_trylock like regular down_write
Pavel Emelianov wrote:
> 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.

please show me why this is safe, especially if you intermix it with 
down_read()'s... like copy_to_user and co may do.

this feels like a very unsafe construct to me...
-
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: 2007-04-09 15:13    [from the cache]
©2003-2008