]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
workqueue: implicit ordered attribute should be overridable
authorTejun Heo <tj@kernel.org>
Sun, 23 Jul 2017 12:36:15 +0000 (08:36 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Aug 2017 15:33:59 +0000 (08:33 -0700)
commita799f35e52b5749b5fb7b4314b42dcd7315a908d
tree086451651d3ca81413d2d594de0e2bdccfde6a63
parent644b39ef65ae7df632e0c0105ac2d4d2dd64a09f
workqueue: implicit ordered attribute should be overridable

commit 0a94efb5acbb6980d7c9ab604372d93cd507e4d8 upstream.

5c0338c68706 ("workqueue: restore WQ_UNBOUND/max_active==1 to be
ordered") automatically enabled ordered attribute for unbound
workqueues w/ max_active == 1.  Because ordered workqueues reject
max_active and some attribute changes, this implicit ordered mode
broke cases where the user creates an unbound workqueue w/ max_active
== 1 and later explicitly changes the related attributes.

This patch distinguishes explicit and implicit ordered setting and
overrides from attribute changes if implict.

Signed-off-by: Tejun Heo <tj@kernel.org>
Fixes: 5c0338c68706 ("workqueue: restore WQ_UNBOUND/max_active==1 to be ordered")
Cc: Holger Hoffstätte <holger@applied-asynchrony.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/workqueue.h
kernel/workqueue.c