Error Report
Hello,
The error came to occur by 'modprobe ath9k' since compat-wireless-2010-05-05.
# less /var/log/messages
May 13 17:50:19 *** kernel: Generic kernel compatibility enabled based on linux-next next-20100113 May 13 17:50:19 *** kernel: cfg80211: Calling CRDA to update world regulatory domain May 13 17:50:19 *** kernel: ath9k 0000:04:00.0: PCI INT A -> Link[LN3A] -> GSI 19 (level, low) -> IRQ 19 May 13 17:50:20 *** kernel: BUG: unable to handle kernel NULL pointer dereference at 0000000000000000 May 13 17:50:20 *** kernel: IP: [<0000000000000000>] 0x0 May 13 17:50:20 *** kernel: PGD b895a067 PUD cd4ab067 PMD 0 May 13 17:50:20 *** kernel: Oops: 0010 [1] SMP May 13 17:50:20 *** kernel: CPU 0 May 13 17:50:20 *** kernel: Modules linked in: ath9k(+) ath9k_common ath9k_hw ath mac80211 cfg80211 rfkill_backport compat pcmcia_core led_class lm90 coretemp hwmon aes_x86_64 aes_generic sunrpc tun bridge stp ipv6 nf_nat_ftp nf_conntrack_ftp nf_conntrack_netbios_ns ipt_MASQUERADE iptable_nat
nf_nat ipt_ULOG ipt_recent nf_conntrack_ipv4 xt_state nf_conntrack xt_limit ipt_REJECT xt_tcpudp xt_multiport iptable_filter ip_tables x_tables p4_clo ckmod speedstep_lib freq_table dm_mirror dm_log dm_mod uinput arc4 snd_hda_intel ecb crypto_blkcipher snd_seq_dummy snd_seq_oss snd_seq_midi_event snd _seq snd_seq_device snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd_page_alloc snd_hwdep pcspkr nvidia(P) thermal snd i2c_nforce2 wmi pegasus processo r button mii soundcore i2c_core forcedeth shpchp sg ahci libata dock ide_cd_mod cdrom sd_mod scsi_mod crc_t10dif raid1 uhci_hcd ohci_hcd ehci_hcd [las t unloaded: crc_ccitt]
May 13 17:50:20 *** kernel: Pid: 16371, comm: modprobe Tainted: P 2.6.27-52vl5 #1 May 13 17:50:20 *** kernel: RIP: 0010:[<0000000000000000>] [<0000000000000000>] 0x0 May 13 17:50:20 *** kernel: RSP: 0018:ffff8800b8985aa0 EFLAGS: 00010282 May 13 17:50:20 *** kernel: RAX: ffff8800cd9c2c94 RBX: ffff8800cd9c2c94 RCX: 0000000000000000 May 13 17:50:20 *** kernel: RDX: 0000000000000000 RSI: ffff8800cd9c2c94 RDI: ffff8800cd44e000 May 13 17:50:20 *** kernel: RBP: ffff8800d2072800 R08: ffff8800d2072900 R09: ffff8800b8985af4 May 13 17:50:20 *** kernel: R10: ffff8800d2072900 R11: ffff8800d2072800 R12: ffff8800cd44e000 May 13 17:50:20 *** kernel: R13: 0000000000000000 R14: 0000000000000000 R15: 00000000ffffffff May 13 17:50:20 *** kernel: FS: 00007f206c7816f0(0000) GS:ffffffff8071b000(0000) knlGS:0000000000000000 May 13 17:50:20 *** kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b May 13 17:50:20 *** kernel: CR2: 0000000000000000 CR3: 00000000d2030000 CR4: 00000000000006e0 May 13 17:50:20 *** kernel: DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 May 13 17:50:20 *** kernel: DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 May 13 17:50:20 *** kernel: Process modprobe (pid: 16371, threadinfo ffff8800b8984000, task ffff8800ced3f0d0) May 13 17:50:20 *** kernel: Stack: ffffffff804610bf 0000000000000000 0000000000000001 ffff8800cd9c2c00 May 13 17:50:20 *** kernel: 0000000000000286 0000000000000000 0000000000000000 0000000000000000 May 13 17:50:20 *** kernel: 0000000000000000 ffffffff8064edc0 000005dc00000000 ffff8800ce981430 May 13 17:50:20 *** kernel: Call Trace: May 13 17:50:20 *** kernel: [<ffffffff804610bf>] ? rtnl_fill_ifinfo+0x2fc/0x539 May 13 17:50:20 *** kernel: [<ffffffff80461541>] ? rtmsg_ifinfo+0x5c/0xd1 May 13 17:50:20 *** kernel: [<ffffffff804615f6>] ? rtnetlink_event+0x40/0x44 May 13 17:50:20 *** kernel: [<ffffffff8024f2fc>] ? notifier_call_chain+0x29/0x4c May 13 17:50:20 *** kernel: [<ffffffff804595ad>] ? register_netdevice+0x2a1/0x2e2 May 13 17:50:20 *** kernel: [<ffffffffa0ab1a4d>] ? ieee80211_if_add+0x4b9/0x59a [mac80211] May 13 17:50:20 *** kernel: [<ffffffffa0ab2c53>] ? ieee80211_try_rate_control_ops_get+0x89/0x94 [mac80211] May 13 17:50:20 *** kernel: [<ffffffffa0aa69e8>] ? ieee80211_register_hw+0x2c4/0x366 [mac80211] May 13 17:50:20 *** kernel: [<ffffffffa0aed2dc>] ? ath9k_init_device+0x65b/0x74d [ath9k] May 13 17:50:20 *** kernel: [<ffffffff8027e29c>] ? request_irq+0x91/0xb5 May 13 17:50:20 *** kernel: [<ffffffffa0af6dea>] ? ath_pci_probe+0x27f/0x331 [ath9k] May 13 17:50:20 *** kernel: [<ffffffff802f638a>] ? __sysfs_add_one+0x66/0x6f May 13 17:50:20 *** kernel: [<ffffffff80381a09>] ? pci_device_probe+0x4f/0x78 May 13 17:50:20 *** kernel: [<ffffffff803ef088>] ? driver_probe_device+0xd0/0x14d May 13 17:50:20 *** kernel: [<ffffffff803ef14b>] ? __driver_attach+0x46/0x6d May 13 17:50:20 *** kernel: [<ffffffff803ef105>] ? __driver_attach+0x0/0x6d May 13 17:50:20 *** kernel: [<ffffffff803ee81f>] ? bus_for_each_dev+0x44/0x6f May 13 17:50:20 *** kernel: [<ffffffff803eec5f>] ? bus_add_driver+0xb4/0x205 May 13 17:50:20 *** kernel: [<ffffffff803ef3b3>] ? driver_register+0x8d/0x101 May 13 17:50:20 *** kernel: [<ffffffffa0a49000>] ? ath9k_init+0x0/0x43 [ath9k] May 13 17:50:20 *** kernel: [<ffffffff80381c72>] ? __pci_register_driver+0x5a/0x8c May 13 17:50:20 *** kernel: [<ffffffffa0a49000>] ? ath9k_init+0x0/0x43 [ath9k] May 13 17:50:20 *** kernel: [<ffffffffa0a49023>] ? ath9k_init+0x23/0x43 [ath9k] May 13 17:50:20 *** kernel: [<ffffffff8020a041>] ? do_one_initcall+0x41/0x11d May 13 17:50:20 *** kernel: [<ffffffff8025b049>] ? sys_init_module+0x9e/0x1ad May 13 17:50:20 *** kernel: [<ffffffff8020ff9a>] ? system_call_fastpath+0x16/0x1b May 13 17:50:20 *** kernel: May 13 17:50:20 *** kernel: May 13 17:50:20 *** kernel: Code: Bad RIP value. May 13 17:50:20 *** kernel: RIP [<0000000000000000>] 0x0 May 13 17:50:20 *** kernel: RSP <ffff8800b8985aa0> May 13 17:50:20 *** kernel: CR2: 0000000000000000 May 13 17:50:20 *** kernel: ---[ end trace cdf98c91d3641c37 ]---
# lspci -v
04:00.0 Network controller: Atheros Communications Inc. AR928X Wireless Network Adapter (PCI-Express) (rev 01)
Subsystem: Device 1a3b:1067
Flags: bus master, fast devsel, latency 0, IRQ 19 Memory at febf0000 (64-bit, non-prefetchable) [size=64K]
Capabilities: [40] Power Management version 2
Capabilities: [50] MSI: Mask- 64bit- Count=1/1 Enable-
Capabilities: [60] Express Legacy Endpoint, MSI 00
Capabilities: [90] MSI-X: Enable- Mask- TabSize=1
Capabilities: [100] Advanced Error Reporting
Capabilities: [140] Virtual Channel <?>
Capabilities: [160] Device Serial Number 00-00-00-00-00-00-00-00 Kernel driver in use: ath9k
Kernel modules: ath9k
Sincerely yours
By the way, I am not good at English.
Sorry,
Masahiro
Hello,
It examined it.
When net_device was examined before register_netdevice was called by function ieee80211_if_add in source net/mac80211/iface.c, the get_stats member was NULL.
Sincerely yours
By the way, I am not good at English.
Sorry,
Masahiro
can you
rm -rf /lib/modules/$(uname -r)/updates/
depmod -a
then get a fresh new compat-wireless and install that?
Luis
Thank you for the reply.
There was no problem up to compat-wireless-2010-04-26.
It is compat-wireless-2010-05-18 to try now.
Quoted 2 lines
rm -rf /lib/modules/$(uname -r)/updates/
depmod -a
This command is executed.
By the way, I am not good at English.
Sorry,
Masahiro
Hello,
It examined it.ndo_get_stats in this seems not to be set in ath9k though netdev_attach_ops is added from compat-wireless-2010-05-xx to compat-2.6.29.c.
Sincerely yours
By the way, I am not good at English.
Sorry,
Masahiro
Quoted 6 lines · Masahiro Inoue
Hello,
It examined it.
ndo_get_statsin this seems not to be set in ath9k thoughnetdev_attach_opsis added from compat-wireless-2010-05-xx tocompat-2.6.29.c.
Well check this out:
void netdev_attach_ops(struct net_device *dev,
const struct net_device_ops *ops)
{
#define SET_NETDEVOP(_op) (_op ? _op : NULL)
...
dev->get_stats = SET_NETDEVOP(ops->ndo_get_stats);
...
#undef SET_NETDEVOP
}
Granted that SET_DEVDEVOP() macro is stupid and I'll be removing it now but, the get_stats() callback is actually being set. What kernel are you using?
Luis
Thank you for the reply.
I'm sorry.
It had been forgotten to tell the kernel version. The kernel version is 2.6.27.
I'm sorry. It made a mistake.get_stats of the ieee80211_dataif_ops is not set though ieee80211_dataif_ops has been passed as a parameter when netdev_attach_ops is called by the ieee80211_if_setup function in net/mac80211/iface.c.
It is alloc_netdev_mq function in net/core/dev.c of the kernel source and
dev->get_stats = internal_stats;
Because it makes it In the ieee80211_if_setup function,
if (ops->ndo_get_stats).
dev->get_stats = SET_NETDEVOP(ops->ndo_get_stats);
..it is likely to have it be being necessary to make it...
My story is neatly transmitted or it is uneasy...
Sincerely yours
By the way, I am not good at English.
Sorry,
Masahiro
Hello,
Quoted 4 lines
Because it makes it In the
ieee80211_if_setupfunction,if (
ops->ndo_get_stats).dev->get_stats = SET_NETDEVOP(ops->ndo_get_stats);
I'm sorry.
An extra period had adhered.
..correct..
if (ops->ndo_get_stats)
dev->get_stats = SET_NETDEVOP(ops->ndo_get_stats);
Because it had been confirmed to move by this correction,
it was able to be confirmed for the time being that it was a problem that get_stats was NULL.
Real correction for the time being because of movement by this, please.
Do not you examine it by me?
Sincerely yours
By the way, I am not good at English.
Sorry,
Masahiro
Hello,
The immediate cause : in the rtnl_fill_ifinto function in /net/core/rtnetlink.c of the kernel source.
static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev,
int type, u32 pid, u32 seq, u32 change, unsigned int flags)
{
...
if (attr == NULL)
goto nla_put_failure;
stats = dev->get_stats(dev); <------- It crashes here.
copy_rtnl_link_stats(nla_data(attr), stats);
if (dev->rtnl_link_ops) {...
}
It solves and I think that it is because of doing. Therefore, I think that should manage it to do somehow by the netdev_attach_ops function of compat-2.6.29.c or to do by me in other places.
Sincerely yours
By the way, I am not good at English.
Sorry,
Masahiro
Hello,
It still crashes though it tried with compat-wireless-2010-06-20.tar.bz2 yesterday. Is not kernel 2.6.27 supported?
When function netdev_attach_ops of compat-2.6.29.c is corrected for the time being as follows, it operates.
void netdev_attach_ops(struct net_device *dev,
const struct net_device_ops *ops)
{
#define SET_NETDEVOP(_op_org, _op) (_op ? _op : _op_org) dev->open = SET_NETDEVOP(dev->open, ops->ndo_open); dev->stop = SET_NETDEVOP(dev->stop, ops->ndo_stop);
...
#undef SET_NETDEVOP
}
By the way, I am not good at English.
Sorry,
Masahiro