iwlwifi: pcie: fix race in Rx buffer allocator
authorShaul Triebitz <shaul.triebitz@intel.com>
Thu, 22 Mar 2018 12:14:45 +0000 (14:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Aug 2018 05:50:27 +0000 (07:50 +0200)
commit73425f6ad6ebaf08db227748c69dbd4bbfd09d0d
tree52aadebfb0f7b0985ccc6d63db088c96000b0a90
parent59b837d5927cfa03867931aed336ac0c9fa9700c
iwlwifi: pcie: fix race in Rx buffer allocator

[ Upstream commit 0f22e40053bd5378ad1e3250e65c574fd61c0cd6 ]

Make sure the rx_allocator worker is canceled before running the
rx_init routine.  rx_init frees and re-allocates all rxb's pages.  The
rx_allocator worker also allocates pages for the used rxb's.  Running
rx_init and rx_allocator simultaniously causes a kernel panic.  Fix
that by canceling the work in rx_init.

Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/intel/iwlwifi/pcie/rx.c