From: Matthias Reichl <hias@horus.com>
To: Samuel Thibault <samuel.thibault@ens-lyon.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
speakup@linux-speakup.org, linux-serial@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: Crash when specifying non-existent serial port in speakup / tty_kopen
Date: Thu, 5 Nov 2020 13:21:34 +0100 [thread overview]
Message-ID: <20201105122134.GA6084@camel2.lan> (raw)
In-Reply-To: <20201104213005.khivjvcwkaz7kz4g@function>
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
prev parent reply other threads:[~2020-11-05 12:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-04 14:57 Crash when specifying non-existent serial port in speakup / tty_kopen Matthias Reichl
2020-11-04 20:13 ` Samuel Thibault
2020-11-04 21:15 ` Matthias Reichl
2020-11-04 21:30 ` Samuel Thibault
2020-11-05 12:21 ` Matthias Reichl [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201105122134.GA6084@camel2.lan \
--to=hias@horus.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=samuel.thibault@ens-lyon.org \
--cc=speakup@linux-speakup.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).