]> www.infradead.org Git - users/dwmw2/linux.git/commit
ubifs: dbg_orphan_check: Fix missed key type checking
authorZhihao Cheng <chengzhihao1@huawei.com>
Wed, 10 Apr 2024 07:37:51 +0000 (15:37 +0800)
committerRichard Weinberger <richard@nod.at>
Fri, 12 Jul 2024 19:42:07 +0000 (21:42 +0200)
commit06776df740660e27c351d89f314d05b2720ba41f
treee63c1ccb6658e60fd3507b8a6454203bcf347463
parent3af2d3a8c56fe7dc24f60c4df0ab85b7ac941902
ubifs: dbg_orphan_check: Fix missed key type checking

When selinux/encryption is enabled, xattr entry node is added into TNC
before host inode when creating new file. So it is possible to find
xattr entry without host inode from TNC. Orphan debug checking is called
by ubifs_orphan_end_commit(), at that time, the commit semaphore is
already unlock, so the new creation won't be blocked.

Fixes: d7f0b70d30ff ("UBIFS: Add security.* XATTR support for the UBIFS")
Fixes: d475a507457b ("ubifs: Add skeleton for fscrypto")
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
fs/ubifs/orphan.c