]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: fix off-by-one bug in print_nodes_state()
authorRyota Ozaki <ozaki.ryota@gmail.com>
Thu, 3 May 2012 05:43:44 +0000 (15:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 3 May 2012 05:46:27 +0000 (15:46 +1000)
commite7f53dbcb23b4c8c67d415fa5d4bd2a3d22dfbcb
treed734e045245d209f68c5777d3ce09a73c18f9dd3
parentd26ca1dfd46a78583a51329ff45a635291711897
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