Re: [PATCH v2] block: fix deadlock between sd_remove & sd_release

From: Bart Van Assche
Date: Tue Jul 23 2024 - 12:28:50 EST


On 7/22/24 2:16 AM, Yang Yang wrote:
SCSI does not set GD_OWNS_QUEUE, so QUEUE_FLAG_DYING is not set in
this scenario. This is a classic ABBA deadlock. To fix the deadlock,
make sure we don't try to acquire disk->open_mutex after freezing
the queue.

Signed-off-by: Yang Yang <yang.yang@xxxxxxxx>

Fixes: and Cc: stable tags are missing. Otherwise this patch looks fine
to me, hence:

Reviewed-by: Bart Van Assche <bvanassche@xxxxxxx>