Ver Fonte

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  RDMA/cxgb3: Fix regression caused by class_device -> device conversion
Linus Torvalds há 17 anos atrás
pai
commit
6329d3021b
1 ficheiros alterados com 4 adições e 0 exclusões
  1. 4 0
      drivers/infiniband/hw/cxgb3/iwch_provider.c

+ 4 - 0
drivers/infiniband/hw/cxgb3/iwch_provider.c

@@ -1096,7 +1096,9 @@ static ssize_t show_fw_ver(struct device *dev, struct device_attribute *attr, ch
 	struct net_device *lldev = iwch_dev->rdev.t3cdev_p->lldev;
 	struct net_device *lldev = iwch_dev->rdev.t3cdev_p->lldev;
 
 
 	PDBG("%s dev 0x%p\n", __func__, dev);
 	PDBG("%s dev 0x%p\n", __func__, dev);
+	rtnl_lock();
 	lldev->ethtool_ops->get_drvinfo(lldev, &info);
 	lldev->ethtool_ops->get_drvinfo(lldev, &info);
+	rtnl_unlock();
 	return sprintf(buf, "%s\n", info.fw_version);
 	return sprintf(buf, "%s\n", info.fw_version);
 }
 }
 
 
@@ -1109,7 +1111,9 @@ static ssize_t show_hca(struct device *dev, struct device_attribute *attr,
 	struct net_device *lldev = iwch_dev->rdev.t3cdev_p->lldev;
 	struct net_device *lldev = iwch_dev->rdev.t3cdev_p->lldev;
 
 
 	PDBG("%s dev 0x%p\n", __func__, dev);
 	PDBG("%s dev 0x%p\n", __func__, dev);
+	rtnl_lock();
 	lldev->ethtool_ops->get_drvinfo(lldev, &info);
 	lldev->ethtool_ops->get_drvinfo(lldev, &info);
+	rtnl_unlock();
 	return sprintf(buf, "%s\n", info.driver);
 	return sprintf(buf, "%s\n", info.driver);
 }
 }