From: Jiri Slaby <jslaby@suse.cz>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Lingzhu Xiang <lxiang@redhat.com>,
Roman Rakus <rrakus@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] tty: set_termios/set_termiox should not return -EINTR
Date: Tue, 29 Jan 2013 20:35:12 +0100 [thread overview]
Message-ID: <51082470.2070601@suse.cz> (raw)
In-Reply-To: <20130129190741.GA28004@redhat.com>
On 01/29/2013 08:07 PM, Oleg Nesterov wrote:
> See https://bugzilla.redhat.com/show_bug.cgi?id=904907
> read command causes bash to abort with double free or corruption (out).
>
> A simple test-case from Roman:
>
> // Compile the reproducer and send sigchld ti that process.
> // EINTR occurs even if SA_RESTART flag is set.
>
> void handler(int sig)
> {
> }
>
> main()
> {
> struct sigaction act;
> act.sa_handler = handler;
> act.sa_flags = SA_RESTART;
> sigaction (SIGCHLD, &act, 0);
> struct termio ttp;
> ioctl(0, TCGETA, &ttp);
> while(1)
> {
> if (ioctl(0, TCSETAW, ttp) < 0)
> {
> if (errno == EINTR)
> {
> fprintf(stderr, "BUG!"); return(1);
> }
> }
> }
> }
>
> Change set_termios/set_termiox to return -ERESTARTSYS to fix this
> particular problem.
This looks reasonable. However given the link above says:
You are not authorized to access bug #904907.
the description above is poor. What problem exactly does this fix? Why
this should go to stable at all?
--
js
suse labs
next prev parent reply other threads:[~2013-01-29 19:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-29 19:07 [PATCH 0/1] tty: set_termios/set_termiox should not return -EINTR Oleg Nesterov
2013-01-29 19:07 ` [PATCH 1/1] " Oleg Nesterov
2013-01-29 19:35 ` Jiri Slaby [this message]
2013-01-29 19:49 ` Oleg Nesterov
2013-01-29 22:01 ` Jiri Slaby
2013-01-30 11:46 ` Oleg Nesterov
2013-01-30 11:51 ` Oleg Nesterov
2013-01-30 13:01 ` Roman Rakus
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=51082470.2070601@suse.cz \
--to=jslaby@suse.cz \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lxiang@redhat.com \
--cc=oleg@redhat.com \
--cc=rrakus@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox