Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0741a951e8489ef2889d9e3eecf33bb29b779dd0
Commit:     0741a951e8489ef2889d9e3eecf33bb29b779dd0
Parent:     10d7425d201e866ee0c57424860e06118dae2500
Author:     Diego Woitasen <[EMAIL PROTECTED]>
AuthorDate: Wed Nov 21 15:07:08 2007 -0800
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Fri Feb 1 15:04:21 2008 -0800

    PCI: remove unneeded lock_kernel() in drivers/pci/syscall.c.
    
    sys_pciconfig_{read,write}() are protected against PCI removal with the
    reference count in struct pci_dev.  The concurrency of
    pci_user_{read,write}_config_* functions are already protected by pci_lock
    in drivers/pci/access.c.
    
    Signed-off-by: Diego Woitasen <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/pci/syscall.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/drivers/pci/syscall.c b/drivers/pci/syscall.c
index 2ac050d..645d7a6 100644
--- a/drivers/pci/syscall.c
+++ b/drivers/pci/syscall.c
@@ -34,7 +34,6 @@ sys_pciconfig_read(unsigned long bus, unsigned long dfn,
        if (!dev)
                goto error;
 
-       lock_kernel();
        switch (len) {
        case 1:
                cfg_ret = pci_user_read_config_byte(dev, off, &byte);
@@ -47,10 +46,8 @@ sys_pciconfig_read(unsigned long bus, unsigned long dfn,
                break;
        default:
                err = -EINVAL;
-               unlock_kernel();
                goto error;
        };
-       unlock_kernel();
 
        err = -EIO;
        if (cfg_ret != PCIBIOS_SUCCESSFUL)
@@ -107,7 +104,6 @@ sys_pciconfig_write(unsigned long bus, unsigned long dfn,
        if (!dev)
                return -ENODEV;
 
-       lock_kernel();
        switch(len) {
        case 1:
                err = get_user(byte, (u8 __user *)buf);
@@ -140,7 +136,6 @@ sys_pciconfig_write(unsigned long bus, unsigned long dfn,
                err = -EINVAL;
                break;
        }
-       unlock_kernel();
        pci_dev_put(dev);
        return err;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to