diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-05-25 08:45:27 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-05-25 08:55:01 -0400 |
commit | 6ab423e0eaca827fbd201ca4ae7d4f8573a366b2 (patch) | |
tree | 072d227934bf213adf5c0dd022369e14f273dc48 /include/linux/perf_counter.h | |
parent | 771d7cde144d87f2d1fbee4da3c6234d61f7e42a (diff) |
perf_counter: Propagate inheritance failures down the fork() path
Fail fork() when we fail inheritance for some reason (-ENOMEM most likely).
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: John Kacur <jkacur@redhat.com>
LKML-Reference: <20090525124600.324656474@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/perf_counter.h')
-rw-r--r-- | include/linux/perf_counter.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h index b1f2bac09f97..d3e85de9bf1e 100644 --- a/include/linux/perf_counter.h +++ b/include/linux/perf_counter.h | |||
@@ -566,7 +566,7 @@ extern void perf_counter_task_sched_in(struct task_struct *task, int cpu); | |||
566 | extern void perf_counter_task_sched_out(struct task_struct *task, | 566 | extern void perf_counter_task_sched_out(struct task_struct *task, |
567 | struct task_struct *next, int cpu); | 567 | struct task_struct *next, int cpu); |
568 | extern void perf_counter_task_tick(struct task_struct *task, int cpu); | 568 | extern void perf_counter_task_tick(struct task_struct *task, int cpu); |
569 | extern void perf_counter_init_task(struct task_struct *child); | 569 | extern int perf_counter_init_task(struct task_struct *child); |
570 | extern void perf_counter_exit_task(struct task_struct *child); | 570 | extern void perf_counter_exit_task(struct task_struct *child); |
571 | extern void perf_counter_do_pending(void); | 571 | extern void perf_counter_do_pending(void); |
572 | extern void perf_counter_print_debug(void); | 572 | extern void perf_counter_print_debug(void); |
@@ -631,7 +631,7 @@ perf_counter_task_sched_out(struct task_struct *task, | |||
631 | struct task_struct *next, int cpu) { } | 631 | struct task_struct *next, int cpu) { } |
632 | static inline void | 632 | static inline void |
633 | perf_counter_task_tick(struct task_struct *task, int cpu) { } | 633 | perf_counter_task_tick(struct task_struct *task, int cpu) { } |
634 | static inline void perf_counter_init_task(struct task_struct *child) { } | 634 | static inline int perf_counter_init_task(struct task_struct *child) { } |
635 | static inline void perf_counter_exit_task(struct task_struct *child) { } | 635 | static inline void perf_counter_exit_task(struct task_struct *child) { } |
636 | static inline void perf_counter_do_pending(void) { } | 636 | static inline void perf_counter_do_pending(void) { } |
637 | static inline void perf_counter_print_debug(void) { } | 637 | static inline void perf_counter_print_debug(void) { } |