Messages in this thread | | | Date | Tue, 29 Jan 2013 20:35:12 +0100 | From | Jiri Slaby <> | Subject | Re: [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
| |