Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 340494
b: refs/heads/master
c: fd9a08a
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Wagner authored and David S. Miller committed Oct 26, 2012
1 parent ebfbdc5 commit 591adec
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 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: 3ace03cc2a03eadf83a59eecada68b37bc1a46ae
refs/heads/master: fd9a08a7b83074e34c13c6340f673f7a51f53489
2 changes: 1 addition & 1 deletion trunk/drivers/net/tun.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ static struct sk_buff *tun_alloc_skb(struct tun_struct *tun,
struct sk_buff *skb;
int err;

sock_update_classid(sk);
sock_update_classid(sk, current);

/* Under a page? Don't bother with paged skb. */
if (prepad + len < PAGE_SIZE || !linear)
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/net/cls_cgroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct cgroup_cls_state
u32 classid;
};

extern void sock_update_classid(struct sock *sk);
extern void sock_update_classid(struct sock *sk, struct task_struct *task);

#if IS_BUILTIN(CONFIG_NET_CLS_CGROUP)
static inline u32 task_cls_classid(struct task_struct *p)
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/core/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -1217,11 +1217,11 @@ static void sk_prot_free(struct proto *prot, struct sock *sk)

#ifdef CONFIG_CGROUPS
#if IS_ENABLED(CONFIG_NET_CLS_CGROUP)
void sock_update_classid(struct sock *sk)
void sock_update_classid(struct sock *sk, struct task_struct *task)
{
u32 classid;

classid = task_cls_classid(current);
classid = task_cls_classid(task);
if (classid != sk->sk_classid)
sk->sk_classid = classid;
}
Expand Down Expand Up @@ -1264,7 +1264,7 @@ struct sock *sk_alloc(struct net *net, int family, gfp_t priority,
sock_net_set(sk, get_net(net));
atomic_set(&sk->sk_wmem_alloc, 1);

sock_update_classid(sk);
sock_update_classid(sk, current);
sock_update_netprioidx(sk, current);
}

Expand Down
8 changes: 4 additions & 4 deletions trunk/net/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ static inline int __sock_sendmsg_nosec(struct kiocb *iocb, struct socket *sock,
{
struct sock_iocb *si = kiocb_to_siocb(iocb);

sock_update_classid(sock->sk);
sock_update_classid(sock->sk, current);

si->sock = sock;
si->scm = NULL;
Expand Down Expand Up @@ -784,7 +784,7 @@ static inline int __sock_recvmsg_nosec(struct kiocb *iocb, struct socket *sock,
{
struct sock_iocb *si = kiocb_to_siocb(iocb);

sock_update_classid(sock->sk);
sock_update_classid(sock->sk, current);

si->sock = sock;
si->scm = NULL;
Expand Down Expand Up @@ -896,7 +896,7 @@ static ssize_t sock_splice_read(struct file *file, loff_t *ppos,
if (unlikely(!sock->ops->splice_read))
return -EINVAL;

sock_update_classid(sock->sk);
sock_update_classid(sock->sk, current);

return sock->ops->splice_read(sock, ppos, pipe, len, flags);
}
Expand Down Expand Up @@ -3437,7 +3437,7 @@ EXPORT_SYMBOL(kernel_setsockopt);
int kernel_sendpage(struct socket *sock, struct page *page, int offset,
size_t size, int flags)
{
sock_update_classid(sock->sk);
sock_update_classid(sock->sk, current);

if (sock->ops->sendpage)
return sock->ops->sendpage(sock, page, offset, size, flags);
Expand Down

0 comments on commit 591adec

Please sign in to comment.