]> git.baikalelectronics.ru Git - kernel.git/commit
ubifs: xattr: Don't operate on deleted inodes
authorRichard Weinberger <richard@nod.at>
Sun, 8 Jul 2018 21:33:25 +0000 (23:33 +0200)
committerRichard Weinberger <richard@nod.at>
Tue, 14 Aug 2018 22:06:15 +0000 (00:06 +0200)
commit34a95e9c09190034ed695c76d52a16c6703885bd
treebae4a2dba40ef3246488a814675ae6a04feb72c0
parent434e0cdaa84e5f3681cefae5e8cbdc990dac0475
ubifs: xattr: Don't operate on deleted inodes

xattr operations can race with unlink and the following assert triggers:
UBIFS assert failed in ubifs_jnl_change_xattr at 1606 (pid 6256)

Fix this by checking i_nlink before working on the host inode.

Cc: <stable@vger.kernel.org>
Fixes: 974763da840d ("UBIFS: add new flash file system")
Signed-off-by: Richard Weinberger <richard@nod.at>
fs/ubifs/xattr.c