Skip to content

Commit b206a6f

Browse files
committed
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()
2 parents 3ba310f + 8dc5145 commit b206a6f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

security/selinux/hooks.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1436,7 +1436,8 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent
14361436
struct dentry *dentry;
14371437
int rc = 0;
14381438

1439-
if (isec->initialized == LABEL_INITIALIZED)
1439+
/* check below is racy, but we will recheck with lock held */
1440+
if (data_race(isec->initialized == LABEL_INITIALIZED))
14401441
return 0;
14411442

14421443
spin_lock(&isec->lock);

0 commit comments

Comments
 (0)