]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mm: fix off-by-one bug in print_nodes_state()
authorRyota Ozaki <ozaki.ryota@gmail.com>
Wed, 25 Apr 2012 01:03:39 +0000 (11:03 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 30 Apr 2012 05:17:22 +0000 (15:17 +1000)
commit737352893a49e225daf6d3fda033c678ad83d8c9
tree134509030ef3754b1391b59c33074b1d2b46d3ed
parent0faeea4b3a337d673ed5446a2ef114bb8d2847df
mm: fix off-by-one bug in print_nodes_state()

/sys/devices/system/node/{online,possible} outputs a garbage byte because
print_nodes_state() returns content size + 1.  To fix the bug, the patch
changes the use of cpuset_sprintf_cpulist to follow the use at other
places, which is clearer and safer.

This bug was introduced since v2.6.24 (bde631a51876f23e9).

Signed-off-by: Ryota Ozaki <ozaki.ryota@gmail.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/base/node.c