From: Oleg Nesterov <oleg@redhat.com>
To: Denys Vlasenko <dvlasenk@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] epoll_[p]wait: fix spurious -EINTR on ptrace attach
Date: Tue, 25 Jun 2013 20:46:19 +0200 [thread overview]
Message-ID: <20130625184619.GA4003@redhat.com> (raw)
In-Reply-To: <1372172737-18726-1-git-send-email-dvlasenk@redhat.com>
On 06/25, Denys Vlasenko wrote:
>
> Before this change, epoll_wait and epoll_pwait
> spuriously return with -EINTR on ptrace attach.
>
> By analogy with poll syscall family, epoll_[p]wait should be interruptible
> by signals regardless of SA_RESTART, therefore, this change
> makes them return -ERESTARTNOHAND if timeout has expired.
Denys, I am not even going to actuallu read this patch, but I think
you should redo it in any case... And you need to cc maintainers.
Because I believe we should cleanup fs/eventpoll.c first, I'll try
to send the patch(es) soon.
> In order to define a "sigset_t ksigmask" member,
You do not need it. But the reason is not clear until the cleanup.
> + if (sigmask) {
> + ksigmask = *sigmask;
> + sigdelsetmask(&ksigmask, sigmask(SIGKILL) | sigmask(SIGSTOP));
> + sigprocmask(SIG_SETMASK, &ksigmask, &ksigsaved);
sigprocmask() should not be used. Again, we need cleanup.
> + }
> + else
> + /*
> + * If we changed the signal mask, we need to restore the original one.
> + */
> + if (sigmask) {
> + sigprocmask(SIG_SETMASK, &ksigsaved, NULL);
> + }
cough.. in this case you should also update Documentation/CodingStyle ;)
Oleg.
next prev parent reply other threads:[~2013-06-25 18:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-25 15:05 [PATCH] epoll_[p]wait: fix spurious -EINTR on ptrace attach Denys Vlasenko
2013-06-25 18:46 ` Oleg Nesterov [this message]
2013-06-25 20:06 ` Oleg Nesterov
2013-06-26 7:43 ` Denys Vlasenko
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=20130625184619.GA4003@redhat.com \
--to=oleg@redhat.com \
--cc=dvlasenk@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/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.