[PATCH] ubifs: ubifs_jnl_change_xattr: Remove assertion 'nlink > 0' for host inode
Richard Weinberger
richard.weinberger at gmail.com
Sun Sep 13 14:42:34 EDT 2020
On Mon, Aug 17, 2020 at 4:29 PM Zhihao Cheng <chengzhihao1 at huawei.com> wrote:
>
> Changing xattr of a temp file will trigger following assertion failed
> and make ubifs turn into readonly filesystem:
> ubifs_assert_failed [ubifs]: UBIFS assert failed: host->i_nlink > 0,
> in fs/ubifs/journal.c:1801
>
> Reproducer:
> 1. fd = open(__O_TMPFILE)
> 2. fsetxattr(fd, key, value2, XATTR_CREATE)
> 3. fsetxattr(fd, key, value2, XATTR_REPLACE)
>
> Fix this by removing assertion 'nlink > 0' for host inode.
>
> Reported-by: Chengsong Ke <kechengsong at huawei.com>
> Signed-off-by: Zhihao Cheng <chengzhihao1 at huawei.com>
Applied to fixes, thanks!
--
Thanks,
//richard
More information about the linux-mtd
mailing list