Re: [PATCH RT] mm/slub: close possible memory-leak in kmem_cache_alloc_bulk()

From: Sebastian Andrzej Siewior
Date: Wed Dec 13 2017 - 09:50:52 EST


On 2017-12-13 15:46:54 [+0100], Jesper Dangaard Brouer wrote:
> > Jesper: There are no users of kmem_cache_alloc_bulk() and kfree_bulk().
> > Only kmem_cache_free_bulk() is used since it was introduced. Do you
> > think that it would make sense to remove those?
>
> I would like to keep them.
>
> Rao Shoaib (Cc'ed) is/was working on a patchset for RCU-bulk-free that
> used the kfree_bulk() API.
>
> I plan to use kmem_cache_alloc_bulk() in the bpf-map "cpumap", for bulk
> allocating SKBs during dequeue of XDP frames. (My original bulk alloc
> SKBs use-case during NAPI/softirq was never merged).

I see. So it may gain users in future you say.

> I've not seen free_delayed() before... and my cscope cannot find it...
It is PREEMPT RT only, mainline is not affected (that is why there is a
RT next to the PATCH in subject).

Sebastian