lkml.org 
[lkml]   [2024]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] x86/cpu/topology: don't write to immutable cpu_present_mask
On Tue, Apr 09, 2024 at 10:42:13AM +0200, Ingo Molnar wrote:
>
> * Thomas Gleixner <tglx@linutronix.de> wrote:
>
> > On Sun, Apr 07 2024 at 18:26, Alexey Dobriyan wrote:
> > > Workaround the following oops:
> > >
> > > topology_hotplug_apic
> > > topo_set_cpuids
> > > set_cpu_possible(cpu, true);
> > > // write to __ro_after_init section after init
> >
> > Duh, yes.
> >
> > > adobriyan: I'm not sure what's going on, can it set unset bit here?
> > > If not, then why does it repeat the job and set already set bits.
> > >
> > > Anyhow, let's not oops peoples' machines for now.
> >
> > Adding a bandaid to paper over the non-understood real problem is
> > definitely not a good plan. I take this patch as a bug report.
> >
> > Proper fix below.
>
> BTW., independently of the fix, warning about a too late set_cpu_possible()
> might still make sense - clearly it *can* be called too late by
> architecture init code :-)

Make the function __init ? Then it goes away right when the data becomes
RO.

\
 
 \ /
  Last update: 2024-05-27 16:30    [W:0.060 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site