lkml.org 
[lkml]   [2010]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [stable] cpumask: fix compat getaffinity
Date
On Tue, 11 May 2010 12:43:54 pm Greg KH wrote:
> On Tue, May 11, 2010 at 10:47:03AM +0900, KOSAKI Motohiro wrote:
> > > How's this?
> > >
> > > cpumask: use nr_cpu_ids for printing and parsing cpumasks
> > >
> > > Commit a45185d2d "cpumask: convert kernel/compat.c" broke
> > > libnuma, which abuses sched_getaffinity to find out NR_CPUS
> > > in order to parse /sys/devices/system/node/node*/cpumap.
> > >
> > > However, the result now returned reflects nr_cpu_ids, and
> > > cpumask_scnprintf et al. use nr_cpumask_bits which is NR_CPUS (for
> > > CONFIG_CPUMASK_OFFSTACK=n) or nr_cpu_ids (for
> > > CONFIG_CPUMASK_OFFSTACK=y).
> > >
> > > We should use nr_cpu_ids consistently.
> > >
> > > Reported-by: Arnd Bergmann <arnd@arndb.de>
> > > Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
> > > Cc: stable@kernel.org
> >
> > Well, This patch seems to have ABI change. please don't send abi-change to -stable.
>
> Why? There is no such thing as a "stable" internal abi in the kernel,
> and that includes the -stable kernel releases.

He's referring to the change in sysfs output. However, the ABI involved is
already defined to be robust against change of NR_CPUS, so changing it to
nr_cpu_ids is OK.

Of course, if libnuma weren't abusing the ABI, this change wouldn't be
necessary :(

Cheers,
Rusty.


\
 
 \ /
  Last update: 2010-05-12 10:11    [W:0.178 / U:1.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site