* [PATCH] mac80211: tdls: don’t WARN on invalid/missing peer
@ 2025-09-25 23:04 Ahmet Eray Karadag
0 siblings, 0 replies; only message in thread
From: Ahmet Eray Karadag @ 2025-09-25 23:04 UTC (permalink / raw)
To: johannes
Cc: linux-wireless, linux-kernel, Ahmet Eray Karadag,
syzbot+665dd2d6eb222ac6a6ab
Replace WARN_ON_ONCE with a regular check; log via sdata_err() and return -EINVAL. Avoids panic_on_warn.
Reported-by: syzbot+665dd2d6eb222ac6a6ab@syzkaller.appspotmail.com
Fixes: https://syzkaller.appspot.com/bug?extid=665dd2d6eb222ac6a6ab
Signed-off-by: Ahmet Eray Karadag <eraykrdg1@gmail.com>
---
net/mac80211/tdls.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/net/mac80211/tdls.c b/net/mac80211/tdls.c
index ba5fbacbeeda..85d627e609f3 100644
--- a/net/mac80211/tdls.c
+++ b/net/mac80211/tdls.c
@@ -1457,8 +1457,11 @@ int ieee80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev,
set_sta_flag(sta, WLAN_STA_TDLS_PEER_AUTH);
- WARN_ON_ONCE(is_zero_ether_addr(sdata->u.mgd.tdls_peer) ||
- !ether_addr_equal(sdata->u.mgd.tdls_peer, peer));
+ if (is_zero_ether_addr(sdata->u.mgd.tdls_peer) || !ether_addr_equal(sdata->u.mgd.tdls_peer, peer)) {
+ sdata_err(sdata, "Invalid/missing peer (%pM vs %pM)\n",
+ sdata->u.mgd.tdls_peer, peer);
+ return -EINVAL;
+ }
break;
case NL80211_TDLS_DISABLE_LINK:
/*
--
2.34.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-09-25 23:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-25 23:04 [PATCH] mac80211: tdls: don’t WARN on invalid/missing peer Ahmet Eray Karadag
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®