From: Stefan Wahren <stefan.wahren@i2se.com>
To: Dan Williams <dan.j.williams@intel.com>,
Vinod Koul <vkoul@kernel.org>,
Florian Fainelli <f.fainelli@gmail.com>,
Ray Jui <rjui@broadcom.com>,
Scott Branden <sbranden@broadcom.com>,
Eric Anholt <eric@anholt.net>
Cc: Stefan Wahren <stefan.wahren@i2se.com>,
Aaro Koskinen <aaro.koskinen@iki.fi>,
Lukas Wunner <lukas@wunner.de>,
bcm-kernel-feedback-list@broadcom.com,
linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org,
Martin Sperl <kernel@martin.sperl.org>,
Florian Kauer <florian.kauer@koalo.de>,
linux-rpi-kernel@lists.infradead.org
Subject: [PATCH RFC] dmaengine: bcm2835: Avoid GFP_KERNEL in device_prep_slave_sg
Date: Mon, 1 Apr 2019 20:38:19 +0200 [thread overview]
Message-ID: <1554143899-4124-1-git-send-email-stefan.wahren@i2se.com> (raw)
The commit af19b7ce76ba ("mmc: bcm2835: Avoid possible races on
data requests") introduces a possible circular locking dependency,
which is triggered by swapping to the sdhost interface.
So instead of reintroduce the race condition again, we could also
avoid this situation by using GFP_NOWAIT for the allocation of the
DMA buffer descriptors.
Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Fixes: af19b7ce76ba ("mmc: bcm2835: Avoid possible races on data requests")
Link: http://lists.infradead.org/pipermail/linux-rpi-kernel/2019-March/008615.html
---
drivers/dma/bcm2835-dma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c
index ec8a291..54093ff 100644
--- a/drivers/dma/bcm2835-dma.c
+++ b/drivers/dma/bcm2835-dma.c
@@ -671,7 +671,7 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_slave_sg(
d = bcm2835_dma_create_cb_chain(chan, direction, false,
info, extra,
frames, src, dst, 0, 0,
- GFP_KERNEL);
+ GFP_NOWAIT);
if (!d)
return NULL;
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2019-04-01 18:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-01 18:38 Stefan Wahren [this message]
2019-04-23 5:11 ` [PATCH RFC] dmaengine: bcm2835: Avoid GFP_KERNEL in device_prep_slave_sg Vinod Koul
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=1554143899-4124-1-git-send-email-stefan.wahren@i2se.com \
--to=stefan.wahren@i2se.com \
--cc=aaro.koskinen@iki.fi \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=eric@anholt.net \
--cc=f.fainelli@gmail.com \
--cc=florian.kauer@koalo.de \
--cc=kernel@martin.sperl.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=lukas@wunner.de \
--cc=rjui@broadcom.com \
--cc=sbranden@broadcom.com \
--cc=vkoul@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