Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ffa4d7216e848fbfdcb8e6f0bb66abeaa1888964
Commit:     ffa4d7216e848fbfdcb8e6f0bb66abeaa1888964
Parent:     6313c1e0992feaee56bc09b85042b3186041fa3c
Author:     Patrick McHardy <[EMAIL PROTECTED]>
AuthorDate: Wed Apr 25 14:01:17 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Apr 25 22:29:06 2007 -0700

    [NETLINK]: don't reinitialize callback mutex
    
    Don't reinitialize the callback mutex the netlink_kernel_create caller
    handed in, it is supposed to already be initialized and could already
    be held by someone.
    
    Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/netlink/af_netlink.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index ec16c9b..64d4b27 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -388,8 +388,12 @@ static int __netlink_create(struct socket *sock, struct 
mutex *cb_mutex,
        sock_init_data(sock, sk);
 
        nlk = nlk_sk(sk);
-       nlk->cb_mutex = cb_mutex ? : &nlk->cb_def_mutex;
-       mutex_init(nlk->cb_mutex);
+       if (cb_mutex)
+               nlk->cb_mutex = cb_mutex;
+       else {
+               nlk->cb_mutex = &nlk->cb_def_mutex;
+               mutex_init(nlk->cb_mutex);
+       }
        init_waitqueue_head(&nlk->wait);
 
        sk->sk_destruct = netlink_sock_destruct;
-
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