diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-03-26 09:25:57 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-03-26 09:25:57 -0700 |
commit | 7033999ecd7b8cf9ea59265035a0150961e023ee (patch) | |
tree | 739419451657ed8c5f39b05ca040ad83d696364a | |
parent | 576bb2d8e37a75a27400849327b996f330bc2380 (diff) | |
parent | 8076972468584d4a21dab9aa50e388b3ea9ad8c7 (diff) |
Merge tag 'printk-for-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux
Pull printk fix from Petr Mladek:
- Prevent scheduling in an atomic context when printk() takes over the
console flushing duty
* tag 'printk-for-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux:
printk: Update @console_may_schedule in console_trylock_spinning()
-rw-r--r-- | kernel/printk/printk.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index ca5146006b94..adf99c05adca 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -2009,6 +2009,12 @@ static int console_trylock_spinning(void) */ mutex_acquire(&console_lock_dep_map, 0, 1, _THIS_IP_); + /* + * Update @console_may_schedule for trylock because the previous + * owner may have been schedulable. + */ + console_may_schedule = 0; + return 1; } |