[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <670c87a0.050a0220.3e960.0050.GAE@google.com>
Date: Sun, 13 Oct 2024 19:53:20 -0700
From: syzbot <syzbot+5506b2556159a1ab6923@...kaller.appspotmail.com>
To: linux-kernel@...r.kernel.org
Subject: Re: [syzbot] Re: [wireless?] INFO: task hung in cfg80211_event_work (4)
For archival purposes, forwarding an incoming command email to
linux-kernel@...r.kernel.org.
***
Subject: Re: [wireless?] INFO: task hung in cfg80211_event_work (4)
Author: lizhi.xu@...driver.com
When hwsim and regulatory are used simultaneously, a race occurs for the
lock "wiphy.mtx", it cause hung in cfg80211_event_work.
The hwsim is a developer testing tool, so maybe using mutex_trylock
insead of mutex_lock is more reasonable.
#syz test
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 661adfc77644..4e8a6c76b12d 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -331,7 +331,8 @@ static void cfg80211_event_work(struct work_struct *work)
rdev = container_of(work, struct cfg80211_registered_device,
event_work);
- wiphy_lock(&rdev->wiphy);
+ if (!mutex_trylock(&rdev->wiphy.mtx))
+ return;
cfg80211_process_rdev_events(rdev);
wiphy_unlock(&rdev->wiphy);
}
Powered by blists - more mailing lists