public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Yi Zhang <yi.zhang@redhat.com>
To: Sagi Grimberg <sagi@grimberg.me>,
	linux-nvme@lists.infradead.org,
	linux-block <linux-block@vger.kernel.org>
Cc: axboe@kernel.dk, Rachel Sibley <rasibley@redhat.com>,
	Chaitanya.Kulkarni@wdc.com, CKI Project <cki-project@redhat.com>,
	Ming Lei <ming.lei@redhat.com>
Subject: Re: kernel null pointer at nvme_tcp_init_iter+0x7d/0xd0 [nvme_tcp]
Date: Tue, 9 Feb 2021 20:57:55 +0800	[thread overview]
Message-ID: <aec13f12-640c-77d5-bbdd-b4a3e18f1bf2@redhat.com> (raw)
In-Reply-To: <a88fd4c8-8d5c-6934-39bc-5c864e3ed84f@grimberg.me>



On 2/9/21 6:25 PM, Sagi Grimberg wrote:
>
>> Hi Sagi
>>
>> On 2/8/21 5:46 PM, Sagi Grimberg wrote:
>>>
>>>> Hello
>>>>
>>>> We found this kernel NULL pointer issue with latest 
>>>> linux-block/for-next and it's 100% reproduced, let me know if you 
>>>> need more info/testing, thanks
>>>>
>>>> Kernel repo: 
>>>> https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
>>>> Commit: 11f8b6fd0db9 - Merge branch 'for-5.12/io_uring' into for-next
>>>>
>>>> Reproducer: blktests nvme-tcp/012
>>>
>>> Thanks for reporting Ming, I've tried to reproduce this on my VM
>>> but did not succeed. Given that you have it 100% reproducible,
>>> can you try to revert commit:
>>>
>>> 0dc9edaf80ea nvme-tcp: pass multipage bvec to request iov_iter
>>>
>>
>> Revert this commit fixed the issue and I've attached the config. :)
>
> Hey Ming,
>
> Instead of revert, does this patch makes the issue go away?
Hi Sagi

Below patch fixed the issue, let me know if you need more testing. :)

Thanks
Yi

> -- 
> diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
> index 619b0d8f6e38..69f59d2c5799 100644
> --- a/drivers/nvme/host/tcp.c
> +++ b/drivers/nvme/host/tcp.c
> @@ -2271,7 +2271,7 @@ static blk_status_t 
> nvme_tcp_setup_cmd_pdu(struct nvme_ns *ns,
>         req->data_len = blk_rq_nr_phys_segments(rq) ?
>                                 blk_rq_payload_bytes(rq) : 0;
>         req->curr_bio = rq->bio;
> -       if (req->curr_bio)
> +       if (req->curr_bio && req->data_len)
>                 nvme_tcp_init_iter(req, rq_data_dir(rq));
>
>         if (rq_data_dir(rq) == WRITE &&
> -- 
>


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  reply	other threads:[~2021-02-09 12:58 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cki.F3E139361A.EN5MUSJKK9@redhat.com>
     [not found] ` <630237787.11660686.1612580898410.JavaMail.zimbra@redhat.com>
2021-02-07  4:50   ` kernel null pointer at nvme_tcp_init_iter[nvme_tcp] with blktests nvme-tcp/012 Yi Zhang
2021-02-07  5:25     ` Chaitanya Kulkarni
2021-02-08  6:48       ` Yi Zhang
2021-02-07  5:48     ` Chaitanya Kulkarni
2021-02-07  5:58     ` Chaitanya Kulkarni
2021-02-07  7:14   ` kernel null pointer at nvme_tcp_init_iter+0x7d/0xd0 [nvme_tcp] Chaitanya Kulkarni
2021-02-08  9:53     ` Sagi Grimberg
2021-02-08  9:46   ` Sagi Grimberg
2021-02-08 13:28     ` Yi Zhang
2021-02-08 17:54       ` Sagi Grimberg
2021-02-08 18:42         ` Sagi Grimberg
2021-02-09  4:21           ` Ming Lei
2021-02-09  7:21             ` Sagi Grimberg
2021-02-09  7:50               ` Ming Lei
2021-02-09  8:34                 ` Chaitanya Kulkarni
2021-02-09 10:09                   ` Sagi Grimberg
2021-02-09 10:07                 ` Sagi Grimberg
2021-02-09 10:33                   ` Ming Lei
2021-02-09 10:36                     ` Sagi Grimberg
2021-02-09 10:25       ` Sagi Grimberg
2021-02-09 12:57         ` Yi Zhang [this message]
2021-02-09 18:01           ` Sagi Grimberg
2021-02-10  2:51             ` Yi Zhang
2021-02-10  3:38               ` Keith Busch
2021-02-10  5:03               ` Chaitanya Kulkarni
2021-02-10 22:06                 ` Sagi Grimberg
2021-02-10 22:15                   ` Chaitanya Kulkarni

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=aec13f12-640c-77d5-bbdd-b4a3e18f1bf2@redhat.com \
    --to=yi.zhang@redhat.com \
    --cc=Chaitanya.Kulkarni@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=cki-project@redhat.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=ming.lei@redhat.com \
    --cc=rasibley@redhat.com \
    --cc=sagi@grimberg.me \
    /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