* [patch] dmaengine: ste_dma40: off by one in d40_of_probe()
@ 2013-08-23 9:23 Dan Carpenter
2013-08-23 18:15 ` Linus Walleij
2013-08-25 10:54 ` Vinod Koul
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2013-08-23 9:23 UTC (permalink / raw)
To: linux-arm-kernel
If "num_disabled" is equal to STEDMA40_MAX_PHYS (32) then we would write
one space beyond the end of the pdata->disable_channels[] array.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index 0036756..e0157c8 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -3516,7 +3516,7 @@ static int __init d40_of_probe(struct platform_device *pdev,
list = of_get_property(np, "disabled-channels", &num_disabled);
num_disabled /= sizeof(*list);
- if (num_disabled > STEDMA40_MAX_PHYS || num_disabled < 0) {
+ if (num_disabled >= STEDMA40_MAX_PHYS || num_disabled < 0) {
d40_err(&pdev->dev,
"Invalid number of disabled channels specified (%d)\n",
num_disabled);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [patch] dmaengine: ste_dma40: off by one in d40_of_probe()
2013-08-23 9:23 [patch] dmaengine: ste_dma40: off by one in d40_of_probe() Dan Carpenter
@ 2013-08-23 18:15 ` Linus Walleij
2013-08-25 10:54 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2013-08-23 18:15 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Aug 23, 2013 at 11:23 AM, Dan Carpenter
<dan.carpenter@oracle.com> wrote:
> If "num_disabled" is equal to STEDMA40_MAX_PHYS (32) then we would write
> one space beyond the end of the pdata->disable_channels[] array.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
* [patch] dmaengine: ste_dma40: off by one in d40_of_probe()
2013-08-23 9:23 [patch] dmaengine: ste_dma40: off by one in d40_of_probe() Dan Carpenter
2013-08-23 18:15 ` Linus Walleij
@ 2013-08-25 10:54 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2013-08-25 10:54 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Aug 23, 2013 at 12:23:43PM +0300, Dan Carpenter wrote:
> If "num_disabled" is equal to STEDMA40_MAX_PHYS (32) then we would write
> one space beyond the end of the pdata->disable_channels[] array.
Applied, thanks
~Vinod
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-08-25 10:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-23 9:23 [patch] dmaengine: ste_dma40: off by one in d40_of_probe() Dan Carpenter
2013-08-23 18:15 ` Linus Walleij
2013-08-25 10:54 ` Vinod Koul
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).