]> git.baikalelectronics.ru Git - kernel.git/commit
UBIFS: fix crash on error path
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Mon, 20 Aug 2012 12:16:24 +0000 (15:16 +0300)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Tue, 21 Aug 2012 12:25:24 +0000 (15:25 +0300)
commit8c5a418004dd7d6ea6253788836d0d6650ae188b
tree7d6590ea687c8cc0f22246bcdc3f2cb3de57174f
parentce6d2ddbce230e840c42dbcdc57cebf30ee6cd96
UBIFS: fix crash on error path

This patch fixes a regression introduced by
"2b57074 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: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
fs/ubifs/lpt.c