[BUG] Oops in nftl driver

David Woodhouse dwmw2 at infradead.org
Tue Oct 8 08:32:39 EDT 2002


sss at sss.dnsalias.net said:
>  I don't know if it will be triggered under "normal" circumstances. In
> my case, it happened after I had switched from using the M-Systems
> driver to the linux-mtd driver, without reformatting the DOC in
> between, and with an ext2-compressed file system on it. I would say
> that the kernel should not oops, no matter the state and content of
> the DOC, so I believe the bug is real.

> I'm using the linux-2.4.19 driver, but the bug still appears to exist
> in the cvs version.

> I wrote down the oops info and handed it to ksymoops:

Thanks for the useful report. Does this help?

--- drivers/mtd/nftlmount.c     13 Sep 2002 14:35:33 -0000      1.29
+++ drivers/mtd/nftlmount.c     8 Oct 2002 12:32:24 -0000
@@ -740,7 +740,7 @@ int NFTL_mount(struct NFTLrecord *s)

        /* second pass to format unreferenced blocks  and init free block count */
        s->numfreeEUNs = 0;
-       s->LastFreeEUN = BLOCK_NIL;
+       s->LastFreeEUN = le16_to_cpu(s->MediaHdr.FirstPhysicalEUN);

        for (block = 0; block < s->nb_blocks; block++) {
                if (s->ReplUnitTable[block] == BLOCK_NOTEXPLORED) {

--
dwmw2






More information about the linux-mtd mailing list