Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1533779
| From | Jason Wang <jasowang@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH net] vhost_net: don't continue to call the recvmsg when meet errors |
| Date | 2016-12-01 04:40 +0100 |
| Message-ID | <sJqo1-6L9-5@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <sJdqO-6Jj-17@gated-at.bofh.it> <sJpBE-6at-1@gated-at.bofh.it> <sJqel-6I9-3@gated-at.bofh.it> <sJqel-6I9-7@gated-at.bofh.it> <sJqo1-6L9-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 2016年12月01日 11:27, Michael S. Tsirkin wrote:
> On Thu, Dec 01, 2016 at 11:26:21AM +0800, Jason Wang wrote:
>> >
>> >
>> >On 2016年12月01日 11:21, Michael S. Tsirkin wrote:
>>> > >On Thu, Dec 01, 2016 at 02:48:59AM +0000, wangyunjian wrote:
>>>>> > > > >-----Original Message-----
>>>>> > > > >From: Michael S. Tsirkin [mailto:mst@redhat.com]
>>>>> > > > >Sent: Wednesday, November 30, 2016 9:41 PM
>>>>> > > > >To: wangyunjian
>>>>> > > > >Cc:jasowang@redhat.com;netdev@vger.kernel.org;linux-kernel@vger.kernel.org; caihe
>>>>> > > > >Subject: Re: [PATCH net] vhost_net: don't continue to call the recvmsg when meet errors
>>>>> > > > >
>>>>> > > > >On Wed, Nov 30, 2016 at 08:10:57PM +0800, Yunjian Wang wrote:
>>>>>> > > > > >When we meet an error(err=-EBADFD) recvmsg,
>>>>> > > > >How do you get EBADFD? Won't vhost_net_rx_peek_head_len
>>>>> > > > >return 0 in this case, breaking the loop?
>>>> > > >We started many guest VMs while attaching/detaching some virtio-net nics for loop.
>>>> > > >The soft lockup might happened. The err is -EBADFD.
>>>> > > >
>>> > >OK, I'd like to figure out what happened here. why don't
>>> > >we get 0 when we peek at the head?
>>> > >
>>> > >EBADFD is from here:
>>> > > struct tun_struct *tun = __tun_get(tfile);
>>> > >...
>>> > > if (!tun)
>>> > > return -EBADFD;
>>> > >
>>> > >but then:
>>> > >static int tun_peek_len(struct socket *sock)
>>> > >{
>>> > >
>>> > >...
>>> > >
>>> > > struct tun_struct *tun;
>>> > >...
>>> > > tun = __tun_get(tfile);
>>> > > if (!tun)
>>> > > return 0;
>>> > >
>>> > >
>>> > >so peek len should return 0.
>>> > >
>>> > >then while will exit:
>>> > > while ((sock_len = vhost_net_rx_peek_head_len(net, sock->sk)))
>>> > >...
>>> > >
>> >
>> >Consider this case: user do ip link del link tap0 before recvmsg() but after
>> >tun_peek_len() ?
> Sure, this can happen, but I think we'll just exit on the next loop,
> won't we?
>
Right, this is the only case I can image for -EBADFD, let's wait for the
author to the steps.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH net] vhost_net: don't continue to call the recvmsg when meet errors Yunjian Wang <wangyunjian@huawei.com> - 2016-11-30 13:20 +0100
Re: [PATCH net] vhost_net: don't continue to call the recvmsg when meet errors Jason Wang <jasowang@redhat.com> - 2016-11-30 14:10 +0100
Re: [PATCH net] vhost_net: don't continue to call the recvmsg when meet errors "Michael S. Tsirkin" <mst@redhat.com> - 2016-11-30 14:50 +0100
Re: [PATCH net] vhost_net: don't continue to call the recvmsg when meet errors "Michael S. Tsirkin" <mst@redhat.com> - 2016-11-30 14:50 +0100
RE: [PATCH net] vhost_net: don't continue to call the recvmsg when meet errors wangyunjian <wangyunjian@huawei.com> - 2016-12-01 03:50 +0100
Re: [PATCH net] vhost_net: don't continue to call the recvmsg when meet errors Jason Wang <jasowang@redhat.com> - 2016-12-01 04:20 +0100
Re: [PATCH net] vhost_net: don't continue to call the recvmsg when meet errors "Michael S. Tsirkin" <mst@redhat.com> - 2016-12-01 04:30 +0100
Re: [PATCH net] vhost_net: don't continue to call the recvmsg when meet errors Jason Wang <jasowang@redhat.com> - 2016-12-01 04:30 +0100
Re: [PATCH net] vhost_net: don't continue to call the recvmsg when meet errors Jason Wang <jasowang@redhat.com> - 2016-12-01 04:40 +0100
RE: [PATCH net] vhost_net: don't continue to call the recvmsg when meet errors wangyunjian <wangyunjian@huawei.com> - 2016-12-01 05:50 +0100
Re: [PATCH net] vhost_net: don't continue to call the recvmsg when meet errors "Michael S. Tsirkin" <mst@redhat.com> - 2016-12-01 06:00 +0100
Re: [PATCH net] vhost_net: don't continue to call the recvmsg when meet errors "Michael S. Tsirkin" <mst@redhat.com> - 2016-12-01 04:40 +0100
Re: [PATCH net] vhost_net: don't continue to call the recvmsg when meet errors Jason Wang <jasowang@redhat.com> - 2016-12-01 04:20 +0100
csiph-web