Skip to content

multipath-tools: static analyzer fixes

Martin Wilck dm-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest8 patches 3 repliesIn review
  2. v16 patches 6 repliesSuperseded

Changes in v2 from the cover letter

- Added links to specific anchors on the static analysis page in commit messages
- 04/08: replaced this one after discussion with Ben
- 07/08, 08/08: new minor cleanups.

[1] https://lore.kernel.org/dm-devel/[email protected]/

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8kpartx_id: fix shellcheck reported errorskpartx/kpartx_id+4 -40 replies
2/8kpartx: fix file descriptor leakkpartx/kpartx.c+7 -70 replies
3/8libmpathpersist: fix memory leak in mpath_prout_rel()libmpathpersist/mpath_persist_int.c+6 -60 replies
4/8libmpathutil: vector_del_slot: modify v->allocated if realloc failslibmpathutil/vector.c+10 -41 reply
5/8libmultipath: fix undefined behavior in 31-bit shiftlibmultipath/nvme/nvme-ioctl.c+1 -10 replies
6/8libmultipath: prioritizers/iet: fix possible NULL dereferencelibmultipath/prioritizers/iet.c+3 -00 replies
7/8libmpathutil: remove vector_repack()libmpathutil/vector.c libmpathutil/vector.h+0 -141 reply
8/8libmpathutil: remove VECTOR_DEFAULT_SIZE macrolibmpathutil/vector.c libmpathutil/vector.h+3 -41 reply

Reviews trailers per patch

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

PatchBenjamin Marzinski
1/8R-b
2/8R-b
3/8R-b
4/8R-b
5/8R-b
6/8R-b
7/8R-b
8/8R-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 [PATCH v2 0/8] multipath-tools: static analyzer fixes

Xose has kindly informed me about the warnings from Fedora's static code analysis tool.

I'm sending a couple of related fixes here.

In the cover letter of v1 of this series [1], I'd included a discussion of what I considered false positives, but many of those might actually be real, as subsequent discussion with Ben Marzinski has revealed.

So I'm not repeating this list here.

Regards
Martin

Changes v1 -> v2:

- Added links to specific anchors on the static analysis page in commit messages
- 04/08: replaced this one after discussion with Ben
- 07/08, 08/08: new minor cleanups.

[1] https://lore.kernel.org/dm-devel/[email protected]/

Martin Wilck (8):
kpartx_id: fix shellcheck reported errors
kpartx: fix file descriptor leak
libmpathpersist: fix memory leak in mpath_prout_rel()
libmpathutil: vector_del_slot: modify v->allocated if realloc fails
libmultipath: fix undefined behavior in 31-bit shift
libmultipath: prioritizers/iet: fix possible NULL dereference
libmpathutil: remove vector_repack()
libmpathutil: remove VECTOR_DEFAULT_SIZE macro

 kpartx/kpartx.c                     | 14 ++++++-------
 kpartx/kpartx_id                    |  8 ++++----
 libmpathpersist/mpath_persist_int.c | 12 +++++------
 libmpathutil/vector.c               | 31 +++++++++++------------------
 libmpathutil/vector.h               |  4 +---
 libmultipath/nvme/nvme-ioctl.c      |  2 +-
 libmultipath/prioritizers/iet.c     |  3 +++
 7 files changed, 34 insertions(+), 40 deletions(-)
Signature · 1 line
2.49.0