summaryrefslogtreecommitdiff
path: root/scripts/lib/kdoc/kdoc_output.py
diff options
context:
space:
mode:
authorFrederic Weisbecker <frederic@kernel.org>2025-04-29 12:08:40 +0200
committerNeeraj Upadhyay (AMD) <neeraj.upadhyay@kernel.org>2025-06-25 08:37:17 +0530
commit3dfdfaff2d49aa7895ced8a54e7d61755eac6830 (patch)
treecf8c8349098da318de15a672416487794b2bfc2f /scripts/lib/kdoc/kdoc_output.py
parent86731a2a651e58953fc949573895f2fa6d456841 (diff)
rcu: Robustify rcu_is_cpu_rrupt_from_idle()
RCU relies on the context tracking nesting counter in order to determine if it is running in extended quiescent state. However the context tracking nesting counter is not completely synchronized with the actual context tracking state: * The nesting counter is set to 1 or incremented further _after_ the actual state is set to RCU watching. * The nesting counter is set to 0 or decremented further _before_ the actual state is set to RCU not watching. Therefore it is safe to assume that if ct_nesting() > 0, RCU is watching. But if ct_nesting() <= 0, RCU is not watching except for tiny windows. This hasn't been a problem so far because rcu_is_cpu_rrupt_from_idle() has only been called from interrupts. However the code is confusing and abuses the role of the context tracking nesting counter while there are more accurate indicators available. Clarify and robustify accordingly. Signed-off-by: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com> Signed-off-by: Neeraj Upadhyay (AMD) <neeraj.upadhyay@kernel.org>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_output.py')
0 files changed, 0 insertions, 0 deletions