]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: avoid double free of PMSR request
authorAvraham Stern <avraham.stern@intel.com>
Fri, 18 Jun 2021 10:41:31 +0000 (13:41 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 18 Jun 2021 11:25:24 +0000 (13:25 +0200)
commit55f18e9748d98e74845e405a999aba0625769086
treec41e742dd0398226a2e9a870caf084a615a3bf9b
parent77aba9cc3644173db12d4d8a0d67af00cd39d2bd
cfg80211: avoid double free of PMSR request

If cfg80211_pmsr_process_abort() moves all the PMSR requests that
need to be freed into a local list before aborting and freeing them.
As a result, it is possible that cfg80211_pmsr_complete() will run in
parallel and free the same PMSR request.

Fix it by freeing the request in cfg80211_pmsr_complete() only if it
is still in the original pmsr list.

Cc: stable@vger.kernel.org
Fixes: f5b4872af518 ("cfg80211: add peer measurement with FTM initiator API")
Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20210618133832.1fbef57e269a.I00294bebdb0680b892f8d1d5c871fd9dbe785a5e@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/pmsr.c