Skip to content

Commit

Permalink
pstore: do not use message compression without lock
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Tony Luck <[email protected]>
  • Loading branch information
koct9i authored and aegl committed May 21, 2015
1 parent e260818 commit f0e2efc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/pstore/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f0e2efc

Please sign in to comment.