Patch "dm thin: fix race condition when destroying thin pool workqueue" has been added to the 3.14-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
dm thin: fix race condition when destroying thin pool workqueue
to the 3.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
dm-thin-fix-race-condition-when-destroying-thin-pool-workqueue.patch
and it can be found in the queue-3.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
18d03e8c25f173f4107a40d0b8c24defb6ed69f3Mon Sep 17 00:00:00 2001
From: Nikolay Borisov <[email protected]>
Date: Thu, 17 Dec 2015 18:03:35 +0200
Subject: dm thin: fix race condition when destroying thin pool workqueue
From: Nikolay Borisov <[email protected]>
commit 18d03e8c25f173f4107a40d0b8c24defb6ed69f3 upstream.
When a thin pool is being destroyed delayed work items are cancelled using cancel_delayed_work(), which doesn't guarantee that on return the delayed item isn't running. This can cause the work item to requeue itself on an already destroyed workqueue. Fix this by using cancel_delayed_work_sync() which guarantees that on return the work item is not running anymore.
--- drivers/md/dm-thin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/md/dm-thin.c +2 -2
@@ -2568,8 +2568,8 @@ static void pool_postsuspend(struct dm_tstruct pool_c *pt = ti->private;struct pool *pool = pt->pool; -cancel_delayed_work (&pool->waker); -cancel_delayed_work (&pool->no_space_timeout); +cancel_delayed_work_sync (&pool->waker); +cancel_delayed_work_sync (&pool->no_space_timeout);flush_workqueue (pool->wq); (void )commit (pool); }
Patches currently in stable-queue which might be from [email protected] are
queue-3.14/dm-thin-fix-race-condition-when-destroying-thin-pool-workqueue.patch