From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Johannes Berg <johannes.berg@intel.com>
Cc: lkp@intel.com, kbuild-all@lists.01.org, linux-wireless@vger.kernel.org
Subject: [kbuild] [mac80211-next:rtnl 22/22] net/wireless/core.c:1336 cfg80211_register_netdevice() error: uninitialized symbol 'rdev'.
Date: Mon, 25 Jan 2021 14:01:49 +0300 [thread overview]
Message-ID: <20210125110149.GL20820@kadam> (raw)
[-- Attachment #1: Type: text/plain, Size: 3548 bytes --]
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
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
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);
^^^^^^^^^^^^^^^^
Uninitialized
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 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 41518 bytes --]
[-- Attachment #3: Type: text/plain, Size: 149 bytes --]
_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-leave@lists.01.org
reply other threads:[~2021-01-25 11:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20210125110149.GL20820@kadam \
--to=dan.carpenter@oracle.com \
--cc=johannes.berg@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=kbuild@lists.01.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lkp@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox