File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -451,6 +451,7 @@ static void kgdboc_earlycon_pre_exp_handler(void)
451
451
{
452
452
struct console * con ;
453
453
static bool already_warned ;
454
+ int cookie ;
454
455
455
456
if (already_warned )
456
457
return ;
@@ -463,9 +464,14 @@ static void kgdboc_earlycon_pre_exp_handler(void)
463
464
* serial drivers might be OK with this, print a warning once per
464
465
* boot if we detect this case.
465
466
*/
466
- for_each_console (con )
467
+ cookie = console_srcu_read_lock ();
468
+ for_each_console_srcu (con ) {
467
469
if (con == kgdboc_earlycon_io_ops .cons )
468
- return ;
470
+ break ;
471
+ }
472
+ console_srcu_read_unlock (cookie );
473
+ if (con )
474
+ return ;
469
475
470
476
already_warned = true;
471
477
pr_warn ("kgdboc_earlycon is still using bootconsole\n" );
You can’t perform that action at this time.
0 commit comments