]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: Fix mtd_check_oob_ops()
authorMiquel Raynal <miquel.raynal@free-electrons.com>
Mon, 18 Dec 2017 07:26:28 +0000 (08:26 +0100)
committerRichard Weinberger <richard@nod.at>
Mon, 18 Dec 2017 08:16:35 +0000 (09:16 +0100)
commitbe7ba59d9c2be15ddf205e8bd465867f5142047d
treec2e6ab78c76f4abc9697989e05494b249fb6b5f1
parent08b5596306cfbd7f06bc2b8b44d9e89569e41993
mtd: Fix mtd_check_oob_ops()

The mtd_check_oob_ops() helper verifies if the operation defined by the
user is correct.

Fix the check that verifies if the entire requested area exists. This
check is too restrictive and will fail anytime the last data byte of the
very last page is included in an operation.

Fixes: 13d6ef5fbfaf ("mtd: Add sanity checks in mtd_write/read_oob()")
Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
drivers/mtd/mtdcore.c