Re: [PATCH 25/20] sysfs: Only support removing emtpy sysfs directories.

From: Eric W. Biederman
Date: Thu May 28 2009 - 11:45:56 EST

Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> 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.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at