From: Oleg Nesterov <oleg@redhat.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>,
David Howells <dhowells@redhat.com>,
David Woodhouse <dwmw2@infradead.org>,
Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86: do_signal: simplify the TS_RESTORE_SIGMASK logic
Date: Mon, 11 Jul 2011 13:39:14 +0200 [thread overview]
Message-ID: <20110711113914.GA4404@redhat.com> (raw)
In-Reply-To: <20110710210833.GH11013@ZenIV.linux.org.uk>
On 07/10, Al Viro wrote:
>
> On Sun, Jul 10, 2011 at 08:22:03PM +0200, Oleg Nesterov wrote:
>
> > 2. do_signal() also clears TS_RESTORE_SIGMASK if handle_signal()
> > succeeds.
> >
> > We can move this to setup_rt_frame() as well, this avoids the
> > unnecessary checks and makes the logic more clear.
>
>
> > + current_thread_info()->status &= ~TS_RESTORE_SIGMASK;
> > return ret;
>
> This is broken.
You know, I was also going to change this "return ret", "return 0"
looks more clear to me. But then I should have renamed "ret", and
I decided to leave it alone.
> If setup_rt_frame() fails, you don't want to do that.
Sure. Please look at the code, it does
if (ret) {
force_sigsegv(sig, current);
return -EFAULT;
}
current_thread_info()->status &= ~TS_RESTORE_SIGMASK;
return ret;
We clear TS_RESTORE_SIGMASK only if we return 0.
Oleg.
next prev parent reply other threads:[~2011-07-11 11:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-10 18:22 [PATCH] x86: do_signal: simplify the TS_RESTORE_SIGMASK logic Oleg Nesterov
2011-07-10 21:08 ` Al Viro
2011-07-11 11:39 ` Oleg Nesterov [this message]
2011-07-13 9:25 ` Matt Fleming
2011-07-13 15:23 ` Oleg Nesterov
2011-07-15 5:47 ` [tip:x86/signal] x86, do_signal: Simplify " tip-bot for Oleg Nesterov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110711113914.GA4404@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=viro@ZenIV.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.