iwl: potential deadlock?
Hi,
we found a potential deadlock in iwl code by our tool.
Can this happen:iwl_update_tkip_key()
-> spin_lock_irqsave(&priv->sta_lock)
-> iwl_send_add_sta()
-> iwl_sta_ucode_activate()
-> spin_lock_irqsave(&priv->sta_lock)
?
Thanks.
Hi Jiri,
Quoted 3 lines · Jiri Slaby
Hi,
we found a potential deadlock in iwl code by our tool.
What tool is this?
Quoted 2 lines
Can this happen:
I don't think so ...
Quoted 3 lines
iwl_update_tkip_key()
->spin_lock_irqsave(&priv->sta_lock)
->iwl_send_add_sta()
iwl_send_add_sta() is called here with flags = CMD_ASYNC
In iwl_send_add_sta() we have:
if (ret || (flags & CMD_ASYNC)) return ret;
Quoted 1 line
-> iwl_sta_ucode_activate()
... so this is not run in this case.
Quoted 1 line
-> spin_lock_irqsave(&priv->sta_lock)
Reinette
Quoted 4 lines · reinette chatre
Quoted 1 line · Jiri Slaby
we found a potential deadlock in iwl code by our tool.
What tool is this?
It's called stanse[1], we still work on it.
Quoted 9 lines
Quoted 3 lines
iwl_update_tkip_key()
->spin_lock_irqsave(&priv->sta_lock)
->iwl_send_add_sta()
iwl_send_add_sta()is called here with flags =CMD_ASYNCIn
iwl_send_add_sta()we have:if (ret || (flags & CMD_ASYNC)) return ret;
Yes, you're right, indeed. Thanks for the explanation.