]> git.baikalelectronics.ru Git - kernel.git/commit
pstore: Remove filesystem records when backend is unregistered
authorKees Cook <keescook@chromium.org>
Tue, 5 May 2020 02:46:53 +0000 (19:46 -0700)
committerKees Cook <keescook@chromium.org>
Sat, 30 May 2020 17:34:02 +0000 (10:34 -0700)
commite0d98a02fcfc82aeb47201391ef1a35c52782671
tree83baf007e546d152d1a474b4e3f4e775ab06c011
parent5e7f971ece84fd233cb7ebe8341228c541de1550
pstore: Remove filesystem records when backend is unregistered

If a backend was unloaded without having first removed all its
associated records in pstorefs, subsequent removals would crash while
attempting to call into the now missing backend. Add automatic removal
from the tree in pstore_unregister(), so that no references to the
backend remain.

Reported-by: Luis Henriques <lhenriques@suse.com>
Link: https://lore.kernel.org/lkml/87o8yrmv69.fsf@suse.com
Link: https://lore.kernel.org/lkml/20200506152114.50375-11-keescook@chromium.org/
Signed-off-by: Kees Cook <keescook@chromium.org>
fs/pstore/inode.c
fs/pstore/internal.h
fs/pstore/platform.c