From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 77CBA33DEF7; Tue, 12 May 2026 17:45:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778607913; cv=none; b=WLk7tVCVpIb+yu8UnMGwWXtc8UNEpJEXIInZsg3CkY4+/i/u7ktBJjEoDzYfy9v/1RRR3LWmK8/A6BfQw8xu2msx/2Hq69JpedckiH+++ewmCK6oV6rDThdRaOiwC+etDQvHmU6UiKVGCOeRrDSAHGg0bhqVrpV9sAQKbKpvhUs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778607913; c=relaxed/simple; bh=9RdJF0VYZyDMDdaB9gGfwRDwZdyJ+A+b6kNSouli1zY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NXCdAOVo9Y+nvcgjmXpSDj8kV3f3CfH32jh7If7tjb3zfJB3cnGXg2TtYGHliDFwO8UVqPJzKnXbAY8JfETa0tljg0uiffJFOEkKEG9UCFpJQvylyKf0bgFnOpF87QO1HawmzhJ12G7d1RNsuYiZLqKubFnnALbU+sam5Jw8ckk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=NfAuYH2L; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="NfAuYH2L" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0F257C2BCB0; Tue, 12 May 2026 17:45:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778607913; bh=9RdJF0VYZyDMDdaB9gGfwRDwZdyJ+A+b6kNSouli1zY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NfAuYH2LRszMxHCX7NU13FNgmgYr05BNrA5IToL/bqAjeSyX3V3ARj4qZfKuREgeP EAQkiJDBgidZ6H7cNCOnMg6r02VFKkSNnG1kucMuXhLHzl8c1S0wMo/9qXkiGaIMOQ CsLnHKME3jpWGdYPUxt+jg6eidJuAvS4BpFl40Y0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, kernel test robot , Dan Carpenter , Hongling Zeng , Helge Deller Subject: [PATCH 6.12 084/206] parisc: Fix IRQ leak in LASI driver Date: Tue, 12 May 2026 19:38:56 +0200 Message-ID: <20260512173934.631324925@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260512173932.810559588@linuxfoundation.org> References: <20260512173932.810559588@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Hongling Zeng commit 37b0dc5e279f35036fb638d1e187197b6c05a76d upstream. When request_irq() succeeds but gsc_common_setup() fails later, the IRQ is never released. Fix this by adding proper error handling with goto labels to ensure resources are released in LIFO order. Detected by Smatch: drivers/parisc/lasi.c:216 lasi_init_chip() warn: 'lasi->gsc_irq.irq' from request_irq() not released on lines: 207. Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202604180957.4QdAIxP6-lkp@intel.com/ Signed-off-by: Hongling Zeng Cc: stable@vger.kernel.org Signed-off-by: Helge Deller Signed-off-by: Greg Kroah-Hartman --- drivers/parisc/lasi.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) --- a/drivers/parisc/lasi.c +++ b/drivers/parisc/lasi.c @@ -193,8 +193,7 @@ static int __init lasi_init_chip(struct ret = request_irq(lasi->gsc_irq.irq, gsc_asic_intr, 0, "lasi", lasi); if (ret < 0) { - kfree(lasi); - return ret; + goto err_free; } /* enable IRQ's for devices below LASI */ @@ -203,8 +202,7 @@ static int __init lasi_init_chip(struct /* Done init'ing, register this driver */ ret = gsc_common_setup(dev, lasi); if (ret) { - kfree(lasi); - return ret; + goto err_irq; } gsc_fixup_irqs(dev, lasi, lasi_choose_irq); @@ -214,6 +212,12 @@ static int __init lasi_init_chip(struct SYS_OFF_PRIO_DEFAULT, lasi_power_off, lasi); return ret; + +err_irq: + free_irq(lasi->gsc_irq.irq, lasi); +err_free: + kfree(lasi); + return ret; } static struct parisc_device_id lasi_tbl[] __initdata = {