From: David Howells <dhowells@redhat.com>
To: Christian Brauner <brauner@kernel.org>
Cc: dhowells@redhat.com, Max Kellermann <max.kellermann@ionos.com>,
Paulo Alcantara <pc@manguebit.org>,
netfs@lists.linux.dev, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v3] netfs: fix reference leak
Date: Thu, 25 Sep 2025 14:06:01 +0100 [thread overview]
Message-ID: <936354.1758805561@warthog.procyon.org.uk> (raw)
In-Reply-To: <928357.1758793097@warthog.procyon.org.uk>
David Howells <dhowells@redhat.com> wrote:
> +/*
> + * Free a request (synchronously) that was just allocated but has
> + * failed before it could be submitted.
> + */
> +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);
> +}
> +
Sigh. I forgot to commit my changes. Will repost.
David
next prev parent reply other threads:[~2025-09-25 13:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-25 9:38 [PATCH v3] netfs: fix reference leak David Howells
2025-09-25 13:06 ` David Howells [this message]
2025-09-25 13:08 ` [PATCH v3 REPOST] " David Howells
2025-09-26 8:14 ` Christian Brauner
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=936354.1758805561@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