[openeuler:openEuler-1.0-LTS 1756/1756] mm/kmemleak.c:430:4: error: implicit declaration of function 'printk_safe_enter'

tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 8723dc57de6371f9cc8764e15d4cc9e57ae592ee commit: 38f093f2876aaa0dd46e11d638e8d2a263f38199 [1756/1756] mm: Fix possible deadlock in console_trylock_spinning config: x86_64-buildonly-randconfig-001-20250812 (https://download.01.org/0day-ci/archive/20250813/202508130114.zosJW1Sg-lkp@i...) compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250813/202508130114.zosJW1Sg-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/202508130114.zosJW1Sg-lkp@intel.com/ All errors (new ones prefixed by >>):
mm/kmemleak.c:430:4: error: implicit declaration of function 'printk_safe_enter' [-Werror,-Wimplicit-function-declaration] 430 | printk_safe_enter(); | ^ mm/kmemleak.c:430:4: note: did you mean 'printk_nmi_enter'? include/linux/printk.h:154:20: note: 'printk_nmi_enter' declared here 154 | static inline void printk_nmi_enter(void) { } | ^ mm/kmemleak.c:434:4: error: implicit declaration of function 'printk_safe_exit' [-Werror,-Wimplicit-function-declaration] 434 | printk_safe_exit(); | ^ 2 errors generated.
vim +/printk_safe_enter +430 mm/kmemleak.c 405 406 /* 407 * Look-up a memory block metadata (kmemleak_object) in the object search 408 * tree based on a pointer value. If alias is 0, only values pointing to the 409 * beginning of the memory block are allowed. The kmemleak_lock must be held 410 * when calling this function. 411 */ 412 static struct kmemleak_object *lookup_object(unsigned long ptr, int alias) 413 { 414 struct rb_node *rb = object_tree_root.rb_node; 415 416 while (rb) { 417 struct kmemleak_object *object = 418 rb_entry(rb, struct kmemleak_object, rb_node); 419 if (ptr < object->pointer) 420 rb = object->rb_node.rb_left; 421 else if (object->pointer + object->size <= ptr) 422 rb = object->rb_node.rb_right; 423 else if (object->pointer == ptr || alias) 424 return object; 425 else { 426 /* 427 * Printk deferring due to the kmemleak_lock held. 428 * This is done to avoid deadlock. 429 */
430 printk_safe_enter(); 431 kmemleak_warn("Found object by alias at 0x%08lx\n", 432 ptr); 433 dump_object_info(object); 434 printk_safe_exit(); 435 436 break; 437 } 438 } 439 return NULL; 440 } 441
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot