The patch titled Subject: vfork: don't freezer_count() for in-kernel users of CLONE_VFORK has been added to the -mm tree. Its filename is vfork-dont-freezer_count-for-in-kernel-users-of-clone_vfork.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Mandeep Singh Baines <msb@xxxxxxxxxxxx> Subject: vfork: don't freezer_count() for in-kernel users of CLONE_VFORK We don't need to call freezer_do_not_count() for in-kernel users of CLONE_VFORK since exec will get called in bounded time. We don't want to call freezer_count() for in-kernel users because they may be holding locks. freezer_count() calls try_to_freeze(). We don't want to freeze an in-kernel user because it may be holding locks. In a follow-up patch, I call debug_check_no_locks_held() from try_to_freeze(). After applying this patch, I get no lockdep warnings with that patch. Signed-off-by: Mandeep Singh Baines <msb@xxxxxxxxxxxx> Cc: Ben Chan <benchan@xxxxxxxxxxxx> Cc: Oleg Nesterov <oleg@xxxxxxxxxx> Cc: Tejun Heo <tj@xxxxxxxxxx> Cc: Rafael J. Wysocki <rjw@xxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/fork.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff -puN kernel/fork.c~vfork-dont-freezer_count-for-in-kernel-users-of-clone_vfork kernel/fork.c --- a/kernel/fork.c~vfork-dont-freezer_count-for-in-kernel-users-of-clone_vfork +++ a/kernel/fork.c @@ -718,9 +718,11 @@ static int wait_for_vfork_done(struct ta { int killed; - freezer_do_not_count(); + if (current->mm) + freezer_do_not_count(); killed = wait_for_completion_killable(vfork); - freezer_count(); + if (current->mm) + freezer_count(); if (killed) { task_lock(child); _ Patches currently in -mm which might be from msb@xxxxxxxxxxxx are vfork-dont-freezer_count-for-in-kernel-users-of-clone_vfork.patch lockdep-check-that-no-locks-held-at-freeze-time.patch coredump-cleanup-the-waiting-for-coredump_finish-code.patch coredump-use-a-freezable_schedule-for-the-coredump_finish-wait.patch coredump-abort-core-dump-piping-only-due-to-a-fatal-signal.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html