From: David Howells <dhowells@redhat.com>
To: Max Kellermann <max.kellermann@ionos.com>
Cc: dhowells@redhat.com, Paulo Alcantara <pc@manguebit.org>,
Christian Brauner <brauner@kernel.org>,
netfs@lists.linux.dev, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v2] fs/netfs: fix reference leak
Date: Wed, 24 Sep 2025 20:12:15 +0100 [thread overview]
Message-ID: <845750.1758741135@warthog.procyon.org.uk> (raw)
In-Reply-To: <20250924185558.3395930-1-max.kellermann@ionos.com>
Max Kellermann <max.kellermann@ionos.com> wrote:
> +void netfs_put_failed_request(struct netfs_io_request *rreq)
> +{
> + /* new requests have two references (see
> + * netfs_alloc_request(), and this function is only allowed on
> + * new request objects
> + */
> + WARN_ON_ONCE(refcount_read(&rreq->ref) != 2);
> +
> + trace_netfs_rreq_ref(rreq->debug_id, 0, netfs_rreq_trace_put_failed);
> + netfs_free_request(&rreq->cleanup_work);
> +}
Can you change the 0 in trace_netfs_rreq_ref() to refcount_read(&rreq->ref)?
(Or I can do that)
David
next prev parent reply other threads:[~2025-09-24 19:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-24 18:55 [PATCH v2] fs/netfs: fix reference leak Max Kellermann
2025-09-24 19:12 ` David Howells [this message]
2025-09-25 9:32 ` David Howells
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=845750.1758741135@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=brauner@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=max.kellermann@ionos.com \
--cc=netfs@lists.linux.dev \
--cc=pc@manguebit.org \
--cc=stable@vger.kernel.org \
/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