[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202001180613.c1TfngwR%lkp@intel.com>
Date: Sat, 18 Jan 2020 06:28:55 +0800
From: kbuild test robot <lkp@...el.com>
To: Florian Westphal <fw@...len.de>
Cc: kbuild-all@...ts.01.org, netdev@...r.kernel.org,
Florian Westphal <fw@...len.de>
Subject: Re: [PATCH net-next] netlink: make getters tolerate NULL nla arg
Hi Florian,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
[also build test WARNING on net/master linus/master ipvs/master v5.5-rc6 next-20200117]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Florian-Westphal/netlink-make-getters-tolerate-NULL-nla-arg/20200117-200009
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 6bc8038035267d12df2bf78a8e1a5f07069fabb8
config: i386-randconfig-c001-20200117 (attached as .config)
compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
All warnings (new ones prefixed by >>):
net/ieee802154/nl802154.c: In function '__cfg802154_wpan_dev_from_attrs.constprop':
>> net/ieee802154/nl802154.c:75:32: warning: 'wpan_dev_id' may be used uninitialized in this function [-Wmaybe-uninitialized]
wpan_dev->identifier == (u32)wpan_dev_id) {
^~~~~~~~~~~~~~~~
vim +/wpan_dev_id +75 net/ieee802154/nl802154.c
79fe1a2aa7b504 Alexander Aring 2014-11-09 34
79fe1a2aa7b504 Alexander Aring 2014-11-09 35 /* returns ERR_PTR values */
79fe1a2aa7b504 Alexander Aring 2014-11-09 36 static struct wpan_dev *
79fe1a2aa7b504 Alexander Aring 2014-11-09 37 __cfg802154_wpan_dev_from_attrs(struct net *netns, struct nlattr **attrs)
79fe1a2aa7b504 Alexander Aring 2014-11-09 38 {
79fe1a2aa7b504 Alexander Aring 2014-11-09 39 struct cfg802154_registered_device *rdev;
79fe1a2aa7b504 Alexander Aring 2014-11-09 40 struct wpan_dev *result = NULL;
79fe1a2aa7b504 Alexander Aring 2014-11-09 41 bool have_ifidx = attrs[NL802154_ATTR_IFINDEX];
79fe1a2aa7b504 Alexander Aring 2014-11-09 42 bool have_wpan_dev_id = attrs[NL802154_ATTR_WPAN_DEV];
79fe1a2aa7b504 Alexander Aring 2014-11-09 43 u64 wpan_dev_id;
79fe1a2aa7b504 Alexander Aring 2014-11-09 44 int wpan_phy_idx = -1;
79fe1a2aa7b504 Alexander Aring 2014-11-09 45 int ifidx = -1;
79fe1a2aa7b504 Alexander Aring 2014-11-09 46
79fe1a2aa7b504 Alexander Aring 2014-11-09 47 ASSERT_RTNL();
79fe1a2aa7b504 Alexander Aring 2014-11-09 48
79fe1a2aa7b504 Alexander Aring 2014-11-09 49 if (!have_ifidx && !have_wpan_dev_id)
79fe1a2aa7b504 Alexander Aring 2014-11-09 50 return ERR_PTR(-EINVAL);
79fe1a2aa7b504 Alexander Aring 2014-11-09 51
79fe1a2aa7b504 Alexander Aring 2014-11-09 52 if (have_ifidx)
79fe1a2aa7b504 Alexander Aring 2014-11-09 53 ifidx = nla_get_u32(attrs[NL802154_ATTR_IFINDEX]);
79fe1a2aa7b504 Alexander Aring 2014-11-09 54 if (have_wpan_dev_id) {
79fe1a2aa7b504 Alexander Aring 2014-11-09 55 wpan_dev_id = nla_get_u64(attrs[NL802154_ATTR_WPAN_DEV]);
79fe1a2aa7b504 Alexander Aring 2014-11-09 56 wpan_phy_idx = wpan_dev_id >> 32;
79fe1a2aa7b504 Alexander Aring 2014-11-09 57 }
79fe1a2aa7b504 Alexander Aring 2014-11-09 58
79fe1a2aa7b504 Alexander Aring 2014-11-09 59 list_for_each_entry(rdev, &cfg802154_rdev_list, list) {
79fe1a2aa7b504 Alexander Aring 2014-11-09 60 struct wpan_dev *wpan_dev;
79fe1a2aa7b504 Alexander Aring 2014-11-09 61
66e5c2672cd11b Alexander Aring 2016-06-18 62 if (wpan_phy_net(&rdev->wpan_phy) != netns)
66e5c2672cd11b Alexander Aring 2016-06-18 63 continue;
79fe1a2aa7b504 Alexander Aring 2014-11-09 64
79fe1a2aa7b504 Alexander Aring 2014-11-09 65 if (have_wpan_dev_id && rdev->wpan_phy_idx != wpan_phy_idx)
79fe1a2aa7b504 Alexander Aring 2014-11-09 66 continue;
79fe1a2aa7b504 Alexander Aring 2014-11-09 67
79fe1a2aa7b504 Alexander Aring 2014-11-09 68 list_for_each_entry(wpan_dev, &rdev->wpan_dev_list, list) {
79fe1a2aa7b504 Alexander Aring 2014-11-09 69 if (have_ifidx && wpan_dev->netdev &&
79fe1a2aa7b504 Alexander Aring 2014-11-09 70 wpan_dev->netdev->ifindex == ifidx) {
79fe1a2aa7b504 Alexander Aring 2014-11-09 71 result = wpan_dev;
79fe1a2aa7b504 Alexander Aring 2014-11-09 72 break;
79fe1a2aa7b504 Alexander Aring 2014-11-09 73 }
79fe1a2aa7b504 Alexander Aring 2014-11-09 74 if (have_wpan_dev_id &&
79fe1a2aa7b504 Alexander Aring 2014-11-09 @75 wpan_dev->identifier == (u32)wpan_dev_id) {
79fe1a2aa7b504 Alexander Aring 2014-11-09 76 result = wpan_dev;
79fe1a2aa7b504 Alexander Aring 2014-11-09 77 break;
79fe1a2aa7b504 Alexander Aring 2014-11-09 78 }
79fe1a2aa7b504 Alexander Aring 2014-11-09 79 }
79fe1a2aa7b504 Alexander Aring 2014-11-09 80
79fe1a2aa7b504 Alexander Aring 2014-11-09 81 if (result)
79fe1a2aa7b504 Alexander Aring 2014-11-09 82 break;
79fe1a2aa7b504 Alexander Aring 2014-11-09 83 }
79fe1a2aa7b504 Alexander Aring 2014-11-09 84
79fe1a2aa7b504 Alexander Aring 2014-11-09 85 if (result)
79fe1a2aa7b504 Alexander Aring 2014-11-09 86 return result;
79fe1a2aa7b504 Alexander Aring 2014-11-09 87
79fe1a2aa7b504 Alexander Aring 2014-11-09 88 return ERR_PTR(-ENODEV);
79fe1a2aa7b504 Alexander Aring 2014-11-09 89 }
79fe1a2aa7b504 Alexander Aring 2014-11-09 90
:::::: The code at line 75 was first introduced by commit
:::::: 79fe1a2aa7b504c68642e510154f17e2de60da60 ieee802154: add nl802154 framework
:::::: TO: Alexander Aring <alex.aring@...il.com>
:::::: CC: Marcel Holtmann <marcel@...tmann.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (30457 bytes)
Powered by blists - more mailing lists