[dm-devel] [PATCH v2 2/3] libmutipath: don't close fd on dm_lib_release

Martin Wilck Martin.Wilck at suse.com
Thu Mar 26 08:41:05 UTC 2020


On Wed, 2020-03-25 at 23:22 -0500, Benjamin Marzinski wrote:
> If dm_hold_control_open() isn't set, when dm_lib_release() is called,
> it
> will close the control fd. The control fd will get re-opened on the
> next
> dm_task_run() call, but if there is a dm_task_run() call already
> in progress in another thread, it can fail. Since many of the
> device-mapper callouts happen with the vecs lock held, this wasn't
> too
> noticeable, but there is code that calls dm_task_run() without the
> vecs lock held, notably the dmevent waiter code.
> 
> Since, as Martin pointed out, dm_hold_control_open() hasn't always
> existed in libdevmapper, check if it's supported on compilation,
> and update the version requirements if so.
> 
> Signed-off-by: Benjamin Marzinski <bmarzins at redhat.com>

Reviewed-by: Martin Wilck <mwilck at suse.com>

-- 
Dr. Martin Wilck <mwilck at suse.com>, Tel. +49 (0)911 74053 2107
SUSE  Software Solutions Germany GmbH
HRB 36809, AG Nürnberg GF: Felix
Imendörffer






More information about the dm-devel mailing list