diff options
| author | Cen Zhang <zzzccc427@gmail.com> | 2026-07-07 00:18:22 +0800 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2026-07-07 10:16:20 +0200 |
| commit | 158438cd6ad69d6dd7d871582c38baf22169fede (patch) | |
| tree | d25a7acb74eee5b49f7db2718cecd366fae2e8ad /crypto/des_generic.c | |
| parent | cffd0d2ed5f2603ef147fc8b625ca84b4041f5bf (diff) | |
| download | linux-next-158438cd6ad69d6dd7d871582c38baf22169fede.tar.gz linux-next-158438cd6ad69d6dd7d871582c38baf22169fede.zip | |
wifi: mac80211_hwsim: avoid NULL skb in stop queue drain
mac80211_hwsim_stop() drops any frames left in data->pending. The loop
currently checks skb_queue_empty() and then dequeues separately.
That split is racy with TX status handling, which can remove a pending
frame under the queue lock. If the last entry is removed after the empty
check, skb_dequeue() returns NULL and the stop path passes that NULL skb
to ieee80211_free_txskb().
Use skb_dequeue() as the loop condition instead. The dequeue result is the
object that stop owns and frees, and a concurrent status completion that
empties the queue simply makes the loop terminate.
Fixes: bd18de517923 ("mac80211_hwsim: drop pending frames on stop")
Assisted-by: Codex:gpt-5.5
Signed-off-by: Cen Zhang <zzzccc427@gmail.com>
Link: https://patch.msgid.link/20260706161822.921039-1-zzzccc427@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'crypto/des_generic.c')
0 files changed, 0 insertions, 0 deletions
