From patchwork Mon Sep 21 16:27:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "gregkh@linuxfoundation.org" X-Patchwork-Id: 263582 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 477BAC4346A for ; Mon, 21 Sep 2020 17:01:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 05126206BE for ; Mon, 21 Sep 2020 17:01:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600707702; bh=UzQ0uvPCt7nfrpRWYyvNauFRanS9fD4G9NDc5o03kRY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=rOOpykMISYkVNDTxUmvJFZq7O2vnTi7KZD/5m3dVlmhF53Z5ZHW1+VCiOJiREM56L XjD/55KtPpL9HSABKZqtDSSWMYJ/a9EZl5xBF0+jqqGrD3CqT0o7B37SWz5XHMqd59 ickHJxPKrafoMwdQNKALGksNwlYK7+ZK/VxSBXBg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730190AbgIURBl (ORCPT ); Mon, 21 Sep 2020 13:01:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:40980 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728689AbgIUQjN (ORCPT ); Mon, 21 Sep 2020 12:39:13 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8583A239D2; Mon, 21 Sep 2020 16:39:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706352; bh=UzQ0uvPCt7nfrpRWYyvNauFRanS9fD4G9NDc5o03kRY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FpV1PuA6nMYoZEA1zC1ETAFu33uSDgq2JR1nOMWqUjOuu7PUF4oswKem/5TGPOIqI VlmSmUGQCmIeQYPzncX5QYpaWg2bVAnvdwBa5pq7kKnMpGOTFYMUH2Be6ZDkeZ4pjo /x/m8gIsCVWXkZ0fZbrwdxQbuANy8q9aqM5x+gTE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Javed Hasan , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.14 66/94] scsi: libfc: Fix for double free() Date: Mon, 21 Sep 2020 18:27:53 +0200 Message-Id: <20200921162038.556287384@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921162035.541285330@linuxfoundation.org> References: <20200921162035.541285330@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Javed Hasan [ 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 Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- 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 62f83cc151b22..0db0d0ad9f966 100644 --- a/drivers/scsi/libfc/fc_disc.c +++ b/drivers/scsi/libfc/fc_disc.c @@ -658,8 +658,6 @@ free_fp: fc_frame_free(fp); out: kref_put(&rdata->kref, fc_rport_destroy); - if (!IS_ERR(fp)) - fc_frame_free(fp); } /**