[PATCH] race with initrd and bdflush

From: Nicolas Pitre (nico@cam.org)
Date: Sun Mar 19 2000 - 23:16:32 EST


For some configuration where there is only an initrd and no driver that
schedule() during their initialization, the kernel gets to play with
bdflush_tsk while the initrd is loading. Because bdflush_tsk is
initialized within a kernel thread which may not have run yet, we then
just blow up!

Here is a quick fix:

diff -u 2.3.99-pre1-rmk1/linux/fs/buffer.c linux/fs/buffer.c
--- 2.3.99-pre1/linux/fs/buffer.c Sat Mar 18 16:50:31 2000
+++ linux/fs/buffer.c Sat Mar 18 17:08:49 2000
@@ -2581,6 +2581,7 @@
 {
         kernel_thread(bdflush, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
         kernel_thread(kupdate, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
+ schedule();
         return 0;
 }
 

Nicolas

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Mar 23 2000 - 21:00:28 EST