2023-05-30 23:21:08

by Josh Poimboeuf

[permalink] [raw]
Subject: [PATCH] livepatch: Make 'klp_stack_entries' static

The 'klp_stack_entries' percpu array is only used in transition.c. Make
it static.

Fixes: e92606fa172f ("livepatch: Convert stack entries array to percpu")
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Signed-off-by: Josh Poimboeuf <[email protected]>
---
kernel/livepatch/transition.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/livepatch/transition.c b/kernel/livepatch/transition.c
index e9fd83a02228..e54c3d60a904 100644
--- a/kernel/livepatch/transition.c
+++ b/kernel/livepatch/transition.c
@@ -15,7 +15,7 @@
#include "transition.h"

#define MAX_STACK_ENTRIES 100
-DEFINE_PER_CPU(unsigned long[MAX_STACK_ENTRIES], klp_stack_entries);
+static DEFINE_PER_CPU(unsigned long[MAX_STACK_ENTRIES], klp_stack_entries);

#define STACK_ERR_BUF_SIZE 128

--
2.40.1



2023-05-31 08:37:30

by Petr Mladek

[permalink] [raw]
Subject: Re: [PATCH] livepatch: Make 'klp_stack_entries' static

On Tue 2023-05-30 16:15:58, Josh Poimboeuf wrote:
> The 'klp_stack_entries' percpu array is only used in transition.c. Make
> it static.
>
> Fixes: e92606fa172f ("livepatch: Convert stack entries array to percpu")
> Reported-by: kernel test robot <[email protected]>
> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
> Signed-off-by: Josh Poimboeuf <[email protected]>

Reviewed-by: Petr Mladek <[email protected]>

Best Regards,
Petr

2023-06-05 14:56:09

by Petr Mladek

[permalink] [raw]
Subject: Re: [PATCH] livepatch: Make 'klp_stack_entries' static

On Tue 2023-05-30 16:15:58, Josh Poimboeuf wrote:
> The 'klp_stack_entries' percpu array is only used in transition.c. Make
> it static.
>
> Fixes: e92606fa172f ("livepatch: Convert stack entries array to percpu")
> Reported-by: kernel test robot <[email protected]>
> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
> Signed-off-by: Josh Poimboeuf <[email protected]>

JFYI, the patch has been committed into livepatching.git, branch
for-6.5/core.

Best Regards,
Petr