lkml.org 
[lkml]   [2014]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [Bugfix] sched: fix possible invalid memory access caused by CPU hot-addition
Date
> > > 1) Handle CPU hot-addition event
> > > 1.a) gather platform specific information
> > > 1.b) associate hot-added CPU with a node
> > > 1.c) create CPU device
> > > 2) User online hot-added CPUs through sysfs:
> > > 2.a) cpu_up()
> > > 2.b) ->try_online_node()
> > > 2.c) ->hotadd_new_pgdat()
> > > 2.d) ->node_set_online()
> > >
> > > So between 1.b and 2.c, kmalloc_node(nid) may cause invalid
> > > memory access without the node_online(nid) check.
> >
> > Any why was all this not in the Changelog?
>
> Also, do explain what kind of hardware you needed to trigger this. This
> code has been like this for a good while.

With your proposed fix in place the allocations will succeed - but they
will be done from other nodes ... and this cpu will have to do a remote
NUMA access for the rest of time.

It would be better to switch the order above - add the memory first,
then add the cpus. Is that possible?

-Tony


\
 
 \ /
  Last update: 2014-04-23 20:21    [W:0.116 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site