projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39a9b8a
)
zram: avoid double free in function zram_bvec_write()
author
Jiang Liu
<liuj97@gmail.com>
Thu, 6 Jun 2013 16:07:25 +0000
(
00:07
+0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 6 Jun 2013 19:12:20 +0000
(12:12 -0700)
When doing a patial write and the whole page is filled with zero,
zram_bvec_write() will free uncmem twice.
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_drv.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/staging/zram/zram_drv.c
b/drivers/staging/zram/zram_drv.c
index 3335a6ce1784986cdb6e48c7c1dc1850107b4d78..f7603617db750e1210decd8f7b2f19d994d7f4ed 100644
(file)
--- a/
drivers/staging/zram/zram_drv.c
+++ b/
drivers/staging/zram/zram_drv.c
@@
-272,8
+272,6
@@
static int zram_bvec_write(struct zram *zram, struct bio_vec *bvec, u32 index,
if (page_zero_filled(uncmem)) {
kunmap_atomic(user_mem);
- if (is_partial_io(bvec))
- kfree(uncmem);
zram->stats.pages_zero++;
zram_set_flag(meta, index, ZRAM_ZERO);
ret = 0;