]> git.baikalelectronics.ru Git - kernel.git/commit
ubifs: Set default assert action to read-only
authorRichard Weinberger <richard@nod.at>
Thu, 12 Jul 2018 11:02:00 +0000 (13:02 +0200)
committerRichard Weinberger <richard@nod.at>
Tue, 14 Aug 2018 22:25:22 +0000 (00:25 +0200)
commit85f196ebc9f9d2c1643916baf043d7a40db0b58a
tree7e54ebb184e769900cb3fa6f44368cbdf20b2412
parente641841c6cc6bdd2a9d9462506c28633feacbedd
ubifs: Set default assert action to read-only

Traditionally UBIFS just reported a failed assertion and moved on. The
drawback is that users will notice UBIFS bugs when it is too late, most
of the time when it is no longer about to mount. This makes bug hunting
problematic since valuable information from failing asserts is long gone
when UBIFS is dead. The other extreme, panic'ing on a failing assert is
also not worthwhile, we want users and developers give a chance to
collect as much debugging information as possible if UBIFS hits an
assert. Therefore go for the third option, switch to read-only mode when
an assert fails. That way UBIFS will not write possible bad data to the
MTD and gives users the chance to collect debugging information.

Signed-off-by: Richard Weinberger <richard@nod.at>
fs/ubifs/super.c