diff options
| author | Petr Mladek <pmladek@suse.com> | 2026-08-19 10:00:34 +0200 |
|---|---|---|
| committer | Petr Mladek <pmladek@suse.com> | 2026-08-19 10:00:34 +0200 |
| commit | 70b1f4413e7501acfc7412d127289cbb7bec42dc (patch) | |
| tree | 8804444ba03ff8d1f0b2f6eb9f6ec2610fe552e1 | |
| parent | d6430968d8f323f4f97b6b7d07cca6454db793bd (diff) | |
| parent | 36630cafbeede0b64c370edb2f7b4094327ee1e0 (diff) | |
| download | linux-70b1f4413e7501acfc7412d127289cbb7bec42dc.tar.gz linux-70b1f4413e7501acfc7412d127289cbb7bec42dc.zip | |
Merge branch 'for-7.3-trivial' into for-linus
| -rw-r--r-- | kernel/printk/printk.c | 11 | ||||
| -rw-r--r-- | lib/vsprintf.c | 4 |
2 files changed, 13 insertions, 2 deletions
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 2fe9a963c823..6d363e42e2a0 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -3264,10 +3264,8 @@ static bool console_flush_one_record(bool do_cond_resched, u64 *next_seq, bool * if (flags & CON_NBCON) { progress = nbcon_legacy_emit_next_record(con, handover, cookie, !do_cond_resched); - printk_seq = nbcon_seq_read(con); } else { progress = console_emit_next_record(con, handover, cookie); - printk_seq = con->seq; } /* @@ -3277,6 +3275,15 @@ static bool console_flush_one_record(bool do_cond_resched, u64 *next_seq, bool * if (*handover) goto fail; + /* + * @con can be used here now that it is certain that this + * context is still holding the SRCU read lock. + */ + if (flags & CON_NBCON) + printk_seq = nbcon_seq_read(con); + else + printk_seq = con->seq; + /* Track the next of the highest seq flushed. */ if (printk_seq > *next_seq) *next_seq = printk_seq; diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 2bc6ef483576..e285e8bc4712 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -2360,6 +2360,9 @@ void __init hash_pointers_finalize(bool slub_debug) static int __init hash_pointers_mode_parse(char *str) { + /* Avoid stale no_hash_pointers state when hash_pointers overrides it */ + no_hash_pointers = false; + if (!str) { pr_warn("Hash pointers mode empty; falling back to auto.\n"); hash_pointers_mode = HASH_PTR_AUTO; @@ -2369,6 +2372,7 @@ static int __init hash_pointers_mode_parse(char *str) } else if (strcmp(str, "never") == 0) { pr_info("Hash pointers mode set to never.\n"); hash_pointers_mode = HASH_PTR_NEVER; + no_hash_pointers = true; } else if (strcmp(str, "always") == 0) { pr_info("Hash pointers mode set to always.\n"); hash_pointers_mode = HASH_PTR_ALWAYS; |
