Re: [PATCH 1/1] tty: set_termios/set_termiox should not return-EINTR
From: Oleg Nesterov
Date: Wed Jan 30 2013 - 06:53:30 EST
On 01/30, Oleg Nesterov wrote:
>
> On 01/29, Jiri Slaby wrote:
> >
> > On 01/29/2013 08:49 PM, Oleg Nesterov wrote:
> > >
> > > 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.
>
> I have no idea, I only saw the test-case yesterday.
But if you ask how this affects /bin/bash, I can quote the description
from Lingzhu,
sigchld.sh (reproducer):
#!/bin/bash
( while :; do kill -CHLD $$ 2>&- || break; done ) &
while :; do
read -p 1 -t 0.3 -d ' '
read -p 2
done
Double free happens in read_builtin, here
FREE (tofree);
-> xfree (orig_input_string);
return (retval);
result:
sigchld.sh: line 4: read: error setting terminal attributes: Interrupted system call
1
*** glibc detected *** ./bash-4.1.2-14.el6/bin/bash: double free or corruption (out): 0x00000000020f45b0 ***
======= Backtrace: =========
(...)
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/