All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] dmaengine: ste_dma40: off by one in d40_of_probe()
@ 2013-08-23  9:23 ` Dan Carpenter
  0 siblings, 0 replies; 7+ 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] 7+ messages in thread

* [patch] dmaengine: ste_dma40: off by one in d40_of_probe()
@ 2013-08-23  9:23 ` Dan Carpenter
  0 siblings, 0 replies; 7+ 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] 7+ messages in thread

* Re: [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
  -1 siblings, 0 replies; 7+ 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] 7+ messages in thread

* [patch] dmaengine: ste_dma40: off by one in d40_of_probe()
@ 2013-08-23 18:15   ` Linus Walleij
  0 siblings, 0 replies; 7+ 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] 7+ messages in thread

* [patch] dmaengine: ste_dma40: off by one in d40_of_probe()
  2013-08-23  9:23 ` Dan Carpenter
  (?)
@ 2013-08-25 10:54   ` Vinod Koul
  -1 siblings, 0 replies; 7+ 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] 7+ messages in thread

* Re: [patch] dmaengine: ste_dma40: off by one in d40_of_probe()
@ 2013-08-25 10:54   ` Vinod Koul
  0 siblings, 0 replies; 7+ messages in thread
From: Vinod Koul @ 2013-08-25 10:54 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Linus Walleij, Dan Williams, Grant Likely, Rob Herring,
	linux-arm-kernel, devicetree, kernel-janitors

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] 7+ messages in thread

* Re: [patch] dmaengine: ste_dma40: off by one in d40_of_probe()
@ 2013-08-25 10:54   ` Vinod Koul
  0 siblings, 0 replies; 7+ messages in thread
From: Vinod Koul @ 2013-08-25 11:06 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] 7+ messages in thread

end of thread, other threads:[~2013-08-25 11:06 UTC | newest]

Thread overview: 7+ 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  9:23 ` Dan Carpenter
2013-08-23 18:15 ` Linus Walleij
2013-08-23 18:15   ` Linus Walleij
2013-08-25 10:54 ` Vinod Koul
2013-08-25 11:06   ` Vinod Koul
2013-08-25 10:54   ` Vinod Koul

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.