[PATCH v3 10/18] nvmet-fcloop: allocate/free fcloop_lsreq directly
Daniel Wagner
dwagner at suse.de
Tue Apr 8 04:20:01 PDT 2025
On Tue, Mar 18, 2025 at 02:58:35PM +0100, Daniel Wagner wrote:
> On Tue, Mar 18, 2025 at 12:17:11PM +0100, Hannes Reinecke wrote:
> > > + tls_req = kmalloc(sizeof(*tls_req), GFP_KERNEL);
> > > + if (!tls_req)
> > > + return -ENOMEM;
> >
> > This cries out for kmem_cache_alloc() ...
>
> Okay, will switch to this API. FWIW, in the same call path there are
> more kmallocs.
This change send me down yet another rabbit hole because when
deallocatin the cache, it reported a leak caused by a list_add_tail(x,
y) vs list_add_tail(y,x) bug which I missed the last time...
More information about the Linux-nvme
mailing list