git.openpandora.org
/
pandora-kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
12a7ad3
)
zram: protect sysfs handler from invalid memory access
author
Jiang Liu
<liuj97@gmail.com>
Thu, 6 Jun 2013 16:07:27 +0000
(
00:07
+0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 6 Jun 2013 19:12:20 +0000
(12:12 -0700)
Use zram->init_lock to protect access to zram->meta, otherwise it
may cause invalid memory access if zram->meta has been freed by
zram_reset_device().
This issue may be triggered by:
Thread 1:
while true; do cat mem_used_total; done
Thread 2:
while true; do echo 8M > disksize; echo 1 > reset; done
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/zram/zram_sysfs.c
patch
|
blob
|
history
diff --cc
drivers/staging/zram/zram_sysfs.c
Simple merge