git: 4add8e4c8991 - main - cxgbei: Don't leak resources for an aborted target transfer.

John Baldwin jhb at FreeBSD.org
Fri May 14 19:21:59 UTC 2021


The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=4add8e4c89915dc0018a8480c63b6d6031d31295

commit 4add8e4c89915dc0018a8480c63b6d6031d31295
Author:     John Baldwin <jhb at FreeBSD.org>
AuthorDate: 2021-05-14 19:17:26 +0000
Commit:     John Baldwin <jhb at FreeBSD.org>
CommitDate: 2021-05-14 19:17:26 +0000

    cxgbei: Don't leak resources for an aborted target transfer.
    
    Sponsored by:   Chelsio Communications
    Differential Revision:  https://reviews.freebsd.org/D29911
---
 sys/dev/cxgbe/cxgbei/icl_cxgbei.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c
index f661d0a9d7d7..e3dc05645732 100644
--- a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c
+++ b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c
@@ -1153,7 +1153,8 @@ icl_cxgbei_conn_transfer_done(struct icl_conn *ic, void *arg)
 {
 	struct ctl_scsiio *ctsio = arg;
 
-	if (ctsio != NULL && ctsio->kern_data_len == ctsio->ext_data_filled) {
+	if (ctsio != NULL && (ctsio->kern_data_len == ctsio->ext_data_filled ||
+	    ic->ic_disconnecting)) {
 		struct ppod_reservation *prsv;
 
 		prsv = io_to_ppod_reservation(ctsio);


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