]> www.infradead.org Git - users/jedix/linux-maple.git/commit
wifi: check if socket flags are valid
authorBert Karwatzki <spasswolf@web.de>
Tue, 20 May 2025 22:34:29 +0000 (00:34 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 21 May 2025 07:26:22 +0000 (09:26 +0200)
commitd7500fbfb12067ee7313f13f4c58f771be3018ab
treead18cb4943e6c4da5c5a361f070856be131e3d1c
parent68b44b05f4c880c42109a91d2e0e7faa94f40529
wifi: check if socket flags are valid

Checking the SOCK_WIFI_STATUS flag bit in sk_flags may give wrong results
since sk_flags are part of a union and the union is used otherwise. Add
sk_requests_wifi_status() which checks if sk is non-NULL, sk is a full
socket (so flags are valid) and checks the flag bit.

Fixes: 76a853f86c97 ("wifi: free SKBTX_WIFI_STATUS skb tx_flags flag")
Suggested-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Bert Karwatzki <spasswolf@web.de>
Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
Link: https://patch.msgid.link/20250520223430.6875-1-spasswolf@web.de
[edit commit message, fix indentation]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/ath/wil6210/txrx.h
drivers/net/wireless/marvell/mwifiex/main.c
include/net/sock.h
net/mac80211/mesh.c
net/mac80211/tx.c