diff options
author | Chaitanya Tata <chaitanya.tata@bluwireless.co.uk> | 2019-01-24 16:13:02 +0530 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2019-01-25 10:18:02 +0100 |
commit | faae54ad4151f120bde60fd6e2b2a40e0de8ac73 (patch) | |
tree | 5716ae3ee09458652aeb51bac0ec9c32bf34de55 /net | |
parent | 7c53eb5d87bc21464da4268c3c0c47457b6d9c9b (diff) | |
download | linux-faae54ad4151f120bde60fd6e2b2a40e0de8ac73.tar.bz2 |
cfg80211: reg: remove warn_on for a normal case
If there are simulatenous queries of regdb, then there might be a case
where multiple queries can trigger request_firmware_no_wait and can have
parallel callbacks being executed asynchronously. In this scenario we
might hit the WARN_ON.
So remove the warn_on, as the code already handles multiple callbacks
gracefully.
Signed-off-by: Chaitanya Tata <chaitanya.tata@bluwireless.co.uk>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/wireless/reg.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index ecfb1a06dbb2..35399a825aed 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -1024,8 +1024,13 @@ static void regdb_fw_cb(const struct firmware *fw, void *context) } rtnl_lock(); - if (WARN_ON(regdb && !IS_ERR(regdb))) { - /* just restore and free new db */ + if (regdb && !IS_ERR(regdb)) { + /* negative case - a bug + * positive case - can happen due to race in case of multiple cb's in + * queue, due to usage of asynchronous callback + * + * Either case, just restore and free new db. + */ } else if (set_error) { regdb = ERR_PTR(set_error); } else if (fw) { |