Skip to content

remove dangerous cleanup __attribute__ uses

Benjamin Marzinski dm-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4libmultipath: don't print garbage keywordslibmpathutil/parser.c+5 -31 reply
2/4libmultipath: avoid STRBUF_ON_STACK with cancellation pointslibmpathutil/parser.c libmpathutil/strbuf.h libmultipath/alias.c +10 more+195 -1050 replies
3/4libmultipath: use regular array for field widthslibmultipath/foreign.c libmultipath/libmultipath.version libmultipath/print.c +3 more+38 -533 replies
4/4libmultipath: avoid cleanup __attribute__ with cancellation pointslibmultipath/configure.c libmultipath/dmparser.c libmultipath/generic.c +3 more+48 -300 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchMartin Wilck
1/4R-b
2/4
3/4
4/4

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

Read the v1 thread

Cover letter [dm-devel] [PATCH 0/4] remove dangerous cleanup __attribute__ uses

the cleanup __attribute__ is only run when a variable goes out of scope normally. It is not run on pthread cancellation. This means that multipathd could leak whatever resources were supposed to be cleaned up if the thread was cancelled in a function using variables with the cleanup __attribute__. This patchset removes all these uses in cases where the code is run by multipathd and includes a cancellation point in the variables scope (usually condlog(), which calls fprintf(), a cancellation point, the way multipathd is usually run).

Benjamin Marzinski (4):
libmultipath: don't print garbage keywords
libmultipath: avoid STRBUF_ON_STACK with cancellation points
libmultipath: use regular array for field widths
libmultipath: avoid cleanup __attribute__ with cancellation points

 libmpathutil/parser.c                    | 13 ++--
 libmpathutil/strbuf.h                    |  4 +-
 libmultipath/alias.c                     | 59 ++++++++++-------
 libmultipath/blacklist.c                 |  4 +-
 libmultipath/configure.c                 |  6 +-
 libmultipath/discovery.c                 | 34 ++++++----
 libmultipath/dmparser.c                  | 23 +++----
 libmultipath/foreign.c                   |  9 +--
 libmultipath/generic.c                   | 14 ++--
 libmultipath/libmultipath.version        |  4 +-
 libmultipath/print.c                     | 82 ++++++++++++++----------
 libmultipath/print.h                     |  4 +-
 libmultipath/prioritizers/weightedpath.c | 22 ++++---
 libmultipath/propsel.c                   | 76 ++++++++++++++++------
 libmultipath/sysfs.h                     | 11 +---
 libmultipath/uevent.c                    |  6 +-
 multipath/main.c                         |  5 +-
 multipathd/cli_handlers.c                | 52 +++++++--------
 multipathd/main.c                        | 49 ++++++++------
 19 files changed, 286 insertions(+), 191 deletions(-)
Signature · 6 lines
2.17.2

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