All of lore.kernel.org
 help / color / mirror / Atom feed
* Should .dtr_rts do tty_port_tty_get?
@ 2011-03-25 10:45 Jiri Slaby
  2011-03-25 10:45 ` [PATCH 1/1] TTY: serial_core, fix dtr_rts NULL dereference Jiri Slaby
  0 siblings, 1 reply; 9+ messages in thread
From: Jiri Slaby @ 2011-03-25 10:45 UTC (permalink / raw)
  To: Greg KH; +Cc: Alan Cox, linux-serial, LKML, Jiri Slaby

Hi,

I'm playing with a serial device and got a nice oops. Maybe after some
weird stty's, I don't know. But it dies in uart_dtr_rts:
        .loc 1 1535 0
        movq    (%rbx), %r13    # port_1(D)->tty, D.26746
...
        .loc 1 1494 0
        testb   $2, 224(%r13)   #, D.26746_10->flags
                    ^^^^^^^^^
                      HERE

Because r13 (port->tty) is NULL. So the question is about the principle.
Should it call tty_port_tty_get or is it a bug in the TTY layer and
uart_dtr_rts should not be called with port->tty == NULL?

I'll attach a patch which does the former as a reply to this message.

BTW only serial_core needs tty in dtr_rts.

thanks,
-- 
js
suse labs

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-03-29 22:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-25 10:45 Should .dtr_rts do tty_port_tty_get? Jiri Slaby
2011-03-25 10:45 ` [PATCH 1/1] TTY: serial_core, fix dtr_rts NULL dereference Jiri Slaby
2011-03-25 11:00   ` Alan Cox
2011-03-25 14:43     ` Jiri Slaby
2011-03-25 20:49       ` Alan Cox
2011-03-29 15:10         ` Jiri Slaby
2011-03-29 22:10           ` [PATCH 1/3] serial: core, move termios handling to uart_startup Jiri Slaby
2011-03-29 22:10             ` [PATCH 2/3] serial: core, do not set DTR/RTS twice on startup Jiri Slaby
2011-03-29 22:10             ` [PATCH 3/3] serial: core, remove uart_update_termios Jiri Slaby

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.