[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <ab909fa2d2e97904b4cf34df79998548a153dd9c.1445611895.git.geliangtang@163.com>
Date: Fri, 23 Oct 2015 22:56:22 +0800
From: Geliang Tang <geliangtang@....com>
To: Anton Vorontsov <anton@...msg.org>,
Colin Cross <ccross@...roid.com>,
Kees Cook <keescook@...omium.org>,
Tony Luck <tony.luck@...el.com>
Cc: Geliang Tang <geliangtang@....com>, linux-kernel@...r.kernel.org
Subject: [PATCH 1/2] pstore: check PSTORE_FLAGS_FRAGILE in pstore_unregister
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@....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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists