Re: [PATCH 4.19 016/133] cgroup: fix cgroup_sk_alloc() for sk_clone_lock()

2020-08-13 Thread Yang Yingliang
On 2020/8/13 19:41, Greg Kroah-Hartman wrote: On Thu, Aug 13, 2020 at 07:30:55PM +0800, Yang Yingliang wrote: Hi, On 2020/7/20 23:36, Greg Kroah-Hartman wrote: From: Cong Wang [ Upstream commit ad0f75e5f57ccbceec13274e1e242f2b5a6397ed ] When we clone a socket in sk_clone_lock(), its

Re: [PATCH 4.19 016/133] cgroup: fix cgroup_sk_alloc() for sk_clone_lock()

2020-08-13 Thread Greg Kroah-Hartman
On Thu, Aug 13, 2020 at 07:30:55PM +0800, Yang Yingliang wrote: > Hi, > > On 2020/7/20 23:36, Greg Kroah-Hartman wrote: > > From: Cong Wang > > > > [ Upstream commit ad0f75e5f57ccbceec13274e1e242f2b5a6397ed ] > > > > When we clone a socket in sk_clone_lock(), its sk_cgrp_data is > > copied, so

Re: [PATCH 4.19 016/133] cgroup: fix cgroup_sk_alloc() for sk_clone_lock()

2020-08-13 Thread Yang Yingliang
Hi, On 2020/7/20 23:36, Greg Kroah-Hartman wrote: From: Cong Wang [ Upstream commit ad0f75e5f57ccbceec13274e1e242f2b5a6397ed ] When we clone a socket in sk_clone_lock(), its sk_cgrp_data is copied, so the cgroup refcnt must be taken too. And, unlike the sk_alloc() path,

[PATCH 4.19 016/133] cgroup: fix cgroup_sk_alloc() for sk_clone_lock()

2020-07-20 Thread Greg Kroah-Hartman
From: Cong Wang [ Upstream commit ad0f75e5f57ccbceec13274e1e242f2b5a6397ed ] When we clone a socket in sk_clone_lock(), its sk_cgrp_data is copied, so the cgroup refcnt must be taken too. And, unlike the sk_alloc() path, sock_update_netprioidx() is not called here. Therefore, it is safe and