[PATCH] MTD: OneNAND: fix numerous races

Artem Bityutskiy dedekind at infradead.org
Fri Sep 21 09:56:02 EDT 2007


On Fri, 2007-09-21 at 16:46 +0300, Artem Bityutskiy wrote:
> >From 5383a93bc534aa15c4e2a260fe5ca4a4ecb8310e Mon Sep 17 00:00:00 2001
> From: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
> Date: Fri, 21 Sep 2007 15:34:43 +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.
> 
> This was tested on N800 hardware.
> 
> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>

Sorry, this patch was against a little older kernel. But anyways,
I'd like to get feedback from Kyungmin.

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




More information about the linux-mtd mailing list