aboutsummaryrefslogtreecommitdiffstats
path: root/Kconfig
diff options
context:
space:
mode:
authorLai Jiangshan <laijs@cn.fujitsu.com>2013-07-24 18:31:42 +0800
committerTejun Heo <tj@kernel.org>2013-07-24 12:24:25 -0400
commitc2fda509667b0fda4372a237f5a59ea4570b1627 (patch)
tree27ba4e2f32cdd58e2f6f2cfa694f25afe7020e35 /Kconfig
parentad81f0545ef01ea651886dddac4bef6cec930092 (diff)
downloadkernel_goldelico_gta04-c2fda509667b0fda4372a237f5a59ea4570b1627.zip
kernel_goldelico_gta04-c2fda509667b0fda4372a237f5a59ea4570b1627.tar.gz
kernel_goldelico_gta04-c2fda509667b0fda4372a237f5a59ea4570b1627.tar.bz2
workqueue: allow work_on_cpu() to be called recursively
If the @fn call work_on_cpu() again, the lockdep will complain: > [ INFO: possible recursive locking detected ] > 3.11.0-rc1-lockdep-fix-a #6 Not tainted > --------------------------------------------- > kworker/0:1/142 is trying to acquire lock: > ((&wfc.work)){+.+.+.}, at: [<ffffffff81077100>] flush_work+0x0/0xb0 > > but task is already holding lock: > ((&wfc.work)){+.+.+.}, at: [<ffffffff81075dd9>] process_one_work+0x169/0x610 > > other info that might help us debug this: > Possible unsafe locking scenario: > > CPU0 > ---- > lock((&wfc.work)); > lock((&wfc.work)); > > *** DEADLOCK *** It is false-positive lockdep report. In this sutiation, the two "wfc"s of the two work_on_cpu() are different, they are both on stack. flush_work() can't be deadlock. To fix this, we need to avoid the lockdep checking in this case, thus we instroduce a internal __flush_work() which skip the lockdep. tj: Minor comment adjustment. Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Reported-by: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com> Reported-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'Kconfig')
0 files changed, 0 insertions, 0 deletions