Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6023059ybc; Wed, 27 Nov 2019 13:34:26 -0800 (PST) X-Google-Smtp-Source: APXvYqzAATsRa3SMWqrD4wNPJbFRHfAz7Mnwf5fal5LI6ULwUTvQHBMt1gIibiayVv3LY8G47sdQ X-Received: by 2002:a05:6402:1a45:: with SMTP id bf5mr4246106edb.265.1574890466296; Wed, 27 Nov 2019 13:34:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574890466; cv=none; d=google.com; s=arc-20160816; b=UMdomT851/osUSCFlC+1+jKQbNY4fNwYIQNRedyEahG9bZQMweLKYaSiw0yy2/oCMu 0dSHkP3dNZxLQCIUOlXj1/Husx9O46JHdYmZAO8RMrcCICyNTuMlhdganbJMP1BNAB/x Kqk6IPOyzZSV8usrZaJioEcPSr9Cj+G4nvoX/kFmlJHHIif7Mm5e6IDQEgUbooUMR6MO 6+HKJ5y/6mErDdFWMdqBz86D+YKwBLfYLo+hOEfNzBz2zR490lpJF4Hi6jUMGKdgOw35 XNpP8iTi29wEhyiHcEPHHUZz9MJWxWE+YE5uYUnSuiEv1gL5QXyQM11BEaxmq7l19+5i E1qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=39/oZx1od8lry+GSijKev+b9LmcIlYIrpJDgUHQcnh0=; b=Y1EMsWHiwCsSY0Eb8in8DhBvb7RsOP5G/3fQgpKhl6dsA3WAuAj4XRMr0WPRCIeMPM 1gAVx/I+CHqDBLtM+y6pUugeitAfynC93l5wWGbi/75B43YXU/69nyalUF5x/MrSxENY 4p4l5jdinQ+hHc6T3pvd854IrGv4DA/smOPHNREQCuZVUn+kH3VYyxRcPvpQpaGwLPz9 mPaM1C+kj0DSQEPeHz85RJbmYidREnxZIJkql6Tb2I3u+0TVDxAZ7CgPd0eby1SRt6kG dIhAkiNHGNiAQJckbcioPA3zs+awAIsSPQU/pzB7EDCBPQ3mAaozF3PltY2u7Gz7zCH3 r4OQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UHTudNyM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m5si11151601eds.8.2019.11.27.13.34.02; Wed, 27 Nov 2019 13:34:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UHTudNyM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731057AbfK0U42 (ORCPT + 99 others); Wed, 27 Nov 2019 15:56:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:47266 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731049AbfK0U40 (ORCPT ); Wed, 27 Nov 2019 15:56:26 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 149102084D; Wed, 27 Nov 2019 20:56:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888185; bh=sJJLiwpOvgcSG95me1xpezoQaHq1vBEc0vPQTntpyhA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UHTudNyMPGeKm/lvJ6ktBklyc7N7JMBefFta3cBH/AnkBR77ZuYaNqTAw2OnWDZks ZChbePjSbXOwMzvNRqgcPIXN3SrSQSJy5thVDQaTW47diSesfxo6g+GudHqKgWlosY GkoZbuWZpW58BuhigZ4OHYoBHhpS0nD2KZd4cvn4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Borislav Petkov , David Daney , Jan Glauber , Mauro Carvalho Chehab , Sergey Temerkhanov , linux-edac , Sasha Levin Subject: [PATCH 4.19 036/306] EDAC, thunderx: Fix memory leak in thunderx_l2c_threaded_isr() Date: Wed, 27 Nov 2019 21:28:06 +0100 Message-Id: <20191127203117.470390146@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Carpenter [ Upstream commit d8c27ba86a2fd806d3957e5a9b30e66dfca2a61d ] Fix memory leak in L2c threaded interrupt handler. [ bp: Rewrite commit message. ] Fixes: 41003396f932 ("EDAC, thunderx: Add Cavium ThunderX EDAC driver") Signed-off-by: Dan Carpenter Signed-off-by: Borislav Petkov CC: David Daney CC: Jan Glauber CC: Mauro Carvalho Chehab CC: Sergey Temerkhanov CC: linux-edac Link: http://lkml.kernel.org/r/20181013102843.GG16086@mwanda Signed-off-by: Sasha Levin --- drivers/edac/thunderx_edac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/edac/thunderx_edac.c b/drivers/edac/thunderx_edac.c index c009d94f40c52..34be60fe68922 100644 --- a/drivers/edac/thunderx_edac.c +++ b/drivers/edac/thunderx_edac.c @@ -1884,7 +1884,7 @@ static irqreturn_t thunderx_l2c_threaded_isr(int irq, void *irq_id) default: dev_err(&l2c->pdev->dev, "Unsupported device: %04x\n", l2c->pdev->device); - return IRQ_NONE; + goto err_free; } while (CIRC_CNT(l2c->ring_head, l2c->ring_tail, @@ -1906,7 +1906,7 @@ static irqreturn_t thunderx_l2c_threaded_isr(int irq, void *irq_id) l2c->ring_tail++; } - return IRQ_HANDLED; + ret = IRQ_HANDLED; err_free: kfree(other); -- 2.20.1