]> www.infradead.org Git - users/jedix/linux-maple.git/commit
wifi: iwlwifi: mei: avoid blocking sap messages handling due to rtnl lock
authorAvraham Stern <avraham.stern@intel.com>
Sun, 30 Oct 2022 17:17:44 +0000 (19:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:10 +0000 (13:32 +0100)
commit57f6784d8831ac1091336b41ef3b80f6bae13191
tree6086cf022da44e91c9823db0d10a8fb42951da79
parenta29e442ee110aafdf7785fac6de44b22d3da43db
wifi: iwlwifi: mei: avoid blocking sap messages handling due to rtnl lock

[ Upstream commit d288067ede4b375e72daf7f9a98d937ede11a311 ]

The AMT_STATE sap message handler tries to take the rtnl lock.
This means that in case the rtnl lock is already taken, sap messages
will not be processed.
When an interface is brought up, the host requests ownership from
csme. However, since the rtnl lock is already held, if there is a
pending amt state message, the host will not be able to read the
ownership confirm message because the amt state message handler
is pending. As a result, the host fails to get ownership although
csme granted it.
Fix it by moving the part that needs the rtnl lock into a dedicated
worker, so handling sap messages can continue.

Fixes: 2da4366f9e2c ("iwlwifi: mei: add the driver to allow cooperation with CSME")
Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20221030191011.8599f2b4e9dd.I518f79e9099bf815c5f8d90235b4ce3250f59970@changeid
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/intel/iwlwifi/mei/main.c