Patch "watchdog: core: Fix circular locking dependency" has been added to the 4.6-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
watchdog: core: Fix circular locking dependency
to the 4.6-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:
watchdog-core-fix-circular-locking-dependency.patch
and it can be found in the queue-4.6 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
e1f30282a1d3d0c75d5a08e47c6ac1563065be52Mon Sep 17 00:00:00 2001
From: Guenter Roeck <[email protected]>
Date: Thu, 21 Apr 2016 07:38:14 -0700
Subject: watchdog: core: Fix circular locking dependency
From: Guenter Roeck <[email protected]>
commit e1f30282a1d3d0c75d5a08e47c6ac1563065be52 upstream.
lockdep reports the following circular locking dependency.
======================================================
INFO: possible circular locking dependency detected ]
4.6.0-rc3-00191-gfabf418 #162 Not tainted
-------------------------------------------------------
systemd/1 is trying to acquire lock:
((&(&wd_data->work)->work)){+.+...}, at: [<80141650>] flush_work+0x0/0x280
but task is already holding lock:
(&wd_data->lock){+.+...}, at: [<804acfa8>] watchdog_release+0x18/0x190
which lock already depends on the new lock. the existing dependency chain (in reverse order) is:
-> #1 (&wd_data->lock){+.+...}:
[<80662310>] mutex_lock_nested+0x64/0x4a8 [<804aca4c>] watchdog_ping_work+0x18/0x4c [<80143128>] process_one_work+0x1ac/0x500 [<801434b4>] worker_thread+0x38/0x554 [<80149510>] kthread+0xf4/0x108 [<80107c10>] ret_from_fork+0x14/0x24
-> #0 ((&(&wd_data->work)->work)){+.+...}:
[<8017c4e8>] lock_acquire+0x70/0x90 [<8014169c>] flush_work+0x4c/0x280 [<801440f8>] __cancel_work_timer+0x9c/0x1e0 [<804acfcc>] watchdog_release+0x3c/0x190 [<8022c5e8>] __fput+0x80/0x1c8 [<80147b28>] task_work_run+0x94/0xc8 [<8010b998>] do_work_pending+0x8c/0xb4 [<80107ba8>] slow_work_pending+0xc/0x20
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&wd_data->lock);
lock((&(&wd_data->work)->work));
lock(&wd_data->lock);lock((&(&wd_data->work)->work));
--- drivers/watchdog/watchdog_dev.c | 1 - 1 file changed, 1 deletion(-)
drivers/watchdog/watchdog_dev.c +0 -1
@@ -736,7 +736,6 @@ static int watchdog_release(struct inodewatchdog_ping (wdd); } -cancel_delayed_work_sync (&wd_data->work);watchdog_update_worker (wdd);/* make sure that /dev/watchdog can be re-opened */
Patches currently in stable-queue which might be from [email protected] are
queue-4.6/watchdog-core-fix-circular-locking-dependency.patch queue-4.6/watchdog-sp5100_tco-properly-check-for-new-register-layouts.patch