From: kernel test robot <lkp@intel.com>
To: Linus Lotz <linus@lotz.li>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
linus@lotz.li, "Jason A. Donenfeld" <Jason@zx2c4.com>,
Jakub Kicinski <kuba@kernel.org>,
wireguard@lists.zx2c4.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] wireguard: netlink: add multicast notification for peer changes
Date: Tue, 12 Jan 2021 04:48:49 +0800 [thread overview]
Message-ID: <202101120458.STsg3pKD-lkp@intel.com> (raw)
In-Reply-To: <20210109210056.160597-1-linus@lotz.li>
[-- Attachment #1: Type: text/plain, Size: 3765 bytes --]
Hi Linus,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.11-rc3 next-20210111]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Linus-Lotz/wireguard-netlink-add-multicast-notification-for-peer-changes/20210110-051531
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 996e435fd401de35df62ac943ab9402cfe85c430
config: x86_64-randconfig-a013-20210111 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 7be3285248bf54d0784a76174cf44cf7c1e780a5)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/3f394635e584429ebbadfbf315c0fe4e2d36b583
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Linus-Lotz/wireguard-netlink-add-multicast-notification-for-peer-changes/20210110-051531
git checkout 3f394635e584429ebbadfbf315c0fe4e2d36b583
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/net/wireguard/netlink.c:675:11: warning: variable 'fail' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
else if (peer->endpoint.addr.sa_family == AF_INET6)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireguard/netlink.c:680:6: note: uninitialized use occurs here
if (fail)
^~~~
drivers/net/wireguard/netlink.c:675:7: note: remove the 'if' if its condition is always true
else if (peer->endpoint.addr.sa_family == AF_INET6)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireguard/netlink.c:654:10: note: initialize the variable 'fail' to silence this warning
int fail;
^
= 0
1 warning generated.
vim +675 drivers/net/wireguard/netlink.c
649
650 int wg_genl_mcast_peer_endpoint_change(struct wg_peer *peer)
651 {
652 struct sk_buff *skb;
653 void *hdr, *peer_nest, *peer_array_nest;
654 int fail;
655
656 skb = genlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL);
657 hdr = genlmsg_put(skb, 0, 0,
658 &genl_family, 0, WG_CMD_CHANGED_PEER);
659
660 nla_put_u32(skb, WGDEVICE_A_IFINDEX, peer->device->dev->ifindex);
661 nla_put_string(skb, WGDEVICE_A_IFNAME, peer->device->dev->name);
662
663 peer_nest = nla_nest_start(skb, WGDEVICE_A_PEERS);
664 peer_array_nest = nla_nest_start(skb, 0);
665 down_read(&peer->handshake.lock);
666 nla_put(skb, WGPEER_A_PUBLIC_KEY, NOISE_PUBLIC_KEY_LEN,
667 peer->handshake.remote_static);
668 up_read(&peer->handshake.lock);
669
670 read_lock_bh(&peer->endpoint_lock);
671 if (peer->endpoint.addr.sa_family == AF_INET)
672 fail = nla_put(skb, WGPEER_A_ENDPOINT,
673 sizeof(peer->endpoint.addr4),
674 &peer->endpoint.addr4);
> 675 else if (peer->endpoint.addr.sa_family == AF_INET6)
---
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: 32150 bytes --]
next prev parent reply other threads:[~2021-01-11 20:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-09 21:00 Linus Lotz
2021-01-11 20:48 ` kernel test robot [this message]
2021-01-15 19:53 ` [PATCH v2] " Linus Lotz
2021-01-15 23:40 ` Jason A. Donenfeld
2021-01-16 1:51 ` Linus Lotz
2021-01-26 20:40 ` Linus Lotz
2021-03-07 21:49 ` [PATCH] " Jason A. Donenfeld
2021-03-13 13:14 ` Linus Lotz
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=202101120458.STsg3pKD-lkp@intel.com \
--to=lkp@intel.com \
--cc=Jason@zx2c4.com \
--cc=clang-built-linux@googlegroups.com \
--cc=kbuild-all@lists.01.org \
--cc=kuba@kernel.org \
--cc=linus@lotz.li \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=wireguard@lists.zx2c4.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;
as well as URLs for NNTP newsgroup(s).