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

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

 



The patch titled
     Subject: mm/zswap: add return value in zswap_frontswap_load
has been removed from the -mm tree.  Its filename was
     mm-zswap-add-the-flag-can_sleep_mapped-fix.patch

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

------------------------------------------------------
From: Nathan Chancellor <natechancellor@xxxxxxxxx>
Subject: mm/zswap: add return value in zswap_frontswap_load

Clang warns:

mm/zswap.c:1271:6: warning: variable 'ret' is used uninitialized
whenever 'if' condition is true [-Wsometimes-uninitialized]
        if (!entry->length) {
            ^~~~~~~~~~~~~~
mm/zswap.c:1322:9: note: uninitialized use occurs here
        return ret;
               ^~~
mm/zswap.c:1271:2: note: remove the 'if' if its condition is always
false
        if (!entry->length) {
        ^~~~~~~~~~~~~~~~~~~~~
mm/zswap.c:1259:9: note: initialize the variable 'ret' to silence this
warning
        int ret;
               ^
                = 0
1 warning generated.

Prior to "mm/zswap: add the flag can_sleep_mapped", this path always
returned 0. Restore that so we are not returning uninitialized memory.

Link: https://github.com/ClangBuiltLinux/linux/issues/1263
Link: https://lkml.kernel.org/r/20210121214804.926843-1-natechancellor@xxxxxxxxx
Signed-off-by: Nathan Chancellor <natechancellor@xxxxxxxxx>
Reported-by: kernelci.org bot <bot@xxxxxxxxxxxx>
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

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

--- a/mm/zswap.c~mm-zswap-add-the-flag-can_sleep_mapped-fix
+++ a/mm/zswap.c
@@ -1272,6 +1272,7 @@ static int zswap_frontswap_load(unsigned
 		dst = kmap_atomic(page);
 		zswap_fill_page(dst, entry->value);
 		kunmap_atomic(dst);
+		ret = 0;
 		goto freeentry;
 	}
 
_

Patches currently in -mm which might be from natechancellor@xxxxxxxxx are

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