[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090615163923.GA7425@redhat.com>
Date: Mon, 15 Jun 2009 18:39:23 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Vitaly Mayatskikh <v.mayatskih@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...e.hu>,
Roland McGrath <roland@...hat.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/5] Use copy_wait_opts_to_user() in do_wait()
Damn. I am sorry for the huge delay. Finally I have read this series
carefully.
On 05/11, Vitaly Mayatskikh wrote:
>
> --- 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 = copy_wait_opts_to_user(wo, 0, 0, 0, 0, 0, 0);
This looks wrong.
copy_wait_opts_to_user()->getrusage() will OOPS if ->wo_rusage != NULL,
because we pass p == NULL.
Easy to fix, but I am not sure what is the most clean fix...
Oleg.
--
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