e.g. is s390x ok? It might be better to put it in task_init() because
It was initialized in the machdep_init(POST_GDB), see the following code:
...
read_in_kernel_config(IKCFG_INIT);
kernel_init();
machdep_init(POST_GDB); <---
vm_init();
machdep_init(POST_VM);
module_init();
help_init();
task_init();
vfs_init();
net_init();
dev_init();
machdep_init(POST_INIT);
...
I would suggest putting it at the end of the kernel_init(), so that the original initialization order will basically not be changed
it's used there?
Do you mean we need to move the existing initialization(all) to the task_init()?
$ git grep 'STRUCT_SIZE_INIT(note_buf'
arm.c: STRUCT_SIZE_INIT(note_buf, "note_buf_t");
arm64.c: STRUCT_SIZE_INIT(note_buf, "note_buf_t");
mips.c: STRUCT_SIZE_INIT(note_buf, "note_buf_t");
mips64.c: STRUCT_SIZE_INIT(note_buf, "note_buf_t");
ppc.c: STRUCT_SIZE_INIT(note_buf, "note_buf_t");
riscv64.c: STRUCT_SIZE_INIT(note_buf, "note_buf_t");
x86.c: STRUCT_SIZE_INIT(note_buf, "note_buf_t");
x86_64.c: STRUCT_SIZE_INIT(note_buf, "note_buf_t");
xen_hyper.c: XEN_HYPER_STRUCT_SIZE_INIT(note_buf_t, "note_buf_t");
Thanks,
Kazu
>
> Fixes: db8c030857b4 ("diskdump/netdump: fix segmentation fault caused by failure of stopping CPUs")
> Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
> ---
> ppc64.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/ppc64.c b/ppc64.c
> index b95a621d8fe4..ff7f0fca3a95 100644
> --- a/ppc64.c
> +++ b/ppc64.c
> @@ -695,6 +695,7 @@ ppc64_init(int when)
> }
>
> ppc64_init_paca_info();
> + STRUCT_SIZE_INIT(note_buf, "note_buf_t");
>
> if (!machdep->hz) {
> machdep->hz = HZ;