* [PATCH AUTOSEL 4.4 8/9] cfg80211: check for set_wiphy_params
[not found] <20200124142221.31201-1-sashal@kernel.org>
@ 2020-01-24 14:22 ` Sasha Levin
0 siblings, 0 replies; only message in thread
From: Sasha Levin @ 2020-01-24 14:22 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Johannes Berg, syzbot+e8a797964a4180eb57d5,
syzbot+34b582cf32c1db008f8e, Sasha Levin, linux-wireless, netdev
From: Johannes Berg <johannes.berg@intel.com>
[ Upstream commit 24953de0a5e31dcca7e82c8a3c79abc2dfe8fb6e ]
Check if set_wiphy_params is assigned and return an error if not,
some drivers (e.g. virt_wifi where syzbot reported it) don't have
it.
Reported-by: syzbot+e8a797964a4180eb57d5@syzkaller.appspotmail.com
Reported-by: syzbot+34b582cf32c1db008f8e@syzkaller.appspotmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://lore.kernel.org/r/20200113125358.ac07f276efff.Ibd85ee1b12e47b9efb00a2adc5cd3fac50da791a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/wireless/rdev-ops.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/wireless/rdev-ops.h b/net/wireless/rdev-ops.h
index c23516d0f8079..b3a60c3e19341 100644
--- a/net/wireless/rdev-ops.h
+++ b/net/wireless/rdev-ops.h
@@ -517,6 +517,10 @@ static inline int
rdev_set_wiphy_params(struct cfg80211_registered_device *rdev, u32 changed)
{
int ret;
+
+ if (!rdev->ops->set_wiphy_params)
+ return -EOPNOTSUPP;
+
trace_rdev_set_wiphy_params(&rdev->wiphy, changed);
ret = rdev->ops->set_wiphy_params(&rdev->wiphy, changed);
trace_rdev_return_int(&rdev->wiphy, ret);
--
2.20.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-01-24 14:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20200124142221.31201-1-sashal@kernel.org>
2020-01-24 14:22 ` [PATCH AUTOSEL 4.4 8/9] cfg80211: check for set_wiphy_params Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).