* + vfork-dont-freezer_count-for-in-kernel-users-of-clone_vfork.patch added to -mm tree
@ 2013-02-15 23:32 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2013-02-15 23:32 UTC (permalink / raw)
To: mm-commits; +Cc: msb, benchan, mingo, oleg, rjw, tj
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@chromium.org>
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@chromium.org>
Cc: Ben Chan <benchan@chromium.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Ingo Molnar <mingo@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
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@chromium.org 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-02-15 23:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-15 23:32 + vfork-dont-freezer_count-for-in-kernel-users-of-clone_vfork.patch added to -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.