tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: a2b4d661a5ca59dd7cf972c1cce8b98422102ab7 commit: d5ddd7080c7442f22d6b92d6fed0dacc606013d1 [2441/2441] kasan: sanitize objects when metadata doesn't fit config: arm64-randconfig-003-20241118 (https://download.01.org/0day-ci/archive/20241201/202412010032.cXm8NPEf-lkp@i...) compiler: aarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241201/202412010032.cXm8NPEf-lkp@i...)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot lkp@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202412010032.cXm8NPEf-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from mm/kasan/common.c:40: mm/kasan/kasan.h: In function 'quarantine_put':
mm/kasan/kasan.h:198:84: warning: 'return' with a value, in function returning void [-Wreturn-mismatch]
198 | static inline void quarantine_put(struct kmem_cache *cache, void *object) { return false; } | ^~~~~ mm/kasan/kasan.h:198:20: note: declared here 198 | static inline void quarantine_put(struct kmem_cache *cache, void *object) { return false; } | ^~~~~~~~~~~~~~ mm/kasan/common.c: In function '__kasan_slab_free': mm/kasan/common.c:471:16: error: void value not ignored as it ought to be 471 | return quarantine_put(cache, object); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mm/kasan/common.c:472:1: warning: control reaches end of non-void function [-Wreturn-type]
472 | } | ^ -- In file included from mm/kasan/report.c:39: mm/kasan/kasan.h: In function 'quarantine_put':
mm/kasan/kasan.h:198:84: warning: 'return' with a value, in function returning void [-Wreturn-mismatch]
198 | static inline void quarantine_put(struct kmem_cache *cache, void *object) { return false; } | ^~~~~ mm/kasan/kasan.h:198:20: note: declared here 198 | static inline void quarantine_put(struct kmem_cache *cache, void *object) { return false; } | ^~~~~~~~~~~~~~
vim +/return +198 mm/kasan/kasan.h
185 186 depot_stack_handle_t kasan_save_stack(gfp_t flags); 187 void kasan_set_track(struct kasan_track *track, gfp_t flags); 188 void kasan_set_free_info(struct kmem_cache *cache, void *object, u8 tag); 189 struct kasan_track *kasan_get_free_track(struct kmem_cache *cache, 190 void *object, u8 tag); 191 192 #if defined(CONFIG_KASAN_GENERIC) && \ 193 (defined(CONFIG_SLAB) || defined(CONFIG_SLUB)) 194 bool quarantine_put(struct kmem_cache *cache, void *object); 195 void quarantine_reduce(void); 196 void quarantine_remove_cache(struct kmem_cache *cache); 197 #else
198 static inline void quarantine_put(struct kmem_cache *cache, void *object) { return false; }
199 static inline void quarantine_reduce(void) { } 200 static inline void quarantine_remove_cache(struct kmem_cache *cache) { } 201 #endif 202