Patch "parisc: Use num_present_cpus() in alternative patching code" has been added to the 6.3-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    parisc: Use num_present_cpus() in alternative patching code

to the 6.3-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     parisc-use-num_present_cpus-in-alternative-patching-code.patch
and it can be found in the queue-6.3 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From b6405f0829d7b1dd926ba3ca5f691cab835abfaa Mon Sep 17 00:00:00 2001
From: Helge Deller <deller@xxxxxx>
Date: Fri, 19 May 2023 12:12:06 +0200
Subject: parisc: Use num_present_cpus() in alternative patching code

From: Helge Deller <deller@xxxxxx>

commit b6405f0829d7b1dd926ba3ca5f691cab835abfaa upstream.

When patching the kernel code some alternatives depend on SMP vs. !SMP.
Use the value of num_present_cpus() instead of num_online_cpus() to
decide, otherwise we may run into issues if and additional CPU is
enabled after having loaded a module while only one CPU was enabled.

Signed-off-by: Helge Deller <deller@xxxxxx>
Cc: <stable@xxxxxxxxxxxxxxx> # v6.1+
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 arch/parisc/kernel/alternative.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/parisc/kernel/alternative.c
+++ b/arch/parisc/kernel/alternative.c
@@ -25,7 +25,7 @@ void __init_or_module apply_alternatives
 {
 	struct alt_instr *entry;
 	int index = 0, applied = 0;
-	int num_cpus = num_online_cpus();
+	int num_cpus = num_present_cpus();
 	u16 cond_check;
 
 	cond_check = ALT_COND_ALWAYS |


Patches currently in stable-queue which might be from deller@xxxxxx are

queue-6.3/parisc-allow-to-reboot-machine-after-system-halt.patch
queue-6.3/parisc-handle-kgdb-breakpoints-only-in-kernel-context.patch
queue-6.3/parisc-handle-kprobes-breakpoints-only-in-kernel-context.patch
queue-6.3/parisc-use-num_present_cpus-in-alternative-patching-code.patch
queue-6.3/parisc-fix-flush_dcache_page-for-usage-from-irq-context.patch
queue-6.3/parisc-enable-lockdep-support.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux