mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 07:33:19 +02:00
selinux: annotate intentional data race in inode_doinit_with_dentry()
Like other `isec->initialized == LABEL_INITIALIZED` checks annotate the check in inode_doinit_with_dentry() with data_race to please KCSAN. The value is rechecked next with lock held. Reported-by: syzbot+9ab96b38b76bec93939a@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=9ab96b38b76bec93939a Signed-off-by: Christian Göttsche <cgzones@googlemail.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:
parent
6de23f81a5
commit
8dc51459ef
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user