Skip to content

multipath config fixes

Benjamin Marzinski dm-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 4 repliesIn review
  2. v13 patches 5 repliesSuperseded

Changes in v2 from the cover letter

1/3: unrolled loop in validate_config_strvec() to explicitly check the
possible quote strings
3/3: spaces is now a "const char * const" and doesn't include '\n'

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3libmpathutil: simplify set_value and validate_config_strveclibmpathutil/parser.c+51 -580 replies
2/3libmultipath: don't leak memory on invalid stringslibmultipath/dict.c+2 -00 replies
3/3libmutipath: validate the argument count of config stringslibmultipath/dict.c+101 -90 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMartin Wilck
SeriesR-b
1/3
2/3
3/3

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 0/3] multipath config fixes

The first two patches are a cleanup and a fix for a memory leak in the config code. The third patch improves multipath's validation of the strings it passes directly into the table, features, path_selector, and hardware_handler. These three strings all have argument counts, and getting them wrong causes the kernel to parse the table incorrectly. When this happens the table load fails, but the error messages from the kernel are often completely unhelpful. A bad argument count will cause the rest of the table to be parsed incorrectly, and the kernel might not hit an unworkable token till later in the parsing. Multipath now makes sure that the count matches the actual number of arguments that it is passing.

V2 Changes (based on suggestions from Martin Wilck):
1/3: unrolled loop in validate_config_strvec() to explicitly check the
possible quote strings
3/3: spaces is now a "const char * const" and doesn't include '\n'

Benjamin Marzinski (3):
libmpathutil: simplify set_value and validate_config_strvec
libmultipath: don't leak memory on invalid strings
libmutipath: validate the argument count of config strings

 libmpathutil/parser.c | 109 +++++++++++++++++++---------------------
 libmultipath/dict.c   | 112 ++++++++++++++++++++++++++++++++++++++----
 2 files changed, 154 insertions(+), 67 deletions(-)
Signature · 6 lines
2.17.2

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