diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-25 15:28:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-25 15:28:28 -0400 |
commit | 2e561c7b7e705b619122e5386d6f99f28f2b6e5a (patch) | |
tree | be942c58cacd25c66cced37e1a82f269c37871de /net/core | |
parent | 2cfed60cc24676d65e01278dbf10d0069de02592 (diff) | |
parent | 653252c2302cdf2dfbca66a7e177f7db783f9efa (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (48 commits)
net: Fix wrong interpretation of some copy_to_user() results.
xfrm: alg_key_len & alg_icv_len should be unsigned
[netdrvr] tehuti: move ioctl perm check closer to function start
ipv6: Fix typo in net/ipv6/Kconfig
via-velocity: fix vlan receipt
tg3: sparse cleanup
forcedeth: realtek phy crossover detection
ibm_newemac: Increase MDIO timeouts
gianfar: Fix skb allocation strategy
netxen: reduce stack usage of netxen_nic_flash_print
smc911x: test after postfix decrement fails in smc911x_{reset,drop_pkt}
net drivers: fix platform driver hotplug/coldplug
forcedeth: new backoff implementation
ehea: make things static
phylib: Add support for board-level PHY fixups
[netdrvr] atlx: code movement: move atl1 parameter parsing
atlx: remove flash vendor parameter
korina: misc cleanup
korina: fix misplaced return statement
WAN: Fix confusing insmod error code for C101 too.
...
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/ethtool.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/core/ethtool.c b/net/core/ethtool.c index a29b43d0b45..0133b5ebd54 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c | |||
@@ -323,6 +323,11 @@ static int ethtool_get_eeprom(struct net_device *dev, void __user *useraddr) | |||
323 | bytes_remaining -= eeprom.len; | 323 | bytes_remaining -= eeprom.len; |
324 | } | 324 | } |
325 | 325 | ||
326 | eeprom.len = userbuf - (useraddr + sizeof(eeprom)); | ||
327 | eeprom.offset -= eeprom.len; | ||
328 | if (copy_to_user(useraddr, &eeprom, sizeof(eeprom))) | ||
329 | ret = -EFAULT; | ||
330 | |||
326 | kfree(data); | 331 | kfree(data); |
327 | return ret; | 332 | return ret; |
328 | } | 333 | } |