Message ID | 20250407125345.1238818-4-i.abramov@mt-integration.ru (mailing list archive) |
---|---|
State | New |
Delegated to: | Johannes Berg |
Headers | show |
Series | Avoid calling WARN_ON() on allocation failure in cfg80211_switch_netns() | expand |
Context | Check | Description |
---|---|---|
wifibot/tree_selection | success | Guessing tree name failed - patch did not apply |
diff --git a/net/wireless/core.c b/net/wireless/core.c index 6f95aad18d47..b77f4ed8f2c0 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c @@ -1656,7 +1656,7 @@ static void __net_exit cfg80211_pernet_exit(struct net *net) rtnl_lock(); for_each_rdev(rdev) { if (net_eq(wiphy_net(&rdev->wiphy), net)) - WARN_ON(cfg80211_switch_netns(rdev, &init_net)); + cfg80211_switch_netns(rdev, &init_net); } rtnl_unlock(); }
There's no need to call WARN_ON() in cfg80211_pernet_exit(), since every point of failure in cfg80211_switch_netns() is covered with WARN_ON(), so remove it. Found by Linux Verification Center (linuxtesting.org). Fixes: 463d01832385 ("cfg80211: make aware of net namespaces") Suggested-by: Kuniyuki Iwashima <kuniyu@amazon.com> Signed-off-by: Ivan Abramov <i.abramov@mt-integration.ru> --- net/wireless/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)