Re: [PATCH] w1: Introduce a slave mutex for serializing IO.

From: Evgeniy Polyakov
Date: Mon May 14 2012 - 21:26:32 EST


On Wed, May 09, 2012 at 11:43:49AM +1000, NeilBrown (neilb@xxxxxxx) wrote:
> However lockdep didn't like it. There are ordering problems between this
> mutex and and sysfs's s_active.
>
> When you access battery properies via sysfs, the sysfs lock is taken first,
> then the master->mutex.
> When w1_reconnect_slaves calls through to device_del and sys_addrm_finish,
> the mutex is held while the sysfs lock is wanted.

I only came to idea of not allowing sysfs in ->probe() and instead
introduce new callback, which will initialize 'external' to w1 core
parts without holding master's mutex

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