[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <845750.1758741135@warthog.procyon.org.uk>
Date: Wed, 24 Sep 2025 20:12:15 +0100
From: David Howells <dhowells@...hat.com>
To: Max Kellermann <max.kellermann@...os.com>
Cc: dhowells@...hat.com, Paulo Alcantara <pc@...guebit.org>,
Christian Brauner <brauner@...nel.org>, netfs@...ts.linux.dev,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH v2] fs/netfs: fix reference leak
Max Kellermann <max.kellermann@...os.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
Powered by blists - more mailing lists