]> git.ipfire.org Git - people/arne_f/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 9 Sep 2018 08:32:39 +0000 (10:32 +0200)
commitcef393ce9aea9e0a0804da9cbabb4bec78bd29fa
tree96d0eea7e406ceb1dd2090a90f65eebc4002b3e4
parentce0504b74d046da612f4758117eca0122c2ee225
ubifs: xattr: Don't operate on deleted inodes

commit 11a6fc3dc743e22fb50f2196ec55bee5140d3c52 upstream.

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: 1e51764a3c2a ("UBIFS: add new flash file system")
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ubifs/xattr.c