From: Benjamin Marzinski <bmarzins@redhat.com>
To: Ganesh Andhale <gandhale@redhat.com>
Cc: christophe.varoqui@opensvc.com, dm-devel@lists.linux.dev,
mwilck@suse.com
Subject: Re: [PATCH] multipathd: cleanup global queues after threads exit
Date: Thu, 19 Nov 2026 12:36:39 -0500 [thread overview]
Message-ID: <av8zp_HtEUoGBn-F@redhat.com> (raw)
In-Reply-To: <20261112153310.19652-1-gandhale@redhat.com>
On Thu, Nov 12, 2026 at 09:03:10PM +0530, Ganesh Andhale wrote:
> cleanup_global_uevq() and cleanup_global_purge_queue() were registered
> as pthread cleanup handlers in worker threads. During shutdown, these
> handlers could run as soon as their owning thread was cancelled, while
> another thread that also accessed the same global queue had not been
> joined yet.
>
> This allowed the global uevent or purge queue to be cleaned while a
> producer or consumer thread could still touch it.
>
> Move the global queue cleanup to cleanup_queues(), which is called
> after cleanup_threads(), once all related threads have been joined.
> Keep the pthread cleanup handlers only for thread-local temporary lists
> and other resources owned by the cancelling thread.
>
> Export cleanup_global_uevq() from libmultipath so multipathd can call
> it during daemon shutdown.
>
> Signed-off-by: Ganesh Andhale <gandhale@redhat.com>
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
prev parent reply other threads:[~2026-11-19 17:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 15:33 [PATCH] multipathd: cleanup global queues after threads exit Ganesh Andhale
2026-11-19 17:36 ` Benjamin Marzinski [this message]
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=av8zp_HtEUoGBn-F@redhat.com \
--to=bmarzins@redhat.com \
--cc=christophe.varoqui@opensvc.com \
--cc=dm-devel@lists.linux.dev \
--cc=gandhale@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 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.