As an experiment, tried acquiring module ref count every time network
device is ref counted. The result is discovering that there are cases
in the Ethernet module init path where there is a call to dev_hold()
without a previous explicit ref count.
kernel BUG at include/linux/module.h:284!
invalid operand: 0000 [#1]
CPU: 0
EIP: 0060:[<c028fd02>] Not tainted
EFLAGS: 00010246
EIP is at linkwatch_fire_event+0x170/0x1a3
eax: 00000000 ebx: c047fad0 ecx: 00000020 edx: f88c8100
esi: f88c7100 edi: f6fa7000 ebp: f6f15de4 esp: f6f15dc8
ds: 007b es: 007b ss: 0068
Process modprobe (pid: 408, threadinfo=f6f14000 task=f78f46a0)
Stack: f88c7100 c03f7008 00000246 f6f14000 f6fa7000 00000000 fffc829b f6f15df8
f88c0ab9 f6fa7000 f6fa71e0 033002a8 f6f15e24 f88c00e0 f6fa71e0 00007148
c03e2e80 f6fa7320 c011eb46 ffffffef f6f15e3e f6fa71e0 fffc829b f6f15e50
Call Trace:
[<f88c7100>] +0x0/0x1180 [e100]
[<f88c0ab9>] e100_update_link_state+0x97/0xa2 [e100]
[<f88c00e0>] e100_find_speed_duplex+0x20/0x26a [e100]
[<c011eb46>] sys_sched_yield+0xc0/0xfe
[<f88c07de>] e100_auto_neg+0x114/0x11c [e100]
[<c01fa4f8>] __delay+0x14/0x18
[<f88c081d>] e100_phy_set_speed_duplex+0x37/0xa4 [e100]
[<f88c0997>] e100_phy_init+0x69/0x78 [e100]
[<f88ba1dc>] e100_hw_init+0x14/0x11e [e100]
[<f88bc432>] e100_rd_pwa_no+0x32/0x40 [e100]
[<f88ba058>] e100_init+0xf6/0x126 [e100]
[<f88b9273>] e100_found1+0x1a9/0x42e [e100]
[<f88c5b25>] e100_driver_version+0x0/0xb [e100]
[<f88c5e40>] e100_driver+0x0/0xa0 [e100]
[<c01fe884>] pci_device_probe+0x5a/0x68
[<f88c5b60>] e100_id_table+0x0/0x2e0 [e100]
[<f88c5e68>] e100_driver+0x28/0xa0 [e100]
[<c0241853>] bus_match+0x43/0x6e
[<f88c5e68>] e100_driver+0x28/0xa0 [e100]
[<f88c5e68>] e100_driver+0x28/0xa0 [e100]
[<c0241956>] driver_attach+0x5c/0x60
[<f88c5e68>] e100_driver+0x28/0xa0 [e100]
[<f88c5e68>] e100_driver+0x28/0xa0 [e100]
[<c0241c2a>] bus_add_driver+0xb2/0xc8
[<f88c5e68>] e100_driver+0x28/0xa0 [e100]
[<f88c7100>] +0x0/0x1180 [e100]
[<c01fe99a>] pci_register_driver+0x46/0x56
[<f88c5e68>] e100_driver+0x28/0xa0 [e100]
[<f880c015>] +0x15/0x3e [e100]
[<f88c5e40>] e100_driver+0x0/0xa0 [e100]
[<c013b034>] sys_init_module+0x1b0/0x292
all_call+0x7/0xb
Code: 0f 0b 1c 01 97 5a 32 c0 e9 d9 fe ff ff c7 04 24 0c 00 00 00
./ifup: line 91: 408 Segmentation fault modprobe $1 >/dev/null 2>&1
netdev-module.diff
Description: Binary data
|