lkml.org 
[lkml]   [2009]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] CPU DLPAR handling
Nathan Fontenot writes:

> Register the pseries specific handlers for the powerpc architecture handlers
> for the cpu probe and release files. This also implements the cpu DLPAR
> addition and removal of CPUS from the system.

...

> + /* configure-connector reports cpus as living in the base
> + * directory of the device tree. CPUs actually live in the
> + * cpus directory so we need to fixup the full_name.
> + */
> + cpu_name = kzalloc(strlen(dn->full_name) + strlen("/cpus/") + 1,
> + GFP_KERNEL);
> + if (!cpu_name) {
> + dlpar_free_cc_nodes(dn);
> + return -ENOMEM;
> + }
> +
> + sprintf(cpu_name, "/cpus/%s", dn->full_name);

I would have expected dn->full_name to start with a '/' already, in
which case this will end up with two consecutive slashes after
'cpus'. I think that will probably cause problems.

Paul.


\
 
 \ /
  Last update: 2009-11-25 04:25    [from the cache]
©2003-2011 Jasper Spaans