Re: [PATCH 5/9] w1: ds2805: use the bus mutex to talk on the bus

From: Krzysztof Kozlowski

Date: Fri Oct 30 2026 - 09:23:55 EST


On 27/10/2026 17:04, Greg Kroah-Hartman wrote:
> From: Josef Bacik <josef@xxxxxxxxxxxxxx>
>
> Since commit b02f8bede217 ("W1: split master mutex to avoid deadlocks.")
> the slave drivers serialise their accesses to the bus with bus_mutex.
> This driver takes the mutex of the master in the callbacks of its eeprom
> file instead.
>
> That mutex is held while a slave which has disappeared from the bus is
> removed, which waits for the sysfs callbacks of the slave to return. A
> callback which is waiting for the mutex at that moment never does: both
> tasks are stuck, and with them the thread of the bus master.
>
> Besides, it does not keep the other slave drivers off the bus, so that two
> transactions can get mixed up on the wire.
>
> Fixes: f6887531c0c6 ("drivers: w1: Add 1w slave driver for DS28E05 EEPROM")
> Cc: stable <stable@xxxxxxxxxx>
> Signed-off-by: Josef Bacik <josef@xxxxxxxxxxxxxx>
> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxxxxxxxx>

Best regards,
Krzysztof