From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC PATCH v4 05/17] af_vsock: separate wait space loop
Date: Mon, 08 Feb 2021 00:58:17 +0800 [thread overview]
Message-ID: <202102080001.eWqRZOHu-lkp@intel.com> (raw)
In-Reply-To: <20210207151545.804889-1-arseny.krasnov@kaspersky.com>
[-- Attachment #1: Type: text/plain, Size: 10048 bytes --]
Hi Arseny,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on linus/master]
[cannot apply to vhost/linux-next v5.11-rc6 next-20210125]
[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/Arseny-Krasnov/virtio-vsock-introduce-SOCK_SEQPACKET-support/20210207-232655
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 61556703b610a104de324e4f061dc6cf7b218b46
config: x86_64-randconfig-a002-20210207 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/2fc3a79be4e6633693da8cf6f889ebb0581f95e4
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Arseny-Krasnov/virtio-vsock-introduce-SOCK_SEQPACKET-support/20210207-232655
git checkout 2fc3a79be4e6633693da8cf6f889ebb0581f95e4
# save the attached .config to linux build tree
make W=1 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 >>):
net/vmw_vsock/af_vsock.c: In function 'vsock_connectible_sendmsg':
>> net/vmw_vsock/af_vsock.c:1761:7: warning: variable 'timeout' set but not used [-Wunused-but-set-variable]
1761 | long timeout;
| ^~~~~~~
vim +/timeout +1761 net/vmw_vsock/af_vsock.c
2fc3a79be4e663 Arseny Krasnov 2021-02-07 1753
91571ee8147192 Arseny Krasnov 2021-02-07 1754 static int vsock_connectible_sendmsg(struct socket *sock, struct msghdr *msg,
1b784140474e4f Ying Xue 2015-03-02 1755 size_t len)
d021c344051af9 Andy King 2013-02-06 1756 {
d021c344051af9 Andy King 2013-02-06 1757 struct sock *sk;
d021c344051af9 Andy King 2013-02-06 1758 struct vsock_sock *vsk;
fe502c4a38d97e Stefano Garzarella 2019-11-14 1759 const struct vsock_transport *transport;
d021c344051af9 Andy King 2013-02-06 1760 ssize_t total_written;
d021c344051af9 Andy King 2013-02-06 @1761 long timeout;
d021c344051af9 Andy King 2013-02-06 1762 int err;
d021c344051af9 Andy King 2013-02-06 1763 struct vsock_transport_send_notify_data send_data;
499fde662f1957 WANG Cong 2017-05-19 1764 DEFINE_WAIT_FUNC(wait, woken_wake_function);
d021c344051af9 Andy King 2013-02-06 1765
d021c344051af9 Andy King 2013-02-06 1766 sk = sock->sk;
d021c344051af9 Andy King 2013-02-06 1767 vsk = vsock_sk(sk);
d021c344051af9 Andy King 2013-02-06 1768 total_written = 0;
d021c344051af9 Andy King 2013-02-06 1769 err = 0;
d021c344051af9 Andy King 2013-02-06 1770
d021c344051af9 Andy King 2013-02-06 1771 if (msg->msg_flags & MSG_OOB)
d021c344051af9 Andy King 2013-02-06 1772 return -EOPNOTSUPP;
d021c344051af9 Andy King 2013-02-06 1773
d021c344051af9 Andy King 2013-02-06 1774 lock_sock(sk);
d021c344051af9 Andy King 2013-02-06 1775
c518adafa39f37 Alexander Popov 2021-02-01 1776 transport = vsk->transport;
c518adafa39f37 Alexander Popov 2021-02-01 1777
d021c344051af9 Andy King 2013-02-06 1778 /* Callers should not provide a destination with stream sockets. */
d021c344051af9 Andy King 2013-02-06 1779 if (msg->msg_namelen) {
3b4477d2dcf270 Stefan Hajnoczi 2017-10-05 1780 err = sk->sk_state == TCP_ESTABLISHED ? -EISCONN : -EOPNOTSUPP;
d021c344051af9 Andy King 2013-02-06 1781 goto out;
d021c344051af9 Andy King 2013-02-06 1782 }
d021c344051af9 Andy King 2013-02-06 1783
d021c344051af9 Andy King 2013-02-06 1784 /* Send data only if both sides are not shutdown in the direction. */
d021c344051af9 Andy King 2013-02-06 1785 if (sk->sk_shutdown & SEND_SHUTDOWN ||
d021c344051af9 Andy King 2013-02-06 1786 vsk->peer_shutdown & RCV_SHUTDOWN) {
d021c344051af9 Andy King 2013-02-06 1787 err = -EPIPE;
d021c344051af9 Andy King 2013-02-06 1788 goto out;
d021c344051af9 Andy King 2013-02-06 1789 }
d021c344051af9 Andy King 2013-02-06 1790
c0cfa2d8a788fc Stefano Garzarella 2019-11-14 1791 if (!transport || sk->sk_state != TCP_ESTABLISHED ||
d021c344051af9 Andy King 2013-02-06 1792 !vsock_addr_bound(&vsk->local_addr)) {
d021c344051af9 Andy King 2013-02-06 1793 err = -ENOTCONN;
d021c344051af9 Andy King 2013-02-06 1794 goto out;
d021c344051af9 Andy King 2013-02-06 1795 }
d021c344051af9 Andy King 2013-02-06 1796
d021c344051af9 Andy King 2013-02-06 1797 if (!vsock_addr_bound(&vsk->remote_addr)) {
d021c344051af9 Andy King 2013-02-06 1798 err = -EDESTADDRREQ;
d021c344051af9 Andy King 2013-02-06 1799 goto out;
d021c344051af9 Andy King 2013-02-06 1800 }
d021c344051af9 Andy King 2013-02-06 1801
d021c344051af9 Andy King 2013-02-06 1802 /* Wait for room in the produce queue to enqueue our user's data. */
d021c344051af9 Andy King 2013-02-06 1803 timeout = sock_sndtimeo(sk, msg->msg_flags & MSG_DONTWAIT);
d021c344051af9 Andy King 2013-02-06 1804
d021c344051af9 Andy King 2013-02-06 1805 err = transport->notify_send_init(vsk, &send_data);
d021c344051af9 Andy King 2013-02-06 1806 if (err < 0)
d021c344051af9 Andy King 2013-02-06 1807 goto out;
d021c344051af9 Andy King 2013-02-06 1808
d021c344051af9 Andy King 2013-02-06 1809 while (total_written < len) {
d021c344051af9 Andy King 2013-02-06 1810 ssize_t written;
d021c344051af9 Andy King 2013-02-06 1811
2fc3a79be4e663 Arseny Krasnov 2021-02-07 1812 if (vsock_wait_space(sk, 1, msg->msg_flags, &send_data))
f7f9b5e7f8eccf Claudio Imbrenda 2016-03-22 1813 goto out_err;
d021c344051af9 Andy King 2013-02-06 1814
d021c344051af9 Andy King 2013-02-06 1815 /* These checks occur both as part of and after the loop
d021c344051af9 Andy King 2013-02-06 1816 * conditional since we need to check before and after
d021c344051af9 Andy King 2013-02-06 1817 * sleeping.
d021c344051af9 Andy King 2013-02-06 1818 */
d021c344051af9 Andy King 2013-02-06 1819 if (sk->sk_err) {
d021c344051af9 Andy King 2013-02-06 1820 err = -sk->sk_err;
f7f9b5e7f8eccf Claudio Imbrenda 2016-03-22 1821 goto out_err;
d021c344051af9 Andy King 2013-02-06 1822 } else if ((sk->sk_shutdown & SEND_SHUTDOWN) ||
d021c344051af9 Andy King 2013-02-06 1823 (vsk->peer_shutdown & RCV_SHUTDOWN)) {
d021c344051af9 Andy King 2013-02-06 1824 err = -EPIPE;
f7f9b5e7f8eccf Claudio Imbrenda 2016-03-22 1825 goto out_err;
d021c344051af9 Andy King 2013-02-06 1826 }
d021c344051af9 Andy King 2013-02-06 1827
d021c344051af9 Andy King 2013-02-06 1828 err = transport->notify_send_pre_enqueue(vsk, &send_data);
d021c344051af9 Andy King 2013-02-06 1829 if (err < 0)
f7f9b5e7f8eccf Claudio Imbrenda 2016-03-22 1830 goto out_err;
d021c344051af9 Andy King 2013-02-06 1831
d021c344051af9 Andy King 2013-02-06 1832 /* Note that enqueue will only write as many bytes as are free
d021c344051af9 Andy King 2013-02-06 1833 * in the produce queue, so we don't need to ensure len is
d021c344051af9 Andy King 2013-02-06 1834 * smaller than the queue size. It is the caller's
d021c344051af9 Andy King 2013-02-06 1835 * responsibility to check how many bytes we were able to send.
d021c344051af9 Andy King 2013-02-06 1836 */
d021c344051af9 Andy King 2013-02-06 1837
d021c344051af9 Andy King 2013-02-06 1838 written = transport->stream_enqueue(
0f7db23a07af5d Al Viro 2014-11-20 1839 vsk, msg,
d021c344051af9 Andy King 2013-02-06 1840 len - total_written);
d021c344051af9 Andy King 2013-02-06 1841 if (written < 0) {
d021c344051af9 Andy King 2013-02-06 1842 err = -ENOMEM;
f7f9b5e7f8eccf Claudio Imbrenda 2016-03-22 1843 goto out_err;
d021c344051af9 Andy King 2013-02-06 1844 }
d021c344051af9 Andy King 2013-02-06 1845
d021c344051af9 Andy King 2013-02-06 1846 total_written += written;
d021c344051af9 Andy King 2013-02-06 1847
d021c344051af9 Andy King 2013-02-06 1848 err = transport->notify_send_post_enqueue(
d021c344051af9 Andy King 2013-02-06 1849 vsk, written, &send_data);
d021c344051af9 Andy King 2013-02-06 1850 if (err < 0)
f7f9b5e7f8eccf Claudio Imbrenda 2016-03-22 1851 goto out_err;
d021c344051af9 Andy King 2013-02-06 1852
d021c344051af9 Andy King 2013-02-06 1853 }
d021c344051af9 Andy King 2013-02-06 1854
f7f9b5e7f8eccf Claudio Imbrenda 2016-03-22 1855 out_err:
d021c344051af9 Andy King 2013-02-06 1856 if (total_written > 0)
d021c344051af9 Andy King 2013-02-06 1857 err = total_written;
d021c344051af9 Andy King 2013-02-06 1858 out:
d021c344051af9 Andy King 2013-02-06 1859 release_sock(sk);
d021c344051af9 Andy King 2013-02-06 1860 return err;
d021c344051af9 Andy King 2013-02-06 1861 }
d021c344051af9 Andy King 2013-02-06 1862
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32214 bytes --]
next prev parent reply other threads:[~2021-02-07 16:58 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-07 15:12 [RFC PATCH v4 00/17] virtio/vsock: introduce SOCK_SEQPACKET support Arseny Krasnov
2021-02-07 15:14 ` [RFC PATCH v4 01/17] af_vsock: update functions for connectible socket Arseny Krasnov
2021-02-11 10:52 ` Stefano Garzarella
2021-02-11 10:52 ` Stefano Garzarella
2021-02-07 15:14 ` [RFC PATCH v4 02/17] af_vsock: separate wait data loop Arseny Krasnov
2021-02-11 11:24 ` Stefano Garzarella
2021-02-11 11:24 ` Stefano Garzarella
2021-02-11 15:11 ` Jorgen Hansen
2021-02-11 15:11 ` Jorgen Hansen
2021-02-16 6:58 ` Arseny Krasnov
2021-02-07 15:15 ` [RFC PATCH v4 03/17] af_vsock: separate receive " Arseny Krasnov
2021-02-11 11:37 ` Stefano Garzarella
2021-02-11 11:37 ` Stefano Garzarella
2021-02-07 15:15 ` [RFC PATCH v4 04/17] af_vsock: implement SEQPACKET receive loop Arseny Krasnov
2021-02-11 11:47 ` Stefano Garzarella
2021-02-11 11:47 ` Stefano Garzarella
2021-02-07 15:15 ` [RFC PATCH v4 05/17] af_vsock: separate wait space loop Arseny Krasnov
2021-02-07 16:58 ` kernel test robot [this message]
2021-02-11 12:14 ` Stefano Garzarella
2021-02-11 12:14 ` Stefano Garzarella
2021-02-07 15:15 ` [RFC PATCH v4 06/17] af_vsock: implement send logic for SEQPACKET Arseny Krasnov
2021-02-11 12:17 ` Stefano Garzarella
2021-02-11 12:17 ` Stefano Garzarella
2021-02-07 15:16 ` [RFC PATCH v4 07/17] af_vsock: rest of SEQPACKET support Arseny Krasnov
2021-02-11 12:27 ` Stefano Garzarella
2021-02-11 12:27 ` Stefano Garzarella
2021-02-15 9:11 ` Arseny Krasnov
2021-02-07 15:16 ` [RFC PATCH v4 08/17] af_vsock: update comments for stream sockets Arseny Krasnov
2021-02-11 13:19 ` Stefano Garzarella
2021-02-11 13:19 ` Stefano Garzarella
2021-02-07 15:16 ` [RFC PATCH v4 09/17] virtio/vsock: dequeue callback for SOCK_SEQPACKET Arseny Krasnov
2021-02-11 13:54 ` Stefano Garzarella
2021-02-11 13:54 ` Stefano Garzarella
2021-02-11 14:03 ` Stefano Garzarella
2021-02-11 14:03 ` Stefano Garzarella
2021-02-07 15:17 ` [RFC PATCH v4 10/17] virtio/vsock: fetch length for SEQPACKET record Arseny Krasnov
2021-02-11 13:58 ` Stefano Garzarella
2021-02-11 13:58 ` Stefano Garzarella
2021-02-07 15:17 ` [RFC PATCH v4 11/17] virtio/vsock: add SEQPACKET receive logic Arseny Krasnov
2021-02-07 15:17 ` [RFC PATCH v4 12/17] virtio/vsock: rest of SOCK_SEQPACKET support Arseny Krasnov
2021-02-09 4:34 ` kernel test robot
2021-02-11 11:00 ` Arseny Krasnov
2021-02-11 14:29 ` Stefano Garzarella
2021-02-11 14:29 ` Stefano Garzarella
2021-02-07 15:18 ` [RFC PATCH v4 13/17] virtio/vsock: setup SEQPACKET ops for transport Arseny Krasnov
2021-02-07 15:18 ` [RFC PATCH v4 14/17] vhost/vsock: " Arseny Krasnov
2021-02-07 15:18 ` [RFC PATCH v4 15/17] vsock_test: add SOCK_SEQPACKET tests Arseny Krasnov
2021-02-07 15:18 ` [RFC PATCH v4 16/17] loopback/vsock: setup SEQPACKET ops for transport Arseny Krasnov
2021-02-11 14:31 ` Stefano Garzarella
2021-02-11 14:31 ` Stefano Garzarella
2021-02-07 15:19 ` [RFC PATCH v4 17/17] virtio/vsock: simplify credit update function API Arseny Krasnov
2021-02-11 14:39 ` Stefano Garzarella
2021-02-11 14:39 ` Stefano Garzarella
2021-02-07 16:20 ` [RFC PATCH v4 00/17] virtio/vsock: introduce SOCK_SEQPACKET support Michael S. Tsirkin
2021-02-07 16:20 ` Michael S. Tsirkin
2021-02-08 6:32 ` Arseny Krasnov
2021-02-11 14:57 ` Stefano Garzarella
2021-02-11 14:57 ` Stefano Garzarella
2021-02-12 6:11 ` Arseny Krasnov
2021-02-12 8:07 ` Stefano Garzarella
2021-02-12 8:07 ` 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=202102080001.eWqRZOHu-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.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.