Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756907AbYCHUTn (ORCPT ); Sat, 8 Mar 2008 15:19:43 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754701AbYCHUTd (ORCPT ); Sat, 8 Mar 2008 15:19:33 -0500 Received: from x346.tv-sign.ru ([89.108.83.215]:49023 "EHLO mail.screens.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754661AbYCHUTd (ORCPT ); Sat, 8 Mar 2008 15:19:33 -0500 Date: Sat, 8 Mar 2008 23:19:09 +0300 From: Oleg Nesterov To: Roland McGrath Cc: Andrew Morton , Linus Torvalds , linux-kernel@vger.kernel.org Subject: Re: [PATCH] waitid si_code regression Message-ID: <20080308201909.GA83@tv-sign.ru> References: <20080308194122.4EEB226F991@magilla.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080308194122.4EEB226F991@magilla.localdomain> User-Agent: Mutt/1.5.11 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 871 Lines: 26 On 03/08, Roland McGrath wrote: > > In commit ee7c82da830ea860b1f9274f1f0cdf99f206e7c2, the magic (short) > cast when storing si_code was lost in wait_task_stopped. This leaks > the in-kernel CLD_* values that do not match what userland expects. > > diff --git a/kernel/exit.c b/kernel/exit.c > index cd20bf0..53872bf 100644 > --- a/kernel/exit.c > +++ b/kernel/exit.c > @@ -1378,7 +1378,7 @@ unlock_sig: > if (!retval && infop) > retval = put_user(0, &infop->si_errno); > if (!retval && infop) > - retval = put_user(why, &infop->si_code); > + retval = put_user((short)why, &infop->si_code); Ugh, thanks. Oleg. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/