]> git.baikalelectronics.ru Git - kernel.git/commit
orangefs: clean up debugfs
authorMike Marshall <hubcap@omnibond.com>
Fri, 4 Nov 2016 20:32:25 +0000 (16:32 -0400)
committerMike Marshall <hubcap@omnibond.com>
Mon, 7 Nov 2016 15:41:55 +0000 (10:41 -0500)
commitd72617df7f84526167e561e24fad29818ba675a1
tree56c9ca467f36588615993f2b163c29bc64109568
parent5f402672725f0cf42ffe5883a211f1dbb02762e9
orangefs: clean up debugfs

We recently refactored the Orangefs debugfs code.
The refactor seemed to trigger dan.carpenter@oracle.com's
static tester to find a possible double-free in the code.

While designing the fix we saw a condition under which the
buffer being freed could also be overflowed.

We also realized how to rebuild the related debugfs file's
"contents" (a string) without deleting and re-creating the file.

This fix should eliminate the possible double-free, the
potential overflow and improve code readability.

Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Signed-off-by: Martin Brandenburg <martin@omnibond.com>
fs/orangefs/orangefs-debugfs.c
fs/orangefs/orangefs-mod.c