[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230919072601.3498866-1-make_ruc2021@163.com>
Date: Tue, 19 Sep 2023 15:26:01 +0800
From: Ma Ke <make_ruc2021@....com>
To: jejb@...ux.ibm.com, martin.petersen@...cle.com, kuba@...nel.org,
bvanassche@....org, razor@...ckwall.org, edumazet@...gle.com,
make_ruc2021@....com
Cc: linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] scsi: iscsi: fix reference count leak in cxgbi_check_route()
cxgbi_check_route() dont release the reference acquired by ip_dev_find()
which introducing a reference count leak. We could remedy this by
insuring the reference is released.ip_dev_find().
Signed-off-by: Ma Ke <make_ruc2021@....com>
---
drivers/scsi/cxgbi/libcxgbi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index abde60a50cf7..435056b27cba 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
+++ b/drivers/scsi/cxgbi/libcxgbi.c
@@ -670,6 +670,7 @@ cxgbi_check_route(struct sockaddr *dst_addr, int ifindex)
"route to %pI4 :%u, ndev p#%d,%s, cdev 0x%p.\n",
&daddr->sin_addr.s_addr, ntohs(daddr->sin_port),
port, ndev->name, cdev);
+ dev_put(ndev);
csk = cxgbi_sock_create(cdev);
if (!csk) {
--
2.37.2
Powered by blists - more mailing lists