[folded-merged] zram-extend-zero-pages-to-same-element-pages-fix.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: zram: do not free same element pages in zram_meta_free
has been removed from the -mm tree.  Its filename was
     zram-extend-zero-pages-to-same-element-pages-fix.patch

This patch was dropped because it was folded into zram-extend-zero-pages-to-same-element-pages.patch

------------------------------------------------------
From: Minchan Kim <minchan@xxxxxxxxxx>
Subject: zram: do not free same element pages in zram_meta_free

zhouxianrong pointed out that we shouldn't free same element pages in
zram_meta_free.  Otherwise, it will encounter oops due to invalid handle
value.

Link: http://lkml.kernel.org/r/20170207065741.GA2567@bbox
Signed-off-by: Minchan Kim <minchan@xxxxxxxxxx>
Cc: zhouxianrong <zhouxianrong@xxxxxxxxxx>
Cc: Sergey Senozhatsky <sergey.senozhatsky@xxxxxxxxx>
Cc: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/block/zram/zram_drv.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff -puN drivers/block/zram/zram_drv.c~zram-extend-zero-pages-to-same-element-pages-fix drivers/block/zram/zram_drv.c
--- a/drivers/block/zram/zram_drv.c~zram-extend-zero-pages-to-same-element-pages-fix
+++ a/drivers/block/zram/zram_drv.c
@@ -425,8 +425,11 @@ static void zram_meta_free(struct zram_m
 	/* Free all pages that are still in this zram device */
 	for (index = 0; index < num_pages; index++) {
 		unsigned long handle = meta->table[index].handle;
-
-		if (!handle)
+		/*
+		 * No memory is allocated for same element filled pages.
+		 * Simply clear same page flag.
+		 */
+		if (!handle || zram_test_flag(meta, index, ZRAM_SAME))
 			continue;
 
 		zs_free(meta->mem_pool, handle);
_

Patches currently in -mm which might be from minchan@xxxxxxxxxx are

zram-remove-waitqueue-for-io-done.patch
zram-extend-zero-pages-to-same-element-pages.patch
mm-do-not-access-page-mapping-directly-on-page_endio.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux