git: 06e9c710998b - main - Fix initiator panic after 6895f89fe54e.

Alexander Motin mav at FreeBSD.org
Tue Mar 2 21:11:39 UTC 2021


The branch main has been updated by mav:

URL: https://cgit.FreeBSD.org/src/commit/?id=06e9c710998b83a3be21f7f264187fff5d590bc3

commit 06e9c710998b83a3be21f7f264187fff5d590bc3
Author:     Alexander Motin <mav at FreeBSD.org>
AuthorDate: 2021-03-02 21:07:22 +0000
Commit:     Alexander Motin <mav at FreeBSD.org>
CommitDate: 2021-03-02 21:11:29 +0000

    Fix initiator panic after 6895f89fe54e.
    
    There are sessions without socket that are not disconnecting yet.
    
    MFC after:      3 weeks
---
 sys/dev/iscsi/icl_soft.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sys/dev/iscsi/icl_soft.c b/sys/dev/iscsi/icl_soft.c
index c66d8ccdb5fd..c64f0cfde71b 100644
--- a/sys/dev/iscsi/icl_soft.c
+++ b/sys/dev/iscsi/icl_soft.c
@@ -1364,9 +1364,11 @@ icl_soft_conn_close(struct icl_conn *ic)
 	ICL_CONN_LOCK(ic);
 	if (!ic->ic_disconnecting) {
 		so = ic->ic_socket;
-		SOCKBUF_LOCK(&so->so_rcv);
+		if (so)
+			SOCKBUF_LOCK(&so->so_rcv);
 		ic->ic_disconnecting = true;
-		SOCKBUF_UNLOCK(&so->so_rcv);
+		if (so)
+			SOCKBUF_UNLOCK(&so->so_rcv);
 	}
 	while (ic->ic_receive_running || ic->ic_send_running) {
 		cv_signal(&ic->ic_receive_cv);


More information about the dev-commits-src-main mailing list