[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20200914130434.1804478-3-sashal@kernel.org>
Date: Mon, 14 Sep 2020 09:04:15 -0400
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Javed Hasan <jhasan@...vell.com>,
Dan Carpenter <dan.carpenter@...cle.com>,
"Martin K . Petersen" <martin.petersen@...cle.com>,
Sasha Levin <sashal@...nel.org>, linux-scsi@...r.kernel.org
Subject: [PATCH AUTOSEL 5.4 03/22] scsi: libfc: Fix for double free()
From: Javed Hasan <jhasan@...vell.com>
[ Upstream commit 5a5b80f98534416b3b253859897e2ba1dc241e70 ]
Fix for '&fp->skb' double free.
Link:
https://lore.kernel.org/r/20200825093940.19612-1-jhasan@marvell.com
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
Signed-off-by: Javed Hasan <jhasan@...vell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@...cle.com>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/scsi/libfc/fc_disc.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
index e00dc4693fcbd..589ddf003886e 100644
--- a/drivers/scsi/libfc/fc_disc.c
+++ b/drivers/scsi/libfc/fc_disc.c
@@ -634,8 +634,6 @@ static void fc_disc_gpn_id_resp(struct fc_seq *sp, struct fc_frame *fp,
fc_frame_free(fp);
out:
kref_put(&rdata->kref, fc_rport_destroy);
- if (!IS_ERR(fp))
- fc_frame_free(fp);
}
/**
--
2.25.1
Powered by blists - more mailing lists