The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: zhoumin <teczm@foxmail.com>
Cc: rafael@kernel.org, dakr@kernel.org, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] kobject: fix uevent helper execution order issues
Date: Tue, 19 Aug 2025 20:29:12 +0200	[thread overview]
Message-ID: <2025081956-untie-elude-7880@gregkh> (raw)
In-Reply-To: <tencent_22B2504A61A3281D6A2590CB43ABCCEC790A@qq.com>

On Wed, Aug 20, 2025 at 01:18:28AM +0800, zhoumin wrote:
> The current use of the UMH_NO_WAIT parameter does not guarantee the
> sequential execution of CONFIG_STATIC_USERMODEHELPER_PATH.

There is never any such guarantee.  Unless you are on a single processor
system.

> For example, when fdisk completes and issues a BLKRRPART ioctl command,
> kernel first sending remove events followed by an add events. However, 
> process CONFIG_STATIC_USERMODEHELPER_PATH may execute
> out-of-order—potentially handling the add before the remove. This can
> result in the new partition being unexpectedly unmounted instead of mounted
> as intended.

Why are you not looking at the SEQNUM value?  That should be what orders
the events, right?  Otherwise how would any of this work?  :)

Also, what usermode helper program are you using that requires a binary?
What is wrong with udev?

thanks,

greg k-h

  reply	other threads:[~2025-08-19 18:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-19 17:18 [RFC PATCH] kobject: fix uevent helper execution order issues zhoumin
2025-08-19 18:29 ` Greg KH [this message]
2025-08-20 14:04   ` zhoumin
2025-08-20 14:23     ` Greg KH

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=2025081956-untie-elude-7880@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=dakr@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=teczm@foxmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox