From: Lai Jiangshan Date: Tue, 19 May 2015 10:03:48 +0000 (+0800) Subject: workqueue: ensure attrs changes are properly synchronized X-Git-Tag: omap-for-v4.2/fixes-rc1^2~86^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4d3e2579756e3a5f4fbf8eac211f0696e253bcd;p=pandora-kernel.git workqueue: ensure attrs changes are properly synchronized Current modification to attrs via sysfs is not fully synchronized. Process A (change cpumask) | Process B (change numa affinity) wq_cpumask_store() | wq_sysfs_prep_attrs() | | apply_workqueue_attrs() apply_workqueue_attrs() | It results that the Process B's operation is totally reverted without any notification, it is a buggy behavior. So this patch moves wq_sysfs_prep_attrs() into the protection under wq_pool_mutex to ensure attrs changes are properly synchronized. Signed-off-by: Lai Jiangshan Signed-off-by: Tejun Heo --- Reading git-diff-tree failed