From patchwork Mon Sep 21 16:27:07 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: 309347 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=unavailable 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 36AA3C43466 for ; Mon, 21 Sep 2020 16:57:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DA4352223E for ; Mon, 21 Sep 2020 16:57:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600707463; bh=x6pybX7Gh2+xviWV8swtUoFvUIcZtEg7U5z2BDWGXLA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=SZIbcaX2oZktznsCXkNonO/BNpU9qWXsbQMjrVkgQSNf0COCxVfaSo8YIvriVm1qt mR2uHRB1q8o2QdQvlQ5doXWqOAqrECkR/cV6dTaQH3QIAZopPd0urvfF4KBnfOUmMk F/HrpIszPWu3WeHd1IsGOnSLWB2GpdCycNKd0zxc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728895AbgIUQ5k (ORCPT ); Mon, 21 Sep 2020 12:57:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:47666 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729556AbgIUQnN (ORCPT ); Mon, 21 Sep 2020 12:43: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 E06002076B; Mon, 21 Sep 2020 16:43:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706592; bh=x6pybX7Gh2+xviWV8swtUoFvUIcZtEg7U5z2BDWGXLA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F6KcEFHZ2XrWDjQ+fjJn16sh6iu/3HYcwLYYlF0nuD5mizzx/8jGlQmEYbO4dz4RT 9pfA7ZeSt0s4uhxg4Xfb4GXdlWAE3/D5cGnADY6CQKMEbTlUebT29WLLHDw+bw9xgj 2fXnemYiyTZ9xNmghD1p5pBC57/fKezf6bhauOC4= 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 5.8 015/118] scsi: libfc: Fix for double free() Date: Mon, 21 Sep 2020 18:27:07 +0200 Message-Id: <20200921162037.042525281@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921162036.324813383@linuxfoundation.org> References: <20200921162036.324813383@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 e00dc4693fcbd..589ddf003886e 100644 --- a/drivers/scsi/libfc/fc_disc.c +++ b/drivers/scsi/libfc/fc_disc.c @@ -634,8 +634,6 @@ free_fp: fc_frame_free(fp); out: kref_put(&rdata->kref, fc_rport_destroy); - if (!IS_ERR(fp)) - fc_frame_free(fp); } /**