Skip to content

Commit c0920cd

Browse files
mikechristiemartinkpetersen
authored andcommitted
scsi: iscsi: iscsi_tcp: Set no linger
Userspace (open-iscsi based tools at least) sets no linger on the socket to prevent stale data from being sent. However, with the in-kernel cleanup if userspace is not up the sockfd_put will release the socket without having set that sockopt. iscsid sets that opt at socket close time, but it seems ok to set this at setup time in the kernel for all tools. 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 23d6fef commit c0920cd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/scsi/iscsi_tcp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,7 @@ iscsi_sw_tcp_conn_bind(struct iscsi_cls_session *cls_session,
689689
sk->sk_sndtimeo = 15 * HZ; /* FIXME: make it configurable */
690690
sk->sk_allocation = GFP_ATOMIC;
691691
sk_set_memalloc(sk);
692+
sock_no_linger(sk);
692693

693694
iscsi_sw_tcp_conn_set_callbacks(conn);
694695
tcp_sw_conn->sendpage = tcp_sw_conn->sock->ops->sendpage;

0 commit comments

Comments
 (0)