Re: [PATCHv2] block/genhd: use atomic_t for disk_event->block

From: Ming Lei
Date: Wed Jun 02 2021 - 02:47:42 EST


On Wed, Jun 02, 2021 at 08:20:15AM +0200, Hannes Reinecke wrote:
> __disk_unblock_events() will call queue_delayed_work() with a '0' argument
> under a spin lock. This might cause the queue_work item to be executed
> immediately, and run into a deadlock in disk_check_events() waiting for
> the lock to be released.

The above commit log isn't correct, and the current usage shouldn't cause such
deadlock, so can you root cause the task hang report[1] on 5.3.18?

[1] https://lore.kernel.org/linux-block/73783f6f-a3ec-907f-ea19-966e9d1457dc@xxxxxxx/T/#mcde381522bdb95740e04ced555ec017a25c993cc

Thanks,
Ming