[dm-devel] dm: rename multipath path selector source files to have "dm-ps" prefix
Colin Ian King
colin.king at canonical.com
Wed Nov 11 11:45:38 UTC 2020
Hi,
Static analysis on linux-next has detected an initialized variable issue
with the following recent commit:
commit 28784347451fdbf4671ba97018f816041ba2306a
Author: Mike Snitzer <snitzer at 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
More information about the dm-devel
mailing list