Skip to content

multipath-tools: coverity fixes

[email protected] dm-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest21 patches 4 repliesIn review
  2. v121 patches 13 repliesSuperseded

Changes in v2 from the cover letter

- all: rebased to current "queue" branch
- 05/21: If a broken designator is encountered in VPD 83, don't error out but try to go on as long as the designator is within limits of the VPD page
- 06/21: adapt tests to the changes in 05/21, add some more (note: dropped Ben's "Reviewed-by:" on this one)
- 08/21: reworked to take Ben's remarks into account

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/21multipath tools: github workflows: add coverity workflow.github/workflows/coverity.yaml+51 -00 replies
2/21multipathd (coverity): check atexit() return valuemultipath/main.c+2 -10 replies
3/21multipathd (coverity): terminate uxlsnr when polls allocation failsmultipathd/uxlsnr.c+1 -00 replies
4/21libmultipath: strbuf: add __get_strbuf_buf()libmultipath/strbuf.c libmultipath/strbuf.h+19 -00 replies
5/21libmultipath (coverity): improve input checking in parse_vpd_pg83libmultipath/discovery.c+88 -461 reply
6/21multipath-tools: add tests for broken VPD page 83tests/vpd.c+143 -11 reply
7/21libmultipath: use strbuf in parse_vpd_pg83()libmultipath/discovery.c+48 -631 reply
8/21libmultipath (coverity): fix tainted values in alua_rtpg.clibmultipath/prioritizers/alua_rtpg.c libmultipath/prioritizers/alua_spc3.h+43 -131 reply
9/21multipath, multipathd: exit if bindings file is brokenmultipath/main.c multipathd/main.c+16 -40 replies
10/21libmultipath (coverity): silence unchecked return value warninglibmultipath/propsel.c+1 -10 replies
11/21multipath: remove pointless code from getopt processingmultipath/main.c+1 -40 replies
12/21libmultipath (coverity): set umask before mkstemplibmultipath/alias.c+4 -00 replies
13/21multipathd (coverity): simplify set_oom_adj()multipathd/main.c+15 -380 replies
14/21kpartx: open /dev/loop-control only oncekpartx/lopart.c+17 -120 replies
15/21kpartx: use opened loop device immediatelykpartx/kpartx.c kpartx/lopart.c kpartx/lopart.h+35 -550 replies
16/21kpartx: find_unused_loop_device(): add newlineskpartx/lopart.c+5 -50 replies
17/21multipathd (coverity): daemonize(): use dup2multipathd/main.c+13 -100 replies
18/21libmultipath (coverity): avoid sleeping in dm_mapname()libmultipath/devmapper.c+1 -160 replies
19/21libmultipath (coverity): Revert "setup_map: wait for pending path checkers to finish"libmultipath/configure.c+1 -620 replies
20/21libmultipath (coverity): check return values in dm_get_multipath()libmultipath/devmapper.c+4 -20 replies
21/21libmultipath: update_pathvec_from_dm: don't force DI_WWIDlibmultipath/structs_vec.c+3 -40 replies

Reviews trailers per patch

All 21 patches have a Reviewed-by or Acked-by.

PatchBenjamin Marzinski
1/21R-b
2/21R-b
3/21R-b
4/21R-b
5/21R-b
6/21R-b
7/21R-b
8/21R-b
9/21R-b
10/21R-b
11/21R-b
12/21R-b
13/21R-b
14/21R-b
15/21R-b
16/21R-b
17/21R-b
18/21R-b
19/21R-b
20/21R-b
21/21R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [dm-devel] [PATCH v2 00/21] multipath-tools: coverity fixes

From: Martin Wilck <[email protected]>

Hi Christophe, hi Ben,

I have started a new attempt to fix defects reported by coverity. With this set (on top of the previously posted one), and a number of false positive classifications, I have been able to bring the defect count all the way down to zero.

Most of these patches fix defects reported by coverity. Some fix other things that occured to me while working on this.

Changes v1 -> v2 (Ben Marzinski)

- all: rebased to current "queue" branch
- 05/21: If a broken designator is encountered in VPD 83, don't error out but try to go on as long as the designator is within limits of the VPD page
- 06/21: adapt tests to the changes in 05/21, add some more (note: dropped Ben's "Reviewed-by:" on this one)
- 08/21: reworked to take Ben's remarks into account

I didn't change 07/21 (see previous discussion).

Regards,
Martin

Martin Wilck (21):
multipath tools: github workflows: add coverity workflow multipathd (coverity): check atexit() return value multipathd (coverity): terminate uxlsnr when polls allocation fails
libmultipath: strbuf: add __get_strbuf_buf() libmultipath (coverity): improve input checking in parse_vpd_pg83
multipath-tools: add tests for broken VPD page 83
libmultipath: use strbuf in parse_vpd_pg83() libmultipath (coverity): fix tainted values in alua_rtpg.c multipath, multipathd: exit if bindings file is broken libmultipath (coverity): silence unchecked return value warning
multipath: remove pointless code from getopt processing libmultipath (coverity): set umask before mkstemp multipathd (coverity): simplify set_oom_adj()
kpartx: open /dev/loop-control only once
kpartx: use opened loop device immediately
kpartx: find_unused_loop_device(): add newlines multipathd (coverity): daemonize(): use dup2 libmultipath (coverity): avoid sleeping in dm_mapname() libmultipath (coverity): Revert "setup_map: wait for pending path
checkers to finish"
libmultipath (coverity): check return values in dm_get_multipath()
libmultipath: update_pathvec_from_dm: don't force DI_WWID

 .github/workflows/coverity.yaml       |  51 ++++++
 kpartx/kpartx.c                       |   4 +-
 kpartx/lopart.c                       | 100 +++++------
 kpartx/lopart.h                       |   3 +-
 libmultipath/alias.c                  |   4 +
 libmultipath/configure.c              |  63 +------
 libmultipath/devmapper.c              |  23 +--
 libmultipath/discovery.c              | 245 ++++++++++++++------------
 libmultipath/prioritizers/alua_rtpg.c |  13 +-
 libmultipath/prioritizers/alua_spc3.h |  43 ++++-
 libmultipath/propsel.c                |   2 +-
 libmultipath/strbuf.c                 |   5 +
 libmultipath/strbuf.h                 |  14 ++
 libmultipath/structs_vec.c            |   7 +-
 multipath/main.c                      |  13 +-
 multipathd/main.c                     |  91 +++++-----
 multipathd/uxlsnr.c                   |   1 +
 tests/vpd.c                           | 144 ++++++++++++++-
 18 files changed, 500 insertions(+), 326 deletions(-)
 create mode 100644 .github/workflows/coverity.yaml
Signature · 7 lines
2.33.1


--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel