Re: [PATCH] ceph: fix cap ref leak via netfs init_request
From: David Howells
Date: Fri Oct 04 2024 - 11:46:01 EST
Ilya Dryomov <idryomov@xxxxxxxxx> wrote:
> The actual problem is that netfs_alloc_request() just frees rreq if
> init_request() callout fails and ceph_netfs_free_request() is never
> called, right?
I could make it call ->free_request() in the case that ->init_request()
returns an error, though I'd prefer that the cleanup be done in
->init_request() rather than passing a partially set-up state to
->free_request().
David