linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: heiko@sntech.de (Heiko Stübner)
To: linux-arm-kernel@lists.infradead.org
Subject: [patch] pinctrl: s3c24xx: off by one in s3c24xx_eint_init()
Date: Tue, 27 Aug 2013 11:39:12 +0200	[thread overview]
Message-ID: <201308271139.13333.heiko@sntech.de> (raw)
In-Reply-To: <20130826233217.GA17061@elgon.mountain>

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

  reply	other threads:[~2013-08-27  9:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2013-08-28 12:45 ` Linus Walleij

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=201308271139.13333.heiko@sntech.de \
    --to=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).