lkml.org 
[lkml]   [2020]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Crash when specifying non-existent serial port in speakup / tty_kopen
On Wed, Nov 04, 2020 at 10:30:05PM +0100, Samuel Thibault wrote:
> Matthias Reichl, le mer. 04 nov. 2020 22:15:05 +0100, a ecrit:
> > > This looks like only a warning, did it actually crash?
> >
> > Yes, scroll down a bit, the null pointer oops followed almost
> > immediately after that
> >
> > [ 49.979043] BUG: kernel NULL pointer dereference, address: 0000000000000090
>
> Ah, [ 50.102938] tty_init_dev+0xb5/0x1d0
>
> probably the trailing release_tty call that does
>
> tty->port->itty = NULL;
> (itty is after a struct tty_bufhead + the tty pointer, that looks
> plausible).
>
> so probably an if (tty->port) in release_tty could help?

Thanks a lot, good catch! This is indeed where the crash happens
and checking for tty->port in release_tty() prevents that.
I'll send a patch.

so long,

Hias

\
 
 \ /
  Last update: 2020-11-05 13:21    [W:0.054 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site