All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] dm: mpath dm_get_device fix
@ 2024-05-17  0:41 Benjamin Marzinski
  2024-05-17  0:41 ` [PATCH 1/2] dm: factor out helper function from dm_get_device Benjamin Marzinski
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Benjamin Marzinski @ 2024-05-17  0:41 UTC (permalink / raw)
  To: Mikulas Patocka, Mike Snitzer; +Cc: dm-devel

dm-mpath shouldn't be calling dm_get_device() in multipath_message().
If you run:

# dmsetup message <mpath_dev> 0 "fail_path <device_not_in_multipath>"

the dm_get_device() call in multipath_message() will add that incorrect
device to the devices list, fail to find a matching pgpath, and then
remove it.  multipath shouldn't be messing with the devices table
outside of its constructor and destructor.

To fix it, this patchset factors out a helper function from
dm_get_device() to turn the device path string into a dev_t.
multipath_message() calls that helper function and uses the dev_t to
find the correct pgpath instead.

Benjamin Marzinski (2):
  dm: factor out helper function from dm_get_device
  dm mpath: don't call dm_get_device in multipath_message

 drivers/md/dm-mpath.c         | 11 ++++-------
 drivers/md/dm-table.c         | 33 ++++++++++++++++++++++++---------
 include/linux/device-mapper.h |  5 +++++
 3 files changed, 33 insertions(+), 16 deletions(-)

-- 
2.45.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-07-04 15:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-17  0:41 [PATCH 0/2] dm: mpath dm_get_device fix Benjamin Marzinski
2024-05-17  0:41 ` [PATCH 1/2] dm: factor out helper function from dm_get_device Benjamin Marzinski
2024-05-17  0:41 ` [PATCH 2/2] dm mpath: don't call dm_get_device in multipath_message Benjamin Marzinski
2024-06-10 18:12 ` [PATCH 0/2] dm: mpath dm_get_device fix Benjamin Marzinski
2024-07-04 15:06   ` Mikulas Patocka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.