Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7f049f2f4259e4a5c213720df1ce0c2ca095641a
Commit:     7f049f2f4259e4a5c213720df1ce0c2ca095641a
Parent:     908cf9a565348b5a6d765d120cb189a568ea4883
Author:     Steve Wise <[EMAIL PROTECTED]>
AuthorDate: Mon Nov 26 11:28:44 2007 -0600
Committer:  Roland Dreier <[EMAIL PROTECTED]>
CommitDate: Fri Jan 25 14:15:26 2008 -0800

    RDMA/cxgb3: Hold rtnl_lock() around ethtool get_drvinfo call
    
    Currently the call into cxgb3 to get the driver info is not serialized.
    The iw_cxgb3 module needs to hold the rtnl_lock around the ethtool ops
    call like dev_ioctl() does.
    
    Signed-off-by: Steve Wise <[EMAIL PROTECTED]>
    Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
---
 drivers/infiniband/hw/cxgb3/iwch_provider.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c 
b/drivers/infiniband/hw/cxgb3/iwch_provider.c
index b5436ca..69b1204 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_provider.c
+++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c
@@ -39,6 +39,7 @@
 #include <linux/list.h>
 #include <linux/spinlock.h>
 #include <linux/ethtool.h>
+#include <linux/rtnetlink.h>
 
 #include <asm/io.h>
 #include <asm/irq.h>
@@ -1053,7 +1054,9 @@ static ssize_t show_fw_ver(struct class_device *cdev, 
char *buf)
        struct net_device *lldev = dev->rdev.t3cdev_p->lldev;
 
        PDBG("%s class dev 0x%p\n", __FUNCTION__, cdev);
+       rtnl_lock();
        lldev->ethtool_ops->get_drvinfo(lldev, &info);
+       rtnl_unlock();
        return sprintf(buf, "%s\n", info.fw_version);
 }
 
@@ -1065,7 +1068,9 @@ static ssize_t show_hca(struct class_device *cdev, char 
*buf)
        struct net_device *lldev = dev->rdev.t3cdev_p->lldev;
 
        PDBG("%s class dev 0x%p\n", __FUNCTION__, cdev);
+       rtnl_lock();
        lldev->ethtool_ops->get_drvinfo(lldev, &info);
+       rtnl_unlock();
        return sprintf(buf, "%s\n", info.driver);
 }
 
-
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