Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=797951200679f1d5ea12a2e58cc7bdbc2848764c
Commit:     797951200679f1d5ea12a2e58cc7bdbc2848764c
Parent:     86112ffdccab3ee75bc9d9dfae6745df73189e37
Author:     Paul Moore <[EMAIL PROTECTED]>
AuthorDate: Fri Jan 5 15:08:21 2007 -0500
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Tue Jan 9 00:30:00 2007 -0800

    NetLabel: correct locking in selinux_netlbl_socket_setsid()
    
    The spinlock protecting the update of the "sksec->nlbl_state" variable is 
not
    currently softirq safe which can lead to problems.  This patch fixes this by
    changing the spin_{un}lock() functions into spin_{un}lock_bh() functions.
    
    Signed-off-by: Paul Moore <[EMAIL PROTECTED]>
    Signed-off-by: James Morris <[EMAIL PROTECTED]>
---
 security/selinux/ss/services.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
index 372eaad..3eb1fa9 100644
--- a/security/selinux/ss/services.c
+++ b/security/selinux/ss/services.c
@@ -2491,9 +2491,9 @@ static int selinux_netlbl_socket_setsid(struct socket 
*sock, u32 sid)
 
        rc = netlbl_socket_setattr(sock, &secattr);
        if (rc == 0) {
-               spin_lock(&sksec->nlbl_lock);
+               spin_lock_bh(&sksec->nlbl_lock);
                sksec->nlbl_state = NLBL_LABELED;
-               spin_unlock(&sksec->nlbl_lock);
+               spin_unlock_bh(&sksec->nlbl_lock);
        }
 
 netlbl_socket_setsid_return:
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to