Bux fix for coda linux kernel driver on SMP kernels

From: Mark Aikens (marka@wpi.edu)
Date: Fri Apr 28 2000 - 22:40:37 EST


I have found a bug in the linux coda driver that only affects SMP
kernels. The problem that occurs is the coda driver doesn't get the
kernel lock which causes a kernel BUG message and venus crashes. I
have attached a patch for the 2.3.99pre6 kernel below.

Please CC any comments to me directly.

-Mark Aikens

diff -u --recursive linux-2.3.99-pre6/fs/coda/psdev.c linux/fs/coda/psdev.c
--- linux-2.3.99-pre6/fs/coda/psdev.c Mon Mar 13 15:35:39 2000
+++ linux/fs/coda/psdev.c Fri Apr 28 17:54:01 2000
@@ -35,6 +35,7 @@
 #include <linux/poll.h>
 #include <linux/init.h>
 #include <linux/list.h>
+#include <linux/smp_lock.h>
 #include <asm/io.h>
 #include <asm/segment.h>
 #include <asm/system.h>
@@ -144,7 +145,9 @@
                         return -EFAULT;
 
                 /* what downcall errors does Venus handle ? */
+ lock_kernel();
                 error = coda_downcall(hdr.opcode, dcbuf, sb);
+ unlock_kernel();
 
                 if ( error) {
                         printk("psdev_write: coda_downcall error: %d\n",

-
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 : Sun Apr 30 2000 - 21:00:16 EST