No description
Find a file
Wang Wensheng 6f733cb2e7 watchdog: Fix potential dereferencing of null pointer
A reboot notifier, which stops the WDT by calling the stop hook without
any check, would be registered when we set WDOG_STOP_ON_REBOOT flag.

Howerer we allow the WDT driver to omit the stop hook since commit
"d0684c8a93549" ("watchdog: Make stop function optional") and provide
a module parameter for user that controls the WDOG_STOP_ON_REBOOT flag
in commit 9232c80659 ("watchdog: Add stop_on_reboot parameter to
control reboot policy"). Together that commits make user potential to
insert a watchdog driver that don't provide a stop hook but with the
stop_on_reboot parameter set, then dereferencing of null pointer occurs
on system reboot.

Check the stop hook before registering the reboot notifier to fix the
issue.

Fixes: d0684c8a93 ("watchdog: Make stop function optional")
Signed-off-by: Wang Wensheng <wangwensheng4@huawei.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20201109130512.28121-1-wangwensheng4@huawei.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
2020-12-13 16:17:43 +01:00
arch Bugfixes for ARM, x86 and tools. 2020-12-12 10:08:16 -08:00
block block-5.10-2020-12-05 2020-12-05 14:45:30 -08:00
certs
crypto
Documentation Bugfixes for ARM, x86 and tools. 2020-12-12 10:08:16 -08:00
drivers watchdog: Fix potential dereferencing of null pointer 2020-12-13 16:17:43 +01:00
fs io_uring-5.10-2020-12-11 2020-12-12 09:45:01 -08:00
include xen: branch for v5.10-rc8 2020-12-12 10:02:03 -08:00
init initramfs: fix clang build failure 2020-12-11 14:02:14 -08:00
ipc
kernel bpf: Fix enum names for bpf_this_cpu_ptr() and bpf_per_cpu_ptr() helpers 2020-12-11 14:19:07 -08:00
lib selftest/fpu: avoid clang warning 2020-12-11 14:02:14 -08:00
LICENSES
mm mm/hugetlb: clear compound_nr before freeing gigantic pages 2020-12-11 14:02:14 -08:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf 2020-12-10 14:29:30 -08:00
samples Tracing fixes for 5.10-rc6 2020-12-01 15:30:18 -08:00
scripts Kbuild fixes for v5.10 (2nd) 2020-12-06 10:31:39 -08:00
security selinux/stable-5.10 PR 20201113 2020-11-14 12:04:02 -08:00
sound ALSA: hda/realtek: Add mute LED quirk to yet another HP x360 model 2020-11-28 10:00:51 +01:00
tools Bugfixes for ARM, x86 and tools. 2020-12-12 10:08:16 -08:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap mailmap: add two more addresses of Uwe Kleine-König 2020-12-06 10:19:07 -08:00
COPYING
CREDITS MAINTAINERS: Move Jason Cooper to CREDITS 2020-11-30 10:20:34 +01:00
Kbuild
Kconfig
MAINTAINERS Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-12-10 15:30:13 -08:00
Makefile Linux 5.10-rc7 2020-12-06 14:25:12 -08:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.