diff mbox

[3.16.y-ckt,stable] Patch "um: Fix get_signal() usage" has been added to staging queue

Message ID 1452882173-20389-1-git-send-email-luis.henriques@canonical.com
State New
Headers show

Commit Message

Luis Henriques Jan. 15, 2016, 6:22 p.m. UTC
This is a note to let you know that I have just added a patch titled

    um: Fix get_signal() usage

to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree 
which can be found at:

    http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.16.y-queue

This patch is scheduled to be released in version 3.16.7-ckt23.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.16.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

---8<------------------------------------------------------------

From b829e81539419d29be44358e035769eb902668ba Mon Sep 17 00:00:00 2001
From: Richard Weinberger <richard@nod.at>
Date: Wed, 18 Nov 2015 09:37:15 +0100
Subject: um: Fix get_signal() usage

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 <richard@nod.at>
[ luis: backported to 3.16:
  - 3.16 still uses the get_signal_to_deliver(), which was changed with
    commit 307627eebbb0 ("um: Use get_signal() signal_setup_done()") ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
 arch/um/kernel/signal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Richard Weinberger Jan. 16, 2016, 8:43 p.m. UTC | #1
Hi!

Am 15.01.2016 um 19:22 schrieb Luis Henriques:
> This is a note to let you know that I have just added a patch titled
> 
>     um: Fix get_signal() usage
> 
> to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree 
> which can be found at:
> 
>     http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.16.y-queue
> 
> This patch is scheduled to be released in version 3.16.7-ckt23.
> 
> If you, or anyone else, feels it should not be added to this tree, please 
> reply to this email.

Please drop this patch, it will be reverted from Linus' tree soon.

Thanks,
//richard
Luis Henriques Jan. 18, 2016, 10:22 p.m. UTC | #2
On Sat, Jan 16, 2016 at 09:43:30PM +0100, Richard Weinberger wrote:
> Hi!
> 
> Am 15.01.2016 um 19:22 schrieb Luis Henriques:
> > This is a note to let you know that I have just added a patch titled
> > 
> >     um: Fix get_signal() usage
> > 
> > to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree 
> > which can be found at:
> > 
> >     http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.16.y-queue
> > 
> > This patch is scheduled to be released in version 3.16.7-ckt23.
> > 
> > If you, or anyone else, feels it should not be added to this tree, please 
> > reply to this email.
> 
> Please drop this patch, it will be reverted from Linus' tree soon.
> 

Thanks for the heads-up.  I'll drop it from the 3.16 queue.

Cheers,
--
Luís


> Thanks,
> //richard
diff mbox

Patch

diff --git a/arch/um/kernel/signal.c b/arch/um/kernel/signal.c
index f57e02e7910f..f57efb7c844d 100644
--- a/arch/um/kernel/signal.c
+++ b/arch/um/kernel/signal.c
@@ -74,7 +74,7 @@  static int kern_do_signal(struct pt_regs *regs)
 	struct siginfo info;
 	int sig, handled_sig = 0;

-	while ((sig = get_signal_to_deliver(&info, &ka_copy, regs, NULL)) > 0) {
+	if ((sig = get_signal_to_deliver(&info, &ka_copy, regs, NULL)) > 0) {
 		handled_sig = 1;
 		/* Whee!  Actually deliver the signal.  */
 		handle_signal(regs, sig, &ka_copy, &info);