All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: "Belanger, Martin" <Martin.Belanger@dell.com>
Cc: "linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Subject: Re: nvme-tcp: kernel NULL pointer dereference, address: 0000000000000034
Date: Wed, 15 Mar 2023 13:39:04 -0600	[thread overview]
Message-ID: <ZBIe2H9J7XDs/zoD@kbusch-mbp.dhcp.thefacebook.com> (raw)
In-Reply-To: <SJ0PR19MB45449E47262DA497633941F9F2BF9@SJ0PR19MB4544.namprd19.prod.outlook.com>

On Wed, Mar 15, 2023 at 06:23:32PM +0000, Belanger, Martin wrote:
> > 
> > On Wed, Mar 15, 2023 at 05:48:14PM +0000, Belanger, Martin wrote:
> > > I'm running tests where I connect/disconnect to/from a few I/O controllers
> > using the nvme_tcp driver. I use nvmet_tcp with a null_blk device to simulate the
> > target. The kernel module crashes (trace below) while trying to connect over
> > TCP. This happens on Fedora 37 and Ubuntu 22.04. I also recompiled the kernel
> > using the latest nvme-6.4 branch and I'm still seeing the crash.
> > >
> > > I'm not sure how to debug this further. Any suggestions?
> > 
> > Never seen anyone try to use poll queues with nvme tcp before. It doesn't look
> > like that would work for a connect command since there's no bdev at this point,
> > and polling needs a bdev.
> 
> Thanks for pointing me in the right direction.
> I wrote a test program that exercises all the different options available.
> The crash went away once I removed "nr-poll-queues=4". 
> But this begs the question: should a user-space program be given the ability
> to crash the kernel by simply providing the wrong (or weird) arguments?

Right, we certainly don't want to let an easy kernel crash like this exist now
that we know it's there. I'm just consdering a couple different ways to fix it.
We could just reject user polling options for nvme fabrics, or we could make
polling work with just a request_queue instead of needing a bdev.


  reply	other threads:[~2023-03-15 19:39 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-15 17:48 nvme-tcp: kernel NULL pointer dereference, address: 0000000000000034 Belanger, Martin
2023-03-15 18:13 ` Keith Busch
2023-03-15 18:23   ` Belanger, Martin
2023-03-15 19:39     ` Keith Busch [this message]
2023-03-16  8:57       ` Sagi Grimberg
2023-03-15 22:49     ` Chaitanya Kulkarni
2023-03-15 22:24 ` Keith Busch
2023-03-16  9:00   ` Sagi Grimberg
2023-03-16 15:20     ` Keith Busch
2023-03-16 16:11       ` Sagi Grimberg
2023-03-16 17:19         ` Keith Busch
2023-03-19 13:10           ` Sagi Grimberg
2023-03-21  8:23             ` Daniel Wagner
2023-03-21  8:49               ` Daniel Wagner
2023-03-21  8:56                 ` Sagi Grimberg
2023-03-21  9:09                   ` Daniel Wagner
2023-03-21  9:15                     ` Sagi Grimberg
2023-03-21  9:25                       ` Daniel Wagner
2023-03-21  9:37                         ` Sagi Grimberg
2023-03-21 10:15                           ` Sagi Grimberg
2023-03-21 16:26                             ` Keith Busch
2023-03-22  7:12                               ` Sagi Grimberg
2023-03-21 10:40                           ` Daniel Wagner
2023-03-21 10:53                             ` Sagi Grimberg
2023-03-21 11:06                               ` Daniel Wagner
2023-03-21 11:10                                 ` Sagi Grimberg
2023-03-21 11:14                                   ` Sagi Grimberg
2023-03-21 12:41                                     ` Daniel Wagner
2023-03-21 12:58                                   ` Daniel Wagner
2023-03-21 13:08                                     ` Sagi Grimberg

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=ZBIe2H9J7XDs/zoD@kbusch-mbp.dhcp.thefacebook.com \
    --to=kbusch@kernel.org \
    --cc=Martin.Belanger@dell.com \
    --cc=linux-nvme@lists.infradead.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 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.