[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YLY1V/dTMeo3RGZd@T590>
Date: Tue, 1 Jun 2021 21:25:43 +0800
From: Ming Lei <ming.lei@...hat.com>
To: Hannes Reinecke <hare@...e.de>
Cc: Jens Axboe <axboe@...nel.dk>, Christoph Hellwig <hch@....de>,
linux-block@...r.kernel.org,
Linux Kernel Mailinglist <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] block/genhd: use atomic_t for disk_event->block
On Tue, Jun 01, 2021 at 01:01:45PM +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.
Do you have lockdep warning on this 'deadlock'?
Executed immediately doesn't mean the work fn is run in the current
task context, and it is actually run in one wq worker(task) context, so
__queue_work() usually wakes up one wq worker for running the work fn,
then there shouldn't be the 'deadlock' you mentioned.
Thanks,
Ming
Powered by blists - more mailing lists