Linux Device Mapper development
 help / color / mirror / Atom feed
From: Benjamin Marzinski <bmarzins@redhat.com>
To: device-mapper development <dm-devel@redhat.com>
Cc: Martin Wilck <mwilck@suse.com>
Subject: [PATCH 0/4] multipath: fixes for invalid path device handling
Date: Thu,  7 Feb 2019 17:52:58 -0600	[thread overview]
Message-ID: <20190207235302.21635-1-bmarzins@redhat.com> (raw)

I recently got a bug from a user with a bad property
blacklist_exceptions line, where multipath tried to use a zram device,
which caused multipathd to crash. This patch set fixes that crash, and
then adds some additional safeguards to prevent things like this
happening in the future.

The first patch fixes the crash. This crash could be triggered by any
path device that isn't part of a multipath device, and has it's checker
fail to check the path correctly.

The second patch blacklists zram devices specifically. The third patch
fixes up some code weirdness that doesn't really cause any problems,
aside from the messages it prints.

The fourth patch changes how pathinfo works so that it now drops devices
of an unknown type if they can't get a wwid.  The biggest reason to do
this is so that multipath won't hold an open file descriptor for these
devices, which are almost definitely not multipathable (and occasionally
send them TUR ioctls, which are bound to fail, since they aren't scsi
devices).

As an aside, is there a good reason why multipath uses a devnode
blacklist to individually blacklist device types, instead of
blacklisting all denodes, and adding exceptions for the device types
that we do support?

Benjamin Marzinski (4):
  multipathd: avoid null pointer dereference in LOG_MSG
  multipath: blacklist zram devices
  multipathd: fix pp->initialized state ping-ponging
  multipathd: don't resend change events for unknown devices

 libmultipath/blacklist.c   |  2 +-
 libmultipath/checkers.c    |  2 +-
 libmultipath/discovery.c   | 10 +++++++---
 libmultipath/structs.h     |  1 +
 multipath/multipath.conf.5 |  2 +-
 multipathd/main.c          | 10 +++++++---
 6 files changed, 18 insertions(+), 9 deletions(-)

-- 
2.17.2

             reply	other threads:[~2019-02-07 23:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-07 23:52 Benjamin Marzinski [this message]
2019-02-07 23:52 ` [PATCH 1/4] multipathd: avoid null pointer dereference in LOG_MSG Benjamin Marzinski
2019-02-08  9:05   ` Martin Wilck
2019-02-08 17:28     ` [PATCH 1/4] multipathd: avoid null pointer dereference in LOG_MSG\ Benjamin Marzinski
2019-02-07 23:53 ` [PATCH 2/4] multipath: blacklist zram devices Benjamin Marzinski
2019-02-08  9:08   ` Martin Wilck
2019-02-07 23:53 ` [PATCH 3/4] multipathd: fix pp->initialized state ping-ponging Benjamin Marzinski
2019-02-08  9:21   ` Martin Wilck
2019-02-07 23:53 ` [PATCH 4/4] multipathd: don't resend change events for unknown devices Benjamin Marzinski
2019-02-08  9:21   ` Martin Wilck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190207235302.21635-1-bmarzins@redhat.com \
    --to=bmarzins@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=mwilck@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox