[PATCH] mtd: Fix check in mtd_unpoint()
computersforpeace at gmail.com
Fri Jul 7 17:58:24 PDT 2017
On Sun, Jun 25, 2017 at 08:22:57PM +0200, Boris Brezillon wrote:
> The code checks that ->_point is not NULL, but we should actually check
> ->_unpoint value which is dereferenced a few lines after the check.
> Signed-off-by: Boris Brezillon <boris.brezillon at free-electrons.com>
> Found while checking that nobody except the core was directly calling
> Note that I didn't had a Fixes tag because it's hard to tell when
> mtd_point() was introduced (code has been moved from mtd.h to mtdcore.c
> in commit 8273a0c911d8 "mtd: add offset and length checks to the API
> function"), and all drivers implementing ->_point() also implement
> ->_unpoint (the only exception being drivers/mtd/maps/uclinux.c).
More information about the linux-mtd