[PATCH] mtd: mtd_oobtest: generate consitent data for verification

Akinobu Mita akinobu.mita at gmail.com
Thu Mar 6 07:33:38 EST 2014


2014-03-06 18:25 GMT+09:00 Brian Norris <computersforpeace at gmail.com>:
> On Sat, Mar 01, 2014 at 12:49:05PM +0900, Akinobu Mita wrote:
>> mtd_oobtest writes OOB, read it back and verify.  The verification is
>> not correctly done if oobsize is not multiple of 4.  Although the data
>> to be written and the data to be compared are generated by several
>> prandom_byte_state() calls starting with the same seed, these two are
>> generated with the different size and different number of calls.
>>
>> Due to the implementation of prandom_byte_state() if the size on each
>> call is not multiple of 4, the resulting data is not always same.
>>
>> This fixes it by just calling prandom_byte_state() once and using
>> correct range instead of calling it multiple times for each.
>>
>> Reported-by: George Cherian <george.cherian at ti.com>
>> Reported-by: Lothar Waßmann <LW at KARO-electronics.de>
>> Cc: George Cherian <george.cherian at ti.com>
>> Cc: Lothar Waßmann <LW at KARO-electronics.de>
>> Cc: David Woodhouse <dwmw2 at infradead.org>
>> Cc: Brian Norris <computersforpeace at gmail.com>
>> Cc: linux-mtd at lists.infradead.org
>> Signed-off-by: Akinobu Mita <akinobu.mita at gmail.com>
>
> This patch does not apply for me. Are you based on l2-mtd.git?

Oops, this patch depends on a cleanup patch which I haven't submitted
yet.  I'll send a correct patch soon.



More information about the linux-mtd mailing list