lkml.org 
[lkml]   [2013]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] tty: set_termios/set_termiox should not return -EINTR
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


\
 
 \ /
  Last update: 2013-01-29 21:21    [W:0.081 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site