[PATCH] 2.6.3-rc2 oops in ethtool.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If a device supports get_ringparam but not set_ringparam, instead of
getting EOPNOTSUPP, a null pointer is dereferenced.  Here's the trivial fix.


--- linux-2.6.3-rc2/net/core/ethtool.c	Tue Feb  3 19:43:19 2004
+++ linux-2.6.3-rc2.p/net/core/ethtool.c	Tue Feb 10 09:43:57 2004
@@ -374,7 +374,7 @@
 {
 	struct ethtool_ringparam ringparam;
 
-	if (!dev->ethtool_ops->get_ringparam)
+	if (!dev->ethtool_ops->set_ringparam)
 		return -EOPNOTSUPP;
 
 	if (copy_from_user(&ringparam, useraddr, sizeof(ringparam)))


-- 
Don Fry
brazilnut@us.ibm.com
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux