Commit:     bdff746a3915f109bd13730b6847e33e17e91ed3
Parent:     59714d65dfbc86d5cb93adc5bac57a921cc2fa84
Author:     Andrew Morton <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 4 22:27:22 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Feb 5 09:44:07 2008 -0800

    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.
    [EMAIL PROTECTED]: it looks like CLONE_DETACHED is being used]
    Cc: Ulrich Drepper <[EMAIL PROTECTED]>
    Cc: Ingo Molnar <[EMAIL PROTECTED]>
    Cc: Roland McGrath <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 kernel/fork.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/kernel/fork.c b/kernel/fork.c
index 05e0b6f..6caf4f2 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1450,6 +1450,23 @@ long do_fork(unsigned long clone_flags,
        int trace = 0;
        long nr;
+       /*
+        * We hope to recycle these flags after 2.6.26
+        */
+       if (unlikely(clone_flags & CLONE_STOPPED)) {
+               static int __read_mostly count = 100;
+               if (count > 0 && printk_ratelimit()) {
+                       char comm[TASK_COMM_LEN];
+                       count--;
+                       printk(KERN_INFO "fork(): process `%s' used deprecated "
+                                       "clone flags 0x%lx\n",
+                               get_task_comm(comm, current),
+                               clone_flags & CLONE_STOPPED);
+               }
+       }
        if (unlikely(current->ptrace)) {
                trace = fork_traceflag (clone_flags);
                if (trace)
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to