[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1242036759-4025-4-git-send-email-v.mayatskih@gmail.com>
Date: Mon, 11 May 2009 12:12:42 +0200
From: Vitaly Mayatskikh <v.mayatskih@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Oleg Nesterov <oleg@...hat.com>, Ingo Molnar <mingo@...e.hu>,
Roland McGrath <roland@...hat.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 3/5] Use wait_copyout() in do_wait()
All copy-paste getrusage() and put_user() code in wait_task_* functions
is replaced by call to wait_copyout()
Use wait_copyout() in do_wait() to clean up user's siginfo structure.
Signed-off-by: Vitaly Mayatskikh <v.mayatskih@...il.com>
---
kernel/exit.c | 15 +--------------
1 files changed, 1 insertions(+), 14 deletions(-)
diff --git a/kernel/exit.c b/kernel/exit.c
index 3b2fdd9..6ee6b53 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -1600,8 +1600,6 @@ end:
__set_current_state(TASK_RUNNING);
remove_wait_queue(¤t->signal->wait_chldexit,&wait);
if (wo->wo_info) {
- struct siginfo __user *infop = wo->wo_info;
-
if (retval > 0)
retval = 0;
else {
@@ -1610,18 +1608,7 @@ end:
* we would set so the user can easily tell the
* difference.
*/
- if (!retval)
- retval = put_user(0, &infop->si_signo);
- if (!retval)
- retval = put_user(0, &infop->si_errno);
- if (!retval)
- retval = put_user(0, &infop->si_code);
- if (!retval)
- retval = put_user(0, &infop->si_pid);
- if (!retval)
- retval = put_user(0, &infop->si_uid);
- if (!retval)
- retval = put_user(0, &infop->si_status);
+ retval = wait_copyout(wo, 0, 0, 0, 0, 0, 0);
}
}
return retval;
--
1.6.2.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists