From: "Grupi, Elad" <Elad.Grupi@dell.com>
To: Hou Pu <houpu.main@gmail.com>
Cc: "linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
"sagi@grimberg.me" <sagi@grimberg.me>
Subject: RE: [PATCH] nvmet-tcp: fix a segmentation fault during io parsing error
Date: Fri, 26 Mar 2021 18:00:36 +0000 [thread overview]
Message-ID: <DM6PR19MB4011343E6FA2ABAAEB219D73EF619@DM6PR19MB4011.namprd19.prod.outlook.com> (raw)
In-Reply-To: <20210326102636.55949-1-houpu.main@gmail.com>
Correct. Fixed your comments
Thanks,
Elad
-----Original Message-----
From: Hou Pu <houpu.main@gmail.com>
Sent: Friday, 26 March 2021 13:27
To: Grupi, Elad
Cc: linux-nvme@lists.infradead.org; sagi@grimberg.me; houpu.main@gmail.com
Subject: RE: [PATCH] nvmet-tcp: fix a segmentation fault during io parsing error
[EXTERNAL EMAIL]
On Date: Fri, 26 Mar 2021 00:49:52 +0200, Elad Grupi wrote:
> diff --git a/drivers/nvme/target/tcp.c b/drivers/nvme/target/tcp.c
> index 70cc507d1565..f10fa2b5aaeb 100644
> --- a/drivers/nvme/target/tcp.c
> +++ b/drivers/nvme/target/tcp.c
> @@ -154,6 +154,7 @@ static struct workqueue_struct *nvmet_tcp_wq;
> static const struct nvmet_fabrics_ops nvmet_tcp_ops; static void
> nvmet_tcp_free_cmd(struct nvmet_tcp_cmd *c); static void
> nvmet_tcp_finish_cmd(struct nvmet_tcp_cmd *cmd);
> +static void nvmet_tcp_queue_response(struct nvmet_req *req);
Do we need declare it here?
> @@ -1103,9 +1121,14 @@ static int nvmet_tcp_try_recv_data(struct nvmet_tcp_queue *queue)
> return 0;
> }
> - if (!(cmd->flags & NVMET_TCP_F_INIT_FAILED) &&
> - cmd->rbytes_done == cmd->req.transfer_len) {
> - cmd->req.execute(&cmd->req);
> + if (cmd->rbytes_done == cmd->req.transfer_len) {
> + if (unlikely(cmd->flags & NVMET_TCP_F_INIT_FAILED))
> + nvmet_tcp_queue_response(&cmd->req);
> + else {
> + if (unlikely(cmd == &queue->connect))
> + nvmet_tcp_executing_connect_cmd(queue);
Is this in somewhere not yet upstream? I did not find nvmet_tcp_executing_connect_cmd on upstream (5.12-rc4).
> + cmd->req.execute(&cmd->req);
> + }
Hi Elad,
The patch looks ok to me except these 2 question.
Thanks,
Hou
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2021-03-26 18:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-25 22:49 [PATCH] nvmet-tcp: fix a segmentation fault during io parsing error elad.grupi
2021-03-26 10:26 ` Hou Pu
2021-03-26 18:00 ` Grupi, Elad [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-03-18 12:55 elad.grupi
2021-03-19 3:52 ` Hou Pu
2021-03-19 17:26 ` Grupi, Elad
2021-03-22 4:06 ` Hou Pu
2021-03-18 8:28 elad.grupi
2021-03-18 11:13 ` Hou Pu
2021-03-18 13:08 ` Hou Pu
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=DM6PR19MB4011343E6FA2ABAAEB219D73EF619@DM6PR19MB4011.namprd19.prod.outlook.com \
--to=elad.grupi@dell.com \
--cc=houpu.main@gmail.com \
--cc=linux-nvme@lists.infradead.org \
--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;
as well as URLs for NNTP newsgroup(s).