Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72971
b: refs/heads/master
c: f1a6c4d
h: refs/heads/master
i:
  72969: f66cdaf
  72967: 1d00669
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Nov 1, 2007
1 parent ed37333 commit d30fb70
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 261ab365fadd53ddc1b292b1663800e11fbf3e71
refs/heads/master: f1a6c4da14c365d3ee0b5de43a93f7470982637c
14 changes: 0 additions & 14 deletions trunk/include/net/sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -993,20 +993,6 @@ static inline void sock_graft(struct sock *sk, struct socket *parent)
write_unlock_bh(&sk->sk_callback_lock);
}

static inline void sock_copy(struct sock *nsk, const struct sock *osk)
{
#ifdef CONFIG_SECURITY_NETWORK
void *sptr = nsk->sk_security;
#endif

memcpy(nsk, osk, osk->sk_prot->obj_size);
get_net(nsk->sk_net);
#ifdef CONFIG_SECURITY_NETWORK
nsk->sk_security = sptr;
security_sk_clone(osk, nsk);
#endif
}

extern int sock_i_uid(struct sock *sk);
extern unsigned long sock_i_ino(struct sock *sk);

Expand Down
14 changes: 14 additions & 0 deletions trunk/net/core/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,20 @@ static inline void sock_lock_init(struct sock *sk)
af_family_keys + sk->sk_family);
}

static void sock_copy(struct sock *nsk, const struct sock *osk)
{
#ifdef CONFIG_SECURITY_NETWORK
void *sptr = nsk->sk_security;
#endif

memcpy(nsk, osk, osk->sk_prot->obj_size);
get_net(nsk->sk_net);
#ifdef CONFIG_SECURITY_NETWORK
nsk->sk_security = sptr;
security_sk_clone(osk, nsk);
#endif
}

/**
* sk_alloc - All socket objects are allocated here
* @net: the applicable net namespace
Expand Down

0 comments on commit d30fb70

Please sign in to comment.