destroy_workqueue() doesn't always work when removing device

Holger Schurig hs4233 at
Tue Apr 29 11:55:47 EDT 2008

I can reproduce a problem where I do the following:

# pccardctl insert
# ifconfig eth1 up

Now I make the worker thread busy by issuing a command --- and 
while the commands is halfways executing, I physically remove 
the device. Any command would work here, but an scan is quite 
long, so it's easy to hit the error:

# iwlist eth1 scan
(remove the device quickly)

Now this happens:

libertas cmd: DNLD_CMD: command 0x0006, seq 8, size 63
libertas leave: lbs_execute_next_command()
libertas thread: 1: currenttxskb 00000000, dnld_sent 2
libertas thread: sleeping, connect_status 1, psmode 0, psstate 0
pccard: card ejected from slot 0
libertas enter: lbs_stop_card()
libertas enter: lbs_eth_stop()
libertas leave: lbs_eth_stop()
libertas enter: lbs_get_stats()
libertas enter: lbs_get_stats(
libertas leave: lbs_stop_card()
libertas enter: lbs_remove_card()
libertas enter: lbs_remove_rtap()
libertas leave: lbs_remove_rtap()

... and nothing else. I put some printk's into lbs_remove_card() 
and found that the thing hangs while calling 


Can this be the case because the thread is still sleeping?

More information about the libertas-dev mailing list