From: Jens Axboe <[email protected]>
To: Gabriel Krisman Bertazi <[email protected]>
Cc: [email protected], [email protected]
Subject: Re: [PATCH 2/2] io_uring/msg_ring: use kmem_cache_free() to free request
Date: Tue, 2 Jul 2024 09:18:36 -0600 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On 7/2/24 9:17 AM, Gabriel Krisman Bertazi wrote:
> Jens Axboe <[email protected]> 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 <[email protected]>
>
> 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
prev parent reply other threads:[~2024-07-02 15:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-01 14:47 [PATCHSET for-next 0/2] msg_ring fixes Jens Axboe
2024-07-01 14:47 ` [PATCH 1/2] io_uring/msg_ring: check for dead submitter task Jens Axboe
2024-07-01 14:48 ` [PATCH 2/2] io_uring/msg_ring: use kmem_cache_free() to free request Jens Axboe
2024-07-02 15:17 ` Gabriel Krisman Bertazi
2024-07-02 15:18 ` Jens Axboe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox