Commit 31d8aaa
committed
rcu: Keep synchronize_rcu() from enabling irqs in early boot
Making polled RCU grace periods account for expedited grace periods
required acquiring the leaf rcu_node structure's lock during early boot,
but after rcu_init() was called. This lock is irq-disabled, but the
code incorrectly assumes that irqs are always disabled when invoking
synchronize_rcu(). The exception is early boot before the scheduler has
started, which means that upon return from synchronize_rcu(), irqs will
be incorrectly enabled.
This commit fixes this bug by using irqsave/irqrestore locking primitives.
Fixes: bf95b2b ("rcu: Switch polled grace-period APIs to ->gp_seq_polled")
Reported-by: Steven Rostedt <[email protected]>
Signed-off-by: Paul E. McKenney <[email protected]>1 parent 9abf231 commit 31d8aaa
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1403 | 1403 | | |
1404 | 1404 | | |
1405 | 1405 | | |
| 1406 | + | |
1406 | 1407 | | |
1407 | 1408 | | |
1408 | 1409 | | |
1409 | 1410 | | |
1410 | | - | |
| 1411 | + | |
1411 | 1412 | | |
1412 | 1413 | | |
1413 | 1414 | | |
1414 | | - | |
| 1415 | + | |
1415 | 1416 | | |
1416 | 1417 | | |
1417 | 1418 | | |
1418 | 1419 | | |
1419 | 1420 | | |
1420 | 1421 | | |
| 1422 | + | |
1421 | 1423 | | |
1422 | 1424 | | |
1423 | 1425 | | |
1424 | 1426 | | |
1425 | | - | |
| 1427 | + | |
1426 | 1428 | | |
1427 | 1429 | | |
1428 | 1430 | | |
1429 | | - | |
| 1431 | + | |
1430 | 1432 | | |
1431 | 1433 | | |
1432 | 1434 | | |
| |||
0 commit comments