mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
cgroup: net_cls: Pass in task to sock_update_classid()
sock_update_classid() assumes that the update operation always are applied on the current task. sock_update_classid() needs to know on which tasks to work on in order to be able to migrate task between cgroups using the struct cgroup_subsys attach() callback. Signed-off-by: Daniel Wagner <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: "Michael S. Tsirkin" <[email protected]> Cc: Eric Dumazet <[email protected]> Cc: Glauber Costa <[email protected]> Cc: Joe Perches <[email protected]> Cc: Neil Horman <[email protected]> Cc: Stanislav Kinsbursky <[email protected]> Cc: Tejun Heo <[email protected]> Cc: <[email protected]> Cc: <[email protected]> Acked-by: Neil Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
3ace03cc2a
commit
fd9a08a7b8
4 changed files with 9 additions and 9 deletions
|
|
@ -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;
|
||||
|
|
@ -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;
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue