I'm using this script to replace my development modules...

jonsm...@terra:/home/linus$ cat copy
sudo cp drivers/ieee802154/*.ko /lib/modules/2.6.35+/kernel/net/ieee802154
sudo cp net/ieee802154/*.ko      /lib/modules/2.6.35+/kernel/net/ieee802154
sudo cp net/mac802154/*.ko      /lib/modules/2.6.35+/kernel/net/mac802154
sudo killall izattach
sudo rmmod serial
sudo rmmod mac802154
sudo rmmod ieee802154
sudo rmmod af_802154
sudo modprobe serial
sudo izattach /dev/ttyUSB0
sudo iz 6lowpan wpan-phy0
sudo ip link set wpan0 address de:ad:be:af:ca:fe:ba:be
sudo ifconfig wpan0 up
sudo ip -6 address add aaaa::1/64 dev wpan0

There is a race condition during the module unload process....

I think what is happening is that you are blocking inside
ieee802154_unregister_device(). While that thread is blocked another
thread comes in and makes a new device. ieee802154_unregister_device()
exits and hits the BUG_ON in  ieee802154_free_device() because it is
expecting the list to be empty.

[ 3427.787606] Initializing ZigBee TTY interface
[ 3427.822105] Openning ldisc
[ 3427.825796] NET: Registered protocol family 36
[ 3427.862368] ieee802154_add_iface
[ 3427.862375] JDS - lowpan_setup
[ 3427.871401] JDS - lowpan_mac_addr
[ 3427.879821] JDS - mac802154_slave_open
[ 3427.879824] ieee802154_serial_start
[ 3427.879826] _open_dev()
[ 3427.879828] _send_pending_data, 3 bytes
[ 3427.879831] send_pending_data 7a 62 01
           zb.
[ 3428.120678] ieee802154_tty_receive, received 4 bytes
[ 3428.120683] ieee802154_tty_receive 7a 62 81 00
                zb..
[ 3428.120686] Opened device
[ 3428.120694] Opened connection to device
[ 3428.120698] send_cmd2(): id = 7
[ 3428.120701] _send_pending_data, 4 bytes
[ 3428.120704] send_pending_data 7a 62 07 02
           zb..
[ 3428.140765] ieee802154_tty_receive, received 4 bytes
[ 3428.140767] ieee802154_tty_receive 7a 62 87 00
                zb..
[ 3428.140776] ieee802154_serial_start end
[ 3433.244934] JDS - ieee802154_unregister_device  - entered
[ 3433.280687] JDS - mac802154_slave_close
[ 3433.280691] ieee802154_serial_stop
[ 3433.280693] send_cmd2(): id = 7
[ 3433.280696] ieee802154_serial_stop end
[ 3433.395953] ieee802154_add_iface
[ 3433.395961] JDS - lowpan_setup
[ 3433.403679] JDS - lowpan_mac_addr
[ 3433.412148] JDS - mac802154_slave_open
[ 3433.412152] ieee802154_serial_start
[ 3433.412154] send_cmd2(): id = 7
[ 3433.412155] send_cmd2(): cmd is already pending, id = 7
[ 3433.412158] ieee802154_serial_start end
[ 3433.412159] ------------[ cut here ]------------
[ 3433.412167] WARNING: at net/mac802154/main.c:40
mac802154_slave_open+0x84/0xa0 [mac802154]()
[ 3433.412169] Hardware name: Dell DXP061
[ 3433.412171] Modules linked in: af_802154 serial mac802154
ieee802154 crc_ccitt binfmt_misc vboxnetadp vboxnetflt vboxdrv
kvm_intel kvm nfsd bridge stp llc exportfs nfs lockd tun nfs_acl
auth_rpcgss nls_utf8 hfsplus dm_crypt sunrpc snd_hda_codec_idt
nvidia(P) snd_hda_intel snd_hda_codec snd_usb_audio snd_pcm_oss
snd_mixer_oss snd_pcm snd_hwdep snd_usbmidi_lib ftdi_sio snd_seq_dummy
snd_seq_oss snd_seq_midi snd_seq_midi_event snd_seq snd_rawmidi
snd_timer uvcvideo snd_seq_device videodev snd usbserial v4l1_compat
psmouse serio_raw snd_page_alloc rtc_cmos v4l2_compat_ioctl32 rtc_core
rtc_lib coretemp dcdbas hwmon soundcore raid10 raid456 async_pq
async_xor xor async_memcpy async_raid6_recov hid_logitech ff_memless
usbhid raid6_pq async_tx multipath linear fbcon tileblit font bitblit
softcursor uvesafb usb_storage raid1 raid0 ohci1394 ieee1394 intel_agp
e1000e
[ 3433.412237] Pid: 6185, comm: ifconfig Tainted: P            2.6.35+ #119
[ 3433.412238] Call Trace:
[ 3433.412248]  [<ffffffff81057f1a>] warn_slowpath_common+0x7a/0xb0
[ 3433.412251]  [<ffffffff81057f65>] warn_slowpath_null+0x15/0x20
[ 3433.412254]  [<ffffffffa0244b04>] mac802154_slave_open+0x84/0xa0 [mac802154]
[ 3433.412259]  [<ffffffff81402b17>] __dev_open+0x97/0xe0
[ 3433.412263]  [<ffffffff814011ec>] __dev_change_flags+0x9c/0x180
[ 3433.412266]  [<ffffffff81402a33>] dev_change_flags+0x23/0x70
[ 3433.412269]  [<ffffffff81463834>] devinet_ioctl+0x5f4/0x6a0
[ 3433.412272]  [<ffffffff81464e70>] inet_ioctl+0x80/0xa0
[ 3433.412276]  [<ffffffff813edfcb>] sock_do_ioctl+0x2b/0x60
[ 3433.412278]  [<ffffffff813ee082>] sock_ioctl+0x82/0x290
[ 3433.412282]  [<ffffffff81139028>] vfs_ioctl+0x38/0xd0
[ 3433.412285]  [<ffffffff8113965a>] do_vfs_ioctl+0x8a/0x580
[ 3433.412288]  [<ffffffff811426f2>] ? alloc_fd+0x102/0x150
[ 3433.412291]  [<ffffffff81139bd1>] sys_ioctl+0x81/0xa0
[ 3433.412296]  [<ffffffff81009ec2>] system_call_fastpath+0x16/0x1b
[ 3433.412298] ---[ end trace 341b58fb9d2ea52e ]---
[ 3433.611930] JDS1 - ieee802154_unregister_device - exited
[ 3433.611968] JDS - ieee802154_free_device
[ 3433.612008] ------------[ cut here ]------------
[ 3433.612011] kernel BUG at net/mac802154/main.c:204!
[ 3433.612013] invalid opcode: 0000 [#1] SMP
[ 3433.612017] last sysfs file:
/sys/devices/pci0000:00/0000:00:1d.2/usb7/7-2/uevent
[ 3433.612019] CPU 3
[ 3433.612020] Modules linked in: af_802154 serial mac802154
ieee802154 crc_ccitt binfmt_misc vboxnetadp vboxnetflt vboxdrv
kvm_intel kvm nfsd bridge stp llc exportfs nfs lockd tun nfs_acl
auth_rpcgss nls_utf8 hfsplus dm_crypt sunrpc snd_hda_codec_idt
nvidia(P) snd_hda_intel snd_hda_codec snd_usb_audio snd_pcm_oss
snd_mixer_oss snd_pcm snd_hwdep snd_usbmidi_lib ftdi_sio snd_seq_dummy
snd_seq_oss snd_seq_midi snd_seq_midi_event snd_seq snd_rawmidi
snd_timer uvcvideo snd_seq_device videodev snd usbserial v4l1_compat
psmouse serio_raw snd_page_alloc rtc_cmos v4l2_compat_ioctl32 rtc_core
rtc_lib coretemp dcdbas hwmon soundcore raid10 raid456 async_pq
async_xor xor async_memcpy async_raid6_recov hid_logitech ff_memless
usbhid raid6_pq async_tx multipath linear fbcon tileblit font bitblit
softcursor uvesafb usb_storage raid1 raid0 ohci1394 ieee1394 intel_agp
e1000e
[ 3433.612079]
[ 3433.612082] Pid: 6139, comm: izattach Tainted: P        W   2.6.35+
#119 0CT017/Dell DXP061
[ 3433.612085] RIP: 0010:[<ffffffffa02449bb>]  [<ffffffffa02449bb>]
ieee802154_free_device+0x3b/0x40 [mac802154]
[ 3433.612093] RSP: 0018:ffff8800a5cc7a28  EFLAGS: 00010293
[ 3433.612095] RAX: ffff88011b4ace88 RBX: ffff88011b4ace40 RCX: ffffffff81b99100
[ 3433.612098] RDX: 0000000000000000 RSI: 0000000000000086 RDI: 0000000000000246
[ 3433.612100] RBP: ffff8800a5cc7a38 R08: 00000000ffffffff R09: 0000000000000000
[ 3433.612102] R10: 0000000000000000 R11: 0000000000000000 R12: ffff88011b4acec0
[ 3433.612104] R13: ffff880135ba3020 R14: 0000000000000000 R15: ffff8801354f80d0
[ 3433.612106] FS:  00007f359e08a700(0000) GS:ffff880001ec0000(0000)
knlGS:0000000000000000
[ 3433.612109] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 3433.612110] CR2: 00007fff971fefa0 CR3: 000000013665e000 CR4: 00000000000006e0
[ 3433.612113] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 3433.612115] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 3433.612117] Process izattach (pid: 6139, threadinfo
ffff8800a5cc6000, task ffff880134d4dac0)
[ 3433.612119] Stack:
[ 3433.612120]  ffff880135ba3000 ffff880135ba3000 ffff8800a5cc7a58
ffffffffa025d5dc
[ 3433.612124] <0> ffff880135ba3000 ffff880136046e90 ffff8800a5cc7a78
ffffffff812ee8fa
[ 3433.612127] <0> ffff880135ba3000 0000000000000000 ffff8800a5cc7aa8
ffffffff812eea1b
[ 3433.612132] Call Trace:
[ 3433.612137]  [<ffffffffa025d5dc>] ieee802154_tty_close+0x5c/0x80 [serial]
[ 3433.612143]  [<ffffffff812ee8fa>] tty_ldisc_close+0x3a/0x60
[ 3433.612146]  [<ffffffff812eea1b>] tty_ldisc_release+0x4b/0x90
[ 3433.612150]  [<ffffffff812e8602>] tty_release+0x452/0x6f0
[ 3433.612156]  [<ffffffff8112b014>] fput+0x124/0x240
[ 3433.612159]  [<ffffffff81127ad8>] filp_close+0x58/0x90
[ 3433.612163]  [<ffffffff8105a160>] put_files_struct+0xd0/0xf0
[ 3433.612166]  [<ffffffff8105a1cf>] exit_files+0x4f/0x60
[ 3433.612169]  [<ffffffff8105c140>] do_exit+0x160/0x830
[ 3433.612174]  [<ffffffff810e6b9d>] ? __alloc_pages_nodemask+0x10d/0x710
[ 3433.612177]  [<ffffffff8112d450>] ? chrdev_open+0x0/0x200
[ 3433.612180]  [<ffffffff81127fb7>] ? __dentry_open+0x207/0x320
[ 3433.612182]  [<ffffffff8105c860>] do_group_exit+0x50/0xc0
[ 3433.612186]  [<ffffffff8106cdae>] get_signal_to_deliver+0x1ee/0x440
[ 3433.612192]  [<ffffffff8113b88e>] ? core_sys_select+0x1be/0x2f0
[ 3433.612197]  [<ffffffff81009260>] do_signal+0x70/0x7c0
[ 3433.612200]  [<ffffffff810fd6e0>] ? handle_mm_fault+0x1c0/0xa10
[ 3433.612204]  [<ffffffff81009a15>] do_notify_resume+0x65/0x90
[ 3433.612207]  [<ffffffff8100a190>] int_signal+0x12/0x17
[ 3433.612209] Code: fb 48 83 ec 08 48 c7 c7 ed 7f 24 a0 e8 14 51 2b
e1 48 8d 43 48 48 39 43 48 75 10 48 8b 7b 38 e8 6c fb fd ff 48 83 c4
08 5b c9 c3 <0f> 0b eb fe 90 55 48 83 ef 80 48 89 e5 41 54 49 89 f4 53
e8 6d
[ 3433.612239] RIP  [<ffffffffa02449bb>]
ieee802154_free_device+0x3b/0x40 [mac802154]
[ 3433.612243]  RSP <ffff8800a5cc7a28>
[ 3433.612247] ---[ end trace 341b58fb9d2ea52f ]---
[ 3433.612250] Fixing recursive fault but reboot is needed!
jonsm...@terra:/home/linus$


-- 
Jon Smirl
[email protected]

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Linux-zigbee-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

Reply via email to