Re: [PATCH 4/9] w1: ds28e04: use the bus mutex to talk on the bus

From: Krzysztof Kozlowski

Date: Fri Oct 30 2026 - 09:10:47 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, which was merged shortly afterwards, takes the mutex of the
> master in the callbacks of its eeprom and pio files 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: fbf7f7b4e2ae ("w1: Add 1-wire slave device driver for DS28E04-100")
> 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