From: Johannes Berg Date: Tue, 6 Jun 2023 12:49:23 +0000 (+0200) Subject: wifi: cfg80211: wext: hold wiphy lock in siwgenie X-Git-Tag: v6.6.7~2536^2~132^2~28 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7d2d0ff49dfdb38ad37baa9a27c0132d5e51a923;p=platform%2Fkernel%2Flinux-starfive.git wifi: cfg80211: wext: hold wiphy lock in siwgenie Missed this ioctl since it's in wext-sme.c where we usually get via a front-level ioctl handler in the other files, but it should also hold the wiphy lock to align the locking contract towards the driver. Signed-off-by: Johannes Berg --- diff --git a/net/wireless/wext-sme.c b/net/wireless/wext-sme.c index f231207..f3eaa33 100644 --- a/net/wireless/wext-sme.c +++ b/net/wireless/wext-sme.c @@ -3,7 +3,7 @@ * cfg80211 wext compat for managed mode. * * Copyright 2009 Johannes Berg - * Copyright (C) 2009, 2020-2022 Intel Corporation + * Copyright (C) 2009, 2020-2023 Intel Corporation */ #include @@ -338,6 +338,7 @@ int cfg80211_wext_siwgenie(struct net_device *dev, if (!ie_len) ie = NULL; + wiphy_lock(wdev->wiphy); wdev_lock(wdev); /* no change */ @@ -370,6 +371,7 @@ int cfg80211_wext_siwgenie(struct net_device *dev, err = 0; out: wdev_unlock(wdev); + wiphy_unlock(wdev->wiphy); return err; }