panic from xmit.c
Hi All,
We saw a kernel panic from xmit.c twice with many users connected. I think
the panic is happening from ath_tx_processq<http://lxr.linux.no/linux+v2.6.29/drivers/net/wireless/ath9k/+code=ath_tx_processq> function
and this piece from it,
ds <http://lxr.linux.no/linux+v2.6.29/drivers/net/wireless/ath9k/+code=ds> = lastbf<http://lxr.linux.no/linux+v2.6.29/drivers/net/wireless/ath9k/+code=lastbf> ->bf_desc<http://lxr.linux.no/linux+v2.6.29/drivers/net/wireless/ath9k/+code=bf_desc>; /* NB: last decriptor */
I deduced this from the panic message.
I think lastbf is NULL because bf<http://lxr.linux.no/linux+v2.6.29/drivers/net/wireless/ath9k/+code=bf> ->bf_lastbf<http://lxr.linux.no/linux+v2.6.29/drivers/net/wireless/ath9k/+code=bf_lastbf> is
NULL. I think there is only one way in which bf_lastbf can stay NULL. It is in function ,
880<http://lxr.linux.no/linux+v2.6.29/drivers/net/wireless/ath9k/drivers/net/wireless/ath9k/xmit.c#L880> ATH_TXBUF_RESET<http://lxr.linux.no/linux+v2.6.29/drivers/net/wireless/ath9k/+code=ATH_TXBUF_RESET> (tbf<http://lxr.linux.no/linux+v2.6.29/drivers/net/wireless/ath9k/+code=tbf>
); 888<http://lxr.linux.no/linux+v2.6.29/drivers/net/wireless/ath9k/drivers/net/wireless/ath9k/xmit.c#L888> if (bf_lastq<http://lxr.linux.no/linux+v2.6.29/drivers/net/wireless/ath9k/+code=bf_lastq>) { 894<http://lxr.linux.no/linux+v2.6.29/drivers/net/wireless/ath9k/drivers/net/wireless/ath9k/xmit.c#L894> } else { 895<http://lxr.linux.no/linux+v2.6.29/drivers/net/wireless/ath9k/drivers/net/wireless/ath9k/xmit.c#L895> tbf <http://lxr.linux.no/linux+v2.6.29/drivers/net/wireless/ath9k/+code=tbf>
->bf_state<http://lxr.linux.no/linux+v2.6.29/drivers/net/wireless/ath9k/+code=bf_state>= bf_last<http://lxr.linux.no/linux+v2.6.29/drivers/net/wireless/ath9k/+code=bf_last> ->bf_state<http://lxr.linux.no/linux+v2.6.29/drivers/net/wireless/ath9k/+code=bf_state> ; 896<http://lxr.linux.no/linux+v2.6.29/drivers/net/wireless/ath9k/drivers/net/wireless/ath9k/xmit.c#L896> tbf <http://lxr.linux.no/linux+v2.6.29/drivers/net/wireless/ath9k/+code=tbf>
->bf_lastfrm<http://lxr.linux.no/linux+v2.6.29/drivers/net/wireless/ath9k/+code=bf_lastfrm>= tbf <http://lxr.linux.no/linux+v2.6.29/drivers/net/wireless/ath9k/+code=tbf>
;
In case of bf_lastq being non-NULL, bf_lastbf would be pointing to bf_lastq.
But when bf_lastq is NULL, tbf->bf_lastbf will remain NULL. This can cause
the above mentioned panic. I think after line 896 another line should be
added,
897 tbf<http://lxr.linux.no/linux+v2.6.29/drivers/net/wireless/ath9k/+code=tbf>->bf_lastbf = tbf<http://lxr.linux.no/linux+v2.6.29/drivers/net/wireless/ath9k/+code=tbf> ->bf_lastfrm<http://lxr.linux.no/linux+v2.6.29/drivers/net/wireless/ath9k/+code=bf_lastfrm>; The panic has been very incosistent to be reproduced, so i've not been able
to check this change. If veterns of the ath9k development team thinks this
is a correct way to make sure bf_lastbf doesnt remain NULL, please add it
(or at least pursue it).
Please let me know if my analysis is incorrect.
Regards,
Keyoor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20090427/0fd458ec/attachment.htm