[PATCH try 3] MTD: OneNAND: fix numerous races

Artem Bityutskiy dedekind at infradead.org
Thu Sep 27 06:50:28 EDT 2007


On Thu, 2007-09-27 at 13:38 +0300, Artem Bityutskiy wrote:
> From: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
> Date: Fri, 21 Sep 2007 19:35:21 +0300
> Subject: [PATCH] MTD: OneNAND: fix numerous races
> 
> This patch make the OneNAND driver much less racy. It fixes
> our "onenand_wait: read timeout!" heisenbugs. The reason of
> these bugs was that the driver did not lock the chip when
> accessing OTP, and it screwed up OneNAND state when the OTP
> was read while JFFS2 was doing FS checking.
> 
> This patch also fixes other races I spotted:
> 1. BBT was not protected
> 2. Access to ecc_stats was not protected
> 
> Now the chip is locked when BBT is accessed.
> 
> To fix all of these I basically split all interface functions
> on 'function()' and 'function_nolock()' parts.
> 
> I tested this patch on N800 hardware - it fixes our problems.
> But I tested a little different version because our OneNAND
> codebase is slightly out-of-date. But it should be OK.
> 
> This patch also includes the prin fixes I posted before.
> 
> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
> ---

Kyungmin,

I did not test _this_ particular patch, I tested a slightly different
version of it. But the patch fixes quite severe problems which lead
to rare bugs which are very difficult to track.

Can you please try it on your setup, so that I'd ask dwmw2
to apply it and send upstream during the next merge window?

Thanks.

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




More information about the linux-mtd mailing list