From: Michal Luczaj <mhal@rbox.co>
To: Luigi Leonardi <leonardi@redhat.com>
Cc: "Stefano Garzarella" <sgarzare@redhat.com>,
netdev@vger.kernel.org, "Simon Horman" <horms@kernel.org>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
linux-kernel@vger.kernel.org,
"Eric Dumazet" <edumazet@google.com>,
"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
"Wongi Lee" <qwerty@theori.io>,
"David S. Miller" <davem@davemloft.net>,
"Paolo Abeni" <pabeni@redhat.com>,
"Jason Wang" <jasowang@redhat.com>,
"Bobby Eshleman" <bobby.eshleman@bytedance.com>,
virtualization@lists.linux.dev,
"Eugenio Pérez" <eperezma@redhat.com>,
bpf@vger.kernel.org, "Jakub Kicinski" <kuba@kernel.org>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Hyunwoo Kim" <v4bel@theori.io>,
kvm@vger.kernel.org
Subject: Re: [PATCH net 1/2] vsock/virtio: discard packets if the transport changes
Date: Tue, 21 Jan 2025 19:06:31 +0100 [thread overview]
Message-ID: <2bdfe259-e182-4846-b501-a33096cc74f1@rbox.co> (raw)
In-Reply-To: <blvbtr3c7uxtbspbfwrobfk7qdukz6nst2bnomoxbltst2yhkm@47k6evsdceeg>
On 1/21/25 18:30, Luigi Leonardi wrote:
> On Thu, Jan 09, 2025 at 02:34:28PM +0100, Michal Luczaj wrote:
>> FWIW, I've tried simplifying Hyunwoo's repro to toy with some tests.
>> Ended
>> up with
>>
>> ```
>>from threading import *
>>from socket import *
>>from signal import *
>>
>> def listener(tid):
>> while True:
>> s = socket(AF_VSOCK, SOCK_SEQPACKET)
>> s.bind((1, 1234))
>> s.listen()
>> pthread_kill(tid, SIGUSR1)
>>
>> signal(SIGUSR1, lambda *args: None)
>> Thread(target=listener, args=[get_ident()]).start()
>>
>> while True:
>> c = socket(AF_VSOCK, SOCK_SEQPACKET)
>> c.connect_ex((1, 1234))
>> c.connect_ex((42, 1234))
>> ```
>>
>> which gives me splats with or without this patch.
>>
>> That said, when I apply this patch, but drop the `sk->sk_state !=
>> TCP_LISTEN &&`: no more splats.
>>
> Hi Michal,
>
> I think it would be nice to have this test in the vsock test suite.
> WDYT? If you don't have any plans to port this to C, I can take care of
> it :)
Sure, go ahead, but note that this is just a (probably suboptimal) Python
version of Hyunwoo's C repro[1].
[1]: https://lore.kernel.org/netdev/Z2LvdTTQR7dBmPb5@v4bel-B760M-AORUS-ELITE-AX/
next prev parent reply other threads:[~2025-01-21 18:06 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-08 18:06 [PATCH net 0/2] vsock: some fixes due to transport de-assignment Stefano Garzarella
2025-01-08 18:06 ` [PATCH net 1/2] vsock/virtio: discard packets if the transport changes Stefano Garzarella
2025-01-08 19:31 ` Hyunwoo Kim
2025-01-09 9:01 ` Stefano Garzarella
2025-01-09 9:06 ` Michael S. Tsirkin
2025-01-09 9:13 ` Hyunwoo Kim
2025-01-09 10:59 ` Stefano Garzarella
2025-01-09 11:10 ` Hyunwoo Kim
2025-01-09 13:34 ` Michal Luczaj
2025-01-09 13:42 ` Stefano Garzarella
2025-01-09 15:27 ` Michal Luczaj
2025-01-10 8:39 ` Stefano Garzarella
2025-01-21 17:30 ` Luigi Leonardi
2025-01-21 18:06 ` Michal Luczaj [this message]
2025-01-08 18:06 ` [PATCH net 2/2] vsock/bpf: return early if transport is not assigned Stefano Garzarella
2025-01-08 19:37 ` Hyunwoo Kim
2025-01-09 9:07 ` Michael S. Tsirkin
2025-01-09 9:24 ` Luigi Leonardi
2025-01-09 13:14 ` Michal Luczaj
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=2bdfe259-e182-4846-b501-a33096cc74f1@rbox.co \
--to=mhal@rbox.co \
--cc=bobby.eshleman@bytedance.com \
--cc=bpf@vger.kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eperezma@redhat.com \
--cc=horms@kernel.org \
--cc=jasowang@redhat.com \
--cc=kuba@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=leonardi@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=qwerty@theori.io \
--cc=sgarzare@redhat.com \
--cc=stefanha@redhat.com \
--cc=v4bel@theori.io \
--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