Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp731115ybc; Sat, 16 Nov 2019 07:43:18 -0800 (PST) X-Google-Smtp-Source: APXvYqycF6Y3WzkmCWVgOkURFwiTonqoWEn1C/nO1kg11qv4RMwe+gklunvZ+G7IWhPLZCHvXcCK X-Received: by 2002:a17:906:743:: with SMTP id z3mr10461607ejb.142.1573918997915; Sat, 16 Nov 2019 07:43:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573918997; cv=none; d=google.com; s=arc-20160816; b=ZImijDiXHaCnzxdI4VfMtSLiAKRDZ+oe4wSJY5RjSxyrP5RMVHxjw/wbBtBaDvSBGw B4Dt5ArGHxsfhIozhp12JpYgmHZ1FuFd3FP1j50vBIfjLReTlkdPOI4qzUD5MgB1McrF DbUmfO2RA7w6AH6uSsEB6KlJp29wbs/A0v/TlCg/upkW6/VkTGDp9LDtHW6cPtz8ipEP oWTOaZCLskF4cNE0nvYAqbYPSPS1JP08k9r5EysTqgQnENMuBt+0YPKxVgPKa/EJReVi FQ7amEAit3aptEh0MFQSb9AQ2xO0nlQxnYeDm3Ug0vxh8NsBoS5ow4Wx1twRSK8X/aAJ JVEA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=39/oZx1od8lry+GSijKev+b9LmcIlYIrpJDgUHQcnh0=; b=HKTWfAJdYKsvs4Mgfu9iiXmLhvXPdnYG4DZ33ErbD3B2FZKP9vSqNnO7CTq8ziVjR0 38kWxanaHO3Lz2Z/ml6gUzRbJ1I29K8omMihOU/rrjhTAQOVIRhLam4P/W/6OSRapejb PZIbkOoCVqTNmBxzF3wr/mNToydWLk4GQ6GWN0VowatvdUEH+yFMyxdIRp+Yp7kbaQ3Y uSliFm+rxs/e/glqSSWzIqCBQZOlz7Q+tMEs7hOaiyaBLynZkp63VxeSCVNyZdMHSM11 /BEgzBuzRvPjfAHPDVTq0GRO0wT/JiUxUhevY0TThycW/KiitX1nnd8wnU6JOT7/Pvs8 w08g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jwhNd48r; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f17si8144715edx.113.2019.11.16.07.42.52; Sat, 16 Nov 2019 07:43:17 -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=jwhNd48r; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727926AbfKPPle (ORCPT + 99 others); Sat, 16 Nov 2019 10:41:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:44506 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727869AbfKPPl1 (ORCPT ); Sat, 16 Nov 2019 10:41:27 -0500 Received: from sasha-vm.mshome.net (unknown [50.234.116.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0F99E207DD; Sat, 16 Nov 2019 15:41:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573918886; bh=sJJLiwpOvgcSG95me1xpezoQaHq1vBEc0vPQTntpyhA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jwhNd48rIycBTQnCAHQkqlPnvCYpboFv/XIcH+P1xQcx1vBuT0roQDE1T/L/sQ3H4 iN9yT9z0ZJU3uZSpp6EhXpKU32Lqz7r+24LuRptOdPbB3zedQuoq4WwGpLYZ15lYaY 3n9ONjmlSQa5QjcsD2CpoIN9JX1UkX8JhWPUICKM= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Dan Carpenter , Borislav Petkov , David Daney , Jan Glauber , Mauro Carvalho Chehab , Sergey Temerkhanov , linux-edac , Sasha Levin Subject: [PATCH AUTOSEL 4.19 015/237] EDAC, thunderx: Fix memory leak in thunderx_l2c_threaded_isr() Date: Sat, 16 Nov 2019 10:37:30 -0500 Message-Id: <20191116154113.7417-15-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116154113.7417-1-sashal@kernel.org> References: <20191116154113.7417-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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