[PATCH v4] nvmet-tcp: fix a segmentation fault during io parsing error

Grupi, Elad Elad.Grupi at dell.com
Wed Mar 31 14:06:33 BST 2021


Right. Thank you for the clarification.

Elad

-----Original Message-----
From: Hou Pu <houpu.main at gmail.com> 
Sent: Wednesday, 31 March 2021 12:08
To: Grupi, Elad
Cc: houpu.main at gmail.com; linux-nvme at lists.infradead.org; sagi at grimberg.me
Subject: Re: [PATCH v4] nvmet-tcp: fix a segmentation fault during io parsing error


[EXTERNAL EMAIL] 

On Wed, 31 Mar 2021 08:28:46 +0000, Elad wrote:
> Not sure I'm following.
>
> Once req_init is failed, nvmet_tcp_handle_req_failure is called and changes the state to NVMET_TCP_RECV_DATA.
> In state NVMET_TCP_RECV_DATA we should not queue the response before it is get off from the list.
>
> Am I missing something here?

1. nvmet_tcp_handle_req_failure is called, 2. Return 0 from nvmet_tcp_done_recv_pdu 3. nvmet_tcp_try_recv_data() from nvmet_tcp_try_recv_one(), After finish
   consume inline data, nvmet_tcp_execute_request() is called. Here
   NVMET_TCP_SEND_POSTPONED is not set. As nvmet_try_send_data_pdu()
   is not called yet. (it will be called after we return from
   nvmet_tcp_try_recv_one()).

Thanks,
Hou


More information about the Linux-nvme mailing list