• Artem Bityutskiy's avatar
    UBIFS: fix crash on error path · 11e3be0b
    Artem Bityutskiy authored
    This patch fixes a regression introduced by
    "49942976 UBIFS: make ubifs_lpt_init clean-up in case of failure" which
    I've hit while running the 'integck -p' test. When remount the file-system
    from R/O mode to R/W mode and 'lpt_init_wr()' fails, we free _all_ LPT
    resources by calling 'ubifs_lpt_free(c, 0)', even those needed for R/O
    mode. This leads to subsequent crashes, e.g., if we try to unmount
    the file-system.
    
    Cc: stable@vger.kernel.org [v3.5+]
    Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
    11e3be0b
lpt.c 58.6 KB