Coda File System

Bux fix for coda linux kernel driver on SMP kernels

From: Mark Aikens <marka_at_wpi.edu>
Date: Fri, 28 Apr 2000 23:40:37 -0400
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", 
Received on 2000-04-29 01:04:27