lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20110418222954.GA9467@akhaparde-VBox>
Date:	Mon, 18 Apr 2011 17:29:54 -0500
From:	Ajit Khaparde <ajit.khaparde@...lex.com>
To:	<davem@...emloft.net>
CC:	<netdev@...r.kernel.org>
Subject: [PATCH net-next 1/5] be2net: allow register dump only for PFs


Signed-off-by: Ajit Khaparde <ajit.khaparde@...lex.com>
---
 drivers/net/benet/be_ethtool.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/net/benet/be_ethtool.c b/drivers/net/benet/be_ethtool.c
index 28716a6..22523b9 100644
--- a/drivers/net/benet/be_ethtool.c
+++ b/drivers/net/benet/be_ethtool.c
@@ -161,7 +161,9 @@ be_get_reg_len(struct net_device *netdev)
 	struct be_adapter *adapter = netdev_priv(netdev);
 	u32 log_size = 0;
 
-	be_cmd_get_reg_len(adapter, &log_size);
+	if (be_physfn(adapter))
+		be_cmd_get_reg_len(adapter, &log_size);
+
 	return log_size;
 }
 
@@ -170,8 +172,10 @@ be_get_regs(struct net_device *netdev, struct ethtool_regs *regs, void *buf)
 {
 	struct be_adapter *adapter = netdev_priv(netdev);
 
-	memset(buf, 0, regs->len);
-	be_cmd_get_regs(adapter, regs->len, buf);
+	if (be_physfn(adapter)) {
+		memset(buf, 0, regs->len);
+		be_cmd_get_regs(adapter, regs->len, buf);
+	}
 }
 
 static int
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ