aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/ss/services.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/selinux/ss/services.c')
-rw-r--r--security/selinux/ss/services.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
index 988079f45294..0c219a1b3243 100644
--- a/security/selinux/ss/services.c
+++ b/security/selinux/ss/services.c
@@ -2578,7 +2578,7 @@ int selinux_netlbl_inode_permission(struct inode *inode, int mask)
2578 sock = SOCKET_I(inode); 2578 sock = SOCKET_I(inode);
2579 isec = inode->i_security; 2579 isec = inode->i_security;
2580 sksec = sock->sk->sk_security; 2580 sksec = sock->sk->sk_security;
2581 down(&isec->sem); 2581 mutex_lock(&isec->lock);
2582 if (unlikely(sksec->nlbl_state == NLBL_REQUIRE && 2582 if (unlikely(sksec->nlbl_state == NLBL_REQUIRE &&
2583 (mask & (MAY_WRITE | MAY_APPEND)))) { 2583 (mask & (MAY_WRITE | MAY_APPEND)))) {
2584 lock_sock(sock->sk); 2584 lock_sock(sock->sk);
@@ -2586,7 +2586,7 @@ int selinux_netlbl_inode_permission(struct inode *inode, int mask)
2586 release_sock(sock->sk); 2586 release_sock(sock->sk);
2587 } else 2587 } else
2588 rc = 0; 2588 rc = 0;
2589 up(&isec->sem); 2589 mutex_unlock(&isec->lock);
2590 2590
2591 return rc; 2591 return rc;
2592} 2592}