From: kernel test robot <lkp@intel.com>
To: "Luigi Leonardi via B4 Relay"
<devnull+luigi.leonardi.outlook.com@kernel.org>,
"Stefano Garzarella" <sgarzare@redhat.com>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Jason Wang" <jasowang@redhat.com>,
"Eugenio Pérez" <eperezma@redhat.com>,
"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
netdev@vger.kernel.org, virtualization@lists.linux.dev,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
Luigi Leonardi <luigi.leonardi@outlook.com>,
Daan De Meyer <daan.j.demeyer@gmail.com>
Subject: Re: [PATCH net-next v3 1/3] vsock: add support for SIOCOUTQ ioctl for all vsock socket types.
Date: Thu, 27 Jun 2024 18:34:29 +0800 [thread overview]
Message-ID: <202406271827.aQ9ZYlCh-lkp@intel.com> (raw)
In-Reply-To: <20240626-ioctl_next-v3-1-63be5bf19a40@outlook.com>
Hi Luigi,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 50b70845fc5c22cf7e7d25b57d57b3dca1725aa5]
url: https://github.com/intel-lab-lkp/linux/commits/Luigi-Leonardi-via-B4-Relay/vsock-add-support-for-SIOCOUTQ-ioctl-for-all-vsock-socket-types/20240627-023902
base: 50b70845fc5c22cf7e7d25b57d57b3dca1725aa5
patch link: https://lore.kernel.org/r/20240626-ioctl_next-v3-1-63be5bf19a40%40outlook.com
patch subject: [PATCH net-next v3 1/3] vsock: add support for SIOCOUTQ ioctl for all vsock socket types.
config: i386-buildonly-randconfig-001-20240627 (https://download.01.org/0day-ci/archive/20240627/202406271827.aQ9ZYlCh-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240627/202406271827.aQ9ZYlCh-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406271827.aQ9ZYlCh-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> net/vmw_vsock/af_vsock.c:1314:7: warning: variable 'retval' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
1314 | if (vsk->transport->unsent_bytes) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/vmw_vsock/af_vsock.c:1334:9: note: uninitialized use occurs here
1334 | return retval;
| ^~~~~~
net/vmw_vsock/af_vsock.c:1314:3: note: remove the 'if' if its condition is always true
1314 | if (vsk->transport->unsent_bytes) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/vmw_vsock/af_vsock.c:1301:12: note: initialize the variable 'retval' to silence this warning
1301 | int retval;
| ^
| = 0
1 warning generated.
vim +1314 net/vmw_vsock/af_vsock.c
1295
1296 static int vsock_do_ioctl(struct socket *sock, unsigned int cmd,
1297 int __user *arg)
1298 {
1299 struct sock *sk = sock->sk;
1300 struct vsock_sock *vsk;
1301 int retval;
1302
1303 vsk = vsock_sk(sk);
1304
1305 switch (cmd) {
1306 case SIOCOUTQ: {
1307 size_t n_bytes;
1308
1309 if (!vsk->transport || !vsk->transport->unsent_bytes) {
1310 retval = -EOPNOTSUPP;
1311 break;
1312 }
1313
> 1314 if (vsk->transport->unsent_bytes) {
1315 if (sock_type_connectible(sk->sk_type) && sk->sk_state == TCP_LISTEN) {
1316 retval = -EINVAL;
1317 break;
1318 }
1319
1320 n_bytes = vsk->transport->unsent_bytes(vsk);
1321 if (n_bytes < 0) {
1322 retval = n_bytes;
1323 break;
1324 }
1325
1326 retval = put_user(n_bytes, arg);
1327 }
1328 break;
1329 }
1330 default:
1331 retval = -ENOIOCTLCMD;
1332 }
1333
1334 return retval;
1335 }
1336
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-06-27 10:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-26 12:08 [PATCH net-next v3 0/3] ioctl support for AF_VSOCK and virtio-based transports Luigi Leonardi via B4 Relay
2024-06-26 12:08 ` [PATCH net-next v3 1/3] vsock: add support for SIOCOUTQ ioctl for all vsock socket types Luigi Leonardi via B4 Relay
2024-06-27 10:34 ` kernel test robot [this message]
2024-06-28 6:15 ` kernel test robot
2024-06-28 9:09 ` Stefano Garzarella
2024-06-28 13:42 ` kernel test robot
2024-06-26 12:08 ` [PATCH net-next v3 2/3] vsock/virtio: add SIOCOUTQ support for all virtio based transports Luigi Leonardi via B4 Relay
2024-06-28 11:16 ` Stefano Garzarella
2024-06-26 12:08 ` [PATCH net-next v3 3/3] test/vsock: add ioctl unsent bytes test Luigi Leonardi via B4 Relay
2024-07-15 16:03 ` Stefano Garzarella
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=202406271827.aQ9ZYlCh-lkp@intel.com \
--to=lkp@intel.com \
--cc=daan.j.demeyer@gmail.com \
--cc=davem@davemloft.net \
--cc=devnull+luigi.leonardi.outlook.com@kernel.org \
--cc=edumazet@google.com \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=kuba@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=luigi.leonardi@outlook.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=sgarzare@redhat.com \
--cc=stefanha@redhat.com \
--cc=virtualization@lists.linux.dev \
--cc=xuanzhuo@linux.alibaba.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