2.6.9-rc2+BK hvc console oops

Ryan Arnold rsa at us.ibm.com
Sat Sep 25 06:15:23 EST 2004


On Sat, 2004-09-18 at 02:06, Anton Blanchard wrote:
> Hi,
> 
> Just got this oops on current -BK.
> 
> Anton
> 
> INIT: Sending processes the KILL signal
> cpu 0x0: Vector: 300 (Data Access) at [c00000000f86f460]
>     pc: c0000000003fdb38: ._spin_lock_irqsave+0x30/0xbc
>     lr: c000000000221c18: .hvc_hangup+0x38/0xd4

Anton,

I traded emails with Alan Cox on the LKML about some odd tty line
discipline behavior exposed by this bug.  Basically we found that there
is a problem where late ldisc writes can follow a final tty close and
another issue where a quick tty close followed by open->hangup allows
hangup to be issued against a closed tty.

My previous short-sighted patch simply set tty->driver_data = NULL but
this has caused problems with these late calls oopsing when the
functions expected driver_data to be a valid hvc_struct instance.

This new patch should prevent late hangups and writes after final closes
from doing anything nasty to the system if/when they occur.  I now
simply check the struct reference count and block writes and hangups
when the hvc_struct ref count is 0 and I leave tty->driver_data alone in
hvc_close().

Please test this patch out and verify that you can't reproduce and then
I'll send it along to the LKML.

Alan has both of these issues on his todo list, at which time we won't
have to worry about these unexpected writes/hangups.

Thanks for the patience,

Ryan S. Arnold
IBM Linux Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hvc_hangup_write_close.patch
Type: text/x-patch
Size: 1760 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20040924/10622045/attachment.bin 


More information about the Linuxppc64-dev mailing list