All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] pstore: check PSTORE_FLAGS_FRAGILE in pstore_unregister
@ 2015-10-23 14:56 Geliang Tang
  2015-10-23 14:56   ` Geliang Tang
  2015-10-23 16:54 ` [PATCH 1/2] pstore: check PSTORE_FLAGS_FRAGILE in pstore_unregister Kees Cook
  0 siblings, 2 replies; 5+ messages in thread
From: Geliang Tang @ 2015-10-23 14:56 UTC (permalink / raw)
  To: Anton Vorontsov, Colin Cross, Kees Cook, Tony Luck
  Cc: Geliang Tang, linux-kernel

When PSTORE_FLAGS_FRAGILE flag is set, only kmsg is registered in
pstore_register. So, under these circumstances, only kmsg needs to
be unregistered in pstore_unregister.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 fs/pstore/platform.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
index 0aab920..7ad2038 100644
--- a/fs/pstore/platform.c
+++ b/fs/pstore/platform.c
@@ -496,9 +496,12 @@ 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();
-- 
2.5.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-10-25  2:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-23 14:56 [PATCH 1/2] pstore: check PSTORE_FLAGS_FRAGILE in pstore_unregister Geliang Tang
2015-10-23 14:56 ` [PATCH 2/2] efi-pstore: implement efivars_pstore_exit() Geliang Tang
2015-10-23 14:56   ` Geliang Tang
2015-10-23 16:54 ` [PATCH 1/2] pstore: check PSTORE_FLAGS_FRAGILE in pstore_unregister Kees Cook
2015-10-25  2:22   ` Geliang Tang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.