[linux] 01/02: ixgbe: do not call check_link for ethtool in ixgbe_get_settings() (Closes: #851952)

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Wed Apr 19 22:18:52 UTC 2017


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch jessie
in repository linux.

commit 81bb3189432055937e44395ab32672672466d71c
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Wed Apr 19 22:56:47 2017 +0100

    ixgbe: do not call check_link for ethtool in ixgbe_get_settings() (Closes: #851952)
---
 debian/changelog                                   |  2 +
 ...t-call-check_link-for-ethtool-in-ixgbe_ge.patch | 45 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 48 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index e7a617b..1f0bd47 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -607,6 +607,8 @@ linux (3.16.43-1) UNRELEASED; urgency=medium
     (CVE-2017-7616)
   * crypto: ahash - Fix EINPROGRESS notification callback (CVE-2017-7618)
   * USB: iowarrior: fix NULL-deref at probe (CVE-2016-2188)
+  * ixgbe: do not call check_link for ethtool in ixgbe_get_settings()
+    (Closes: #851952)
 
   [ Salvatore Bonaccorso ]
   * sunrpc: fix refcounting problems with auth_gss messages.
diff --git a/debian/patches/bugfix/all/ixgbe-do-not-call-check_link-for-ethtool-in-ixgbe_ge.patch b/debian/patches/bugfix/all/ixgbe-do-not-call-check_link-for-ethtool-in-ixgbe_ge.patch
new file mode 100644
index 0000000..a6cb9b3
--- /dev/null
+++ b/debian/patches/bugfix/all/ixgbe-do-not-call-check_link-for-ethtool-in-ixgbe_ge.patch
@@ -0,0 +1,45 @@
+From: Emil Tantilov <emil.s.tantilov at intel.com>
+Date: Thu, 3 Dec 2015 15:20:06 -0800
+Subject: ixgbe: do not call check_link for ethtool in ixgbe_get_settings()
+Origin: https://git.kernel.org/linus/0e4d422f5f7249324ac8d1b8e12772e530787a66
+Bug-Debian: https://bugs.debian.org/851952
+
+In ixgbe_get_settings() the link status and speed of the interface
+are determined based on a read from the LINKS register via the call
+to mac.ops.check.link(). This can cause issues where external drivers
+may end up with unknown speed when calling ethtool_get_setings().
+
+Instead of calling the mac.ops.check_link() we can report the speed
+from the adapter structure which is populated by the driver.
+
+Signed-off-by: Emil Tantilov <emil.s.tantilov at intel.com>
+Tested-by: Phil Schmitt <phillip.j.schmitt at intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
+---
+ drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
++++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
+@@ -157,9 +157,7 @@ static int ixgbe_get_settings(struct net
+ 	struct ixgbe_adapter *adapter = netdev_priv(netdev);
+ 	struct ixgbe_hw *hw = &adapter->hw;
+ 	ixgbe_link_speed supported_link;
+-	u32 link_speed = 0;
+ 	bool autoneg = false;
+-	bool link_up;
+ 
+ 	hw->mac.ops.get_link_capabilities(hw, &supported_link, &autoneg);
+ 
+@@ -279,9 +277,8 @@ static int ixgbe_get_settings(struct net
+ 		break;
+ 	}
+ 
+-	hw->mac.ops.check_link(hw, &link_speed, &link_up, false);
+-	if (link_up) {
+-		switch (link_speed) {
++	if (netif_carrier_ok(netdev)) {
++		switch (adapter->link_speed) {
+ 		case IXGBE_LINK_SPEED_10GB_FULL:
+ 			ethtool_cmd_speed_set(ecmd, SPEED_10000);
+ 			break;
diff --git a/debian/patches/series b/debian/patches/series
index 2836167..c72f796 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -245,6 +245,7 @@ bugfix/all/-xen-blkfront-fix-accounting-of-reqs-when-migrating.patch
 bugfix/all/locking-mutex-don-t-assume-task_running.patch
 bugfix/all/SUNRPC-fix-refcounting-problems-with-auth_gss-messag.patch
 bugfix/all/ext4-fix-fencepost-in-s_first_meta_bg-validation.patch
+bugfix/all/ixgbe-do-not-call-check_link-for-ethtool-in-ixgbe_ge.patch
 
 # memfd_create() & kdbus backport
 features/all/kdbus/mm-allow-drivers-to-prevent-new-writable-mappings.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git



More information about the Kernel-svn-changes mailing list