<div class="gmail_quote">On 24 June 2011 15:29, Dave Anderson <span dir="ltr"><<a href="mailto:anderson@redhat.com">anderson@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5">
</div></div>Yeah, although the contents tty->read_buf are hard to explain.<br>
It gets allocated during n_tty_open() and freed during n_tty_close().<br>
And at the beginning of n_tty_read() there's:<br>
<div class="im"><br>
        BUG_ON(!tty->read_buf);<br>
<br>
</div>and the dump-time contents show a buffer allocated:<br>
<div class="im"><br>
crash> tty_struct ffff8802cbd54800<br>
 struct tty_struct { ...<br>
   magic = 21505,<br>
   driver = 0xffff88031b54ea00,<br>
   ops = 0xffffffff8130f650,<br>
   name = "pts9\000\...",<br>
   driver_data = 0xffff88029c8a9668,<br>
   icanon = 1 '\001',<br>
   read_buf = 0xffff8802cbfe6000 "",<br>
   read_head = 0,<br>
   read_tail = 0,<br>
   read_cnt = 0,<br>
   ...<br>
<br>
</div>but it's a NULL pointer when read during the function?<br>
<div><div></div><br></div></blockquote></div><br>Hmm, that is interesting. Assuming that we are in fact dealing with a software bug where this memory area changed recently, the only possible explanation I can see is that n_tty_close() has been called while n_tty_read() is in progress. I know that's not supposed to happen, but the implication would be that is the bug - a locking issue in the tty layer that allows them to be closed while calls are in progress. Sadly that code isn't as mature as it should be and there was a whole load of concurrency issues fixed in the late 2.6.30s; I don't know the details, but it might be one of those.<br>
<br>Alternatively it's regular old hardware failure and we're just looking at junk.<br><br>I think that's about as far as we can go on the information available (and also the extent to which it's relevant to this mailing list)<br>