summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2014-06-06 23:37:18 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-07 01:08:13 +0200
commit2ca9bb456ada8bcbdc8f77f8fc78207653bbaa92 (patch)
tree05f8bd09ad6e9b24b735d7cf90c3167bade83050 /Documentation/devicetree
parentsysctl: clean up char buffer arguments (diff)
downloadlinux-2ca9bb456ada8bcbdc8f77f8fc78207653bbaa92.tar.xz
linux-2ca9bb456ada8bcbdc8f77f8fc78207653bbaa92.zip
sysctl: refactor sysctl string writing logic
Consolidate buffer length checking with new-line/end-of-line checking. Additionally, instead of reading user memory twice, just do the assignment during the loop. This change doesn't affect the potential races here. It was already possible to read a sysctl that was in the middle of a write. In both cases, the string will always be NULL terminated. The pre-existing race remains a problem to be solved. Signed-off-by: Kees Cook <keescook@chromium.org> Cc: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/devicetree')
0 files changed, 0 insertions, 0 deletions