Bug 685004 - kernel oops on cp_get_ethtool_stats
Summary: kernel oops on cp_get_ethtool_stats
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel
Version: 4.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Red Hat Kernel Manager
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-15 02:41 UTC by Joe Jin
Modified: 2012-06-20 15:57 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 15:57:48 UTC
Target Upstream Version:


Attachments (Terms of Use)
[PATCH] 8139cp: allocate statistics space only when needed (4.92 KB, patch)
2011-03-15 02:41 UTC, Joe Jin
no flags Details | Diff

Description Joe Jin 2011-03-15 02:41:53 UTC
Created attachment 484341 [details]
[PATCH] 8139cp: allocate statistics space only when needed

Description of problem:
  Executed "ethtool -S eth<x>" hit the panic:

Unable to handle kernel NULL pointer dereference at virtual address 00000004
 printing eip:
dd098faf
*pde = 1ad01067
Oops: 0000 [#1]
Modules linked in: md5 ipv6 parport_pc lp parport autofs4 i2c_dev i2c_core
ocfs2_dlmfs(U) ocfs2_dlm(U) ocfs2_nodemanager(U) configfs(U) sunrpc loop
button battery ac 8139cp mii floppy sd_mod sym53c8xx scsi_transport_spi
scsi_mod dm_snapshot dm_zero dm_mirror ext3 jbd dm_mod
CPU:    0
EIP:    0060:[<dd098faf>]    Not tainted VLI
EFLAGS: 00010246   (2.6.9-55.0.2.6.2.EL)
EIP is at cp_get_ethtool_stats+0x5b/0x15c [8139cp]
eax: 00000000   ebx: d9a7d280   ecx: 00000008   edx: 00000063
esi: c54a0d00   edi: dd09bf40   ebp: c0c3bf08   esp: c0c3bef0
ds: 007b   es: 007b   ss: 0068
Process ethtool (pid: 4456, threadinfo=c0c3b000 task=ca680dd0)
Stack: 09aa41d8 c0c3b000 c02c200b c54a0d00 00000246 d9a7d000 0000001d
0000000e
       09aa41d8 c0c3bf3c d9a7d000 bfee6ea0 c02c22eb 0000001d c0c3b000
00000001
       00008946 c02bfd8b 00000000 32687465 00000000 00000000 00000000
09aa41d8
Call Trace:
 [<c02c200b>] ethtool_get_stats+0xc3/0x16a
 [<c02c22eb>] dev_ethtool+0x239/0x27a
 [<c02bfd8b>] dev_ioctl+0x2b1/0x495
 [<c02f70c8>] udp_ioctl+0x0/0x19d
 [<c02fd1e5>] inet_ioctl+0xa0/0xa5
 [<c02b5673>] sock_ioctl+0x2dd/0x38b
 [<c018061d>] sys_ioctl+0x297/0x336
 [<c031a90b>] syscall_call+0x7/0xb
Code: 63 00 00 00 8b 40 10 8b 03 8b 40 10 a8 08 74 08 f3 90 4a 83 fa ff 75 ef
8b 03 8b 40 10 a8 08 0f 85 04 01 00 00 8b 83 90 00 00 00 <8b> 50 04 8b 00 89
56 04 89 06 8b 83 90 00 00 00 8b 50 0c 8b 40
 <0>Fatal exception: panic in 5 seconds
Kernel panic - not syncing: Fatal exception


This is a known issue and have fixed in upstream:
http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=97f568d8e3dc031b092e6086c0534d5411fb2cf5

8139cp: safer spin loop for get_statistics

The spin loop in 8139cp is limited to 100 iterations when pulling hardware
stats. There is no allowance for processor speed so on a fast machine, the
stats may not be available that fast. Also, if the board doesn't return
soon enough make sure turn the address back off to prevent later updates
when memory has gone away.

From: Stephen Hemminger <shemminger>
Date: Wed, 14 Sep 2005 16:45:44 +0000 (-0700)
Subject: [PATCH] 8139cp: allocate statistics space only when needed
X-Git-Tag: v2.6.14-rc2~5^2~67
X-Git-Url:
http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=8b51292764a0ed46d7eb6bead4625ba83ee2ec05

[PATCH] 8139cp: allocate statistics space only when needed

Don't crash if ethtool statistics are requested and device is down.
Fix is to allocate pci space for statistics only when needed.

Signed-off-by: Stephen Hemminger <shemminger>
Signed-off-by: Jeff Garzik <jgarzik>

Comment 1 Jiri Pallich 2012-06-20 15:57:48 UTC
Thank you for submitting this issue for consideration in Red Hat Enterprise Linux. The release for which you requested us to review is now End of Life. 
Please See https://access.redhat.com/support/policy/updates/errata/

If you would like Red Hat to re-consider your feature request for an active release, please re-open the request via appropriate support channels and provide additional supporting details about the importance of this issue.


Note You need to log in before you can comment on or make changes to this bug.