Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3297658pxk; Mon, 21 Sep 2020 10:00:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrqgXyb1ktNGmAk7jcLvAPB/47KQVW4g3UcRQE9dWgbSzwZHql1ROUWzieCqYD1LN1fMFR X-Received: by 2002:aa7:c308:: with SMTP id l8mr561303edq.361.1600707617902; Mon, 21 Sep 2020 10:00:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600707617; cv=none; d=google.com; s=arc-20160816; b=fed3DJtAknP9BvZCHnuY59d2+3qQLmrQ9d8f6RT7Ipn3cqVzjlZfk222gj+YJmAvLt 6FHWQarCdCQg9wYgvPgFgUDb+7oeJXpTSwcBk7R3ohXT58aTQJbGo6Oy7Brne44dmAZ1 Iu312zpBRQD+AdDpHV65LSYWq9cLEGi1EPlp7Bft6JravUD4LTF5quz4Eva+7iBLu3PW on/HWgGTlKSJcP82M/kfYxt+zvd0IrOSSt3EJPcelwSO4XAjEGXdatXBxkJz9iToSKZX mNDqd/qdFg+QlqFymPflpKDMJ0aUtXKt43qvFz3t//EroQFgGBtjqI+TKe1ReEniR6Is XHYw== 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=+gN1Fr+zWT9JITujY+b9Sdsy4c8gJyZjZgRtzVNAkFQ=; b=tGJU8GKN0gQnPfgkZhm8XzeQWZcGrYAgZYBW5UJL21jwd/stvXjy9RLUjH14kbtqOW dy8W13G4RmvNi5XlglqbRKm4D22rzHJ9FCEZgesUEJ9tyM+MJIfXLcVon5capTBAV1b1 hninsKqE+APyvIg9Is2Mz/MgE01Kd8l/HVbNrOtZ6EO3hJHUPHGd0XAUAhGj6J7o8oLI gZJ+BFpWzdMVExRfcCqvqZZH0uPkDoPOCxTmLRM9pLY8/x97y5IomDS3YgaRS39jf4ly z+ckodMhhMISje5d/p/7ujnH8B0m6arlGndwkzkQOnERsUldBWXowjA5euyIvNBtEcjw dcTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=F6KcEFHZ; 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 3si5415212ejr.430.2020.09.21.09.59.53; Mon, 21 Sep 2020 10:00:17 -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=F6KcEFHZ; 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 S1728872AbgIUQ5k (ORCPT + 99 others); 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 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 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); } /** -- 2.25.1