From: Vitaly Wool <vitaly.wool@konsulko.com>
To: Souptick Joarder <jrdr.linux@gmail.com>
Cc: Tian Tao <tiantao6@hisilicon.com>,
Seth Jennings <sjenning@redhat.com>,
Barry Song <song.bao.hua@hisilicon.com>,
Dan Streetman <ddstreet@ieee.org>,
Andrew Morton <akpm@linux-foundation.org>,
Linux-MM <linux-mm@kvack.org>
Subject: Re: [PATCH] mm/zswap: fix variable 'entry' is uninitialized when used
Date: Thu, 28 Jan 2021 09:30:15 +0100 [thread overview]
Message-ID: <CAM4kBBJ7jun6ef_rx1Wvy8q+6Hezua2Pyqi363o5Z3oaS_gR9A@mail.gmail.com> (raw)
In-Reply-To: <CAFqt6zbHvaBh7AMcuh=s+pBAurUR7vYBJf-jC9WPT_gYHo9bLA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1252 bytes --]
On Thu, Jan 28, 2021, 5:09 AM Souptick Joarder <jrdr.linux@gmail.com> wrote:
> On Thu, Jan 21, 2021 at 3:27 PM Tian Tao <tiantao6@hisilicon.com> wrote:
> >
> > the entry has not been initialized when it is used, so allocate PAGE_SIZE
>
> Can you please add the original error msg in change logs ?
>
I second that. Another option would be to come up with an update of the
original patch which would incorporate all the fixes. I believe it should
be possible, since the initial patch has not been merged into Linus tree.
Best regards,
Vitaly
> >
> > Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
> > Reported-by: kernel test robot <lkp@intel.com>
> > ---
> > mm/zswap.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/mm/zswap.c b/mm/zswap.c
> > index 6e0bb61..4b7b6ad 100644
> > --- a/mm/zswap.c
> > +++ b/mm/zswap.c
> > @@ -944,7 +944,7 @@ static int zswap_writeback_entry(struct zpool *pool,
> unsigned long handle)
> >
> > if (!zpool_can_sleep_mapped(pool)) {
> >
> > - tmp = kmalloc(entry->length, GFP_ATOMIC);
> > + tmp = kmalloc(PAGE_SIZE, GFP_ATOMIC);
> > if (!tmp)
> > return -ENOMEM;
> > }
> > --
> > 2.7.4
> >
> >
>
[-- Attachment #2: Type: text/html, Size: 2297 bytes --]
next prev parent reply other threads:[~2021-01-28 8:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-21 9:57 [PATCH] mm/zswap: fix variable 'entry' is uninitialized when used Tian Tao
2021-01-28 4:09 ` Souptick Joarder
2021-01-28 8:30 ` Vitaly Wool [this message]
2021-01-28 8:36 ` Song Bao Hua (Barry Song)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAM4kBBJ7jun6ef_rx1Wvy8q+6Hezua2Pyqi363o5Z3oaS_gR9A@mail.gmail.com \
--to=vitaly.wool@konsulko.com \
--cc=akpm@linux-foundation.org \
--cc=ddstreet@ieee.org \
--cc=jrdr.linux@gmail.com \
--cc=linux-mm@kvack.org \
--cc=sjenning@redhat.com \
--cc=song.bao.hua@hisilicon.com \
--cc=tiantao6@hisilicon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).