]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Oct 2016 13:21:18 +0000 (15:21 +0200)
commit9d518a8470aa07b1b67c7b9490c118230883bb56
treec455210d8e9326ea1164f01500c85be710f25444
parent26d682167c6be2b6f7b193037105114d304cee21
iwlwifi: pcie: fix access to scratch buffer

commit d5d0689aefc59c6a5352ca25d7e6d47d03f543ce upstream.

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: 38c0f334b359 ("iwlwifi: use coherent DMA memory for command header")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/intel/iwlwifi/pcie/tx.c