[PATCH v2] mtdram: check offs and len where appropriate

2017-03-16 Thread chenwy
We should prevent user to operating mtd device with an illegal offset or length. Signed-off-by: Chen Wenyong <chenwy-f...@cn.fujitsu.com> --- drivers/mtd/devices/mtdram.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/mtd/devices/mtdram.c b/drivers/mtd/d

[PATCH v2] mtdram: check offs and len where appropriate

2017-03-16 Thread chenwy
We should prevent user to operating mtd device with an illegal offset or length. Signed-off-by: Chen Wenyong --- drivers/mtd/devices/mtdram.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/mtd/devices/mtdram.c b/drivers/mtd/devices/mtdram.c index cbd8547..83e1603

[PATCH] mtd: mtdram: check offs and len in mtdram->point madram->unpoint,mtdram->write and mtdram->read

2017-03-02 Thread chenwy
We should prevent user to erasing mtd device with an unaligned offset or length. Signed-off-by: Chen Wenyong <chenwy-f...@cn.fujitsu.com> --- drivers/mtd/devices/mtdram.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/mtd/devices/mtdram.c b/drivers/mtd/d

[PATCH] mtd: mtdram: check offs and len in mtdram->point madram->unpoint,mtdram->write and mtdram->read

2017-03-02 Thread chenwy
We should prevent user to erasing mtd device with an unaligned offset or length. Signed-off-by: Chen Wenyong --- drivers/mtd/devices/mtdram.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/mtd/devices/mtdram.c b/drivers/mtd/devices/mtdram.c index cbd8547..b0468c1