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

Hou Pu houpu.main at gmail.com
Wed Mar 31 10:07:38 BST 2021


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