From: Michal Luczaj <mhal@rbox.co>
To: Stefano Garzarella <sgarzare@redhat.com>, Hyunwoo Kim <v4bel@theori.io>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>, Jason Wang <jasowang@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
virtualization@lists.linux.dev, netdev@vger.kernel.org,
qwerty@theori.io
Subject: Re: [PATCH] vsock/virtio: Fix null-ptr-deref in vsock_stream_has_data
Date: Thu, 19 Dec 2024 15:36:05 +0100 [thread overview]
Message-ID: <722e8d32-fe5c-4522-be2b-5967fdbb6b30@rbox.co> (raw)
In-Reply-To: <fezrztdzj5bz54ys6qialz4w3bjqqxmhx74t2tnklbif6ns5dn@mtcjqnqbx6n4>
On 12/19/24 09:19, Stefano Garzarella wrote:
> ...
> I think the best thing though is to better understand how to handle
> deassign, rather than checking everywhere that it's not null, also
> because in some cases (like the one in virtio-vsock), it's also
> important that the transport is the same.
My vote would be to apply your virtio_transport_recv_pkt() patch *and* make
it impossible-by-design to switch ->transport from non-NULL to NULL in
vsock_assign_transport().
If I'm not mistaken, that would require rewriting vsock_assign_transport()
so that a new transport is assigned only once fully initialized, otherwise
keep the old one (still unhurt and functional) and return error. Because
failing connect() should not change anything under the hood, right?
next prev parent reply other threads:[~2024-12-19 14:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-18 12:25 [PATCH] vsock/virtio: Fix null-ptr-deref in vsock_stream_has_data Hyunwoo Kim
2024-12-18 13:40 ` Stefano Garzarella
2024-12-18 14:19 ` Hyunwoo Kim
2024-12-18 14:40 ` Stefano Garzarella
2024-12-18 15:31 ` Stefano Garzarella
2024-12-18 15:51 ` Hyunwoo Kim
2024-12-19 0:25 ` Michal Luczaj
2024-12-19 1:37 ` Hyunwoo Kim
2024-12-19 8:19 ` Stefano Garzarella
2024-12-19 14:36 ` Michal Luczaj [this message]
2024-12-19 14:48 ` Stefano Garzarella
2024-12-19 15:04 ` Michal Luczaj
2024-12-19 15:12 ` Stefano Garzarella
2024-12-19 16:09 ` Michal Luczaj
2024-12-20 10:49 ` Stefano Garzarella
2024-12-20 14:34 ` 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=722e8d32-fe5c-4522-be2b-5967fdbb6b30@rbox.co \
--to=mhal@rbox.co \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jasowang@redhat.com \
--cc=kuba@kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=qwerty@theori.io \
--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