summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-04-14 01:34:52 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2026-04-14 01:34:52 +0300
commitb206a6fb9a105be198cf2dc435ffa4ad7c75ddc2 (patch)
tree20eb70eb165160da9f9a8c4e16c7f6a1b36ef076
parent3ba310f2a3ca70f0497aab5c2e8aa85a12e19406 (diff)
parent8dc51459ef702bcc0ef5fb26bb4d362b38aa56c2 (diff)
downloadlinux-b206a6fb9a105be198cf2dc435ffa4ad7c75ddc2.tar.xz
Merge tag 'selinux-pr-20260410' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux
Pull selinux update from Paul Moore: - Annotate a known race condition to soothe KCSAN * tag 'selinux-pr-20260410' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: annotate intentional data race in inode_doinit_with_dentry()
-rw-r--r--security/selinux/hooks.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 1bc71fcd318a..fc21cfba726c 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -1436,7 +1436,8 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent
struct dentry *dentry;
int rc = 0;
- if (isec->initialized == LABEL_INITIALIZED)
+ /* check below is racy, but we will recheck with lock held */
+ if (data_race(isec->initialized == LABEL_INITIALIZED))
return 0;
spin_lock(&isec->lock);