From: Rosen Penev <rosenp@gmail.com>
To: linux-ide@vger.kernel.org
Cc: Damien Le Moal <dlemoal@kernel.org>,
Niklas Cassel <cassel@kernel.org>,
Grant Likely <grant.likely@secretlab.ca>,
Tim Yamin <plasm@roo.me.uk>, Julia Lawall <Julia.Lawall@lip6.fr>,
Jeff Garzik <jgarzik@redhat.com>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCHv2 1/5] ata: pata_mpc52xx: fix NULL pointer dereference in IRQ handler
Date: Tue, 9 Jun 2026 12:43:07 -0700 [thread overview]
Message-ID: <20260609194311.6217-2-rosenp@gmail.com> (raw)
In-Reply-To: <20260609194311.6217-1-rosenp@gmail.com>
Assign priv->dmatsk before request_irq() to ensure the IRQ handler
does not dereference a NULL pointer. The handler accesses priv->dmatsk
via bcom_retrieve_buffer().
Assisted-by: opencode:big-pickle
Fixes: 6b61e69e7bc1 ("powerpc/mpc5200: Add MDMA/UDMA support to MPC5200 ATA driver")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/ata/pata_mpc52xx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c
index 210a63283f62..fe445d6aaff6 100644
--- a/drivers/ata/pata_mpc52xx.c
+++ b/drivers/ata/pata_mpc52xx.c
@@ -766,6 +766,8 @@ static int mpc52xx_ata_probe(struct platform_device *op)
goto err1;
}
+ priv->dmatsk = dmatsk;
+
task_irq = bcom_get_task_irq(dmatsk);
rv = devm_request_irq(&op->dev, task_irq, &mpc52xx_ata_task_irq, 0,
"ATA task", priv);
@@ -773,7 +775,6 @@ static int mpc52xx_ata_probe(struct platform_device *op)
dev_err(&op->dev, "error requesting DMA IRQ\n");
goto err2;
}
- priv->dmatsk = dmatsk;
/* Init the hw */
rv = mpc52xx_ata_hw_init(priv);
--
2.54.0
next prev parent reply other threads:[~2026-06-09 19:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-09 19:43 [PATCHv2 0/5] ata: pata_mpc52xx: fix cleanup ordering and modernize Rosen Penev
2026-06-09 19:43 ` Rosen Penev [this message]
2026-06-09 19:56 ` [PATCHv2 1/5] ata: pata_mpc52xx: fix NULL pointer dereference in IRQ handler sashiko-bot
2026-06-09 19:43 ` [PATCHv2 2/5] ata: pata_mpc52xx: switch to non-devm request_irq for proper ordering Rosen Penev
2026-06-09 19:43 ` [PATCHv2 3/5] ata: pata_mpc52xx: remove redundant irq_dispose_mapping calls Rosen Penev
2026-06-09 19:43 ` [PATCHv2 4/5] ata: pata_mpc52xx: convert to platform_get_irq() Rosen Penev
2026-06-09 19:43 ` [PATCHv2 5/5] ata: pata_mpc52xx: use devm_platform_get_and_ioremap_resource Rosen Penev
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=20260609194311.6217-2-rosenp@gmail.com \
--to=rosenp@gmail.com \
--cc=Julia.Lawall@lip6.fr \
--cc=cassel@kernel.org \
--cc=dlemoal@kernel.org \
--cc=grant.likely@secretlab.ca \
--cc=jgarzik@redhat.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=plasm@roo.me.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.