[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_84396D049598E9E2ED52CCE479426DD02E0A@qq.com>
Date: Wed, 17 Jul 2024 19:39:13 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+d5dc2801166df6d34774@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [fs?] KASAN: slab-use-after-free Read in lockref_get
before remove debugfs_dir set reference pointer to NULL
#syz test: linux-next 58f9416d413a
diff --git a/net/mac80211/driver-ops.c b/net/mac80211/driver-ops.c
index fe868b521622..fe29ba561599 100644
--- a/net/mac80211/driver-ops.c
+++ b/net/mac80211/driver-ops.c
@@ -113,11 +113,10 @@ void drv_remove_interface(struct ieee80211_local *local,
if (!check_sdata_in_driver(sdata))
return;
- sdata->flags &= ~IEEE80211_SDATA_IN_DRIVER;
-
/* Remove driver debugfs entries */
ieee80211_debugfs_recreate_netdev(sdata, sdata->vif.valid_links);
+ sdata->flags &= ~IEEE80211_SDATA_IN_DRIVER;
trace_drv_remove_interface(local, sdata);
local->ops->remove_interface(&local->hw, &sdata->vif);
trace_drv_return_void(local);
Powered by blists - more mailing lists