Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

io_uring: dont ifdef io_alloc_cache_kasan()

Use IS_ENABLED in io_alloc_cache_kasan() so at least it gets compile
tested without KASAN.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de>
Link: https://lore.kernel.org/r/35e53e83f6e16478dca0028a64a6cc905dc764d3.1738087204.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Pavel Begunkov and committed by
Jens Axboe
16ac51a0 29927650

+5 -9
+5 -9
io_uring/alloc_cache.h
··· 8 8 */ 9 9 #define IO_ALLOC_CACHE_MAX 128 10 10 11 - #if defined(CONFIG_KASAN) 12 11 static inline void io_alloc_cache_kasan(struct iovec **iov, int *nr) 13 12 { 14 - kfree(*iov); 15 - *iov = NULL; 16 - *nr = 0; 13 + if (IS_ENABLED(CONFIG_KASAN)) { 14 + kfree(*iov); 15 + *iov = NULL; 16 + *nr = 0; 17 + } 17 18 } 18 - #else 19 - static inline void io_alloc_cache_kasan(struct iovec **iov, int *nr) 20 - { 21 - } 22 - #endif 23 19 24 20 static inline bool io_alloc_cache_put(struct io_alloc_cache *cache, 25 21 void *entry)