Commit 5f5fa7e
rcu: Don't use negative nesting depth in __rcu_read_unlock()
Now that RCU flavors have been consolidated, an RCU-preempt
rcu_read_unlock() in an interrupt or softirq handler cannot possibly
end the RCU read-side critical section. Consider the old vulnerability
involving rcu_read_unlock() being invoked within such a handler that
interrupted an __rcu_read_unlock_special(), in which a wakeup might be
invoked with a scheduler lock held. Because rcu_read_unlock_special()
no longer does wakeups in such situations, it is no longer necessary
for __rcu_read_unlock() to set the nesting level negative.
This commit therefore removes this recursion-protection code from
__rcu_read_unlock().
[ paulmck: Let rcu_exp_handler() continue to call rcu_report_exp_rdp(). ]
[ paulmck: Adjust other checks given no more negative nesting. ]
Signed-off-by: Lai Jiangshan <[email protected]>
Signed-off-by: Paul E. McKenney <[email protected]>1 parent f0bdf6d commit 5f5fa7e
2 files changed
Lines changed: 12 additions & 41 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
639 | 639 | | |
640 | 640 | | |
641 | 641 | | |
| 642 | + | |
642 | 643 | | |
643 | 644 | | |
644 | 645 | | |
| |||
649 | 650 | | |
650 | 651 | | |
651 | 652 | | |
652 | | - | |
| 653 | + | |
653 | 654 | | |
654 | 655 | | |
655 | 656 | | |
| |||
673 | 674 | | |
674 | 675 | | |
675 | 676 | | |
676 | | - | |
| 677 | + | |
677 | 678 | | |
678 | 679 | | |
679 | 680 | | |
| |||
683 | 684 | | |
684 | 685 | | |
685 | 686 | | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
699 | | - | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
705 | | - | |
706 | | - | |
707 | | - | |
708 | | - | |
709 | | - | |
| 687 | + | |
| 688 | + | |
710 | 689 | | |
711 | 690 | | |
712 | 691 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
348 | | - | |
349 | | - | |
350 | | - | |
| 348 | + | |
351 | 349 | | |
352 | 350 | | |
353 | 351 | | |
354 | 352 | | |
355 | 353 | | |
356 | 354 | | |
357 | 355 | | |
358 | | - | |
| 356 | + | |
359 | 357 | | |
360 | | - | |
| 358 | + | |
361 | 359 | | |
362 | 360 | | |
363 | 361 | | |
| |||
390 | 388 | | |
391 | 389 | | |
392 | 390 | | |
393 | | - | |
394 | | - | |
395 | | - | |
| 391 | + | |
396 | 392 | | |
397 | | - | |
398 | | - | |
399 | 393 | | |
400 | 394 | | |
401 | | - | |
402 | | - | |
403 | 395 | | |
404 | 396 | | |
405 | 397 | | |
406 | 398 | | |
407 | | - | |
| 399 | + | |
408 | 400 | | |
409 | 401 | | |
410 | 402 | | |
| |||
556 | 548 | | |
557 | 549 | | |
558 | 550 | | |
559 | | - | |
| 551 | + | |
560 | 552 | | |
561 | 553 | | |
562 | 554 | | |
| |||
692 | 684 | | |
693 | 685 | | |
694 | 686 | | |
695 | | - | |
| 687 | + | |
696 | 688 | | |
697 | 689 | | |
698 | 690 | | |
| |||
0 commit comments