Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1310706 > unrolled thread

[PATCH 4.2.y-ckt 161/305] um: Fix get_signal() usage

Started byKamal Mostafa <kamal@canonical.com>
First post2016-01-16 01:50 +0100
Last post2016-01-19 17:10 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.2.y-ckt 161/305] um: Fix get_signal() usage Kamal Mostafa <kamal@canonical.com> - 2016-01-16 01:50 +0100
    Re: [PATCH 4.2.y-ckt 161/305] um: Fix get_signal() usage Richard Weinberger <richard@nod.at> - 2016-01-16 21:50 +0100
      Re: [PATCH 4.2.y-ckt 161/305] um: Fix get_signal() usage Kamal Mostafa <kamal@canonical.com> - 2016-01-19 17:10 +0100

#1310706 — [PATCH 4.2.y-ckt 161/305] um: Fix get_signal() usage

FromKamal Mostafa <kamal@canonical.com>
Date2016-01-16 01:50 +0100
Subject[PATCH 4.2.y-ckt 161/305] um: Fix get_signal() usage
Message-ID<qRne3-5ix-47@gated-at.bofh.it>
4.2.8-ckt2 -stable review patch.  If anyone has any objections, please let me know.

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

From: Richard Weinberger <richard@nod.at>

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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 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);
-- 
1.9.1

[toc] | [next] | [standalone]


#1311028

FromRichard Weinberger <richard@nod.at>
Date2016-01-16 21:50 +0100
Message-ID<qRFXk-13Z-3@gated-at.bofh.it>
In reply to#1310706
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 <richard@nod.at>
> 
> 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>
> Signed-off-by: Kamal Mostafa <kamal@canonical.com>
> ---
>  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.

Thanks,
//richard

[toc] | [prev] | [next] | [standalone]


#1312356

FromKamal Mostafa <kamal@canonical.com>
Date2016-01-19 17:10 +0100
Message-ID<qSH11-1Nb-35@gated-at.bofh.it>
In reply to#1311028
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 <richard@nod.at>
> > 
> > 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>
> > Signed-off-by: Kamal Mostafa <kamal@canonical.com>
> > ---
> >  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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web