From: kernel test robot <lkp@intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
x86@kernel.org, Petr Mladek <pmladek@suse.com>
Subject: [tip:sched/core 41/47] kernel/livepatch/transition.c:419: undefined reference to `wake_up_if_idle'
Date: Wed, 13 Oct 2021 00:47:20 +0800 [thread overview]
Message-ID: <202110130013.rBTpvFo8-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4219 bytes --]
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
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35589 bytes --]
reply other threads:[~2021-10-12 16:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202110130013.rBTpvFo8-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®