From: Li Pengcheng Date: Sat, 5 Nov 2016 02:15:59 +0000 (+0800) Subject: pstore: Actually give up during locking failure X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=959217c84c27;p=linux.git pstore: Actually give up during locking failure Without a return after the pr_err(), dumps will collide when two threads call pstore_dump() at the same time. Signed-off-by: Liu Hailong Signed-off-by: Li Pengcheng Signed-off-by: Li Zhong [kees: improved commit message] Signed-off-by: Kees Cook --- diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c index 14984d902a992..60e6db6f5da2b 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);