ath10k: fix htt rx ring clean up
authorMichal Kazior <michal.kazior@tieto.com>
Wed, 14 May 2014 13:23:31 +0000 (16:23 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Wed, 14 May 2014 13:40:47 +0000 (16:40 +0300)
commit3e841fd0a54745c8ad24ecfb0303c505b7460ffb
treee53cf63c1784fbfb497ff6adcf1e97d83e01aedb
parente21353576df1fae38710bdbff1c3abfe49f651cd
ath10k: fix htt rx ring clean up

msdu_payId was read before txrx tasklet was killed
so it was possible to end up using an invalid
sk_buff pointer leading to a panic.

Make sure to sanitize rx ring sk_buff pointers and
make the clean up go through all possible entries
and not rely on coherent-DMA mapped u32 index
which could be (in theory) corrupted by the device
as well.

Reported-By: Avery Pennarun <apenwarr@gmail.com>
Reported-By: Ben Greear <greearb@candelatech.com>
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/htt_rx.c