diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2025-01-28 20:56:15 +0000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2025-01-28 15:10:40 -0700 |
commit | 0d124578fed92cadeaca47d734da782beacdc1a7 (patch) | |
tree | a9cf788d7f4f2362e9e291be9226c48eb4690111 /io_uring/net.c | |
parent | 86e62354eef16993834be5bd218d38ec96c47f16 (diff) |
io_uring: remove !KASAN guards from cache free
Test setups (with KASAN) will avoid !KASAN sections, and so it's not
testing paths that would be exercised otherwise. That's bad as to be
sure that your code works you now have to specifically test both KASAN
and !KASAN configs.
Remove !CONFIG_KASAN guards from io_netmsg_cache_free() and
io_rw_cache_free(). The free functions should always be getting valid
entries, and even though for KASAN iovecs should already be cleared,
that's better than skipping the chunks completely.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de>
Link: https://lore.kernel.org/r/d6078a51c7137a243f9d00849bc3daa660873209.1738087204.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/net.c')
-rw-r--r-- | io_uring/net.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/io_uring/net.c b/io_uring/net.c index 4d21f7bd2149..d89c39f853e3 100644 --- a/io_uring/net.c +++ b/io_uring/net.c @@ -1813,10 +1813,8 @@ void io_netmsg_cache_free(const void *entry) { struct io_async_msghdr *kmsg = (struct io_async_msghdr *) entry; -#if !defined(CONFIG_KASAN) if (kmsg->free_iov) io_netmsg_iovec_free(kmsg); -#endif kfree(kmsg); } #endif |