From: zhoumin <teczm@foxmail.com>
To: gregkh@linuxfoundation.org
Cc: akpm@linux-foundation.org, dakr@kernel.org,
linux-kernel@vger.kernel.org, rafael@kernel.org,
teczm@foxmail.com
Subject: Re: [RFC PATCH] kobject: fix uevent helper execution order issues
Date: Wed, 20 Aug 2025 22:04:26 +0800 [thread overview]
Message-ID: <tencent_34F69492AC1630B90634E94C886712651306@qq.com> (raw)
In-Reply-To: <2025081956-untie-elude-7880@gregkh>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 1203 bytes --]
Hi Greg
Thanks for your patience.
> 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?
Due to historical reasons, our system does not use udev and relies entirely
on custom shell scripts to handle kobject events.
The helper_lock and UMH_WAIT_EXEC in the kernel ensure that the uevent
helper serializes the execution of our shell scripts. That is why I
proposed the RFC patch to change UMH_NO_WAIT to UMH_WAIT_EXEC—for our use
case, this change provides clear benefits without downsides, aslo it avoids
blocking like UMH_WAIT_PROC while improving script execution order.
Regarding SEQNUM: using it would require parsing and tracking global
sequence numbers manually. In contrast, using a file lock would allow me to
focus only on serializing events for the same kobject, since events from
different objects don’t require synchronization.
If you believe this patch isn’t suitable for mainline, I’m open to
implementing a SEQNUM-based approach for better event ordering instead.
Best regards,
zhoumin
next prev parent reply other threads:[~2025-08-20 14:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-19 17:18 zhoumin
2025-08-19 18:29 ` Greg KH
2025-08-20 14:04 ` zhoumin [this message]
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=tencent_34F69492AC1630B90634E94C886712651306@qq.com \
--to=teczm@foxmail.com \
--cc=akpm@linux-foundation.org \
--cc=dakr@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
/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
all inboxes | Powered by JetHome®