[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4DD2CDE2.60604@kernel.dk>
Date: Tue, 17 May 2011 21:34:58 +0200
From: Jens Axboe <axboe@...nel.dk>
To: Tejun Heo <tj@...nel.org>
CC: Linus Torvalds <torvalds@...ux-foundation.org>,
Sitsofe Wheeler <sitsofe@...oo.com>,
Borislav Petkov <bp@...en8.de>, Meelis Roos <mroos@...ux.ee>,
Andrew Morton <akpm@...ux-foundation.org>,
Kay Sievers <kay.sievers@...y.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH UPDATED 2/3 v2.6.39-rc7] block: make disk_block_events()
properly wait for work cancellation
On 2011-05-17 17:47, Tejun Heo wrote:
> disk_block_events() should guarantee that the event work is not in
> flight on return and once blocked it shouldn't issue further
> cancellations.
>
> Because there was no synchronization between the first blocker doing
> cancel_delayed_work_sync() and the following blockers, the following
> blockers could finish before cancellation was complete, which broke
> both guarantees - event work could be in flight and cancellation could
> happen after return.
>
> This bug triggered WARN_ON_ONCE() in disk_clear_events() reported in
> bug#34662.
>
> https://bugzilla.kernel.org/show_bug.cgi?id=34662
>
> Fix it by adding an outer mutex which protects both block count
> manipulation and work cancellation.
>
> -v2: Use outer mutex instead of bit waitqueue per Linus.
Thanks, much cleaner indeed. I've rebased for-linus. BTW, this is patch
3/3, not 2/3. Had me confused for a while, the numbering on the initial
series was off as well.
I'll let this simmer until tomorrow, then send out the pull request.
--
Jens Axboe
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists