Commit:     1e2e6b89f1d3152da0606d23e65e8760bf62a4c3
Parent:     f1a6c4da14c365d3ee0b5de43a93f7470982637c
Author:     Pavel Emelyanov <[EMAIL PROTECTED]>
AuthorDate: Thu Nov 1 00:31:26 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Thu Nov 1 00:31:26 2007 -0700

    [NET]: Move the get_net() from sock_copy()
    The sock_copy() is supposed to just clone the socket. In a perfect
    world it has to be just memcpy, but we have to handle the security
    mark correctly. All the extra setup must be performed in sk_clone()
    call, so move the get_net() into more proper place.
    Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
 net/core/sock.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/core/sock.c b/net/core/sock.c
index fdacf9c..9c2dbfa 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -864,7 +864,6 @@ static void sock_copy(struct sock *nsk, const struct sock 
        memcpy(nsk, osk, osk->sk_prot->obj_size);
-       get_net(nsk->sk_net);
        nsk->sk_security = sptr;
        security_sk_clone(osk, nsk);
@@ -958,6 +957,7 @@ struct sock *sk_clone(const struct sock *sk, const gfp_t 
                sock_copy(newsk, sk);
                /* SANITY */
+               get_net(newsk->sk_net);
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

Reply via email to