From f0e2efcfd271733119cfe499f5811968544cbe7b Mon Sep 17 00:00:00 2001 From: Konstantin Khlebnikov <khlebnikov@yandex-team.ru> Date: Thu, 21 May 2015 09:26:19 -0700 Subject: pstore: do not use message compression without lock pstore_compress() uses static stream buffer for zlib-deflate which easily crashes when several concurrent threads use one shared state. Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru> Signed-off-by: Tony Luck <tony.luck@intel.com> --- fs/pstore/platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs') diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c index c4c9a10c5760..de525ec0b490 100644 --- a/fs/pstore/platform.c +++ b/fs/pstore/platform.c @@ -299,7 +299,7 @@ static void pstore_dump(struct kmsg_dumper *dumper, bool compressed; size_t total_len; - if (big_oops_buf) { + if (big_oops_buf && is_locked) { dst = big_oops_buf; hsize = sprintf(dst, "%s#%d Part%u\n", why, oopscount, part); -- cgit v1.2.3