Re: mtd: Make sure mtd->erasesize is valid even if the partition is of size 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Your Name <patch-notifications@xxxxxxxxxxxxxxx>

On Wed, 2019-01-30 at 11:55:52 UTC, Boris Brezillon 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@xxxxxxxxxxxxxx>
> Cc: <stable@xxxxxxxxxxxxxxx>
> Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> Signed-off-by: Boris Brezillon <bbrezillon@xxxxxxxxxx>
> Tested-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>

Applied to http://git.infradead.org/linux-mtd.git mtd/fixes, thanks.

y'all come back now!



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux