Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 01-11-2007, 03:57 AM   #1
LQ Newbie
Registered: Jan 2007
Posts: 2

Rep: Reputation: 0
segmentation problem when unloading the driver


I am porting a USB-to-serial & parallel driver to

I can load the driver, but couldn't unload it.
(But It is working fine in 2.6.19 , 2.6.18 &FC4)

The following are the log messages:

make: *** [unload] Segmentation fault
kernel BUG at kernel/workqueue.c:110!
invalid opcode: 0000 [#1]

Modules linked in: mos7715 savage drm usbserial nfsd exportfs lockd nfs_acl irnet ppp_generic slhc irtty_sir sir_dev ircomm_tty ircomm autofs4 hidp rfcomm l2cap bluetooth sunrpc usbnet dm_mirror dm_mod video button battery ac ipv6 parport_pc parport floppy nvram uhci_hcd ehci_hcd snd_via82xx gameport snd_ac97_codec snd_ac97_bus snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_pcm_oss snd_mixer_oss snd_pcm i2c_prosavage i2c_algo_bit via_ircc snd_timer snd_page_alloc snd_mpu401_uart snd_rawmidi snd_seq_device 8139too irda crc_ccitt i2c_viapro i2c_core snd soundcore 8139cp mii sata_via libata sd_mod scsi_mod

Call Trace:
<cebdb765> usb_serial_disconnect+0x54/0x94 [usbserial] <c026e058> usb_unbind_interface+0x34/0x6a
<c0235f8c> __device_release_driver+0x60/0x78 <c023625e> driver_detach+0x97/0xc5
<c023578c> bus_remove_driver+0x5a/0x78 <c023636c> driver_unregister+0x8/0x13
<c026df4c> usb_deregister+0x7f/0x87 <cec4821a> moschip7715_exit+0x1e/0x40 [mos7715]
<c012f4b1> sys_delete_module+0x15b/0x182 <c02ef3e9> do_page_fault+0x221/0x584
<c01029ef> sysenter_past_esp+0x54/0x75
Code: 58 89 d8 5b 5e 5f e9 92 7d 1c 00 8b 48 14 89 c2 8b 01 eb ae 53 89 c3 0f ba 2a 00 19 c0 31 c9 85 c0 75 1c 8d 42 04 39 42 04 74 08 <0f> 0b 6e 00 6d d5 30 c0 8b 03 e8 88 ff ff ff b9 01 00 00 00 5b
EIP: [<c01268f5>] queue_work+0x17/0x2f SS:ESP 0068:c4185ee8

Any help on this is appriciated.

Old 08-19-2007, 10:02 PM   #2
Registered: Sep 2004
Distribution: Debian Testing / Unstable
Posts: 171
Blog Entries: 1

Rep: Reputation: 30
Workqueues got totally redone in 2.6.20

Have a look at the following articles:

I wish I could add more but I'm just learning about this myself at this time. Hope this helps shed some light on the problem.
Old 08-20-2007, 06:18 PM   #3
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 8,493
Blog Entries: 4

Rep: Reputation: 2950Reputation: 2950Reputation: 2950Reputation: 2950Reputation: 2950Reputation: 2950Reputation: 2950Reputation: 2950Reputation: 2950Reputation: 2950Reputation: 2950
It sounds like the workqueue was not yet empty when the module was unloaded.

As we all know from painful experience, "achieving a clean shutdown" of any application can be very tricky when asynchronous processing is involved. Since there are several ways that you could have gotten into this mess, there's no single way to get out of it.


error, kernel, panic, segfault

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unloading an active driver module desertViking Linux - Wireless Networking 4 10-04-2005 10:39 PM
module unloading riseringseeker Mandriva 2 01-08-2005 03:41 PM
problem unloading kernal card services jawz Linux - Networking 3 11-10-2003 06:17 PM
nVidia 10-4496 driver causes segmentation faults in Redhat 9 applications. ithaqua Linux - Hardware 0 10-22-2003 11:05 PM
PyQt, xmms, ooffice segmentation fault after installing nvidia driver blais Linux - Software 4 08-06-2003 10:17 AM > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 03:09 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration