linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [patch] pinctrl: s3c24xx: off by one in s3c24xx_eint_init()
@ 2013-08-27  1:11 Dan Carpenter
  2013-08-27  9:39 ` Heiko Stübner
  2013-08-28 12:45 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2013-08-27  1:11 UTC (permalink / raw)
  To: linux-arm-kernel

If "irq == NUM_EINT" then it writes one space beyond the end of the
eint_data->domains[] array.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/pinctrl/pinctrl-s3c24xx.c b/drivers/pinctrl/pinctrl-s3c24xx.c
index 24446da..ad3eaad 100644
--- a/drivers/pinctrl/pinctrl-s3c24xx.c
+++ b/drivers/pinctrl/pinctrl-s3c24xx.c
@@ -549,7 +549,7 @@ static int s3c24xx_eint_init(struct samsung_pinctrl_drv_data *d)
 		irq = bank->eint_offset;
 		mask = bank->eint_mask;
 		for (pin = 0; mask; ++pin, mask >>= 1) {
-			if (irq > NUM_EINT)
+			if (irq >= NUM_EINT)
 				break;
 			if (!(mask & 1))
 				continue;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [patch] pinctrl: s3c24xx: off by one in s3c24xx_eint_init()
  2013-08-27  1:11 [patch] pinctrl: s3c24xx: off by one in s3c24xx_eint_init() Dan Carpenter
@ 2013-08-27  9:39 ` Heiko Stübner
  2013-08-28 12:45 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Heiko Stübner @ 2013-08-27  9:39 UTC (permalink / raw)
  To: linux-arm-kernel

Am Dienstag, 27. August 2013, 03:11:26 schrieb Dan Carpenter:
> If "irq == NUM_EINT" then it writes one space beyond the end of the
> eint_data->domains[] array.

Thanks for catching this.


> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>


> 
> diff --git a/drivers/pinctrl/pinctrl-s3c24xx.c
> b/drivers/pinctrl/pinctrl-s3c24xx.c index 24446da..ad3eaad 100644
> --- a/drivers/pinctrl/pinctrl-s3c24xx.c
> +++ b/drivers/pinctrl/pinctrl-s3c24xx.c
> @@ -549,7 +549,7 @@ static int s3c24xx_eint_init(struct
> samsung_pinctrl_drv_data *d) irq = bank->eint_offset;
>  		mask = bank->eint_mask;
>  		for (pin = 0; mask; ++pin, mask >>= 1) {
> -			if (irq > NUM_EINT)
> +			if (irq >= NUM_EINT)
>  				break;
>  			if (!(mask & 1))
>  				continue;
> --
> To unsubscribe from this list: send the line "unsubscribe
> linux-samsung-soc" in the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [patch] pinctrl: s3c24xx: off by one in s3c24xx_eint_init()
  2013-08-27  1:11 [patch] pinctrl: s3c24xx: off by one in s3c24xx_eint_init() Dan Carpenter
  2013-08-27  9:39 ` Heiko Stübner
@ 2013-08-28 12:45 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2013-08-28 12:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Aug 27, 2013 at 3:11 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:

> If "irq == NUM_EINT" then it writes one space beyond the end of the
> eint_data->domains[] array.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Patch applied with Heiko's ACK.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-08-28 12:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-27  1:11 [patch] pinctrl: s3c24xx: off by one in s3c24xx_eint_init() Dan Carpenter
2013-08-27  9:39 ` Heiko Stübner
2013-08-28 12:45 ` Linus Walleij

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).