diff options
| author | Peter Zijlstra <[email protected]> | 2022-08-22 13:18:18 +0200 |
|---|---|---|
| committer | Peter Zijlstra <[email protected]> | 2022-09-07 21:53:48 +0200 |
| commit | 1fbcaa923ce2d7e6de17abd74fa076dc1e0be1a2 (patch) | |
| tree | f6b83d9a4edbd1c8cdc2ba1b48635fa2096a2eb6 /init | |
| parent | 5950e5d574c636a07dd21a872c2f8b41f6d20c55 (diff) | |
freezer,umh: Clean up freezer/initrd interaction
handle_initrd() marks itself as PF_FREEZER_SKIP in order to ensure
that the UMH, which is going to freeze the system, doesn't
indefinitely wait for it's caller.
Rework things by adding UMH_FREEZABLE to indicate the completion is
freezable.
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Acked-by: Rafael J. Wysocki <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'init')
| -rw-r--r-- | init/do_mounts_initrd.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c index 327962ea354c..34731241377d 100644 --- a/init/do_mounts_initrd.c +++ b/init/do_mounts_initrd.c @@ -99,19 +99,11 @@ static void __init handle_initrd(void) init_mkdir("/old", 0700); init_chdir("/old"); - /* - * In case that a resume from disk is carried out by linuxrc or one of - * its children, we need to tell the freezer not to wait for us. - */ - current->flags |= PF_FREEZER_SKIP; - info = call_usermodehelper_setup("/linuxrc", argv, envp_init, GFP_KERNEL, init_linuxrc, NULL, NULL); if (!info) return; - call_usermodehelper_exec(info, UMH_WAIT_PROC); - - current->flags &= ~PF_FREEZER_SKIP; + call_usermodehelper_exec(info, UMH_WAIT_PROC|UMH_FREEZABLE); /* move initrd to rootfs' /old */ init_mount("..", ".", NULL, MS_MOVE, NULL); |