[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20120610205855.GD4380@ioremap.net>
Date: Mon, 11 Jun 2012 00:58:55 +0400
From: Evgeniy Polyakov <zbr@...emap.net>
To: NeilBrown <neilb@...e.de>
Cc: linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH] w1: Introduce a slave mutex for serializing IO.
Hi
Sorry for *that* long delay, this mail was somehow dropped.
On Fri, May 18, 2012 at 04:05:07PM +1000, NeilBrown (neilb@...e.de) wrote:
> So to avoid deadlocks between w1 slaves and sysfs, these must be
> two separate locks. Making them separate means that the work around
> in ds2780 and ds2781 can be removed.
>
> So this patch:
> - adds a new mutex: "bus_mutex" which serialises access to the bus.
> - takes mutex in w1_search and ds1wm_search while they access
> the bus for searching. The mutex is dropped before calling the
> callback which adds the slave.
> - changes all slaves to use bus_mutex instead of mutex to
> protect access to the bus
> - removes w1_ds2790_io_nolock and w1_ds2781_io_nolock, and the
> related code from drivers/power/ds278[01]_battery.c which
> calls them.
Greg, can you put it into the tree when merge window opens (sorry, I do
not really know release cycle dates). Since other drivers basically are
not affected (only mutex name changed for them), it should be ok, but
this new feature should be told for all new device.
Also if deadlock will be caught somewhere in w1 in current tree (which
is possible, although unlikely - w1 users are usually embedded devices
where new sysfs files are created only at startup time), we can direct
authors to this thread.
> Signed-off-by: NeilBrown <neilb@...e.de>
Acked-by: Evgeniy Polyakov <zbr@...emap.net>
--
Evgeniy Polyakov
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists