From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756938AbcASQGJ (ORCPT ); Tue, 19 Jan 2016 11:06:09 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:50368 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753626AbcASQGB (ORCPT ); Tue, 19 Jan 2016 11:06:01 -0500 Message-ID: <1453219556.11553.8.camel@fourier> Subject: Re: [PATCH 4.2.y-ckt 161/305] um: Fix get_signal() usage From: Kamal Mostafa To: Richard Weinberger Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, kernel-team@lists.ubuntu.com Date: Tue, 19 Jan 2016 08:05:56 -0800 In-Reply-To: <569AAB91.4090904@nod.at> References: <1452902519-2754-1-git-send-email-kamal@canonical.com> <1452902519-2754-162-git-send-email-kamal@canonical.com> <569AAB91.4090904@nod.at> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2016-01-16 at 21:44 +0100, Richard Weinberger wrote: > Am 16.01.2016 um 00:59 schrieb Kamal Mostafa: > > 4.2.8-ckt2 -stable review patch. If anyone has any objections, please let me know. > > > > ---8<------------------------------------------------------------ > > > > From: Richard Weinberger > > > > commit db2f24dc240856fb1d78005307f1523b7b3c121b upstream. > > > > If get_signal() returns us a signal to post > > we must not call it again, otherwise the already > > posted signal will be overridden. > > Before commit a610d6e672d this was the case as we stopped > > the while after a successful handle_signal(). > > > > Fixes: a610d6e672d ("pull clearing RESTORE_SIGMASK into block_sigmask()") > > Signed-off-by: Richard Weinberger > > Signed-off-by: Kamal Mostafa > > --- > > arch/um/kernel/signal.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/arch/um/kernel/signal.c b/arch/um/kernel/signal.c > > index 4f60e4a..50b6e9f 100644 > > --- a/arch/um/kernel/signal.c > > +++ b/arch/um/kernel/signal.c > > @@ -69,7 +69,7 @@ static int kern_do_signal(struct pt_regs *regs) > > struct ksignal ksig; > > int handled_sig = 0; > > > > - while (get_signal(&ksig)) { > > + if (get_signal(&ksig)) { > > handled_sig = 1; > > /* Whee! Actually deliver the signal. */ > > handle_signal(&ksig, regs); > > > > Please drop this patch, it will be reverted from Linus' tree soon. Dropped from 4.2-stable. Thanks Richard! -Kamal