diff options
author | Lai Jiangshan <laijs@cn.fujitsu.com> | 2014-04-18 11:04:16 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-07 10:28:22 -0700 |
commit | 7b21cacc8bf8fda9822d63496fb38bc6def34046 (patch) | |
tree | a757daf5cd0f1a59673294c57409d460c5f2b6e1 /kernel/Kconfig.locks | |
parent | 65eefbee64455cb2f18a77be616ca1df10c95d6d (diff) |
workqueue: fix a possible race condition between rescuer and pwq-release
commit 77668c8b559e4fe2acf2a0749c7c83cde49a5025 upstream.
There is a race condition between rescuer_thread() and
pwq_unbound_release_workfn().
Even after a pwq is scheduled for rescue, the associated work items
may be consumed by any worker. If all of them are consumed before the
rescuer gets to them and the pwq's base ref was put due to attribute
change, the pwq may be released while still being linked on
@wq->maydays list making the rescuer dereference already freed pwq
later.
Make send_mayday() pin the target pwq until the rescuer is done with
it.
tj: Updated comment and patch description.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/Kconfig.locks')
0 files changed, 0 insertions, 0 deletions