[PATCH] 2.6.3-rc2 oops in ethtool.c
From: Don Fry
Date: Tue Feb 10 2004 - 15:58:20 EST
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@xxxxxxxxxx
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html