diff options
author | Konstantin Khlebnikov <khlebnikov@yandex-team.ru> | 2015-05-21 12:26:19 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2015-05-21 12:26:19 -0400 |
commit | f0e2efcfd271733119cfe499f5811968544cbe7b (patch) | |
tree | 7498547b41f58762556ce447684ba96fc8cfba1d | |
parent | e26081808edadfd257c6c9d81014e3b25e9a6118 (diff) |
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>
-rw-r--r-- | fs/pstore/platform.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, | |||
299 | bool compressed; | 299 | bool compressed; |
300 | size_t total_len; | 300 | size_t total_len; |
301 | 301 | ||
302 | if (big_oops_buf) { | 302 | if (big_oops_buf && is_locked) { |
303 | dst = big_oops_buf; | 303 | dst = big_oops_buf; |
304 | hsize = sprintf(dst, "%s#%d Part%u\n", why, | 304 | hsize = sprintf(dst, "%s#%d Part%u\n", why, |
305 | oopscount, part); | 305 | oopscount, part); |