From: Johannes Berg <johannes@sipsolutions.net>
To: Bert Karwatzki <spasswolf@web.de>, linux-wireless@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, linux-next@vger.kernel.org,
Jason Xing <kerneljasonxing@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
netdev@vger.kernel.org
Subject: Re: [PATCH] wifi: Check if socket flags are valid
Date: Tue, 20 May 2025 15:22:01 +0200 [thread overview]
Message-ID: <f6d119025a88b766ec803ef948dbbf7c97574b74.camel@sipsolutions.net> (raw)
In-Reply-To: <20250518164546.4612-1-spasswolf@web.de>
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
prev parent reply other threads:[~2025-05-20 13:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-18 16:45 [PATCH] wifi: Check if socket flags are valid Bert Karwatzki
2025-05-19 0:19 ` Jason Xing
2025-05-20 13:22 ` Johannes Berg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f6d119025a88b766ec803ef948dbbf7c97574b74.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=kerneljasonxing@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=spasswolf@web.de \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox