* [PATCH] pstore/dump: solution pstore data abort.
@ 2016-11-05 2:15 Li Pengcheng
2016-11-09 0:44 ` Kees Cook
0 siblings, 1 reply; 2+ messages in thread
From: Li Pengcheng @ 2016-11-05 2:15 UTC (permalink / raw)
To: anton, ccross, keescook, tony.luck, linux-kernel, liuhailong5
Cc: lipengcheng8, lizhong11, liuyongfu, dan.zhao, suzhuangluan
If not return,data abort will happen
when two threads call pstore_dump at the same time.
Signed-off-by: Liu Hailong <liuhailong5@huawei.com>
Signed-off-by: Li Pengcheng <lipengcheng8@huawei.com>
Signed-off-by: Li Zhong <lizhong11@hisilicon.com>
---
fs/pstore/platform.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
index 14984d9..60e6db6 100644
--- a/fs/pstore/platform.c
+++ b/fs/pstore/platform.c
@@ -493,6 +493,7 @@ static void pstore_dump(struct kmsg_dumper *dumper,
if (!is_locked) {
pr_err("pstore dump routine blocked in %s path, may corrupt error record\n"
, in_nmi() ? "NMI" : why);
+ return;
}
} else {
spin_lock_irqsave(&psinfo->buf_lock, flags);
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] pstore/dump: solution pstore data abort.
2016-11-05 2:15 [PATCH] pstore/dump: solution pstore data abort Li Pengcheng
@ 2016-11-09 0:44 ` Kees Cook
0 siblings, 0 replies; 2+ messages in thread
From: Kees Cook @ 2016-11-09 0:44 UTC (permalink / raw)
To: Li Pengcheng
Cc: Anton Vorontsov, Colin Cross, Tony Luck, LKML, liuhailong5,
lizhong11, liuyongfu, dan.zhao, suzhuangluan
On Fri, Nov 4, 2016 at 7:15 PM, Li Pengcheng <lipengcheng8@huawei.com> wrote:
> If not return,data abort will happen
> when two threads call pstore_dump at the same time.
>
> Signed-off-by: Liu Hailong <liuhailong5@huawei.com>
> Signed-off-by: Li Pengcheng <lipengcheng8@huawei.com>
> Signed-off-by: Li Zhong <lizhong11@hisilicon.com>
> ---
> fs/pstore/platform.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
> index 14984d9..60e6db6 100644
> --- a/fs/pstore/platform.c
> +++ b/fs/pstore/platform.c
> @@ -493,6 +493,7 @@ static void pstore_dump(struct kmsg_dumper *dumper,
> if (!is_locked) {
> pr_err("pstore dump routine blocked in %s path, may corrupt error record\n"
> , in_nmi() ? "NMI" : why);
> + return;
> }
> } else {
> spin_lock_irqsave(&psinfo->buf_lock, flags);
> --
> 1.9.1
Ah, thanks! I've queued this for -next.
-Kees
--
Kees Cook
Nexus Security
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-09 0:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-05 2:15 [PATCH] pstore/dump: solution pstore data abort Li Pengcheng
2016-11-09 0:44 ` Kees Cook
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).