Commit 3342aa8
printk: fix cpu lock ordering
The cpu lock implementation uses a full memory barrier to take
the lock, but no memory barriers when releasing the lock. This
means that changes performed by a lock owner may not be seen by
the next lock owner. This may have been "good enough" for use
by dump_stack() as a serialization mechanism, but it is not
enough to provide proper protection for a critical section.
Correct this problem by using acquire/release memory barriers
for lock/unlock, respectively.
Signed-off-by: John Ogness <[email protected]>
Reviewed-by: Sergey Senozhatsky <[email protected]>
Reviewed-by: Petr Mladek <[email protected]>
Signed-off-by: Petr Mladek <[email protected]>
Link: https://lore.kernel.org/r/[email protected]1 parent 766c268 commit 3342aa8
1 file changed
+50
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3568 | 3568 | | |
3569 | 3569 | | |
3570 | 3570 | | |
3571 | | - | |
| 3571 | + | |
| 3572 | + | |
| 3573 | + | |
| 3574 | + | |
| 3575 | + | |
| 3576 | + | |
| 3577 | + | |
| 3578 | + | |
| 3579 | + | |
| 3580 | + | |
| 3581 | + | |
| 3582 | + | |
| 3583 | + | |
| 3584 | + | |
| 3585 | + | |
| 3586 | + | |
| 3587 | + | |
| 3588 | + | |
| 3589 | + | |
| 3590 | + | |
3572 | 3591 | | |
3573 | | - | |
| 3592 | + | |
| 3593 | + | |
| 3594 | + | |
| 3595 | + | |
3574 | 3596 | | |
| 3597 | + | |
3575 | 3598 | | |
3576 | 3599 | | |
3577 | 3600 | | |
| |||
3596 | 3619 | | |
3597 | 3620 | | |
3598 | 3621 | | |
3599 | | - | |
| 3622 | + | |
| 3623 | + | |
| 3624 | + | |
| 3625 | + | |
| 3626 | + | |
| 3627 | + | |
| 3628 | + | |
| 3629 | + | |
| 3630 | + | |
| 3631 | + | |
| 3632 | + | |
| 3633 | + | |
| 3634 | + | |
| 3635 | + | |
| 3636 | + | |
| 3637 | + | |
| 3638 | + | |
| 3639 | + | |
| 3640 | + | |
| 3641 | + | |
| 3642 | + | |
| 3643 | + | |
| 3644 | + | |
| 3645 | + | |
| 3646 | + | |
3600 | 3647 | | |
3601 | 3648 | | |
3602 | 3649 | | |
0 commit comments