usermodehelper: use UMH_WAIT_PROC consistently
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest1 patch 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | usermodehelper: use UMH_WAIT_PROC consistentlydrivers/ drivers/ drivers/ +2 more | +6 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [Drbd-dev] [PATCH 0/1] usermodehelper: use UMH_WAIT_PROC consistently
Quoted 7 lines · Tetsuo Handa
Quoted 4 lines · Oleg Nesterov
Subject: [PATCH 1/5] usermodehelper: kill
umh_wait, renumber UMH_* constantsNo functional changes, preparation.
Quoted 7 lines
Quoted 4 lines
umh_waitdoesn't can't be used as a bitmask, and we do not want to add another argument call_usermodehelper_* helpers.Kill this enum and redefine the UMH_* constants.
There are several users that call
call_usermodehelper()without using this enum.security/tomoyo/load_policy.cis one of such users
... and there are more.
Thanks a lot Tetsuo.
Quoted 2 lines
and there will be some
in out-of-tree code.
Well, they should be fixed imho.
Quoted 3 lines
Since I think distro kernels want
to backport this killablerequest_module()patchset, this patch should not change the constants in a way that makes impossible to detect kABI changes.
Good point, but I think the backporter should take care to not break the KABI. I do not think we should defer the possible cleanups for the sake of backporting.
It is possible to skip the first patch and add UMH_KILLABLE, just call_usermodehelper_exec() needs the additional wait != UMH_NO_WAIT check before testind/clearing UMH_KILLABLE. UMH_NO_WAIT | KILLABLE is not possible.
Quoted 7 lines
#define
UMH_WAIT_EXEC0 /* wait for the exec, but not the process */
#defineUMH_WAIT_PROC1 /* wait for the process to complete */
#defineUMH_KILLABLE2 /* wait for EXEC/PROC killable */
#defineUMH_NO_WAIT4 /* don't wait at all */might be acceptable because we can remap -1 ->
UMH_NO_WAIToncall_usermodehelper_exec()side.
Yes... but I think it is better to fix the users.
Perhaps we can do something like
#define UMH_NO_WAIT 0x8000 #define UMH_WAIT_EXEC 0x8001 #define UMH_WAIT_ 0x8002
and then call_usermodehelper_exec() does
/* catch the old buggy users */ BUG_ON(!(wait & 0x8000) || (wait < 0))
In any case. Whatever we do, I think we should fix the current ab-users.
Andrew, could you take this patch? Or should I split this trivial change by file/maintainer?
Oleg.