• Dave Chinner's avatar
    xfs: fix missing error check in xfs_rtfree_range · 3daeb42c
    Dave Chinner authored
    When xfs_rtfind_forw() returns an error, the block is returned
    uninitialised.  xfs_rtfree_range() is not checking the error return,
    so could be using an uninitialised block number for modifying bitmap
    summary info.
    
    The problem was found by gcc when compiling the *userspace* libxfs
    code - it is an copy of the kernel code with the exact same bug.
    gcc gives an uninitialised variable warning on the userspace code
    but not on the kernel code. You gotta love the consistency (Mmmm,
    slightly chewy today!).
    Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
    Signed-off-by: default avatarAlex Elder <aelder@sgi.com>
    3daeb42c
xfs_rtalloc.c 62.2 KB