public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
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 23:01:15 +0100	[thread overview]
Message-ID: <510846AB.8010900@suse.cz> (raw)
In-Reply-To: <20130129194908.GA29480@redhat.com>

On 01/29/2013 08:49 PM, Oleg Nesterov wrote:
> On 01/29, Jiri Slaby wrote:
>>
>> On 01/29/2013 08:07 PM, Oleg Nesterov wrote:
>>>
>>> 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?
> 
> A syscall must never return EINTR unless it can not be restarted
> (or it should not be restarted by, say, historical reasons).
> 
> In this case ioctl(TCSETAW) returns -EINTR even if it is interrupted
> by the signal which has the SA_RESTART handler. This doesn't look right
> no matter what.

Yes, and more, it is against POSIX. I don't dispute the correctness of
the patch at all.

>> Why this should go to stable at all?
> 
> OK, this is up to you.
> 
> But if this patch is correct, perhaps it should be backported. This
> -EINTR breaks /bin/bash which doesn't expect it, this leads to
> "*** glibc detected *** ./bash-4.1.2-14.el6/bin/bash: double free or corruption (out):"
> 
> Perhaps /bin/bash is buggy too, I do not know. Probably Roman and
> Lingzhu can tell more.

But I really want to hear more details here (the commit log deserves
that). E.g. why it started causing problems right now. The code is there
like forever.

-- 
js
suse labs

  reply	other threads:[~2013-01-29 22:01 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
2013-01-29 19:49     ` Oleg Nesterov
2013-01-29 22:01       ` Jiri Slaby [this message]
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=510846AB.8010900@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