]> git.baikalelectronics.ru Git - kernel.git/commit
pstore: Do not leave timer disabled for next backend
authorKees Cook <keescook@chromium.org>
Wed, 6 May 2020 04:36:15 +0000 (21:36 -0700)
committerKees Cook <keescook@chromium.org>
Sat, 30 May 2020 17:34:02 +0000 (10:34 -0700)
commitd5411e84bca07a6ed2033446a004adb01600c9e4
tree216de382f5364dbb88e1691c2317346f44413ea2
parente362f9abfad760b81e528b963fbefaa0e1e71e3d
pstore: Do not leave timer disabled for next backend

The pstore.update_ms value was being disabled during pstore_unregister(),
which would cause any prior value to go unnoticed on the next
pstore_register(). Instead, just let del_timer() stop the timer, which
was always sufficient. This additionally refactors the timer reset code
and allows the timer to be enabled if the module parameter is changed
away from the default.

Link: https://lore.kernel.org/lkml/20200506152114.50375-10-keescook@chromium.org/
Signed-off-by: Kees Cook <keescook@chromium.org>
fs/pstore/platform.c