• Mike Marshall's avatar
    orangefs: clean up debugfs · dc033621
    Mike Marshall authored
    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: default avatarMike Marshall <hubcap@omnibond.com>
    Signed-off-by: default avatarMartin Brandenburg <martin@omnibond.com>
    dc033621
orangefs-mod.c 6.08 KB