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

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

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-11 18:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-11 11:45 [dm-devel] dm: rename multipath path selector source files to have "dm-ps" prefix Colin Ian King
2020-11-11 11:45 ` Colin Ian King
2020-11-11 15:24 ` [dm-devel] " Mike Snitzer
2020-11-11 16:46   ` Mike Christie

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.