mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-05-24 10:39:52 +00:00
ramoops: Only unregister when registered
While none of the "fragile" pstore backends unregister yet, if they ever did, the unregistering code for the non-dump targets might get confused. This adds a check for fragile backends on unregister. Signed-off-by: Kees Cook <keescook@chromium.org>
This commit is contained in:
parent
1a695a905c
commit
a1db8060f5
1 changed files with 5 additions and 3 deletions
|
@ -497,9 +497,11 @@ EXPORT_SYMBOL_GPL(pstore_register);
|
|||
|
||||
void pstore_unregister(struct pstore_info *psi)
|
||||
{
|
||||
pstore_unregister_pmsg();
|
||||
pstore_unregister_ftrace();
|
||||
pstore_unregister_console();
|
||||
if ((psi->flags & PSTORE_FLAGS_FRAGILE) == 0) {
|
||||
pstore_unregister_pmsg();
|
||||
pstore_unregister_ftrace();
|
||||
pstore_unregister_console();
|
||||
}
|
||||
pstore_unregister_kmsg();
|
||||
|
||||
free_buf_for_compression();
|
||||
|
|
Loading…
Add table
Reference in a new issue