mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Konstantin Shkolnyy <kshk@linux.ibm.com>
To: Stefano Garzarella <sgarzare@redhat.com>
Cc: mhal@rbox.co, virtualization@lists.linux.dev,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	v4bel@theori.io, leonardi@redhat.com
Subject: Re: [PATCH net-next v4] vsock/test: Add test for null ptr deref when transport changes
Date: Wed, 9 Jul 2025 14:03:02 -0500	[thread overview]
Message-ID: <1915e11f-9513-4d9a-a46a-3f97ac152a3b@linux.ibm.com> (raw)
In-Reply-To: <CAGxU2F4GbeCJDYrs8Usd8JJcTrp99gyn3c_zXqpnz+UH2NNBGw@mail.gmail.com>

On 09-Jul-25 10:41, Stefano Garzarella wrote:
> On Wed, 9 Jul 2025 at 17:26, Stefano Garzarella <sgarzare@redhat.com> wrote:
>>
>> On Wed, 9 Jul 2025 at 16:54, Konstantin Shkolnyy <kshk@linux.ibm.com> wrote:
>>>
>>> I'm seeing a problem on s390 with the new "SOCK_STREAM transport change
>>> null-ptr-deref" test. Here is how it appears to happen:
>>>
>>> test_stream_transport_change_client() spins for 2s and sends 70K+
>>> CONTROL_CONTINUE messages to the "control" socket.
>>>
>>> test_stream_transport_change_server() spins calling accept() because it
>>> keeps receiving CONTROL_CONTINUE.
>>>
>>> When the client exits, the server has received just under 1K of those
>>> 70K CONTROL_CONTINUE, so it calls accept() again but the client has
>>> exited, so accept() never returns and the server never exits.
> 
> Just to be clear, I was seeing something a bit different.
> The accept() in the server is no-blocking, since we set O_NONBLOCK on
> the socket, so I see the server looping around a failing accept()
> (errno == EAGAIN) while dequeueing the CONTROL_CONTINUE messages, so
> after 10/15 seconds the server ends on my case.
> 
> It seems strange that in your case it blocks, since it should be a
> no-blocking call.

It was my mistake. The accept() doesn't block. I've retested it more 
carefully and it keeps returning and the loop eventually consumes all 
queued CONTROL_CONTINUE messages and quits, as you described.


  reply	other threads:[~2025-07-09 19:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-09 14:54 Konstantin Shkolnyy
2025-07-09 14:57 ` Luigi Leonardi
2025-07-09 16:45   ` Konstantin Shkolnyy
2025-07-09 15:26 ` Stefano Garzarella
2025-07-09 15:41   ` Stefano Garzarella
2025-07-09 19:03     ` Konstantin Shkolnyy [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-06-24 15:40 Luigi Leonardi
2025-06-25  8:26 ` Stefano Garzarella
2025-06-30  9:24   ` Luigi Leonardi

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=1915e11f-9513-4d9a-a46a-3f97ac152a3b@linux.ibm.com \
    --to=kshk@linux.ibm.com \
    --cc=leonardi@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhal@rbox.co \
    --cc=netdev@vger.kernel.org \
    --cc=sgarzare@redhat.com \
    --cc=v4bel@theori.io \
    --cc=virtualization@lists.linux.dev \
    /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

all inboxes | Powered by JetHome®