Skip to content

Commit

Permalink
[REVERTME] comment out pr_info() that causes lockdep error
Browse files Browse the repository at this point in the history
Without this patch, lockdep complains as follows and disable it.
 =============================
 [ BUG: Invalid wait context ]
 5.18.0-rc1 torvalds#171 Not tainted
 -----------------------------
 swapper/0/1 is trying to lock:
 ffffffff978f7978 (&port_lock_key){....}-{3:3}, at: serial8250_console_write+0x557/0x610
 other info that might help us debug this:
 context-{5:5}
 3 locks held by swapper/0/1:
  #0: ffffffff95a9ab48 (rcu_tasks.cbs_gbl_lock){....}-{2:2}, at: cblist_init_generic+0x29/0x310
  #1: ffffffff95a86d60 (console_lock){+.+.}-{0:0}, at: vprintk_emit+0x153/0x200
  #2: ffffffff959a66c0 (console_owner){....}-{0:0}, at: console_unlock+0x27a/0x620
 stack backtrace:
 CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.18.0-rc1-yamahata-kvm-upstream+ torvalds#171 eb656e2c6a2533f980e80fcf0fe9314dd3ea2a22
 Hardware name: Intel Corporation EAGLESTREAM/EAGLESTREAM, BIOS EGSDCRB1.SYS.0066.D24.2110072326 10/07/2021
 Call Trace:
  <TASK>
  show_stack+0x52/0x58
  dump_stack_lvl+0x5b/0x82
  dump_stack+0x10/0x12
  check_wait_context.cold+0xc0/0xfe
  __lock_acquire+0x222/0x990
  lock_acquire.part.0+0x126/0x2f0
  ? serial8250_console_write+0x557/0x610
  ? rcu_read_unlock+0x50/0x50
  ? check_prev_add+0x1270/0x1270
  ? __this_cpu_preempt_check+0x13/0x20
  lock_acquire+0x8f/0x180
  ? serial8250_console_write+0x557/0x610
  _raw_spin_lock_irqsave+0x43/0x60
  ? serial8250_console_write+0x557/0x610
  serial8250_console_write+0x557/0x610
  ? serial8250_config_port+0x210/0x210
  ? rcu_read_unlock+0x50/0x50
  ? __lock_release+0x14d/0x2d0
  ? record_print_text+0x206/0x260
  ? console_unlock+0x2a5/0x620
  ? __this_cpu_preempt_check+0x13/0x20
  univ8250_console_write+0x4b/0x60
  call_console_drivers.constprop.0+0x180/0x250
  console_unlock+0x2d0/0x620
  ? console_unlock+0x27a/0x620
  ? devkmsg_read+0x420/0x420
  ? __down_trylock_console_sem+0x7c/0xc0
  ? vprintk_emit+0x153/0x200
  vprintk_emit+0x1a4/0x200
  vprintk_default+0x1d/0x20
  vprintk+0x4e/0x60
  _printk+0xb2/0xe3
  ? record_print_text.cold+0x11/0x11
  ? rwlock_bug.part.0+0x60/0x60
  ? lock_acquire+0x8f/0x180
  ? cblist_init_generic+0x29/0x310
  ? do_raw_spin_lock+0x11e/0x1b0
  ? do_raw_spin_lock+0x109/0x1b0
  cblist_init_generic.cold+0x44/0x52
  rcu_init_tasks_generic+0x15/0x164
  kernel_init_freeable+0x103/0x1ba
  ? rest_init+0x340/0x340
  kernel_init+0x1f/0x170
  ? rest_init+0x340/0x340
  ret_from_fork+0x1f/0x30
  </TASK>

Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
  • Loading branch information
yamahata committed Feb 9, 2023
1 parent 1ab63b1 commit ebe5355
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/rcu/tasks.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ static void cblist_init_generic(struct rcu_tasks *rtp)
if (rcu_task_enqueue_lim < 0) {
rcu_task_enqueue_lim = 1;
rcu_task_cb_adjust = true;
pr_info("%s: Setting adjustable number of callback queues.\n", __func__);
//pr_info("%s: Setting adjustable number of callback queues.\n", __func__);
} else if (rcu_task_enqueue_lim == 0) {
rcu_task_enqueue_lim = 1;
}
Expand Down Expand Up @@ -264,7 +264,7 @@ static void cblist_init_generic(struct rcu_tasks *rtp)
raw_spin_unlock_rcu_node(rtpcp); // irqs remain disabled.
}
raw_spin_unlock_irqrestore(&rtp->cbs_gbl_lock, flags);
pr_info("%s: Setting shift to %d and lim to %d.\n", __func__, data_race(rtp->percpu_enqueue_shift), data_race(rtp->percpu_enqueue_lim));
//pr_info("%s: Setting shift to %d and lim to %d.\n", __func__, data_race(rtp->percpu_enqueue_shift), data_race(rtp->percpu_enqueue_lim));
}

// IRQ-work handler that does deferred wakeup for call_rcu_tasks_generic().
Expand Down

0 comments on commit ebe5355

Please sign in to comment.