All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Lianjie Wang" <lian@is.s.u-tokyo.ac.jp>
Cc: v9fs@lists.linux.dev
Subject: Re: [PATCH 3/5] 9p/virtio: keep a request until the device returns it
Date: Tue, 10 Nov 2026 10:53:13 +0000	[thread overview]
Message-ID: <sashiko-outbox-206902@kernel.org> (raw)
In-Reply-To: <20261109105251.2545764-4-lian@is.s.u-tokyo.ac.jp>

> When the RFLUSH of a pending request arrives, p9_virtio_cancelled()
> drops the virtio transport's reference to it. However,
> p9_virtio_zc_request() has already dropped that reference if a fatal
> signal ended its wait for room in the ring, since the request then never
> reached the device. Such a request is still flushed, so the reference is
> dropped twice. This can happen when concurrent requests fill the ring
> and a waiting process is killed:
> 
>   refcount_t: underflow; use-after-free.
>   WARNING: lib/refcount.c:37 at refcount_warn_saturate+0x84/0xd0, CPU#3: dd/293
>   Call Trace:
>    p9_req_put+0xe5/0x190
>    p9_client_zc_rpc+0x52e/0x970
>    p9_client_read_once+0x237/0x6c0
>    p9_client_read+0x9d/0x140
> [ ... ]
> This patch is assisted by Claude Opus 5.5.
> 
> Fixes: 728356dedeff ("9p: Add refcount to p9_req_t")
> Cc: stable@vger.kernel.org
> Signed-off-by: Lianjie Wang <lian@is.s.u-tokyo.ac.jp>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261109105251.2545764-1-lian@is.s.u-tokyo.ac.jp?part=3


  reply	other threads:[~2026-11-10 10:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09 10:52 [PATCH 0/5] 9p: bound zero-copy error replies and keep flushed requests until the device returns them Lianjie Wang
2026-11-09 10:52 ` [PATCH 1/5] 9p/virtio: clamp the reply size of a zero-copy request Lianjie Wang
2026-11-10 10:53   ` sashiko-bot
2026-11-12  7:53   ` netdev-bot+sashiko
2026-11-09 10:52 ` [PATCH 2/5] 9p: ignore a zero-copy reply that arrives after a fatal signal Lianjie Wang
2026-11-10 10:53   ` sashiko-bot
2026-11-12  7:53   ` netdev-bot+sashiko
2026-11-09 10:52 ` [PATCH 3/5] 9p/virtio: keep a request until the device returns it Lianjie Wang
2026-11-10 10:53   ` sashiko-bot [this message]
2026-11-12  7:53   ` netdev-bot+sashiko
2026-11-09 10:52 ` [PATCH 4/5] 9p: take the tag of a flushed request from the request Lianjie Wang
2026-11-10 10:53   ` sashiko-bot
2026-11-09 10:52 ` [PATCH 5/5] 9p/virtio: keep zero-copy buffers until the device returns them Lianjie Wang
2026-11-10 10:53   ` sashiko-bot
2026-11-12  7:53   ` netdev-bot+sashiko

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=sashiko-outbox-206902@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=lian@is.s.u-tokyo.ac.jp \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=v9fs@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.