linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* re: dm: rename multipath path selector source files to have "dm-ps" prefix
@ 2020-11-11 11:45 Colin Ian King
  0 siblings, 0 replies; only message in thread
From: Colin Ian King @ 2020-11-11 11:45 UTC (permalink / raw)
  To: Mike Snitzer; +Cc: Alasdair Kergon, dm-devel, Song Liu, linux-raid, linux-raid

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

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

only message in thread, other threads:[~2020-11-11 11:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-11 11:45 dm: rename multipath path selector source files to have "dm-ps" prefix Colin Ian King

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).