Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3300200pxk; Mon, 21 Sep 2020 10:03:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKaZZmuOjH/N2ZiZki9HXMp2nLVKuez2S8A77n2c+F88+LIS2KAsbuSKEw+QU72UhysA5J X-Received: by 2002:aa7:d6c6:: with SMTP id x6mr636935edr.338.1600707792009; Mon, 21 Sep 2020 10:03:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600707792; cv=none; d=google.com; s=arc-20160816; b=qNPbOToELsnY4PHDUgx2M6OcCXxGpRcIfQe0vuwdIt90QGKDYcjJTFsrnvaAecFfRN fVZ6MDQvynwqOGyNCXN+Qvd3FUl8vwObBBLIanDOfnhJtSU7pXqafurD7LNeaSj54kl7 2/vx/SAxm4tLrFmA8Z7g0TczRwRv94QqcJojikMEyYLOCTCqC88pAX2yyuxzHnoMfCpL zkm/vV6yT/unjhTaPGVDBA6TwlI13CX1dr7szscT4IRA9m4+MkCEIEJkdibQ2kxEbfZr 8JHAWQyxFxL/vb7PK7HAEXP5DMNIY4OtjckimpyK0rAdxcE0XWR7JOCe6/vBk937DBoG fx1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IF++EBOM7V046SdFl6yCdhG3Uvij6n/RjemtGCPHgCk=; b=rL6n5KHKWGE235gvOzBtpAYdXwfkqik8PAUl8sSHkQgsDer2BDx0YEPcYYPZADQ0W/ 7TqacSJfs38bW5UnH/ptZNBQUF65jZxeB4R0JF5O4PPbVlehBCcsgjMqfdn73d5+6ZuT RLPUNJrc/2uAPLFZaBxdGc1sUeOdqrpa3RHJldToBji6HBMqdvc+6i6betx0mvxzMD4j dar0iAkOsvQPgchakEuJ+J+qT1hV9OeOoX1wHkGIeOT+r5gLb5N+b8UWj9bZnK0pzw1D eL/s/m8reYDDfuTIIWXa2XNeok+T5NpoTJmb3DoElcaSqwQH/oj3tAWrQxZeD3hDbUoJ kDIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FpV1PuA6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w23si8535990eju.558.2020.09.21.10.02.47; Mon, 21 Sep 2020 10:03:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FpV1PuA6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730380AbgIURBl (ORCPT + 99 others); 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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); } /** -- 2.25.1