* Re: [PATCH] mac80211: Fix WARNING in drv_get_tsf debugfs access [not found] <20260118213328.74309-1-kapoorarnav43@gmail.com> @ 2026-01-19 13:20 ` Johannes Berg 2026-01-19 13:20 ` syzbot 0 siblings, 1 reply; 2+ messages in thread From: Johannes Berg @ 2026-01-19 13:20 UTC (permalink / raw) To: Arnav Kapoor Cc: linux-wireless, linux-kernel, syzbot+15f88dfa580000, Arnav Rawat On Mon, 2026-01-19 at 03:03 +0530, Arnav Kapoor wrote: > The debugfs tsf read function was calling drv_get_tsf() even when the > interface was not registered with the driver, causing a WARN_ON to be > triggered. This is inappropriate for debugfs access. > > Fix this by checking the IEEE80211_SDATA_IN_DRIVER flag in the debugfs > read function and returning -1ULL directly when the interface is not > in the driver, avoiding the warning. > > Reported-by: syzbot+15f88dfa580000@syzkaller.appspotmail.com > Signed-off-by: Arnav Rawat <arnavrawat2000@gmail.com> > --- > net/mac80211/debugfs_netdev.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c > index 30a5a978a..669e7c519 100644 > --- a/net/mac80211/debugfs_netdev.c > +++ b/net/mac80211/debugfs_netdev.c > @@ -656,7 +656,10 @@ static ssize_t ieee80211_if_fmt_tsf( > struct ieee80211_local *local = sdata->local; > u64 tsf; > > - tsf = drv_get_tsf(local, (struct ieee80211_sub_if_data *)sdata); > + if (!(sdata->flags & IEEE80211_SDATA_IN_DRIVER)) > + tsf = -1ULL; > + else > + tsf = drv_get_tsf(local, (struct ieee80211_sub_if_data *)sdata); Seems like we could get rid of the pointless cast, while changing it anyway. Also seems we should do it for all the debugfs files? johannes ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] mac80211: Fix WARNING in drv_get_tsf debugfs access 2026-01-19 13:20 ` [PATCH] mac80211: Fix WARNING in drv_get_tsf debugfs access Johannes Berg @ 2026-01-19 13:20 ` syzbot 0 siblings, 0 replies; 2+ messages in thread From: syzbot @ 2026-01-19 13:20 UTC (permalink / raw) To: johannes Cc: arnavrawat2000, johannes, kapoorarnav43, linux-kernel, linux-wireless > On Mon, 2026-01-19 at 03:03 +0530, Arnav Kapoor wrote: >> The debugfs tsf read function was calling drv_get_tsf() even when the >> interface was not registered with the driver, causing a WARN_ON to be >> triggered. This is inappropriate for debugfs access. >> >> Fix this by checking the IEEE80211_SDATA_IN_DRIVER flag in the debugfs >> read function and returning -1ULL directly when the interface is not >> in the driver, avoiding the warning. >> >> Reported-by: syzbot+15f88dfa580000@syzkaller.appspotmail.com >> Signed-off-by: Arnav Rawat <arnavrawat2000@gmail.com> >> --- >> net/mac80211/debugfs_netdev.c | 5 ++++- >> 1 file changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c >> index 30a5a978a..669e7c519 100644 >> --- a/net/mac80211/debugfs_netdev.c >> +++ b/net/mac80211/debugfs_netdev.c >> @@ -656,7 +656,10 @@ static ssize_t ieee80211_if_fmt_tsf( >> struct ieee80211_local *local = sdata->local; >> u64 tsf; >> >> - tsf = drv_get_tsf(local, (struct ieee80211_sub_if_data *)sdata); >> + if (!(sdata->flags & IEEE80211_SDATA_IN_DRIVER)) >> + tsf = -1ULL; >> + else >> + tsf = drv_get_tsf(local, (struct ieee80211_sub_if_data *)sdata); > > > Seems like we could get rid of the pointless cast, while changing it > anyway. > > Also seems we should do it for all the debugfs files? > > johannes I see the command but can't find the corresponding bug. The email is sent to syzbot+HASH@syzkaller.appspotmail.com address but the HASH does not correspond to any known bug. Please double check the address. ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-01-19 13:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260118213328.74309-1-kapoorarnav43@gmail.com>
2026-01-19 13:20 ` [PATCH] mac80211: Fix WARNING in drv_get_tsf debugfs access Johannes Berg
2026-01-19 13:20 ` syzbot
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox