jffs2/mtd on flash Spansion S29GL064AR4

MikeW mw_phil at yahoo.co.uk
Thu May 24 03:36:42 EDT 2007


Teun Grinwis <teun <at> adesys.nl> writes:

> 
> Hello All,
> 
> After further investigation, the real problem is a NULL ptr function
> call in kernel/sched.c, see below:
>
> ...snip...
>
> I tried a patch in kernel/sched.c, __wake_up_common:
> ...
>         if( curr->func == NULL || (curr->func(curr, mode, sync, key) &&
>                                    (flags & WQ_FLAG_EXCLUSIVE) &&
>                                    !--nr_exclusive) ) {
>             break;
>         }
> ...
> 
> Now jffs2 can be initialized on our flash S29GL064AR4. Also a test file
> remains
> persistent after re-power our system.
> 
> Is this patch right? My feeling is that something should be done in mtd!
> 
> Thanks for your info,
> 
> Regards
> 
> Teun Grinwis

Well, it's right in that it avoids the crunch of a NULL ptr,
but presumably the logic of the code should never permit
this to happen, so something's wrong somewhere else !

Perhaps as a side issue, drivers ought to include a 'checked' build
setting that effectively does an assertion check on things like
pointers about to be dereferenced, to spot issues during testing.

Regards,
MikeW





More information about the linux-mtd mailing list