[folded-merged] mm-zswap-add-the-flag-can_sleep_mapped-fix-3.patch removed from -mm tree

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

 



The patch titled
     Subject: mm/zswap: fix potential uninitialized pointer read on tmp
has been removed from the -mm tree.  Its filename was
     mm-zswap-add-the-flag-can_sleep_mapped-fix-3.patch

This patch was dropped because it was folded into mm-zswap-add-the-flag-can_sleep_mapped.patch

------------------------------------------------------
From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
Subject: mm/zswap: fix potential uninitialized pointer read on tmp

In the case where zpool_can_sleep_mapped(pool) returns 0 then tmp is not
allocated and tmp is then an uninitialized pointer.  Later if entry is
null, tmp is freed, hence free'ing an uninitialized pointer.  Fix this by
ensuring tmp is initialized to NULL.

Link: https://lkml.kernel.org/r/20210128141728.639030-1-colin.king@xxxxxxxxxxxxx
Addresses-Coverity: ("Uninitialized pointer read")
Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
Cc: Seth Jennings <sjenning@xxxxxxxxxx>
Cc: Dan Streetman <ddstreet@xxxxxxxx>
Cc: Vitaly Wool <vitaly.wool@xxxxxxxxxxxx>
Cc: Tian Tao <tiantao6@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/zswap.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/zswap.c~mm-zswap-add-the-flag-can_sleep_mapped-fix-3
+++ a/mm/zswap.c
@@ -935,7 +935,7 @@ static int zswap_writeback_entry(struct
 	struct scatterlist input, output;
 	struct crypto_acomp_ctx *acomp_ctx;
 
-	u8 *src, *tmp;
+	u8 *src, *tmp = NULL;
 	unsigned int dlen;
 	int ret;
 	struct writeback_control wbc = {
_

Patches currently in -mm which might be from colin.king@xxxxxxxxxxxxx are

scripts-spellingtxt-add-more-spellings-to-spellingtxt.patch
mm-zswap-add-the-flag-can_sleep_mapped.patch




[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