Skip to content

Commit 1246c2f

Browse files
yamahatafidencio
authored andcommitted
comment out pr_info() that causes lockdep error
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 <[email protected]>
1 parent 30cf6f8 commit 1246c2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/rcu/tasks.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ static void cblist_init_generic(struct rcu_tasks *rtp)
227227
if (rcu_task_enqueue_lim < 0) {
228228
rcu_task_enqueue_lim = 1;
229229
rcu_task_cb_adjust = true;
230-
pr_info("%s: Setting adjustable number of callback queues.\n", __func__);
230+
//pr_info("%s: Setting adjustable number of callback queues.\n", __func__);
231231
} else if (rcu_task_enqueue_lim == 0) {
232232
rcu_task_enqueue_lim = 1;
233233
}
@@ -256,7 +256,7 @@ static void cblist_init_generic(struct rcu_tasks *rtp)
256256
raw_spin_unlock_rcu_node(rtpcp); // irqs remain disabled.
257257
}
258258
raw_spin_unlock_irqrestore(&rtp->cbs_gbl_lock, flags);
259-
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));
259+
//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));
260260
}
261261

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

0 commit comments

Comments
 (0)