[dm-devel] [PATCH] multipathd: avoid crash in uevent_cleanup()

Martin Wilck mwilck at suse.com
Mon Feb 8 09:50:23 UTC 2021


On Mon, 2021-02-08 at 15:41 +0800, lixiaokeng wrote:
> 
> Hi Martin,
> 
> There is a _cleanup_ in device_new_from_nulstr. If uevent_thr exit in
> device_new_from_nulstr and some keys is not be append to sd_device,
> the _cleanup_ will be called, which leads to multipathd crashes with
> the stack.
> 
> When I use your advice,
> 
> 
> On 2021/1/26 16:34, Martin Wilck wrote:
> >     int oldstate;
> > 
> >     pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &oldstate);
> > 
> >     udev_monitor_receive_device(...)
> > 
> >     pthread_setcancelstate(oldstate, NULL);
> >     pthread_testcancel();
> 
> this coredump does not seem to appear anymore (several hours with
> test scripts).

Thanks for your continued hard work on this, but I can't follow you. In
this post:

https://listman.redhat.com/archives/dm-devel/2021-January/msg00396.html

you said that this advice did _not_ help. Please clarify.

Regards
Martin






More information about the dm-devel mailing list