Skip to content

Commit 788b71c

Browse files
mikechristiemartinkpetersen
authored andcommitted
scsi: iscsi: iscsi_tcp: Start socket shutdown during conn stop
Make sure the conn socket shutdown starts before we start the timer to fail commands to upper layers. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Lee Duncan <[email protected]> Signed-off-by: Mike Christie <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent c0920cd commit 788b71c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/scsi/iscsi_tcp.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,12 @@ static void iscsi_sw_tcp_release_conn(struct iscsi_conn *conn)
600600
if (!sock)
601601
return;
602602

603+
/*
604+
* Make sure we start socket shutdown now in case userspace is up
605+
* but delayed in releasing the socket.
606+
*/
607+
kernel_sock_shutdown(sock, SHUT_RDWR);
608+
603609
sock_hold(sock->sk);
604610
iscsi_sw_tcp_conn_restore_callbacks(conn);
605611
sock_put(sock->sk);

0 commit comments

Comments
 (0)