All of lore.kernel.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Tomer Barletz <barletz@gmail.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH] mtd-utils: Check mtdoffset is not larger than mtd.size in case of a bad block.
Date: Fri, 29 Jun 2012 11:32:21 +0300	[thread overview]
Message-ID: <1340958741.3070.133.camel@sauron.fi.intel.com> (raw)
In-Reply-To: <4FEA2DC1.9090003@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 595 bytes --]

On Tue, 2012-06-26 at 14:46 -0700, Tomer Barletz wrote:
> mtdoffset is being tested against mtd.size in the outer two loops, but 
> the third nested one does not test against it.
> In case of a bad block we'll try to access an out of bounds offset in 
> the next MEMGETBADBLOCK ioctl, which will fail with EINVAL.
> In case mtdoffset is indeed larger than the partition size, we need to 
> bail, since there are not enough "good" blocks to complete the write.
> 
> Signed-off-by: Tomer Barletz <barletz@gmail.com>

Pushed to mtd-utils, thanks!

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

      reply	other threads:[~2012-06-29  8:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-26 21:46 [PATCH] mtd-utils: Check mtdoffset is not larger than mtd.size in case of a bad block Tomer Barletz
2012-06-29  8:32 ` Artem Bityutskiy [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=1340958741.3070.133.camel@sauron.fi.intel.com \
    --to=dedekind1@gmail.com \
    --cc=barletz@gmail.com \
    --cc=linux-mtd@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 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.