Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 230696
b: refs/heads/master
c: 43bb40c
h: refs/heads/master
v: v3
  • Loading branch information
Dave Jones authored and Linus Torvalds committed Jan 14, 2011
1 parent 21a61bc commit f569630
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 29 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5dfbd1d734ef5415bc47b034df7433ba21e40e7b
refs/heads/master: 43bb40c9e3aa51a3b038c9df2c9afb4d4685614d
3 changes: 2 additions & 1 deletion trunk/include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
#define CLONE_DETACHED 0x00400000 /* Unused, ignored */
#define CLONE_UNTRACED 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on this clone */
#define CLONE_CHILD_SETTID 0x01000000 /* set the TID in the child */
#define CLONE_STOPPED 0x02000000 /* Start in stopped state */
/* 0x02000000 was previously the unused CLONE_STOPPED (Start in stopped state)
and is now available for re-use. */
#define CLONE_NEWUTS 0x04000000 /* New utsname group? */
#define CLONE_NEWIPC 0x08000000 /* New ipcs */
#define CLONE_NEWUSER 0x10000000 /* New user namespace */
Expand Down
28 changes: 1 addition & 27 deletions trunk/kernel/fork.c
Original file line number Diff line number Diff line change
Expand Up @@ -1409,23 +1409,6 @@ long do_fork(unsigned long clone_flags,
return -EPERM;
}

/*
* 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);
}
}

/*
* When called from kernel_thread, don't do user tracing stuff.
*/
Expand Down Expand Up @@ -1464,16 +1447,7 @@ long do_fork(unsigned long clone_flags,
*/
p->flags &= ~PF_STARTING;

if (unlikely(clone_flags & CLONE_STOPPED)) {
/*
* We'll start up with an immediate SIGSTOP.
*/
sigaddset(&p->pending.signal, SIGSTOP);
set_tsk_thread_flag(p, TIF_SIGPENDING);
__set_task_state(p, TASK_STOPPED);
} else {
wake_up_new_task(p, clone_flags);
}
wake_up_new_task(p, clone_flags);

tracehook_report_clone_complete(trace, regs,
clone_flags, nr, p);
Expand Down

0 comments on commit f569630

Please sign in to comment.