From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755785AbZEUOgD (ORCPT ); Thu, 21 May 2009 10:36:03 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754247AbZEUOfz (ORCPT ); Thu, 21 May 2009 10:35:55 -0400 Received: from mail-fx0-f158.google.com ([209.85.220.158]:49240 "EHLO mail-fx0-f158.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753374AbZEUOfy (ORCPT ); Thu, 21 May 2009 10:35:54 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:message-id:from:to:cc:subject:in-reply-to:references :user-agent:mime-version:content-type; b=CgahuLc5s+AguSiGVPEoiZLl6OJqxDDaJxuRlPYTOsthP4XqGYPBfmiud8SLmWENmY awiek4jISPW8RnnyPITlEtvAxkLQuMtVib/rQ9prgrXvwvlT6g71qI315WsjkAYNTIle 64/H0YwDZNmbwrNaDbEMQFH9wNUle4XVezAes= Date: Thu, 21 May 2009 16:35:53 +0200 Message-ID: <8763fuwmk6.wl%vmayatsk@redhat.com> From: Vitaly Mayatskikh To: Oleg Nesterov Cc: Ingo Molnar , Vitaly Mayatskikh , Andrew Morton , Roland McGrath , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/5] Split wait_noreap_copyout() In-Reply-To: <20090521141250.GC14149@redhat.com> References: <1242048349-2766-1-git-send-email-v.mayatskih@gmail.com> <1242048349-2766-2-git-send-email-v.mayatskih@gmail.com> <87tz3fssv1.wl%vmayatsk@redhat.com> <20090520182118.GA10692@elte.hu> <20090521141250.GC14149@redhat.com> User-Agent: Wanderlust/2.15.6 (Almost Unreal) Emacs/22.3 Mule/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Thu, 21 May 2009 16:12:50 +0200, Oleg Nesterov wrote: > Roland thinks that "-EFAULT -> success" change is acceptable, and I think > the same. So, to me the best option is just change the changelog of this > patch and that is all. > > Or. We can make a trivial patch which adds the behavior change first: > > Changelog: always accept the NULL infop, because it is not > possible to understand the current behaviour ;) > > User-visible change! needs Acks! > > --- a/kernel/exit.c > +++ b/kernel/exit.c > @@ -1126,24 +1126,26 @@ static int eligible_child(struct wait_op > static int wait_noreap_copyout(struct wait_opts *wo, struct task_struct *p, > pid_t pid, uid_t uid, int why, int status) > { > - struct siginfo __user *infop; > int retval = wo->wo_rusage > ? getrusage(p, RUSAGE_BOTH, wo->wo_rusage) : 0; > - > put_task_struct(p); > - infop = wo->wo_info; > - if (!retval) > - retval = put_user(SIGCHLD, &infop->si_signo); > - if (!retval) > - retval = put_user(0, &infop->si_errno); > - if (!retval) > - retval = put_user((short)why, &infop->si_code); > - if (!retval) > - retval = put_user(pid, &infop->si_pid); > - if (!retval) > - retval = put_user(uid, &infop->si_uid); > - if (!retval) > - retval = put_user(status, &infop->si_status); > + > + if (wo->wo_info) { > + struct siginfo __user *infop = wo->wo_info; > + > + if (!retval) > + retval = put_user(SIGCHLD, &infop->si_signo); > + if (!retval) > + retval = put_user(0, &infop->si_errno); > + if (!retval) > + retval = put_user((short)why, &infop->si_code); > + if (!retval) > + retval = put_user(pid, &infop->si_pid); > + if (!retval) > + retval = put_user(uid, &infop->si_uid); > + if (!retval) > + retval = put_user(status, &infop->si_status); > + } > if (!retval) > retval = pid; > return retval; > > And then redo Vitaly's patches on top of this change. > > What do you and Vitaly think? I like your idea. -- wbr, Vitaly