aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r--security/selinux/hooks.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 29e64d4ca099..e66314138b38 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -481,6 +481,7 @@ next_inode:
481 list_entry(sbsec->isec_head.next, 481 list_entry(sbsec->isec_head.next,
482 struct inode_security_struct, list); 482 struct inode_security_struct, list);
483 struct inode *inode = isec->inode; 483 struct inode *inode = isec->inode;
484 list_del_init(&isec->list);
484 spin_unlock(&sbsec->isec_lock); 485 spin_unlock(&sbsec->isec_lock);
485 inode = igrab(inode); 486 inode = igrab(inode);
486 if (inode) { 487 if (inode) {
@@ -489,7 +490,6 @@ next_inode:
489 iput(inode); 490 iput(inode);
490 } 491 }
491 spin_lock(&sbsec->isec_lock); 492 spin_lock(&sbsec->isec_lock);
492 list_del_init(&isec->list);
493 goto next_inode; 493 goto next_inode;
494 } 494 }
495 spin_unlock(&sbsec->isec_lock); 495 spin_unlock(&sbsec->isec_lock);
@@ -3381,14 +3381,12 @@ static int selinux_file_fcntl(struct file *file, unsigned int cmd,
3381 return err; 3381 return err;
3382} 3382}
3383 3383
3384static int selinux_file_set_fowner(struct file *file) 3384static void selinux_file_set_fowner(struct file *file)
3385{ 3385{
3386 struct file_security_struct *fsec; 3386 struct file_security_struct *fsec;
3387 3387
3388 fsec = file->f_security; 3388 fsec = file->f_security;
3389 fsec->fown_sid = current_sid(); 3389 fsec->fown_sid = current_sid();
3390
3391 return 0;
3392} 3390}
3393 3391
3394static int selinux_file_send_sigiotask(struct task_struct *tsk, 3392static int selinux_file_send_sigiotask(struct task_struct *tsk,