Messages in this thread | | | Date | Wed, 13 Oct 2021 00:47:20 +0800 | From | kernel test robot <> | Subject | [tip:sched/core 41/47] kernel/livepatch/transition.c:419: undefined reference to `wake_up_if_idle' |
| |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/core head: b2d5b9cec60fecc72a13191c2c6c05acf60975a5 commit: 2aa45be430a031c10d5f4a5bf3329ff8413a9187 [41/47] sched,livepatch: Use wake_up_if_idle() config: x86_64-randconfig-a004-20211012 (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=1 build): # https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=2aa45be430a031c10d5f4a5bf3329ff8413a9187 git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git git fetch --no-tags tip sched/core git checkout 2aa45be430a031c10d5f4a5bf3329ff8413a9187 # save the attached .config to linux build tree mkdir build_dir make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
ld: kernel/livepatch/transition.o: in function `klp_try_complete_transition': >> kernel/livepatch/transition.c:419: undefined reference to `wake_up_if_idle'
vim +419 kernel/livepatch/transition.c
376 377 /* 378 * Try to switch all remaining tasks to the target patch state by walking the 379 * stacks of sleeping tasks and looking for any to-be-patched or 380 * to-be-unpatched functions. If such functions are found, the task can't be 381 * switched yet. 382 * 383 * If any tasks are still stuck in the initial patch state, schedule a retry. 384 */ 385 void klp_try_complete_transition(void) 386 { 387 unsigned int cpu; 388 struct task_struct *g, *task; 389 struct klp_patch *patch; 390 bool complete = true; 391 392 WARN_ON_ONCE(klp_target_state == KLP_UNDEFINED); 393 394 /* 395 * Try to switch the tasks to the target patch state by walking their 396 * stacks and looking for any to-be-patched or to-be-unpatched 397 * functions. If such functions are found on a stack, or if the stack 398 * is deemed unreliable, the task can't be switched yet. 399 * 400 * Usually this will transition most (or all) of the tasks on a system 401 * unless the patch includes changes to a very common function. 402 */ 403 read_lock(&tasklist_lock); 404 for_each_process_thread(g, task) 405 if (!klp_try_switch_task(task)) 406 complete = false; 407 read_unlock(&tasklist_lock); 408 409 /* 410 * Ditto for the idle "swapper" tasks. 411 */ 412 cpus_read_lock(); 413 for_each_possible_cpu(cpu) { 414 task = idle_task(cpu); 415 if (cpu_online(cpu)) { 416 if (!klp_try_switch_task(task)) { 417 complete = false; 418 /* Make idle task go through the main loop. */ > 419 wake_up_if_idle(cpu); 420 } 421 } else if (task->patch_state != klp_target_state) { 422 /* offline idle tasks can be switched immediately */ 423 clear_tsk_thread_flag(task, TIF_PATCH_PENDING); 424 task->patch_state = klp_target_state; 425 } 426 } 427 cpus_read_unlock(); 428 429 if (!complete) { 430 if (klp_signals_cnt && !(klp_signals_cnt % SIGNALS_TIMEOUT)) 431 klp_send_signals(); 432 klp_signals_cnt++; 433 434 /* 435 * Some tasks weren't able to be switched over. Try again 436 * later and/or wait for other methods like kernel exit 437 * switching. 438 */ 439 schedule_delayed_work(&klp_transition_work, 440 round_jiffies_relative(HZ)); 441 return; 442 } 443 444 /* we're done, now cleanup the data structures */ 445 patch = klp_transition_patch; 446 klp_complete_transition(); 447 448 /* 449 * It would make more sense to free the unused patches in 450 * klp_complete_transition() but it is called also 451 * from klp_cancel_transition(). 452 */ 453 if (!patch->enabled) 454 klp_free_patch_async(patch); 455 else if (patch->replace) 456 klp_free_replaced_patches_async(patch); 457 } 458
--- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [unhandled content-type:application/gzip] | |