]> git.baikalelectronics.ru Git - kernel.git/commit
watchdog: softdog: fire watchdog even if softirqs do not get to run
authorNiklas Cassel <niklas.cassel@axis.com>
Mon, 27 Feb 2017 12:49:09 +0000 (13:49 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 1 Mar 2017 14:15:10 +0000 (06:15 -0800)
commitd4c1c7fb36656f5dbeea59f554f88f0f7f45ab8b
tree0646924cdfd71e4e00a59924061c52e79b8560f1
parentffc9b148f37b33befe544f7f3db9f41dad9fed9d
watchdog: softdog: fire watchdog even if softirqs do not get to run

Checking for timer expiration is done from the softirq TIMER_SOFTIRQ.

Since commit c3ac641d3f61 ("softirq: Let ksoftirqd do its job"),
pending softirqs are no longer always handled immediately, instead,
if there are pending softirqs, and ksoftirqd is in state TASK_RUNNING,
the handling of the softirqs are deferred, and are instead supposed
to be handled by ksoftirqd, when ksoftirqd gets scheduled.

If a user space process with a real-time policy starts to misbehave
by never relinquishing the CPU while ksoftirqd is in state TASK_RUNNING,
what will happen is that all softirqs will get deferred, while ksoftirqd,
which is supposed to handle the deferred softirqs, will never get to run.

To make sure that the watchdog is able to fire even when we do not get
to run softirqs, replace the timers with hrtimers.

Signed-off-by: Niklas Cassel <niklas.cassel@axis.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/watchdog/softdog.c