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>
{
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
{
struct io_async_rw *rw = (struct io_async_rw *) entry;
-#if !defined(CONFIG_KASAN)
if (rw->free_iovec)
io_rw_iovec_free(rw);
-#endif
kfree(rw);
}