Skip to content

Commit 7033999

Browse files
committed
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()
2 parents 576bb2d + 8076972 commit 7033999

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

kernel/printk/printk.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2009,6 +2009,12 @@ static int console_trylock_spinning(void)
20092009
*/
20102010
mutex_acquire(&console_lock_dep_map, 0, 1, _THIS_IP_);
20112011

2012+
/*
2013+
* Update @console_may_schedule for trylock because the previous
2014+
* owner may have been schedulable.
2015+
*/
2016+
console_may_schedule = 0;
2017+
20122018
return 1;
20132019
}
20142020

0 commit comments

Comments
 (0)