From: "Colin King (gmail)" <colin.i.king@gmail.com>
To: Nhat Pham <nphamcs@gmail.com>,
Seth Jennings <sjenning@redhat.com>,
Dan Streetman <ddstreet@ieee.org>,
Vitaly Wool <vitaly.wool@konsulko.com>,
Andrew Morton <akpm@linux-foundation.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Linux-MM <linux-mm@kvack.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: re: zswap: do not shrink if cgroup may not zswap
Date: Fri, 2 Jun 2023 13:38:44 +0100 [thread overview]
Message-ID: <1cbc8768-7a94-530d-f3ba-923038e6ef12@gmail.com> (raw)
Hi,
static analysis with clang scan build has detected an issue in the
following commit:
commit 6804144bf1cfa3978ad98e625d8a1d2a4b80cbee
Author: Nhat Pham <nphamcs@gmail.com>
Date: Tue May 30 15:24:40 2023 -0700
zswap: do not shrink if cgroup may not zswap
The issue is as follows in function zswap_frontswap_store in mm/zswap.c:
/*
* XXX: zswap reclaim does not work with cgroups yet. Without a
* cgroup-aware entry LRU, we will push out entries system-wide
based on
* local cgroup limits.
*/
objcg = get_obj_cgroup_from_page(page);
if (objcg && !obj_cgroup_may_zswap(objcg))
goto reject;
mm/zswap.c:1210:6: warning: variable 'ret' is used uninitialized
whenever 'if' condition is true [-Wsometimes-uninitialized]
The goto reject path ends up returning ret, however, ret at this point
has not been initialized, so a garbage return value is being returned
by function zswap_frontswap_store
Colin
next reply other threads:[~2023-06-02 12:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-02 12:38 Colin King (gmail) [this message]
2023-06-02 13:47 ` Johannes Weiner
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=1cbc8768-7a94-530d-f3ba-923038e6ef12@gmail.com \
--to=colin.i.king@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=ddstreet@ieee.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nphamcs@gmail.com \
--cc=sjenning@redhat.com \
--cc=vitaly.wool@konsulko.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
all inboxes | Powered by JetHome®