[folded-merged] zram-fix-null-dereference-of-handle-v2.patch removed from -mm tree

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

 



The patch titled
     Subject: zram-fix-null-dereference-of-handle-v2
has been removed from the -mm tree.  Its filename was
     zram-fix-null-dereference-of-handle-v2.patch

This patch was dropped because it was folded into zram-fix-null-dereference-of-handle.patch

------------------------------------------------------
From: Minchan Kim <minchan@xxxxxxxxxx>
Subject: zram-fix-null-dereference-of-handle-v2

* From v1:
  * remove unlikely branch - Sergey
  * In !handle case, use 0 instead of zram_get_element - Sergey

Link: http://lkml.kernel.org/r/1505887347-10881-1-git-send-email-minchan@xxxxxxxxxx
Fixes: 1f7319c74275 ("zram: partial IO refactoring")
Signed-off-by: Minchan Kim <minchan@xxxxxxxxxx>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky.work@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

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

diff -puN drivers/block/zram/zram_drv.c~zram-fix-null-dereference-of-handle-v2 drivers/block/zram/zram_drv.c
--- a/drivers/block/zram/zram_drv.c~zram-fix-null-dereference-of-handle-v2
+++ a/drivers/block/zram/zram_drv.c
@@ -865,11 +865,13 @@ static int __zram_bvec_read(struct zram
 
 	zram_slot_lock(zram, index);
 	handle = zram_get_handle(zram, index);
-	if (unlikely(!handle || zram_test_flag(zram, index, ZRAM_SAME))) {
+	if (!handle || zram_test_flag(zram, index, ZRAM_SAME)) {
+		unsigned long value;
 		void *mem;
 
+		value = handle ? zram_get_element(zram, index) : 0;
 		mem = kmap_atomic(page);
-		zram_fill_page(mem, PAGE_SIZE, zram_get_element(zram, index));
+		zram_fill_page(mem, PAGE_SIZE, value);
 		kunmap_atomic(mem);
 		zram_slot_unlock(zram, index);
 		return 0;
_

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

zram-fix-null-dereference-of-handle.patch
zram-set-bdi_cap_stable_writes-once.patch
bdi-introduce-bdi_cap_synchronous_io.patch
mm-swap-introduce-swp_synchronous_io.patch
mm-swap-skip-swapcache-for-swapin-of-synchronous-device.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