]> git.baikalelectronics.ru Git - kernel.git/commit
srcu: Tighten cleanup_srcu_struct() GP checks
authorPaul E. McKenney <paulmck@kernel.org>
Wed, 12 Jan 2022 17:52:44 +0000 (09:52 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 11 Apr 2022 22:31:01 +0000 (15:31 -0700)
commit941acaf394914f9406f2c788bfb7dc6e2027adc4
treed436cccfe36000d8561e63aaabd378920da7f0c3
parent6d94017b7b59bab528be97be158d0d602982e3a6
srcu: Tighten cleanup_srcu_struct() GP checks

Currently, cleanup_srcu_struct() checks for a grace period in progress,
but it does not check for a grace period that has not yet started but
which might start at any time.  Such a situation could result in a
use-after-free bug, so this commit adds a check for a grace period that
is needed but not yet started to cleanup_srcu_struct().

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/srcutree.c