<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/watchdog/watchdog_dev.c, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2018-10-02T11:32:24Z</updated>
<entry>
<title>watchdog: core: fix null pointer dereference when releasing cdev</title>
<updated>2018-10-02T11:32:24Z</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa+renesas@sang-engineering.com</email>
</author>
<published>2018-08-28T10:13:47Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=953b9dd7725bad55a922a35e75bff7bebf7b9978'/>
<id>urn:sha1:953b9dd7725bad55a922a35e75bff7bebf7b9978</id>
<content type='text'>
watchdog_stop() calls watchdog_update_worker() which needs a valid
wdd-&gt;wd_data pointer. So, when unregistering the cdev, clear the
pointers after we call watchdog_stop(), not before.

Fixes: bb292ac1c602 ("watchdog: Introduce watchdog_stop_on_unregister helper")
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Reviewed-by: Fabrizio Castro &lt;fabrizio.castro@bp.renesas.com&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@linux-watchdog.org&gt;
</content>
</entry>
<entry>
<title>watchdog: core: make sure the watchdog_worker is not deferred</title>
<updated>2018-01-21T11:44:59Z</updated>
<author>
<name>Christophe Leroy</name>
<email>christophe.leroy@c-s.fr</email>
</author>
<published>2018-01-18T11:11:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1ff688209e2ed23f699269b9733993e2ce123fd2'/>
<id>urn:sha1:1ff688209e2ed23f699269b9733993e2ce123fd2</id>
<content type='text'>
commit 4cd13c21b207e ("softirq: Let ksoftirqd do its job") has the
effect of deferring timer handling in case of high CPU load, hence
delaying the delayed work allthought the worker is running which
high realtime priority.

As hrtimers are not managed by softirqs, this patch replaces the
delayed work by a plain work and uses an hrtimer to schedule that work.

Signed-off-by: Christophe Leroy &lt;christophe.leroy@c-s.fr&gt;
Reviewed-by: Guenter Roeck &lt;Linux@roeck-us.net&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@iguana.be&gt;
</content>
</entry>
<entry>
<title>watchdog: core: make sure the watchdog worker always works</title>
<updated>2017-12-28T19:45:57Z</updated>
<author>
<name>Christophe Leroy</name>
<email>christophe.leroy@c-s.fr</email>
</author>
<published>2017-12-08T10:18:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=38a1222ae4f364d5bd5221fe305dbb0889f45d15'/>
<id>urn:sha1:38a1222ae4f364d5bd5221fe305dbb0889f45d15</id>
<content type='text'>
When running a command like 'chrt -f 50 dd if=/dev/zero of=/dev/null',
the watchdog_worker fails to service the HW watchdog and the
HW watchdog fires long before the watchdog soft timeout.

At the moment, the watchdog_worker is invoked as a delayed work.
Delayed works are handled by non realtime kernel threads. The
WQ_HIGHPRI flag only increases the niceness of that threads.

This patch replaces the delayed work logic by kthread delayed work,
and sets the associated kernel task to SCHED_FIFO with the highest
priority, in order to ensure that the watchdog worker will run as
soon as possible.

Signed-off-by: Christophe Leroy &lt;christophe.leroy@c-s.fr&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@iguana.be&gt;
</content>
</entry>
<entry>
<title>watchdog: watchdog_dev: mark expected switch fall-through</title>
<updated>2017-12-28T19:45:30Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>garsilva@embeddedor.com</email>
</author>
<published>2017-11-03T23:03:27Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e2af3092d05a814d670a045df983fcefb18e7c14'/>
<id>urn:sha1:e2af3092d05a814d670a045df983fcefb18e7c14</id>
<content type='text'>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Notice that in this particular case I replaced "Fall" with a proper
"fall through" comment, which is what GCC is expecting to find.

Signed-off-by: Gustavo A. R. Silva &lt;garsilva@embeddedor.com&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@iguana.be&gt;
</content>
</entry>
<entry>
<title>watchdog: Fix kref imbalance seen if handle_boot_enabled=0</title>
<updated>2017-12-17T10:01:48Z</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2017-09-25T16:17:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=914d65f3f013ba2556c7beec5d3baac7b3292504'/>
<id>urn:sha1:914d65f3f013ba2556c7beec5d3baac7b3292504</id>
<content type='text'>
If handle_boot_enabled is set to 0, the watchdog driver module use
counter will not be increased and kref_get() will not be called when
registering the watchdog. Subsequently, on open, this does not happen
either because the code believes that it was already done because the
hardware watchdog is marked as running.

We could introduce a state variable to indicate this state, but let's
just increase the module use counter and call kref_get() unconditionally
if the hardware watchdog is running when a driver is registering itself
to keep the code simple.

Fixes: 2501b015313fe ("watchdog: core: add option to avoid early ...")
Cc: Sebastian Reichel &lt;sebastian.reichel@collabora.co.uk&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@iguana.be&gt;
</content>
</entry>
<entry>
<title>watchdog: Fix potential kref imbalance when opening watchdog</title>
<updated>2017-12-17T10:01:47Z</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2017-09-25T16:17:01Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4bcd615fad6adddc68b058d498b30a9e0e0db77a'/>
<id>urn:sha1:4bcd615fad6adddc68b058d498b30a9e0e0db77a</id>
<content type='text'>
If a watchdog driver's open function sets WDOG_HW_RUNNING with the
expectation that the watchdog can not be stopped, but then stops the
watchdog anyway in its stop function, kref_get() wil not be called in
watchdog_open(). If the watchdog then stops on close, WDOG_HW_RUNNING
will be cleared and kref_put() will be called, causing a kref imbalance.
As result the character device data structure will be released, which in
turn will cause the system to crash on the next call to watchdog_open().

Fixes: ee142889e32f5 ("watchdog: Introduce WDOG_HW_RUNNING flag")
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@iguana.be&gt;
</content>
</entry>
<entry>
<title>drivers/watchdog: make use of devm_register_reboot_notifier()</title>
<updated>2017-11-18T00:10:04Z</updated>
<author>
<name>Andrey Smirnov</name>
<email>andrew.smirnov@gmail.com</email>
</author>
<published>2017-11-17T23:31:01Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=44ea39420fc95e7432ddc91de4eb58c7470ab897'/>
<id>urn:sha1:44ea39420fc95e7432ddc91de4eb58c7470ab897</id>
<content type='text'>
Save a bit of cleanup code by leveraging newly added
devm_register_reboot_notifier().

[akpm@linux-foundation.org: small cleanup: avoid 80-col tricks]
Link: http://lkml.kernel.org/r/20170411160615.9784-1-andrew.smirnov@gmail.com
Signed-off-by: Andrey Smirnov &lt;andrew.smirnov@gmail.com&gt;
Acked-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Cc: Chris Healy &lt;cphealy@gmail.com&gt;
Cc: Wim Van Sebroeck &lt;wim@iguana.be&gt;
Cc: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>watchdog: introduce watchdog_worker_should_ping helper</title>
<updated>2017-07-03T11:59:05Z</updated>
<author>
<name>Rasmus Villemoes</name>
<email>rasmus.villemoes@prevas.dk</email>
</author>
<published>2017-05-30T08:56:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c013b65ad8a1e132f733404809afc72f7d00e768'/>
<id>urn:sha1:c013b65ad8a1e132f733404809afc72f7d00e768</id>
<content type='text'>
This will be useful when the condition becomes slightly more
complicated in the next patch.

Signed-off-by: Rasmus Villemoes &lt;rasmus.villemoes@prevas.dk&gt;
Reviewed-by: Esben Haabendal &lt;esben@haabendal.dk&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@iguana.be&gt;
</content>
</entry>
<entry>
<title>watchdog: core: add option to avoid early handling of watchdog</title>
<updated>2017-06-05T18:55:17Z</updated>
<author>
<name>Sebastian Reichel</name>
<email>sebastian.reichel@collabora.co.uk</email>
</author>
<published>2017-05-12T12:05:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2501b015313fe2fa40ed11fa4dd1748e09b7c773'/>
<id>urn:sha1:2501b015313fe2fa40ed11fa4dd1748e09b7c773</id>
<content type='text'>
On some systems its desirable to have watchdog reboot the system
when it does not come up fast enough. This adds a kernel parameter
to disable the auto-update of watchdog before userspace takes over
and a kernel option to set the default. The info messages were
added to shorten error searching on misconfigured systems.

Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.co.uk&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@iguana.be&gt;
</content>
</entry>
<entry>
<title>watchdog: Introduce watchdog_stop_on_unregister helper</title>
<updated>2017-02-24T22:00:23Z</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2017-01-25T22:21:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bb292ac1c6028344013309a309b44dc691581825'/>
<id>urn:sha1:bb292ac1c6028344013309a309b44dc691581825</id>
<content type='text'>
Many watchdog drivers explicitly stop the watchdog when unregistering it.
While it is unclear if this is actually needed (the whatdog should not be
running at that time if it can be stopped), introduce a helper to
explicitly stop the watchdog in the watchdog core when unregistering it.
This helps reducing driver code size while retaining functionality.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
</feed>
