The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Cristian Stoica <cristian.stoica@freescale.com>,
	Dan Williams <dan.j.williams@intel.com>,
	Abhilash Kesavan <a.kesavan@samsung.com>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] devres: fix a for loop bounds check
Date: Mon, 21 Sep 2015 13:40:34 -0400	[thread overview]
Message-ID: <20150921174034.GA13263@mtj.duckdns.org> (raw)
In-Reply-To: <20150921162151.GA5648@mwanda>

On Mon, Sep 21, 2015 at 07:21:51PM +0300, Dan Carpenter wrote:
> The iomap[] array has PCIM_IOMAP_MAX (6) elements and not
> DEVICE_COUNT_RESOURCE (16).  This bug was found using a static checker.
> It may be that the "if (!(mask & (1 << i)))" check means we never
> actually go past the end of the array in real life.
> 
> Fixes: ec04b075843d ('iomap: implement pcim_iounmap_regions()')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Tejun Heo <tj@kernel.org>

Thanks.

-- 
tejun

      reply	other threads:[~2015-09-21 17:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20150916171000.GD3243@mtj.duckdns.org>
2015-09-21 16:21 ` [patch] devres: fix a for loop bounds check Dan Carpenter
2015-09-21 17:40   ` Tejun Heo [this message]

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=20150921174034.GA13263@mtj.duckdns.org \
    --to=htejun@gmail.com \
    --cc=a.kesavan@samsung.com \
    --cc=catalin.marinas@arm.com \
    --cc=cristian.stoica@freescale.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dan.j.williams@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.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