From: Tony Sanchez <tonybanters@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Dave Penkler <dpenkler@gmail.com>,
Dan Carpenter <error27@gmail.com>,
kernel test robot <lkp@intel.com>,
stable@kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v3] gpib: ines: fix I/O region leak in ines_isa_attach() error path
Date: Thu, 23 Jul 2026 14:25:45 -0700 [thread overview]
Message-ID: <20260723212545.2397641-1-tonybanters@gmail.com> (raw)
If request_irq() fails after request_region() has succeeded,
ines_isa_attach() returns without releasing the I/O region. This
leaks the region and prevents a subsequent attach attempt from
acquiring it.
Release the region on the failure path.
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Closes: https://lore.kernel.org/r/202605271229.d8wGTffx-lkp@intel.com/
Fixes: e6ab504633e4 ("staging: gpib: Destage gpib")
Cc: stable <stable@kernel.org>
Signed-off-by: Tony Sanchez <tonybanters@gmail.com>
---
v3: Fix From: header to real name (was overridden by git config in v2).
v2: Use real name in Signed-off-by (Greg KH).
drivers/gpib/ines/ines_gpib.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpib/ines/ines_gpib.c b/drivers/gpib/ines/ines_gpib.c
index c000f647fbb..cb6ee6882a0 100644
--- a/drivers/gpib/ines/ines_gpib.c
+++ b/drivers/gpib/ines/ines_gpib.c
@@ -911,6 +911,7 @@ static int ines_isa_attach(struct gpib_board *board, const struct gpib_board_con
nec7210_board_reset(nec_priv, board);
if (request_irq(config->ibirq, ines_pci_interrupt, isr_flags, DRV_NAME, board)) {
dev_err(board->gpib_dev, "failed to allocate IRQ %d\n", config->ibirq);
+ release_region(config->ibbase, ines_isa_iosize);
return -1;
}
ines_priv->irq = config->ibirq;
--
2.54.0
reply other threads:[~2026-07-23 21:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260723212545.2397641-1-tonybanters@gmail.com \
--to=tonybanters@gmail.com \
--cc=dpenkler@gmail.com \
--cc=error27@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=stable@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®