LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Rong Chen <rong.a.chen@intel.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	Bart Van Assche <bvanassche@acm.org>,
	Christoph Hellwig <hch@lst.de>,
	LKML <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	lkp@01.org
Subject: Re: [block] 47cdee29ef: BUG:kernel_NULL_pointer_dereference,address
Date: Tue, 4 Jun 2019 21:11:53 +0800	[thread overview]
Message-ID: <20190604131152.GA17248@ming.t460p> (raw)
In-Reply-To: <20190604104326.GA22492@ming.t460p>

On Tue, Jun 04, 2019 at 06:43:27PM +0800, Ming Lei wrote:
> On Tue, Jun 04, 2019 at 05:06:44PM +0800, Rong Chen wrote:
> > Hi,
> > 
> > On 6/4/19 12:03 PM, Ming Lei wrote:
> > > Hi Rong Chen,
> > > 
> > > Thanks for your test & report!
> > > 
> > > On Tue, Jun 04, 2019 at 10:09:56AM +0800, kernel test robot wrote:
> > > > FYI, we noticed the following commit (built with gcc-7):
> > > > 
> > > > commit: 47cdee29ef9d94e485eb08f962c74943023a5271 ("block: move blk_exit_queue into __blk_release_queue")
> > > > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master
> > > > 
> > > > in testcase: trinity
> > > > with following parameters:
> > > > 
> > > > 	runtime: 300s
> > > > 
> > > > test-description: Trinity is a linux system call fuzz tester.
> > > > test-url: http://codemonkey.org.uk/projects/trinity/
> > > > 
> > > > 
> > > > on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 2G
> > > > 
> > > > caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
> > > > 
> > > > 
> > > > +-------------------------------------------------+------------+------------+
> > > > |                                                 | 31cb1d64da | 47cdee29ef |
> > > > +-------------------------------------------------+------------+------------+
> > > > | boot_successes                                  | 3          | 0          |
> > > > | boot_failures                                   | 13         | 8          |
> > > > | BUG:kernel_reboot-without-warning_in_test_stage | 13         |            |
> > > > | BUG:kernel_NULL_pointer_dereference,address     | 0          | 8          |
> > > > | Oops:#[##]                                      | 0          | 8          |
> > > > | RIP:blk_mq_free_rqs                             | 0          | 8          |
> > > > | Kernel_panic-not_syncing:Fatal_exception        | 0          | 8          |
> > > > +-------------------------------------------------+------------+------------+
> > > > 
> > > > 
> > > > If you fix the issue, kindly add following tag
> > > > Reported-by: kernel test robot <rong.a.chen@intel.com>
> > > > 
> > > > 
> > > > [    6.560544] BUG: kernel NULL pointer dereference, address: 0000000000000020
> > > > [    6.561658] #PF: supervisor read access in kernel mode
> > > > [    6.562495] #PF: error_code(0x0000) - not-present page
> > > > [    6.563277] PGD 0 P4D 0
> > > > [    6.563277] Oops: 0000 [#1] PTI
> > > > [    6.563277] CPU: 0 PID: 147 Comm: kworker/0:2 Tainted: G                T 5.2.0-rc1-00387-g47cdee29 #1
> > > > [    6.563277] Workqueue: events __blk_release_queue
> > > > [    6.563277] RIP: 0010:blk_mq_free_rqs+0x2c/0xaf
> > > 
> > > Looks there is race between removing queue and switching elevator, and
> > > which should be done by Trinity.
> > > 
> > > I guess that commit 47cdee29ef9d94e485eb08f962c74943023a5271 just
> > > changes the timing and makes it easy to trigger.
> > > 
> > > Please test the following patch and see if difference can be made.
> > > If the patch can't fix the issue, please enable KASAN and reproduce,
> > > then more useful log may be got.
> > 
> > The patch doesn't work, Attached please find the dmesg file with KASAN
> > enabled.
> 
> 
> Thanks for your test.
> 
> I think I can understand the issue now, it is because blk_mq_free_rqs()
> needs tag_set, however tag_set may have been freed.
> 
> In theory, we don't need tagset for freeing scheduler tags which is
> per-request-queue, not like driver tags.
> 
> However, the big trouble is that .exit_request() needs tagset, and this
> one is a generic issue, not limited to ide.
> 
> Give me a little time, I will investigate and see if good solution can be
> figured out. Otherwise, we may have to revert that commit.

Patch has been posted out:

https://lore.kernel.org/linux-block/20190604130802.17076-1-ming.lei@redhat.com/T/#u


Thanks,
Ming

      reply	other threads:[~2019-06-04 13:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-04  2:09 kernel test robot
2019-06-04  4:03 ` Ming Lei
2019-06-04  9:06   ` Rong Chen
2019-06-04 10:43     ` Ming Lei
2019-06-04 13:11       ` Ming Lei [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=20190604131152.GA17248@ming.t460p \
    --to=ming.lei@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@01.org \
    --cc=rong.a.chen@intel.com \
    --cc=torvalds@linux-foundation.org \
    --subject='Re: [block] 47cdee29ef: BUG:kernel_NULL_pointer_dereference,address' \
    /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

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).