Re: [PATCH 2/2] io_uring/msg_ring: use kmem_cache_free() to free request

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/2/24 9:17 AM, Gabriel Krisman Bertazi wrote:
> Jens Axboe <axboe@xxxxxxxxx> writes:
> 
>> The change adding caching around the request allocated and freed for
>> data messages changed a kmem_cache_free() to a kfree(), which isn't
>> correct as the request came from slab in the first place. Fix that up
>> and use the right freeing function if the cache is already at its limit.
>>
>> Fixes: 50cf5f3842af ("io_uring/msg_ring: add an alloc cache for io_kiocb entries")
>> Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
> 
> Fwiw, kfree works fine for kmem_cache_alloc objects since 6.4, when SLOB
> was removed.  Either way, it doesn't harm.

Right, it's more for consistency sake, it's not fixing a real bug.

-- 
Jens Axboe






[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux