* Re: [PATCH] wifi: Check if socket flags are valid
[not found] <20250518164546.4612-1-spasswolf@web.de>
@ 2025-05-20 13:22 ` Johannes Berg
0 siblings, 0 replies; only message in thread
From: Johannes Berg @ 2025-05-20 13:22 UTC (permalink / raw)
To: Bert Karwatzki, linux-wireless
Cc: linux-kernel, linux-next, Jason Xing, Thomas Gleixner, netdev
Hi Bert,
Thank you _very_ much for doing all this debug. I was somewhat following
along on my phone, but was out over the weekend.
> +++ b/drivers/net/wireless/ath/wil6210/txrx.h
> @@ -618,7 +618,7 @@ static inline bool wil_need_txstat(struct sk_buff *skb)
> const u8 *da = wil_skb_get_da(skb);
>
> return is_unicast_ether_addr(da) && skb->sk &&
> - sock_flag(skb->sk, SOCK_WIFI_STATUS);
> + sk_fullsock(skb->sk) && sock_flag(skb->sk, SOCK_WIFI_STATUS);
I feel like in line with sk_is_refcounted(), maybe we could add
static inline bool
sk_requests_wifi_status(struct sock *sk)
{
return sk && sk_fullsock(sk) && sock_flag(sk,
SOCK_WIFI_STATUS);
}
perhaps?
That's basically all the checks in all the callers.
I can also just do that though if you don't want to resend.
johannes
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-05-20 13:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20250518164546.4612-1-spasswolf@web.de>
2025-05-20 13:22 ` [PATCH] wifi: Check if socket flags are valid Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).