JFFS2 oops when writing to two partitions simultaneously

Orjan Friberg of at flatfrog.com
Wed Jan 25 16:01:03 EST 2012


On 01/25/2012 08:53 PM, Orjan Friberg wrote:
> I've boiled it down to whether CONFIG_PREEMPT (bug happens) or
> CONFIG_PREEMPT_VOLUNTARY (bug doesn't happen) is selected.

No, I haven't.  The problem disappeared only for

   while :; do dd if=/dev/zero of=file bs=800 count=1; done

That one-liner was boiled down from the following program, which still 
oopses instantly:

   #include <stdio.h>
   #include <unistd.h>
   #include <sys/types.h>
   #include <sys/stat.h>
   #include <fcntl.h>

   int main()
   {
     int fd;
     struct stat st;
     char buf[800];

     do {
       unlink("file2");
       fd = open("file1", O_RDWR|O_CREAT|O_TRUNC, 0666);
       stat("file1", &st);
       lseek(fd, 0, SEEK_SET);
       write(fd, buf, 800);
       close(fd);
       rename("file1", "file2");
     } while (1);

     return 0;
   }


(Apologies for spamming.)

-- 
Orjan Friberg
FlatFrog Laboratories AB



More information about the linux-mtd mailing list