]> git.baikalelectronics.ru Git - kernel.git/commit
iwlwifi: pcie: fix access to scratch buffer
authorSara Sharon <sara.sharon@intel.com>
Thu, 9 Jun 2016 14:19:35 +0000 (17:19 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Wed, 6 Jul 2016 06:40:33 +0000 (09:40 +0300)
commit62bd2d05304c76e95f9977427288c2891e95fa66
tree184846293e4c60361b7ac278db44665957ee8a9b
parent97631a654ec6bf2573dec6c80d28bf5449ee8871
iwlwifi: pcie: fix access to scratch buffer

This fixes a pretty ancient bug that hasn't manifested itself
until now.
The scratchbuf for command queue is allocated only for 32 slots
but is accessed with the queue write pointer - which can be
up to 256.
Since the scratch buf size was 16 and there are up to 256 TFDs
we never passed a page boundary when accessing the scratch buffer,
but when attempting to increase the size of the scratch buffer a
panic was quick to follow when trying to access the address resulted
in a page boundary.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Fixes: 35210b0f6777 ("iwlwifi: use coherent DMA memory for command header")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/pcie/tx.c