All of lore.kernel.org
 help / color / mirror / Atom feed
* + mm-zswap-fix-variable-entry-is-uninitialized-when-used.patch added to -mm tree
@ 2021-01-21 22:21 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2021-01-21 22:21 UTC (permalink / raw)
  To: bigeasy, ddstreet, efault, lkp, mm-commits, sjenning,
	song.bao.hua, tiantao6, vitaly.wool


The patch titled
     Subject: mm/zswap: fix variable 'entry' is uninitialized when used
has been added to the -mm tree.  Its filename is
     mm-zswap-fix-variable-entry-is-uninitialized-when-used.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/mm-zswap-fix-variable-entry-is-uninitialized-when-used.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/mm-zswap-fix-variable-entry-is-uninitialized-when-used.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Tian Tao <tiantao6@hisilicon.com>
Subject: mm/zswap: fix variable 'entry' is uninitialized when used

the entry has not been initialized when it is used, so allocate PAGE_SIZE

Link: https://lkml.kernel.org/r/1611223030-58346-1-git-send-email-tiantao6@hisilicon.com
Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Vitaly Wool <vitaly.wool@konsulko.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Barry Song <song.bao.hua@hisilicon.com>
Cc: Dan Streetman <ddstreet@ieee.org>
Cc: Seth Jennings <sjenning@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

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

--- a/mm/zswap.c~mm-zswap-fix-variable-entry-is-uninitialized-when-used
+++ a/mm/zswap.c
@@ -944,7 +944,7 @@ static int zswap_writeback_entry(struct
 
 	if (!zpool_can_sleep_mapped(pool)) {
 
-		tmp = kmalloc(entry->length, GFP_ATOMIC);
+		tmp = kmalloc(PAGE_SIZE, GFP_ATOMIC);
 		if (!tmp)
 			return -ENOMEM;
 	}
_

Patches currently in -mm which might be from tiantao6@hisilicon.com are

mm-zswap-add-the-flag-can_sleep_mapped.patch
mm-zswap-fix-variable-entry-is-uninitialized-when-used.patch
mm-set-the-sleep_mapped-to-true-for-zbud-and-z3fold.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-21 22:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-21 22:21 + mm-zswap-fix-variable-entry-is-uninitialized-when-used.patch added to -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.