From: sashiko-bot@kernel.org
To: "Daehyeon Ko" <4ncienth@gmail.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
"Eugenio Perez" <eperezma@redhat.com>,
virtualization@lists.linux.dev, kvm@vger.kernel.org,
bpf@vger.kernel.org
Subject: Re: [PATCH net] vsock: account only unread bytes in read_skb()
Date: Thu, 01 Oct 2026 12:26:40 +0000 [thread overview]
Message-ID: <20261001122640.9E2361F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20261001121541.2983379-1-4ncienth@gmail.com>
> After a partial stream receive, rx_bytes tracks the unread suffix while
> buf_used and peer credit still cover the whole packet.
> virtio_transport_read_skb() dequeues that packet but passes pkt_len for
> both counters, underflowing rx_bytes.
>
> On a connected CID_LOCAL stream with an SK_SKB verdict, a 40-byte read
> from a 100-byte packet made SIOCINQ report -40, an empty recv return
> ELOOP, and poll report the empty socket readable. After verdict detach,
> receiving 40 bytes wrapped the counter to zero and hid those queued bytes
> until one more byte arrived. The fixed run kept the counter balanced
> and exposed all queued data immediately.
>
> Subtract only skb->len minus the VSOCK offset from rx_bytes. Retain the
> full packet length for buf_used and peer credit.
>
> Fixes: 45ca7e9f0730 ("vsock/virtio: fix `rx_bytes` accounting for stream sockets")
> Cc: stable@vger.kernel.org
> Assisted-by: LLM
> Signed-off-by: Daehyeon Ko <4ncienth@gmail.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261001121541.2983379-1-4ncienth@gmail.com?part=1
next prev parent reply other threads:[~2026-10-01 12:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 12:15 [PATCH net] vsock: account only unread bytes in read_skb() Daehyeon Ko
2026-10-01 12:19 ` netdev-bot+sinfo
2026-10-01 14:32 ` Daehyeon Ko
2026-10-01 12:26 ` sashiko-bot [this message]
2026-10-01 13:42 ` 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=20261001122640.9E2361F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=4ncienth@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=eperezma@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=sashiko-reviews@lists.linux.dev \
--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