[PATCH 07/33] utrace: utrace_report_death() can use task_utrace_struct()

Oleg Nesterov oleg at redhat.com
Mon Nov 21 20:01:47 UTC 2011


utrace_report_death() assumes that the caller (exit_notify) should
pass task->utrace as an argument. This is no longer needed, it can
safely do task_utrace_struct(). This way we avoid the nasty changes
in exit_notify().

Signed-off-by: Oleg Nesterov <oleg at redhat.com>
---
 include/linux/utrace.h |    2 +-
 kernel/utrace.c        |    5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/linux/utrace.h b/include/linux/utrace.h
index 9ac0b1b..9a2e2f4 100644
--- a/include/linux/utrace.h
+++ b/include/linux/utrace.h
@@ -99,7 +99,7 @@ int utrace_get_signal(struct task_struct *, struct pt_regs *,
 void utrace_report_clone(unsigned long, struct task_struct *);
 void utrace_finish_vfork(struct task_struct *);
 void utrace_report_exit(long *exit_code);
-void utrace_report_death(struct task_struct *, struct utrace *, bool, int);
+void utrace_report_death(struct task_struct *, bool, int);
 void utrace_report_jctl(int notify, int type);
 void utrace_report_exec(struct linux_binfmt *, struct linux_binprm *,
 			struct pt_regs *regs);
diff --git a/kernel/utrace.c b/kernel/utrace.c
index ef856c9..1e750ad 100644
--- a/kernel/utrace.c
+++ b/kernel/utrace.c
@@ -1759,9 +1759,10 @@ void utrace_report_exit(long *exit_code)
  * For this reason, utrace_release_task checks for the event bits that get
  * us here, and delays its cleanup for us to do.
  */
-void utrace_report_death(struct task_struct *task, struct utrace *utrace,
-			 bool group_dead, int signal)
+void utrace_report_death(struct task_struct *task, bool group_dead, int signal)
 {
+	struct utrace *utrace = task_utrace_struct(task);
+
 	INIT_REPORT(report);
 
 	BUG_ON(!task->exit_state);
-- 
1.5.5.1



More information about the kernel mailing list