Message ID | 1285764747.2437.116.camel@localhost |
---|---|
State | New, archived |
Headers | show |
On Wed, 2010-09-29 at 15:52 +0300, Artem Bityutskiy wrote: > Maxime, I've cleaned up comments, added your signed-off-by and cc > stable. Is this OK? Yep > It would also be nice to get an ack from Maxim Levitsky. The patch fixes the problem, but I let Maxim decides if that's the correct way to fix it.
On Wed, 2010-09-29 at 15:58 +0200, Maxime Bizon wrote: > On Wed, 2010-09-29 at 15:52 +0300, Artem Bityutskiy wrote: > > > Maxime, I've cleaned up comments, added your signed-off-by and cc > > stable. Is this OK? > > Yep > > > It would also be nice to get an ack from Maxim Levitsky. > > The patch fixes the problem, but I let Maxim decides if that's the > correct way to fix it. Very sorry for not noticing this. I will look very carefully at this tomorrow. Best regards, Maxim Levitsky
On Fri, 2010-10-22 at 00:54 +0200, Maxim Levitsky wrote: > On Wed, 2010-09-29 at 15:58 +0200, Maxime Bizon wrote: > > On Wed, 2010-09-29 at 15:52 +0300, Artem Bityutskiy wrote: > > > > > Maxime, I've cleaned up comments, added your signed-off-by and cc > > > stable. Is this OK? > > > > Yep > > > > > It would also be nice to get an ack from Maxim Levitsky. > > > > The patch fixes the problem, but I let Maxim decides if that's the > > correct way to fix it. > > Very sorry for not noticing this. > I will look very carefully at this tomorrow. > > Best regards, > Maxim Levitsky > I don't see any reason for that patch to be wrong. I can't test it on my xD card, because like I said before its OOB is fake, and it probably just emulates the NAND interface. So of course: Acked-by: Maxim Levitsky <maximlevitsky@gmail.com> Best regards, Maxim Levitsky
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index a825002..39dcb57 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c @@ -216,6 +216,7 @@ static ssize_t mtd_read(struct file *file, char __user *buf, size_t count,loff_t { struct mtd_oob_ops ops; + memset(&ops, 0, sizeof (ops)); ops.mode = MTD_OOB_RAW; ops.datbuf = kbuf; ops.oobbuf = NULL; @@ -319,6 +320,7 @@ static ssize_t mtd_write(struct file *file, const char __user *buf, size_t count { struct mtd_oob_ops ops; + memset(&ops, 0, sizeof (ops)); ops.mode = MTD_OOB_RAW; ops.datbuf = kbuf; ops.oobbuf = NULL;