summaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorWeijie Yang <weijie.yang@samsung.com>2014-10-29 22:50:57 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-30 00:33:15 +0100
commit5a99e95b8d1cd47f6feddcdca6c71d22060df8a2 (patch)
tree51384759dcfdc6e189139a5a58a5df7f6e16f56b /arch/sh
parentmm/slab_common: don't check for duplicate cache names (diff)
downloadlinux-5a99e95b8d1cd47f6feddcdca6c71d22060df8a2.tar.xz
linux-5a99e95b8d1cd47f6feddcdca6c71d22060df8a2.zip
zram: avoid NULL pointer access in concurrent situation
There is a rare NULL pointer bug in mem_used_total_show() and mem_used_max_store() in concurrent situation, like this: zram is not initialized, process A is a mem_used_total reader which runs periodically, while process B try to init zram. process A process B access meta, get a NULL value init zram, done init_done() is true access meta->mem_pool, get a NULL pointer BUG This patch fixes this issue. Signed-off-by: Weijie Yang <weijie.yang@samsung.com> Acked-by: Minchan Kim <minchan@kernel.org> Acked-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/sh')
0 files changed, 0 insertions, 0 deletions