[PATCH v2] nand: nand_base: Always initialise oob_poi before writing OOB data

Artem Bityutskiy dedekind1 at gmail.com
Fri May 27 05:30:54 EDT 2011


On Thu, 2011-05-26 at 17:15 +0200, THOMSON, Adam (Adam) wrote:
> The reason I mentioned 2.6.31 was because it was the earliest kernel I
> had been using when I witnessed this issue. Having looked at the commit
> you mentioned, I have to agree that's where the problem first appeared.
> Do you want me to add the CC with [2.6.20+] (assume that should be part
> of the patch text in the mail)?

Yes, please, add the CC to -stable.

> > 2. I think the right place fir this memset is 
> > 'nand_fill_oob()'. But in this case the first memset from 
> > 'nand_do_write_oob()' has to be removed.
> > 
> 
> Yes, that makes sense. Did consider that afterwards. Will update
> Accordingly.

Thanks!

> No that's fine. Shouldn't be too much to do. Do you want both
> the stable patch and the proper fix submitted around the same
> time,

Yes, please.

>  or are you happy to get the initial fix in first, and follow up
> with the more complete tidying of that code?

Please, send all together. It is anyway too late to merge it to 2.6.40,
so there is no rush.

>  Also am guessing
> the complete patch should be based on the latest and greatest
> Kernel (2.6.39)?

Yes, of course, although the latest kernel is this one:
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

But it is OK to _test_ it an older kernel, though. 

> Having looked briefly at the read side code in nand_base.c,
> it does look like it should be enough to remove the second
> memset and leave the read side code as is, but will examine
> it more thoroughly before I post a patch.

Thanks a lot. When you send a patch, please, also explicitly tell
whether you tested it on some HW or only compile-tested.

Thanks!

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)




More information about the linux-mtd mailing list