[PATCH] ubifs: fix uninitialized variable usage
Antonio Quartulli
antonio at mandelbit.com
Mon Nov 18 02:02:27 PST 2024
On 16/11/2024 03:02, Zhihao Cheng wrote:
> 在 2024/11/16 6:26, Antonio Quartulli 写道:
>> In ubifs_jnl_write_inode(), when an inode cannot be deleted
>> due to too many xattrs, err is passed to ubifs_ro_mode()
>> uninitialized, thus leading to bogus error reporting.
>>
>> Fix this case by passing -EPERM, which is the same value that
>> ubifs_jnl_write_inode() is going to return to the caller.
>>
>> This fixes 1 UNINIT issue reported by Coverity
>> Report: CID 1601860: Uninitialized scalar variable (UNINIT)
>>
>> Cc: Richard Weinberger <richard at nod.at>
>> Cc: Zhihao Cheng <chengzhihao1 at huawei.com>
>> Cc: linux-kernel at vger.kernel.org (open list)
>> Signed-off-by: Antonio Quartulli <antonio at mandelbit.com>
>> ---
>> fs/ubifs/journal.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Hi Antonio, thanks for the patch. Nathan has sent a patch to fix it.
> https://lore.kernel.org/linux-mtd/
> b560f413-70f1-8ebb-7403-34591658ca86 at huawei.com/T/#t
Perfect!
Thanks for letting me know.
Regards,
--
Antonio Quartulli
CEO and Co-Founder
Mandelbit Srl
https://www.mandelbit.com
More information about the linux-mtd
mailing list