aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2008-02-05 01:27:22 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-05 12:44:07 -0500
commitbdff746a3915f109bd13730b6847e33e17e91ed3 (patch)
treebacc8edf83f06c4366cbb43fa21213e0a346a6f2
parent59714d65dfbc86d5cb93adc5bac57a921cc2fa84 (diff)
clone: prepare to recycle CLONE_STOPPED
Ulrich says that we never used this clone flags and that nothing should be using it. As we're down to only a single bit left in clone's flags argument, let's add a warning to check that no userspace is actually using it. Hopefully we will be able to recycle it. Roland said: CLONE_STOPPED was previously used by some NTPL versions when under thread_db (i.e. only when being actively debugged by gdb), but not for a long time now, and it never worked reliably when it was used. Removing it seems fine to me. [akpm@linux-foundation.org: it looks like CLONE_DETACHED is being used] Cc: Ulrich Drepper <drepper@redhat.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--kernel/fork.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 05e0b6f4365b..6caf4f23206b 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1450,6 +1450,23 @@ long do_fork(unsigned long clone_flags,
1450 int trace = 0; 1450 int trace = 0;
1451 long nr; 1451 long nr;
1452 1452
1453 /*
1454 * We hope to recycle these flags after 2.6.26
1455 */
1456 if (unlikely(clone_flags & CLONE_STOPPED)) {
1457 static int __read_mostly count = 100;
1458
1459 if (count > 0 && printk_ratelimit()) {
1460 char comm[TASK_COMM_LEN];
1461
1462 count--;
1463 printk(KERN_INFO "fork(): process `%s' used deprecated "
1464 "clone flags 0x%lx\n",
1465 get_task_comm(comm, current),
1466 clone_flags & CLONE_STOPPED);
1467 }
1468 }
1469
1453 if (unlikely(current->ptrace)) { 1470 if (unlikely(current->ptrace)) {
1454 trace = fork_traceflag (clone_flags); 1471 trace = fork_traceflag (clone_flags);
1455 if (trace) 1472 if (trace)