linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pstore: do not use message compression without lock
@ 2015-04-21 11:32 Konstantin Khlebnikov
  2015-05-14 16:00 ` Konstantin Khlebnikov
  0 siblings, 1 reply; 3+ messages in thread
From: Konstantin Khlebnikov @ 2015-04-21 11:32 UTC (permalink / raw)
  To: Tony Luck, Anton Vorontsov, linux-kernel, Kees Cook, Colin Cross

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>
---
 fs/pstore/platform.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-05-21 16:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-21 11:32 [PATCH] pstore: do not use message compression without lock Konstantin Khlebnikov
2015-05-14 16:00 ` Konstantin Khlebnikov
2015-05-21 16:30   ` Luck, Tony

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).