diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-06 19:35:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-06 19:35:10 -0400 |
commit | 57d326169e878a1a37b2bccd1cf81f6809ee67b9 (patch) | |
tree | 86ed74ae4dc2beaebce1c67b8459f1873b777d3a /kernel/fork.c | |
parent | 7b215de3d0abbc4f6daf2efd19e8809af0564490 (diff) | |
parent | 0244756edc4b98c129e92c7061d9f383708cf786 (diff) |
Merge branch 'akpm' (patches from Andrew Morton) into next
Merge more updates from Andrew Morton:
- Most of the rest of MM.
This includes "mark remap_file_pages syscall as deprecated" but the
actual "replace remap_file_pages syscall with emulation" is held
back. I guess we'll need to work out when to pull the trigger on
that one.
- various minor cleanups to obscure filesystems
- the drivers/rtc queue
- hfsplus updates
- ufs, hpfs, fatfs, affs, reiserfs
- Documentation/
- signals
- procfs
- cpu hotplug
- lib/idr.c
- rapidio
- sysctl
- ipc updates
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (171 commits)
ufs: sb mutex merge + mutex_destroy
powerpc: update comments for generic idle conversion
cris: update comments for generic idle conversion
idle: remove cpu_idle() forward declarations
nbd: zero from and len fields in NBD_CMD_DISCONNECT.
mm: convert some level-less printks to pr_*
MAINTAINERS: adi-buildroot-devel is moderated
MAINTAINERS: add linux-api for review of API/ABI changes
mm/kmemleak-test.c: use pr_fmt for logging
fs/dlm/debug_fs.c: replace seq_printf by seq_puts
fs/dlm/lockspace.c: convert simple_str to kstr
fs/dlm/config.c: convert simple_str to kstr
mm: mark remap_file_pages() syscall as deprecated
mm: memcontrol: remove unnecessary memcg argument from soft limit functions
mm: memcontrol: clean up memcg zoneinfo lookup
mm/memblock.c: call kmemleak directly from memblock_(alloc|free)
mm/mempool.c: update the kmemleak stack trace for mempool allocations
lib/radix-tree.c: update the kmemleak stack trace for radix tree allocations
mm: introduce kmemleak_update_trace()
mm/kmemleak.c: use %u to print ->checksum
...
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 0d53eb0dfb6f..d2799d1fc952 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1606,10 +1606,12 @@ long do_fork(unsigned long clone_flags, | |||
1606 | */ | 1606 | */ |
1607 | if (!IS_ERR(p)) { | 1607 | if (!IS_ERR(p)) { |
1608 | struct completion vfork; | 1608 | struct completion vfork; |
1609 | struct pid *pid; | ||
1609 | 1610 | ||
1610 | trace_sched_process_fork(current, p); | 1611 | trace_sched_process_fork(current, p); |
1611 | 1612 | ||
1612 | nr = task_pid_vnr(p); | 1613 | pid = get_task_pid(p, PIDTYPE_PID); |
1614 | nr = pid_vnr(pid); | ||
1613 | 1615 | ||
1614 | if (clone_flags & CLONE_PARENT_SETTID) | 1616 | if (clone_flags & CLONE_PARENT_SETTID) |
1615 | put_user(nr, parent_tidptr); | 1617 | put_user(nr, parent_tidptr); |
@@ -1624,12 +1626,14 @@ long do_fork(unsigned long clone_flags, | |||
1624 | 1626 | ||
1625 | /* forking complete and child started to run, tell ptracer */ | 1627 | /* forking complete and child started to run, tell ptracer */ |
1626 | if (unlikely(trace)) | 1628 | if (unlikely(trace)) |
1627 | ptrace_event(trace, nr); | 1629 | ptrace_event_pid(trace, pid); |
1628 | 1630 | ||
1629 | if (clone_flags & CLONE_VFORK) { | 1631 | if (clone_flags & CLONE_VFORK) { |
1630 | if (!wait_for_vfork_done(p, &vfork)) | 1632 | if (!wait_for_vfork_done(p, &vfork)) |
1631 | ptrace_event(PTRACE_EVENT_VFORK_DONE, nr); | 1633 | ptrace_event_pid(PTRACE_EVENT_VFORK_DONE, pid); |
1632 | } | 1634 | } |
1635 | |||
1636 | put_pid(pid); | ||
1633 | } else { | 1637 | } else { |
1634 | nr = PTR_ERR(p); | 1638 | nr = PTR_ERR(p); |
1635 | } | 1639 | } |