All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Florian Westphal <fw@strlen.de>
Cc: kbuild-all@lists.01.org, netdev@vger.kernel.org,
	Florian Westphal <fw@strlen.de>
Subject: Re: [PATCH net-next] netlink: make getters tolerate NULL nla arg
Date: Sat, 18 Jan 2020 06:28:55 +0800	[thread overview]
Message-ID: <202001180613.c1TfngwR%lkp@intel.com> (raw)
In-Reply-To: <20200116145522.28803-1-fw@strlen.de>

[-- Attachment #1: Type: text/plain, Size: 5860 bytes --]

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@intel.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@gmail.com>
:::::: CC: Marcel Holtmann <marcel@holtmann.org>

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30457 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH net-next] netlink: make getters tolerate NULL nla arg
Date: Sat, 18 Jan 2020 06:28:55 +0800	[thread overview]
Message-ID: <202001180613.c1TfngwR%lkp@intel.com> (raw)
In-Reply-To: <20200116145522.28803-1-fw@strlen.de>

[-- Attachment #1: Type: text/plain, Size: 5962 bytes --]

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@intel.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@gmail.com>
:::::: CC: Marcel Holtmann <marcel@holtmann.org>

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 30457 bytes --]

  parent reply	other threads:[~2020-01-17 22:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-16 14:55 [PATCH net-next] netlink: make getters tolerate NULL nla arg Florian Westphal
2020-01-16 15:19 ` Toke Høiland-Jørgensen
2020-01-16 16:04   ` Florian Westphal
2020-01-16 16:23     ` Toke Høiland-Jørgensen
2020-01-17 10:39       ` Florian Westphal
2020-01-17 16:26         ` Toke Høiland-Jørgensen
2020-01-17 12:08 ` David Miller
2020-01-19 12:32   ` Florian Westphal
2020-01-19 14:08     ` David Miller
2020-01-17 22:28 ` kbuild test robot [this message]
2020-01-17 22:28   ` kbuild test robot
2020-01-18  9:40 ` kbuild test robot
2020-01-18  9:40   ` kbuild test robot
2020-01-24 15:47 ` kbuild test robot
2020-01-24 15:47   ` kbuild test robot

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=202001180613.c1TfngwR%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=fw@strlen.de \
    --cc=kbuild-all@lists.01.org \
    --cc=netdev@vger.kernel.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.