diff options
author | Elena Reshetova <elena.reshetova@intel.com> | 2017-03-28 11:56:42 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-05-22 18:23:43 +0300 |
commit | 552aa585faff19ceead7aa840d4ce11830ce34a9 (patch) | |
tree | 7a6b48dba5514bb743be96023f287a6b226869bc /drivers/net/wireless/intersil/hostap/hostap_wlan.h | |
parent | 9029679f66d976f8c720eb03c4898274803c9923 (diff) | |
download | op-kernel-dev-552aa585faff19ceead7aa840d4ce11830ce34a9.zip op-kernel-dev-552aa585faff19ceead7aa840d4ce11830ce34a9.tar.gz |
hostap: convert hostap_cmd_queue.usecnt from atomic_t to refcount_t
refcount_t type and corresponding API should be
used instead of atomic_t when the variable is used as
a reference counter. This allows to avoid accidental
refcounter overflows that might lead to use-after-free
situations.
Signed-off-by: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Hans Liljestrand <ishkamiel@gmail.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: David Windsor <dwindsor@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/intersil/hostap/hostap_wlan.h')
-rw-r--r-- | drivers/net/wireless/intersil/hostap/hostap_wlan.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/intersil/hostap/hostap_wlan.h b/drivers/net/wireless/intersil/hostap/hostap_wlan.h index ca25283..5352adb 100644 --- a/drivers/net/wireless/intersil/hostap/hostap_wlan.h +++ b/drivers/net/wireless/intersil/hostap/hostap_wlan.h @@ -6,6 +6,7 @@ #include <linux/netdevice.h> #include <linux/etherdevice.h> #include <linux/mutex.h> +#include <linux/refcount.h> #include <net/iw_handler.h> #include <net/ieee80211_radiotap.h> #include <net/lib80211.h> @@ -557,7 +558,7 @@ struct hostap_cmd_queue { u16 resp0, res; volatile int issued, issuing; - atomic_t usecnt; + refcount_t usecnt; int del_req; }; |