From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [mac80211-next:rtnl 22/22] net/wireless/core.c:1336 cfg80211_register_netdevice() error: uninitialized symbol 'rdev'.
Date: Mon, 25 Jan 2021 12:34:37 +0800 [thread overview]
Message-ID: <202101251231.NDMbP0yb-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3780 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-wireless(a)vger.kernel.org
TO: Johannes Berg <johannes.berg@intel.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git rtnl
head: 81df9f5e047aa0424b954a726c3fc3259be26526
commit: 81df9f5e047aa0424b954a726c3fc3259be26526 [22/22] cfg80211: avoid holding the RTNL when calling the driver
:::::: branch date: 3 days ago
:::::: commit date: 3 days ago
config: x86_64-randconfig-m001-20210125 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-20) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
net/wireless/core.c:1336 cfg80211_register_netdevice() error: uninitialized symbol 'rdev'.
vim +/rdev +1336 net/wireless/core.c
e4d4216e91ea3104 Johannes Berg 2018-09-13 1328
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1329 int cfg80211_register_netdevice(struct net_device *dev)
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1330 {
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1331 struct wireless_dev *wdev = dev->ieee80211_ptr;
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1332 struct cfg80211_registered_device *rdev;
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1333 int ret;
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1334
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1335 ASSERT_RTNL();
81df9f5e047aa042 Johannes Berg 2021-01-19 @1336 lockdep_assert_held(&rdev->wiphy.mtx);
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1337
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1338 if (WARN_ON(!wdev))
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1339 return -EINVAL;
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1340
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1341 rdev = wiphy_to_rdev(wdev->wiphy);
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1342
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1343 lockdep_assert_held(&rdev->wiphy.mtx);
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1344
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1345 /* we'll take care of this */
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1346 wdev->registered = true;
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1347 ret = register_netdevice(dev);
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1348 if (ret)
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1349 goto out;
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1350
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1351 if (sysfs_create_link(&dev->dev.kobj, &rdev->wiphy.dev.kobj,
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1352 "phy80211")) {
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1353 pr_err("failed to add phy80211 symlink to netdev!\n");
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1354 unregister_netdevice(dev);
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1355 ret = -EINVAL;
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1356 goto out;
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1357 }
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1358
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1359 cfg80211_register_wdev(rdev, wdev);
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1360 ret = 0;
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1361 out:
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1362 if (ret)
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1363 wdev->registered = false;
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1364 return ret;
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1365 }
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1366 EXPORT_SYMBOL(cfg80211_register_netdevice);
cf2f4b65e4e9d866 Johannes Berg 2021-01-22 1367
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 41518 bytes --]
next reply other threads:[~2021-01-25 4:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-25 4:34 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-01-25 11:01 [mac80211-next:rtnl 22/22] net/wireless/core.c:1336 cfg80211_register_netdevice() error: uninitialized symbol 'rdev' Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202101251231.NDMbP0yb-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.