From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Boris Brezillon <bbrezillon@kernel.org>
Cc: Richard Weinberger <richard@nod.at>,
stable <stable@vger.kernel.org>,
Marek Vasut <marek.vasut@gmail.com>,
MTD Maling List <linux-mtd@lists.infradead.org>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Brian Norris <computersforpeace@gmail.com>,
David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH] mtd: Make sure mtd->erasesize is valid even if the partition is of size 0
Date: Tue, 5 Feb 2019 13:58:00 +0100 [thread overview]
Message-ID: <CAMuHMdWpaWpRhe4Z=sg2sLcrp5_BSrdvfX2FXovZ1+XpMUGc7g@mail.gmail.com> (raw)
In-Reply-To: <20190130115552.9610-1-bbrezillon@kernel.org>
Hi Boris,
On Wed, Jan 30, 2019 at 12:56 PM Boris Brezillon <bbrezillon@kernel.org> wrote:
> Commit 33f45c44d68b ("mtd: Do not allow MTD devices with inconsistent
> erase properties") introduced a check to make sure ->erasesize and
> ->_erase values are consistent with the MTD_NO_ERASE flag.
> This patch did not take the 0 bytes partition case into account which
> can happen when the defined partition is outside the flash device memory
> range. Fix that by setting the partition erasesize to the parent
> erasesize.
>
> Fixes: 33f45c44d68b ("mtd: Do not allow MTD devices with inconsistent erase properties")
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Cc: <stable@vger.kernel.org>
> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Boris Brezillon <bbrezillon@kernel.org>
Thanks, that made the warning disappear.
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2019-02-05 12:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-30 11:55 [PATCH] mtd: Make sure mtd->erasesize is valid even if the partition is of size 0 Boris Brezillon
2019-02-05 12:58 ` Geert Uytterhoeven [this message]
2019-02-06 8:37 ` Boris Brezillon
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='CAMuHMdWpaWpRhe4Z=sg2sLcrp5_BSrdvfX2FXovZ1+XpMUGc7g@mail.gmail.com' \
--to=geert@linux-m68k.org \
--cc=bbrezillon@kernel.org \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=stable@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;
as well as URLs for NNTP newsgroup(s).