[PATCH] mkfs.ubifs: Fix runtime assertions when running without crypto

Richard Weinberger richard at nod.at
Mon Mar 8 13:09:14 GMT 2021


Henri,

----- Ursprüngliche Mail -----
> Von: "Henri Roosen" <henriroosen at gmail.com>
> An: "linux-mtd" <linux-mtd at lists.infradead.org>
> CC: "richard" <richard at nod.at>, "Henri Roosen" <henri.roosen at ginzinger.com>
> Gesendet: Montag, 8. März 2021 13:59:18
> Betreff: [PATCH] mkfs.ubifs: Fix runtime assertions when running without crypto

> Running mkfs.ubifs which was build without crypto triggered the
> following assertion:
> 
> mkfs.ubifs: ubifs-utils/mkfs.ubifs/fscrypt.h:166:
> inherit_fscrypt_context: Assertion `0' failed.
> 
> A previous commit-cc4c5e295f54 ("mkfs.ubifs: Enable support for building
> without crypto") added a check for an existing fscrypt context before calling
> functions inherit_fscrypt_context() and free_fscrypt_context(),
> however did not properly do this for each call to these functions.
> 
> Fixes: cc4c5e295f54 ("mkfs.ubifs: Enable support for building without crypto")
> Signed-off-by: Henri Roosen <henri.roosen at ginzinger.com>
> ---
> ubifs-utils/mkfs.ubifs/mkfs.ubifs.c | 27 ++++++++++++++++++---------
> 1 file changed, 18 insertions(+), 9 deletions(-)

Instead of patching every call site please fix the inline function itself.

Thanks,
//richard



More information about the linux-mtd mailing list