From: Michal Kazior Date: Wed, 31 Jul 2013 08:55:11 +0000 (+0200) Subject: ath10k: prevent using invalid ringbuffer indexes X-Git-Tag: v3.12-rc1~132^2~84^2^2~109^2~8 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=432358ed1d18c19dbf89008325ff6ba662d0996e;p=pandora-kernel.git ath10k: prevent using invalid ringbuffer indexes If the device is removed and hotplug fails ioread32() will return 0xFFFFFFFF. In that case reading ringbuffer during device bringup led to out-of-bounds addressing of a ringbuffer array that in turn led to a paging failure. This could be reproduced by the following: * boot without acpi/prevent hotplug from working * insert and manually detect (pci rescan) the device * remove the device physically * load ath10k driver * kernel crashed Ringbuffer index reading is now protected by using an appropriate mask to prevent addressing an invalid array index. Signed-off-by: Michal Kazior Signed-off-by: Kalle Valo --- Reading git-diff-tree failed