| .. | .. |
|---|
| 507 | 507 | if (rdp->rcu_forced_tick_exp) |
|---|
| 508 | 508 | continue; |
|---|
| 509 | 509 | rdp->rcu_forced_tick_exp = true; |
|---|
| 510 | | - tick_dep_set_cpu(cpu, TICK_DEP_BIT_RCU_EXP); |
|---|
| 510 | + preempt_disable(); |
|---|
| 511 | + if (cpu_online(cpu)) |
|---|
| 512 | + tick_dep_set_cpu(cpu, TICK_DEP_BIT_RCU_EXP); |
|---|
| 513 | + preempt_enable(); |
|---|
| 511 | 514 | } |
|---|
| 512 | 515 | } |
|---|
| 513 | 516 | j = READ_ONCE(jiffies_till_first_fqs); |
|---|
| .. | .. |
|---|
| 565 | 568 | mask = leaf_node_cpu_bit(rnp, cpu); |
|---|
| 566 | 569 | if (!(READ_ONCE(rnp->expmask) & mask)) |
|---|
| 567 | 570 | continue; |
|---|
| 571 | + preempt_disable(); // For smp_processor_id() in dump_cpu_task(). |
|---|
| 568 | 572 | dump_cpu_task(cpu); |
|---|
| 573 | + preempt_enable(); |
|---|
| 569 | 574 | } |
|---|
| 570 | 575 | } |
|---|
| 571 | 576 | jiffies_stall = 3 * rcu_jiffies_till_stall_check() + 3; |
|---|
| .. | .. |
|---|
| 706 | 711 | int ndetected = 0; |
|---|
| 707 | 712 | struct task_struct *t; |
|---|
| 708 | 713 | |
|---|
| 709 | | - if (!READ_ONCE(rnp->exp_tasks)) |
|---|
| 710 | | - return 0; |
|---|
| 711 | 714 | raw_spin_lock_irqsave_rcu_node(rnp, flags); |
|---|
| 715 | + if (!rnp->exp_tasks) { |
|---|
| 716 | + raw_spin_unlock_irqrestore_rcu_node(rnp, flags); |
|---|
| 717 | + return 0; |
|---|
| 718 | + } |
|---|
| 712 | 719 | t = list_entry(rnp->exp_tasks->prev, |
|---|
| 713 | 720 | struct task_struct, rcu_node_entry); |
|---|
| 714 | 721 | list_for_each_entry_continue(t, &rnp->blkd_tasks, rcu_node_entry) { |
|---|