Commit 51a1d25
printk: Keep non-panic-CPUs out of console lock
When in a panic situation, non-panic CPUs should avoid holding the
console lock so as not to contend with the panic CPU. This is already
implemented with abandon_console_lock_in_panic(), which is checked
after each printed line. However, non-panic CPUs should also avoid
trying to acquire the console lock during a panic.
Modify console_trylock() to fail and console_lock() to block() when
called from a non-panic CPU during a panic.
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20230717194607.145135-4-john.ogness@linutronix.de1 parent 7b23a66 commit 51a1d25
1 file changed
+26
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2583 | 2583 | | |
2584 | 2584 | | |
2585 | 2585 | | |
| 2586 | + | |
| 2587 | + | |
| 2588 | + | |
| 2589 | + | |
| 2590 | + | |
| 2591 | + | |
| 2592 | + | |
| 2593 | + | |
| 2594 | + | |
| 2595 | + | |
| 2596 | + | |
| 2597 | + | |
| 2598 | + | |
| 2599 | + | |
| 2600 | + | |
| 2601 | + | |
| 2602 | + | |
| 2603 | + | |
| 2604 | + | |
2586 | 2605 | | |
2587 | 2606 | | |
2588 | 2607 | | |
| |||
2595 | 2614 | | |
2596 | 2615 | | |
2597 | 2616 | | |
| 2617 | + | |
| 2618 | + | |
| 2619 | + | |
| 2620 | + | |
2598 | 2621 | | |
2599 | 2622 | | |
2600 | 2623 | | |
| |||
2613 | 2636 | | |
2614 | 2637 | | |
2615 | 2638 | | |
| 2639 | + | |
| 2640 | + | |
| 2641 | + | |
2616 | 2642 | | |
2617 | 2643 | | |
2618 | 2644 | | |
| |||
2631 | 2657 | | |
2632 | 2658 | | |
2633 | 2659 | | |
2634 | | - | |
2635 | | - | |
2636 | | - | |
2637 | | - | |
2638 | | - | |
2639 | | - | |
2640 | | - | |
2641 | | - | |
2642 | | - | |
2643 | | - | |
2644 | | - | |
2645 | | - | |
2646 | | - | |
2647 | | - | |
2648 | | - | |
2649 | | - | |
2650 | | - | |
2651 | | - | |
2652 | | - | |
2653 | 2660 | | |
2654 | 2661 | | |
2655 | 2662 | | |
| |||
0 commit comments