Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 327230
b: refs/heads/master
c: c336d14
h: refs/heads/master
v: v3
  • Loading branch information
Eric W. Biederman committed Aug 15, 2012
1 parent 447e072 commit d05fdf4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3fbc290540a1ed1a8a076ed8f53bee7a38a9f408
refs/heads/master: c336d148adc4181f31741ae066df41429be64b67
9 changes: 9 additions & 0 deletions trunk/include/net/sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,15 @@ static inline void sk_add_bind_node(struct sock *sk,
#define sk_for_each_bound(__sk, node, list) \
hlist_for_each_entry(__sk, node, list, sk_bind_node)

static inline struct user_namespace *sk_user_ns(struct sock *sk)
{
/* Careful only use this in a context where these parameters
* can not change and must all be valid, such as recvmsg from
* userspace.
*/
return sk->sk_socket->file->f_cred->user_ns;
}

/* Sock flags */
enum sock_flags {
SOCK_DEAD,
Expand Down

0 comments on commit d05fdf4

Please sign in to comment.