From: Colin Ian King <colin.king@canonical.com>
To: Mike Snitzer <snitzer@redhat.com>
Cc: Alasdair Kergon <agk@redhat.com>,
dm-devel@redhat.com, Song Liu <song@kernel.org>,
linux-raid@vger.kernel.org, linux-raid@vger.kernel.org
Subject: re: dm: rename multipath path selector source files to have "dm-ps" prefix
Date: Wed, 11 Nov 2020 11:45:38 +0000 [thread overview]
Message-ID: <c5c17cba-3bf2-ce07-ed7f-6e5b5e71427c@canonical.com> (raw)
Hi,
Static analysis on linux-next has detected an initialized variable issue
with the following recent commit:
commit 28784347451fdbf4671ba97018f816041ba2306a
Author: Mike Snitzer <snitzer@redhat.com>
Date: Tue Nov 10 13:41:53 2020 -0500
dm: rename multipath path selector source files to have "dm-ps" prefix
The analysis is as follows:
43
static int ioa_add_path(struct path_selector *ps, struct dm_path *path,
44 int argc, char **argv, char **error)
45 {
46 struct selector *s = ps->context;
47 struct path_info *pi = NULL;
1. var_decl: Declaring variable cpu without initializer.
48 unsigned int cpu;
49 int ret;
50
2. Condition argc != 1, taking false branch.
51 if (argc != 1) {
52 *error = "io-affinity ps: invalid number of arguments";
53 return -EINVAL;
54 }
55
Uninitialized scalar variable (UNINIT)
3. uninit_use_in_call: Using uninitialized value cpu when calling
__cpu_to_node.
56 pi = kzalloc_node(sizeof(*pi), GFP_KERNEL, cpu_to_node(cpu));
57 if (!pi) {
58 *error = "io-affinity ps: Error allocating path context";
59 return -ENOMEM;
60 }
Colin
reply other threads:[~2020-11-11 11:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=c5c17cba-3bf2-ce07-ed7f-6e5b5e71427c@canonical.com \
--to=colin.king@canonical.com \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.com \
--cc=linux-raid@vger.kernel.org \
--cc=snitzer@redhat.com \
--cc=song@kernel.org \
/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).