#5 Increasing the value of CG_VALUE_MAX

Unstable (example)
open
nobody
None
5
2014-06-26
2014-06-26
No

CG_VALUE_MAX is arbitrarily set to 100 which limits string values to a max of 100 characters. A potential situation where this will cause a failure is in the case of setting cpuset.cpus to a long list (unrolled/comma-separated) of logical cpu ids.

Example: Passing a list of 64 logical cpu ids as a string

"0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63"

will truncate and result in a badly formatted string value that causes an EOF

"0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36\x01"

This patch increases CG_VALUE_MAX to a value of 1024. While still somewhat arbitrary, it seems this value should cover even the largest case. And since it looks like the string value buffers are being statically allocated per thread, it shouldn't really result in any major impact in initial memory.

1 Attachments

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks