提交 f0e2efcf 编写于 作者: K Konstantin Khlebnikov 提交者: Tony Luck

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: NKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: NTony Luck <tony.luck@intel.com>
上级 e2608180
...@@ -299,7 +299,7 @@ static void pstore_dump(struct kmsg_dumper *dumper, ...@@ -299,7 +299,7 @@ static void pstore_dump(struct kmsg_dumper *dumper,
bool compressed; bool compressed;
size_t total_len; size_t total_len;
if (big_oops_buf) { if (big_oops_buf && is_locked) {
dst = big_oops_buf; dst = big_oops_buf;
hsize = sprintf(dst, "%s#%d Part%u\n", why, hsize = sprintf(dst, "%s#%d Part%u\n", why,
oopscount, part); oopscount, part);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册