]> git.baikalelectronics.ru Git - kernel.git/commit
ath10k: fix possible bmi crash
authorMichal Kazior <michal.kazior@tieto.com>
Tue, 28 Oct 2014 09:34:36 +0000 (10:34 +0100)
committerKalle Valo <kvalo@qca.qualcomm.com>
Fri, 31 Oct 2014 00:32:15 +0000 (02:32 +0200)
commit60a5e9bc1237df08ad0a6309018e162d94c0913d
treecd94ee6fac9700e2832fac83446dc60b38b6b521
parent7ac8b8d7c3a9cfc3d5f9a4bd8cdb545f171ca956
ath10k: fix possible bmi crash

While testing other things I've found that CE
items aren't cleared properly. This could lead to
null dereferences in BMI.

To prevent that make sure CE revoking clears the
nbytes value (which is used as a buffer completion
indication) and memset the entire CE ring data
shared between host and target when
(re)initializing.

Also make sure to check BMI xfer pointer and print
a splat instead of crashing the kernel.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/ce.c
drivers/net/wireless/ath/ath10k/pci.c