lkml.org 
[lkml]   [2009]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 25/20] sysfs: Only support removing emtpy sysfs directories.
Alan Stern <stern@rowland.harvard.edu> writes:

> There's another point to consider. If you do accept my argument that
> empty targets can be removed from visibility regardless of the host's
> state, then this removal races with addition of a new child. Since
> removal involves calling device_del(), it can't be protected by the
> host lock. Instead we'd have to use a mutex to protect both target
> addition and target removal.

Careful. Holding a lock over device_del is an easy and hidden way
to trigger a rare deadlocks.

Eric


\
 
 \ /
  Last update: 2009-05-28 17:49    [W:0.244 / U:1.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site