summaryrefslogtreecommitdiffstats
path: root/fs/pstore/internal.h
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2020-05-04 19:46:53 -0700
committerKees Cook <keescook@chromium.org>2020-05-30 10:34:02 -0700
commit609e28bb139e53621521130f0d4aea27a725d465 (patch)
tree83baf007e546d152d1a474b4e3f4e775ab06c011 /fs/pstore/internal.h
parent78c83c828c043f2e18929137c1e218e8977349b1 (diff)
downloadlinux-609e28bb139e53621521130f0d4aea27a725d465.tar.gz
linux-609e28bb139e53621521130f0d4aea27a725d465.tar.bz2
linux-609e28bb139e53621521130f0d4aea27a725d465.zip
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>
Diffstat (limited to 'fs/pstore/internal.h')
-rw-r--r--fs/pstore/internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/pstore/internal.h b/fs/pstore/internal.h
index fe5f7ef7323f..8efd72d93b10 100644
--- a/fs/pstore/internal.h
+++ b/fs/pstore/internal.h
@@ -31,6 +31,7 @@ extern void pstore_set_kmsg_bytes(int);
extern void pstore_get_records(int);
extern void pstore_get_backend_records(struct pstore_info *psi,
struct dentry *root, int quiet);
+extern int pstore_put_backend_records(struct pstore_info *psi);
extern int pstore_mkfile(struct dentry *root,
struct pstore_record *record);
extern void pstore_record_init(struct pstore_record *record,