]> git.itanic.dy.fi Git - linux-stable/commit
iwlwifi: mvm: guard against device removal in reprobe
authorJohannes Berg <johannes.berg@intel.com>
Fri, 22 Jan 2021 12:52:41 +0000 (14:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 13 Feb 2021 12:52:55 +0000 (13:52 +0100)
commitfa758032a546ef517ab49c33893c5e75e74d5247
treed5f03a09fa95b3a8f8a40a9c3180f29893246789
parent2fa76f19dc15437c39c9521746a86ebfd03921c6
iwlwifi: mvm: guard against device removal in reprobe

[ Upstream commit 7a21b1d4a728a483f07c638ccd8610d4b4f12684 ]

If we get into a problem severe enough to attempt a reprobe,
we schedule a worker to do that. However, if the problem gets
more severe and the device is actually destroyed before this
worker has a chance to run, we use a free device. Bump up the
reference count of the device until the worker runs to avoid
this situation.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/iwlwifi.20210122144849.871f0892e4b2.I94819e11afd68d875f3e242b98bef724b8236f1e@changeid
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/intel/iwlwifi/mvm/ops.c