linux-stable/include
Frederic Weisbecker 43789ef3f7 rcu/nocb: Perform deferred wake up before last idle's need_resched() check
Entering RCU idle mode may cause a deferred wake up of an RCU NOCB_GP
kthread (rcuog) to be serviced.

Usually a local wake up happening while running the idle task is handled
in one of the need_resched() checks carefully placed within the idle
loop that can break to the scheduler.

Unfortunately the call to rcu_idle_enter() is already beyond the last
generic need_resched() check and we may halt the CPU with a resched
request unhandled, leaving the task hanging.

Fix this with splitting the rcuog wakeup handling from rcu_idle_enter()
and place it before the last generic need_resched() check in the idle
loop. It is then assumed that no call to call_rcu() will be performed
after that in the idle loop until the CPU is put in low power mode.

Fixes: 96d3fd0d31 (rcu: Break call_rcu() deadlock involving scheduler and perf)
Reported-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20210131230548.32970-3-frederic@kernel.org
2021-02-17 14:12:43 +01:00
..
acpi More power management updates for 5.11-rc1 2020-12-22 14:12:10 -08:00
asm-generic static_call: Allow module use without exposing static_call_key 2021-02-17 14:12:42 +01:00
clocksource
crypto
drm drm/dp/mst: Export drm_dp_get_vc_payload_bw() 2021-02-02 17:31:37 +02:00
dt-bindings ASoC: dt-bindings: lpass: Fix and common up lpass dai ids 2021-01-20 16:46:44 +00:00
keys
kunit
kvm KVM: arm64: Replace KVM_ARM_PMU with HW_PERF_EVENTS 2021-01-04 16:50:16 +00:00
linux rcu/nocb: Perform deferred wake up before last idle's need_resched() check 2021-02-17 14:12:43 +01:00
math-emu
media media: v4l: common: Fix naming of v4l2_get_link_rate 2021-01-07 15:47:52 +01:00
memory
misc
net switchdev: mrp: Remove SWITCHDEV_ATTR_ID_MRP_PORT_STAT 2021-02-08 16:20:57 -08:00
pcmcia
ras
rdma RDMA 5.11 pull request 2020-12-16 13:42:26 -08:00
scsi SCSI misc on 20201216 2020-12-16 13:34:31 -08:00
soc net: dsa: felix: implement port flushing on .phylink_mac_link_down 2021-02-09 11:41:11 -08:00
sound ALSA: pcm: One more dependency for hw constraints 2021-01-23 16:59:24 +01:00
target
trace for-linus-2021-01-24 2021-01-24 09:35:28 -08:00
uapi - For syscall user dispatch, separate ptctl operation from syscall 2021-02-07 10:16:24 -08:00
vdso
video
xen arm/xen: Don't probe xenbus as part of an early initcall 2021-02-11 07:49:37 +01:00