Driver loading issues on Ubuntu 11.04 ( 2.6.38-8-generic #42-Ubuntu SMP)

142 views
Skip to first unread message

Gary Virta

unread,
Jun 28, 2011, 11:00:56 PM6/28/11
to Boltek Linux Programming
Running Ubuntu 11.04 32-bit kernel version 2.6.38-8-generic #42-Ubuntu
SMP. I'm able to successfully build the driver per the readme, but
when trying to load the ko I get an ugly oops (see below). Any advice
is appreciated.

[ 389.115934] Boltek Lightning Detector v1:1.0.0
[ 389.117250] boltek 0000:04:05.0: PCI INT A -> GSI 18 (level, low) -
> IRQ 18
[ 389.117303] BUG: unable to handle kernel NULL pointer dereference
at (null)
[ 389.117397] IP: [<c1279cb1>] vsnprintf+0x41/0x3c0
[ 389.117458] *pde = 7dba7067
[ 389.117495] Oops: 0000 [#1] SMP
[ 389.117538] last sysfs file: /sys/devices/system/cpu/cpu1/cache/
index2/shared_cpu_map
[ 389.117620] Modules linked in: boltek(+) binfmt_misc parport_pc
ppdev arc4 snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep
i915 drm_kms_helper p54pci hisax snd_pcm snd_seq_midi snd_rawmidi
snd_seq_midi_event snd_seq snd_timer snd_seq_device p54common drm lp
i2c_algo_bit snd soundcore snd_page_alloc crc_ccitt psmouse isdn
serio_raw parport joydev mac80211 hid_microsoft video cfg80211 usbhid
firewire_ohci hid firewire_core ahci crc_itu_t e1000e pata_jmicron
libahci
[ 389.118220]
[ 389.118240] Pid: 1715, comm: insmod Not tainted 2.6.38-8-generic
#42-Ubuntu MSI MS-7430/MS-7430
[ 389.118353] EIP: 0060:[<c1279cb1>] EFLAGS: 00010246 CPU: 1
[ 389.118415] EIP is at vsnprintf+0x41/0x3c0
[ 389.118461] EAX: 00000000 EBX: 000000d0 ECX: 00000000 EDX: 00000000
[ 389.118527] ESI: 00000000 EDI: 00000000 EBP: f2035dac ESP: f2035d70
[ 389.118592] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
[ 389.118649] Process insmod (pid: 1715, ti=f2034000 task=f2341940
task.ti=f2034000)
[ 389.118728] Stack:
[ 389.118752] febfd000 00000573 0686f000 f838efff f4002100 f70206c0
00000000 00000000
[ 389.118861] 00000000 00000573 00000000 00000000 000000d0 f2035e20
00000000 f2035dc8
[ 389.118972] c127cf33 f2035e20 f3af6400 f3af6408 00000000 0f900000
f2035dd8 c12732a2
[ 389.119088] Call Trace:
[ 389.119126] [<c127cf33>] kvasprintf+0x23/0x60
[ 389.119178] [<c12732a2>] kobject_set_name_vargs+0x32/0x70
[ 389.119239] [<c1331a5f>] device_create_vargs+0x7f/0xe0
[ 389.119297] [<c1331aed>] device_create+0x2d/0x30
[ 389.119352] [<fa478470>] boltek_probe+0x164/0x1b1 [boltek]
[ 389.119413] [<c1291f77>] local_pci_probe+0x47/0xb0
[ 389.119467] [<c12933f8>] pci_device_probe+0x68/0x90
[ 389.119523] [<c1333d8d>] really_probe+0x4d/0x150
[ 389.119575] [<c133bffb>] ? pm_runtime_barrier+0x4b/0xb0
[ 389.119634] [<c133402c>] driver_probe_device+0x3c/0x60
[ 389.119690] [<c13340d1>] __driver_attach+0x81/0x90
[ 389.119743] [<c1334050>] ? __driver_attach+0x0/0x90
[ 389.119800] [<c1333188>] bus_for_each_dev+0x48/0x70
[ 389.119855] [<c1292e00>] ? pci_device_remove+0x0/0xf0
[ 389.119912] [<c1333c3e>] driver_attach+0x1e/0x20
[ 389.119963] [<c1334050>] ? __driver_attach+0x0/0x90
[ 389.120009] [<c1333858>] bus_add_driver+0xb8/0x250
[ 389.120009] [<c1292e00>] ? pci_device_remove+0x0/0xf0
[ 389.120009] [<c1334316>] driver_register+0x66/0x110
[ 389.120009] [<c1292515>] __pci_register_driver+0x45/0xb0
[ 389.120009] [<fa47e11f>] boltek_init+0x11f/0x1000 [boltek]
[ 389.120009] [<c1001255>] do_one_initcall+0x35/0x170
[ 389.120009] [<fa47e000>] ? boltek_init+0x0/0x1000 [boltek]
[ 389.124926] [<c108899b>] sys_init_module+0xdb/0x230
[ 389.124926] [<c1125925>] ? sys_close+0x75/0xd0
[ 389.124926] [<c1509bf4>] syscall_call+0x7/0xb
[ 389.124926] Code: 00 00 00 00 c7 45 f0 00 00 00 00 0f 88 6c 03 00
00 8b 45 e0 03 45 dc 89 45 e4 73 0f 8b 55 e0 c7 45 e4 ff ff ff ff f7
d2 89 55 dc <0f> b6 06 8b 5d e0 90 84 c0 74 74 8d 55 ec 89 f0 e8 0a e6
ff ff
[ 389.124926] EIP: [<c1279cb1>] vsnprintf+0x41/0x3c0 SS:ESP
0068:f2035d70
[ 389.124926] CR2: 0000000000000000
[ 389.165066] ---[ end trace f12c6278fb0d76a7 ]---

Jim Hunziker

unread,
Jun 29, 2011, 9:17:30 AM6/29/11
to Boltek Linux Programming
My kernel also crashes when I try to load the driver on 64-bit
Scientific Linux (==RHEL) 6 with kernel 2.6.32-131. How did you log
the crash? It doesn't end up in my system logs, even though I
configured rsyslog to log all kernel messages.

Gary Virta

unread,
Jun 29, 2011, 9:25:18 AM6/29/11
to Boltek Linux Programming
Luckily it didn't bring down the machine and I was able to I just pull
it from dmesg. I don't know if OOPSes go to syslog by default, but
there might be a trace file hanging around somewhere you can look at.

Patrick McManus

unread,
Jun 29, 2011, 9:33:53 AM6/29/11
to boltek-linux...@googlegroups.com
in 2.6.27 the linux kernel team broke API compatibility for
device_create() .. The attached patch fixed it up in the driver a couple
years ago. I haven't looked at the boltek hardware since that time so I
don't know if anything else would be needed today.
boltek-1.0.1-patch

Gary Virta

unread,
Jun 29, 2011, 9:36:29 AM6/29/11
to Boltek Linux Programming
Thanks Patrick! I will try applying this tonight and report back...
>  boltek-1.0.1-patch
> 1KViewDownload

Gary Virta

unread,
Jun 29, 2011, 1:31:20 PM6/29/11
to boltek-linux...@googlegroups.com
That did the trick, thanks a lot!

[  485.685411] Boltek Lightning Detector v1:1.0.1
[  485.686113] boltek 0000:04:05.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
[  485.686229] Boltek Lightning Detector started at /dev/lightning-0 major 249 minor 0

Jim Hunziker

unread,
Jun 29, 2011, 2:03:55 PM6/29/11
to Boltek Linux Programming
The patch worked for me, too. Though when I define SIMULATE_HIT in
demo.c, I only get strikes that have valid set to 0. I'm not sure if
this is expected behavior.

Gary Virta

unread,
Jul 3, 2011, 7:25:34 PM7/3/11
to boltek-linux...@googlegroups.com
BTW Patrick-
Since you appear to be the maintainer for this driver, are you in a position to help Boltek update their package with the version including this patch to help out the next guy?  I got this broken 1.0.0 driver from the Linux SDK download from Boltek here (linked from their download page).
Reply all
Reply to author
Forward
0 new messages