From: akpm@linux-foundation.org
To: linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org, drepper@redhat.com, mingo@elte.hu,
roland@redhat.com
Subject: [patch 2/2] clone: prepare to recycle CLONE_DETACHED and CLONE_STOPPED
Date: Thu, 08 Nov 2007 13:31:43 -0800 [thread overview]
Message-ID: <200711082131.lA8LVhnk015137@imap1.linux-foundation.org> (raw)
From: Andrew Morton <akpm@linux-foundation.org>
Ulrich says that we never used these clone flags and that nothing should be
using them.
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 these. Hopefully we will
be able to recycle them.
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>
---
kernel/fork.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff -puN kernel/fork.c~clone-prepare-to-recycle-clone_detached-and-clone_stopped kernel/fork.c
--- a/kernel/fork.c~clone-prepare-to-recycle-clone_detached-and-clone_stopped
+++ a/kernel/fork.c
@@ -1420,10 +1420,18 @@ long do_fork(unsigned long clone_flags,
int trace = 0;
long nr;
- if (unlikely(current->ptrace)) {
- trace = fork_traceflag (clone_flags);
- if (trace)
- clone_flags |= CLONE_PTRACE;
+ /*
+ * We hope to recycle these flags after 2.6.26
+ */
+ if (unlikely(clone_flags & (CLONE_DETACHED|CLONE_STOPPED))) {
+ if (printk_ratelimit()) {
+ char comm[TASK_COMM_LEN];
+
+ printk(KERN_INFO "fork(): process `%s' used deprecated "
+ "clone flags 0x%lx\n",
+ get_task_comm(comm, current),
+ clone_flags & (CLONE_DETACHED|CLONE_STOPPED));
+ }
}
p = copy_process(clone_flags, stack_start, regs, stack_size,
_
next reply other threads:[~2007-11-08 21:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-08 21:31 akpm [this message]
2007-11-08 22:09 ` [patch 2/2] clone: prepare to recycle CLONE_DETACHED and CLONE_STOPPED Roland McGrath
2007-11-09 4:36 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200711082131.lA8LVhnk015137@imap1.linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=drepper@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=roland@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).