Re: [PATCH RFC 02/22] x86: intel_epb: Don't rely on link order
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
- Subject: Re: [PATCH RFC 02/22] x86: intel_epb: Don't rely on link order
- From: "Russell King (Oracle)" <linux@xxxxxxxxxxxxxxx>
- Date: Tue, 28 Nov 2023 15:42:22 +0000
- Cc: linux-pm@xxxxxxxxxxxxxxx, loongarch@xxxxxxxxxxxxxxx, linux-acpi@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx, kvmarm@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx, linux-csky@xxxxxxxxxxxxxxx, linux-doc@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-parisc@xxxxxxxxxxxxxxx, Salil Mehta <salil.mehta@xxxxxxxxxx>, Jean-Philippe Brucker <jean-philippe@xxxxxxxxxx>, jianyong.wu@xxxxxxx, justin.he@xxxxxxx, James Morse <james.morse@xxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>
- In-reply-to: <20231128144059.000042c8@Huawei.com>
- References: <ZUoRY33AAHMc5ThW@shell.armlinux.org.uk> <E1r0JKq-00CTwZ-Mh@rmk-PC.armlinux.org.uk> <20231128144059.000042c8@Huawei.com>
On Tue, Nov 28, 2023 at 02:40:59PM +0000, Jonathan Cameron wrote:
> On Tue, 07 Nov 2023 10:29:28 +0000
> Russell King <rmk+kernel@xxxxxxxxxxxxxxx> wrote:
>
> > From: James Morse <james.morse@xxxxxxx>
> >
> > intel_epb_init() is called as a subsys_initcall() to register cpuhp
> > callbacks. The callbacks make use of get_cpu_device() which will return
> > NULL unless register_cpu() has been called. register_cpu() is called
> > from topology_init(), which is also a subsys_initcall().
> >
> > This is fragile. Moving the register_cpu() to a different
> > subsys_initcall() leads to a NULL dereference during boot.
> >
> > Make intel_epb_init() a late_initcall(), user-space can't provide a
> > policy before this point anyway.
> >
> > Signed-off-by: James Morse <james.morse@xxxxxxx>
> > Signed-off-by: Russell King (Oracle) <rmk+kernel@xxxxxxxxxxxxxxx>
>
> Seems reasonable. FWIW
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
Thanks, however this has already been merged into the tip tree since
Rafael suggested sending it separately.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]