All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] linux-2.6.15-rc7/drivers/pci/syscall.c
@ 2006-01-09 11:38 carlos neira
  2006-01-09 15:13 ` Matthew Wilcox
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: carlos neira @ 2006-01-09 11:38 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 271 bytes --]

Greetings :

patch :linux-2.6.15-rc7/drivers/pci/syscall.c

replaced a  lock_kernel with spinlocks  , compile tested ok






-- 
"Employ your time in improving yourself by other men's writings, so that you 
shall gain easily what others have labored hard for."
Socrates

[-- Attachment #2: syscall.patch --]
[-- Type: text/x-diff, Size: 1367 bytes --]

diff -urN /usr/src/linux-2.6.15-rc7/drivers/pci/syscall.c /home/cneira/Linuxjanitoring/linux-janitorpatching/drivers/pci/syscall.c
--- /usr/src/linux-2.6.15-rc7/drivers/pci/syscall.c	2005-12-24 20:47:48.000000000 -0300
+++ /home/cneira/Linuxjanitoring/linux-janitorpatching/drivers/pci/syscall.c	2006-01-07 22:53:23.000000000 -0300
@@ -11,6 +11,7 @@
 #include <linux/errno.h>
 #include <linux/pci.h>
 #include <linux/smp_lock.h>
+#include <linux/spinlock.h>
 #include <linux/syscalls.h>
 #include <asm/uaccess.h>
 #include "pci.h"
@@ -21,6 +22,7 @@
 		   void __user *buf)
 {
 	struct pci_dev *dev;
+
 	u8 byte;
 	u16 word;
 	u32 dword;
@@ -35,7 +37,7 @@
 	if (!dev)
 		goto error;
 
-	lock_kernel();
+	spin_lock(&pciconfig_read_lock)
 	switch (len) {
 	case 1:
 		cfg_ret = pci_user_read_config_byte(dev, off, &byte);
@@ -48,10 +50,10 @@
 		break;
 	default:
 		err = -EINVAL;
-		unlock_kernel();
+		spin_unlock(&pciconfig_read_lock);
 		goto error;
 	};
-	unlock_kernel();
+	spin_unlock(&pciconfig_read_lock);
 
 	err = -EIO;
 	if (cfg_ret != PCIBIOS_SUCCESSFUL)
@@ -106,7 +108,7 @@
 	if (!dev)
 		return -ENODEV;
 
-	lock_kernel();
+	spin_lock(&pciconfig_write_lock)
 	switch(len) {
 	case 1:
 		err = get_user(byte, (u8 __user *)buf);
@@ -139,7 +141,7 @@
 		err = -EINVAL;
 		break;
 	};
-	unlock_kernel();
+	spin_unlock(&pciconfig_write_lock)
 
 	return err;
 }

[-- Attachment #3: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-01-09 19:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-09 11:38 [KJ] linux-2.6.15-rc7/drivers/pci/syscall.c carlos neira
2006-01-09 15:13 ` Matthew Wilcox
2006-01-09 17:07 ` Greg KH
2006-01-09 19:02 ` Jesper Juhl
2006-01-09 19:12 ` Greg KH
2006-01-09 19:29 ` Matthew Wilcox
2006-01-09 19:47 ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.