archive mirror
 help / color / mirror / Atom feed
	Madhuparna Bhowmik <>
Subject: [PATCH] drivers: dma: pch_dma.c: Avoid data race between probe and irq handler
Date: Thu, 16 Apr 2020 11:53:35 +0530	[thread overview]
Message-ID: <> (raw)

From: Madhuparna Bhowmik <>

pd-> is read in irq handler pd_irq().
However, it is set to pdev->dev after request_irq().
Therefore, set pd-> to pdev->dev before request_irq() to
avoid data race between pch_dma_probe() and pd_irq().

Found by Linux Driver Verification project (

Signed-off-by: Madhuparna Bhowmik <>
 drivers/dma/pch_dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/pch_dma.c b/drivers/dma/pch_dma.c
index 581e7a290d98..a3b0b4c56a19 100644
--- a/drivers/dma/pch_dma.c
+++ b/drivers/dma/pch_dma.c
@@ -865,6 +865,7 @@ static int pch_dma_probe(struct pci_dev *pdev,
+	pd-> = &pdev->dev;
 	err = request_irq(pdev->irq, pd_irq, IRQF_SHARED, DRV_NAME, pd);
 	if (err) {
@@ -880,7 +881,6 @@ static int pch_dma_probe(struct pci_dev *pdev,
 		goto err_free_irq;
-	pd-> = &pdev->dev;

             reply	other threads:[~2020-04-16  6:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-16  6:23 madhuparnabhowmik10 [this message]
2020-04-23  6:19 ` [PATCH] drivers: dma: pch_dma.c: Avoid data race between probe and irq handler Vinod Koul
2020-04-23 18:13   ` Madhuparna Bhowmik

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \

* 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;
as well as URLs for NNTP newsgroup(s).