linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
To: Rob Herring <robh@kernel.org>
Cc: kernel test robot <xiaolong.ye@intel.com>,
	Alan Cox <alan@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Peter Hurley <peter@hurleysoftware.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>, LKP ML <lkp@01.org>
Subject: Re: [lkp] [tty] 761ed4a945: BUG: unable to handle kernel NULL pointer dereference at 000000000000046c
Date: Fri, 9 Sep 2016 23:00:11 +0100	[thread overview]
Message-ID: <20160909230011.6ccf02d3@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <CAL_Jsq+_8UpHoGCOtWFOQMmb0Vbew3e3ZXR=8sKpUesTdJh8aA@mail.gmail.com>

On Fri, 9 Sep 2016 11:40:47 -0500
Rob Herring <robh@kernel.org> wrote:

> On Wed, Sep 7, 2016 at 3:47 PM, Rob Herring <robh@kernel.org> wrote:
> > On Tue, Sep 6, 2016 at 1:33 AM, kernel test robot <xiaolong.ye@intel.com> wrote:  
> >>
> >> FYI, we noticed the following commit:
> >>
> >> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> >> commit 761ed4a94582ab291aa24dcbea4e01e8936488c8 ("tty: serial_core: convert uart_close to use tty_port_close")
> >>
> >> in testcase: boot
> >>
> >> on test machine: qemu-system-x86_64 -enable-kvm -cpu host -smp 2 -m 4G  
> >
> > Is the rootfs used in this test available to help me reproduce?  
> 
> I reproduced this now. There's a couple of ways to fix this, so I'm
> looking for some advice. The problem is tty_port->ops.shutdown()
> doesn't get called for a port marked as a console. So interrupts can
> still fire and then uart_tx_stopped() called after tty_struct becomes
> NULL. I can add a NULL check in uart_tx_stopped to fix that. There are
> possibly other spots that need a similar fix. That's going to be
> needed anyway as I remove dependencies on tty_struct. The 2nd
> possibility is just not marking the tty_port as a console. That seems
> wrong, but is what we had before this change. A third option is move
> the console handling in tty_port_shutdown into the tty_port drivers.
> That seems the wrong direction too. Thoughts?

The uart layer handles console itself so I'd suggest the quick fix for
now. The other reason for that is that if we can open/close/write to a
tty port without a tty most of the existing magic crap for consoles goes
away because a console can just open and close the tty port directly.

Alan

      reply	other threads:[~2016-09-09 22:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-06  6:33 [lkp] [tty] 761ed4a945: BUG: unable to handle kernel NULL pointer dereference at 000000000000046c kernel test robot
2016-09-07 20:47 ` Rob Herring
2016-09-09 16:40   ` Rob Herring
2016-09-09 22:00     ` One Thousand Gnomes [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=20160909230011.6ccf02d3@lxorguk.ukuu.org.uk \
    --to=gnomes@lxorguk.ukuu.org.uk \
    --cc=alan@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@01.org \
    --cc=peter@hurleysoftware.com \
    --cc=robh@kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=xiaolong.ye@intel.com \
    /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).