Re: [PATCH] libmpathpersist: fix thread safety of default functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 26, 2021 at 09:36:59AM +0000, Martin Wilck wrote:
> On Mon, 2021-01-25 at 23:31 -0600, Benjamin Marzinski wrote:
> > commit a839e39e ("libmpathpersist: factor out initialization and
> > teardown") made mpath_presistent_reserve_{in,out} use share variables
> > for curmp and pathvec.  There are users of this library that call
> > these
> > functions in a multi-threaded process, and this change causes their
> > application to crash. config and udev are also shared variables, but
> > libmpathpersist doesn't write to the config in
> > mpath_presistent_reserve_{in,out}, and looking into the libudev code,
> > I
> > don't see any place where libmpathpersist uses the udev object in a
> > way
> > that isn't thread-safe.
> > 
> > This patch makes mpath_presistent_reserve_{in,out} go back to using
> > local variables for curmp and pathvec, so that multiple threads won't
> > be operating on these variables at the same time.
> 
> Reviewed-by: Martin Wilck <mwilck@xxxxxxxx>
> 
> Out of curiosity: what's the multi-threaded application?

Dunno. I just got the bug report saying that their multithreaded
application is crashing.

-Ben

> 
> Regards,
> Martin

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel





[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux