2 oopses in ethtool
Hi Marcelo,
I got an oops today with 2.4.33-rc2 when playing ethtool games on my TG3 NIC. It was caused by a typo in ethtool.c, and while fixing it, I discovered a second one.
David, a quick check showed that 2.6.17.1 has the first one fixed but not second one (ethtool_set_pauseparam), so you might want to merge it too.
Cheers,
Willy
From: Willy Tarreau <willy@wtap.(none)>
Date: Wed, 5 Jul 2006 22:34:52 +0200
Subject: [PATCH] ethtool: two oopses in ethtool_set_coalesce() and ethtool_set_pauseparam()
The function pointers which were checked were for their get_* counterparts. Typically a copy-paste typo.
---
net/core/ethtool.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
d249002f5f8141f98a4f625e7333bf3c49768575
net/core/ethtool.c +2 -2
@@ -349,7 +349,7 @@ static int ethtool_set_coalesce(struct n {struct ethtool_coalesce coalesce; -if (!dev->ethtool_ops->get_coalesce) +if (!dev->ethtool_ops->set_coalesce)return -EOPNOTSUPP ;if (copy_from_user (&coalesce, useraddr,sizeof (coalesce)))
@@ -403,7 +403,7 @@ static int ethtool_set_pauseparam(struct {struct ethtool_pauseparam pauseparam; -if (!dev->ethtool_ops->get_pauseparam) +if (!dev->ethtool_ops->set_pauseparam)return -EOPNOTSUPP ;if (copy_from_user (&pauseparam, useraddr,sizeof (pauseparam)))
Signature · 1 line
1.3.3
Quoted 12 lines · Willy Tarreau
Hi Marcelo,
I got an oops today with 2.4.33-rc2 when playing ethtool games on my TG3 NIC. It was caused by a typo in
ethtool.c, and while fixing it, I discovered a second one.David, a quick check showed that 2.6.17.1 has the first one fixed but not second one (
ethtool_set_pauseparam), so you might want to merge it too.Cheers,
Willy
Quoted 8 lines
From: Willy Tarreau <willy@wtap.(none)>
Date: Wed, 5 Jul 2006 22:34:52 +0200
Subject: [PATCH] ethtool: two oopses inethtool_set_coalesce()andethtool_set_pauseparam()The function pointers which were checked were for their get_* counterparts. Typically a copy-paste typo.
Signed-off-by Willy Tarreau <[email protected]>
ACK