Re: [Patch net] cgroup: fix cgroup_sk_alloc() for sk_clone_lock()

2020-07-02 Thread Zefan Li
On 2020/7/3 0:02, Roman Gushchin wrote: > On Wed, Jul 01, 2020 at 09:48:48PM -0700, Cong Wang wrote: >> On Tue, Jun 30, 2020 at 3:48 PM Roman Gushchin wrote: >>> >>> Btw if we want to backport the problem but can't blame a specific commit, >>> we can always use something like "Cc: [3.1+]". >>

Re: [Patch net] cgroup: fix cgroup_sk_alloc() for sk_clone_lock()

2020-06-30 Thread Zefan Li
On 2020/7/1 6:48, Roman Gushchin wrote: > On Tue, Jun 30, 2020 at 03:22:34PM -0700, Cong Wang wrote: >> On Sat, Jun 27, 2020 at 4:41 PM Roman Gushchin wrote: >>> >>> On Fri, Jun 26, 2020 at 10:58:14AM -0700, Cong Wang wrote: On Thu, Jun 25, 2020 at 10:23 PM Cameron Berkenpas wrote: >>>

Re: [Patch net] cgroup: fix cgroup_sk_alloc() for sk_clone_lock()

2020-06-20 Thread Zefan Li
在 2020/6/20 11:31, Cong Wang 写道: > On Fri, Jun 19, 2020 at 5:51 PM Zefan Li wrote: >> >> 在 2020/6/20 8:45, Zefan Li 写道: >>> On 2020/6/20 3:51, Cong Wang wrote: >>>> On Thu, Jun 18, 2020 at 11:40 PM Zefan Li wrote: >>>>> >>>>> On

Re: [Patch net] cgroup: fix cgroup_sk_alloc() for sk_clone_lock()

2020-06-19 Thread Zefan Li
>>> If so, we might wanna fix it in a different way, >>> just checking if (!(css->flags & CSS_NO_REF)) in cgroup_bpf_put() >>> like in cgroup_put(). It feels more reliable to me. >>> >> >> Yeah I also have this idea in my mind. > > I wonder if the following patch will fix the issue? > I guess so

Re: [Patch net] cgroup: fix cgroup_sk_alloc() for sk_clone_lock()

2020-06-19 Thread Zefan Li
On 2020/6/20 8:51, Roman Gushchin wrote: > On Fri, Jun 19, 2020 at 02:40:19PM +0800, Zefan Li wrote: >> On 2020/6/19 5:09, Cong Wang wrote: >>> On Thu, Jun 18, 2020 at 12:36 PM Roman Gushchin wrote: >>>> >>>> On Thu, Jun 18, 2020 at 12:19:13PM -0700, Cong

Re: [Patch net] cgroup: fix cgroup_sk_alloc() for sk_clone_lock()

2020-06-19 Thread Zefan Li
在 2020/6/20 8:45, Zefan Li 写道: > On 2020/6/20 3:51, Cong Wang wrote: >> On Thu, Jun 18, 2020 at 11:40 PM Zefan Li wrote: >>> >>> On 2020/6/19 5:09, Cong Wang wrote: >>>> On Thu, Jun 18, 2020 at 12:36 PM Roman Gushchin wrote: >>>>> >>&

Re: [Patch net] cgroup: fix cgroup_sk_alloc() for sk_clone_lock()

2020-06-19 Thread Zefan Li
On 2020/6/20 3:51, Cong Wang wrote: > On Thu, Jun 18, 2020 at 11:40 PM Zefan Li wrote: >> >> On 2020/6/19 5:09, Cong Wang wrote: >>> On Thu, Jun 18, 2020 at 12:36 PM Roman Gushchin wrote: >>>> >>>> On Thu, Jun 18, 2020 at 12:19:13PM -0700, Cong W

Re: [Patch net] cgroup: fix cgroup_sk_alloc() for sk_clone_lock()

2020-06-18 Thread Zefan Li
On 2020/6/19 5:09, Cong Wang wrote: > On Thu, Jun 18, 2020 at 12:36 PM Roman Gushchin wrote: >> >> On Thu, Jun 18, 2020 at 12:19:13PM -0700, Cong Wang wrote: >>> On Wed, Jun 17, 2020 at 6:44 PM Zefan Li wrote: >>>> >>>> Cc: Roman Gushchin >>

Re: [Patch net] cgroup: fix cgroup_sk_alloc() for sk_clone_lock()

2020-06-17 Thread Zefan Li
_get() in cgroup_sk_alloc(). > Reported-by: Cameron Berkenpas > Reported-by: Peter Geis > Reported-by: Lu Fengqi > Reported-by: Daniël Sonck > Tested-by: Cameron Berkenpas > Cc: Daniel Borkmann > Cc: Zefan Li > Cc: Tejun Heo > Signed-off-by: Cong Wang > ---

Re: BUG: kernel NULL pointer dereference in __cgroup_bpf_run_filter_skb

2020-06-09 Thread Zefan Li
On 2020/6/10 4:50, Daniel Borkmann wrote: > [ +Zefan, + TJ ] > > On 6/3/20 12:17 AM, Alexei Starovoitov wrote: >> On Tue, Jun 2, 2020 at 2:46 PM Brenden Blanco wrote: >>> On Sat, May 30, 2020 at 12:51 AM Lu Fengqi wrote: I encountered a reproducible NULL pointer dereference using the m

Re: [PATCH v2] netprio_cgroup: Fix unlimited memory leak of v2 cgroups

2020-05-21 Thread Zefan Li
On 2020/5/22 5:14, John Fastabend wrote: > Jakub Kicinski wrote: >> On Fri, 8 May 2020 22:58:29 -0700 Jakub Kicinski wrote: >>> On Sat, 9 May 2020 11:32:10 +0800 Zefan Li wrote: >>>> If systemd is configured to use hybrid mode which enables the use of >>&g

[PATCH v2] netprio_cgroup: Fix unlimited memory leak of v2 cgroups

2020-05-08 Thread Zefan Li
k is attached to a new cgroup. Fixes: bd1060a1d671("sock, cgroup: add sock->sk_cgroup") Reported-by: Yang Yingliang Tested-by: Yang Yingliang Signed-off-by: Zefan Li --- forgot to rebase to the latest kernel. --- net/core/netprio_cgroup.c | 2 ++ 1 file changed, 2 inserti

[PATCH] netprio_cgroup: Fix unlimited memory leak of v2 cgroup

2020-05-08 Thread Zefan Li
k is attached to a new cgroup. Fixes: bd1060a1d671("sock, cgroup: add sock->sk_cgroup") Reported-by: Yang Yingliang Tested-by: Yang Yingliang Signed-off-by: Zefan Li --- net/core/netprio_cgroup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/core/netprio_cgroup.c b/ne

Re: cgroup pointed by sock is leaked on mode switch

2020-05-06 Thread Zefan Li
On 2020/5/6 10:16, Zefan Li wrote: On 2020/5/6 9:50, Yang Yingliang wrotee: +cc lize...@huawei.com On 2020/5/6 0:06, Tejun Heo wrote: Hello, Yang. On Sat, May 02, 2020 at 06:27:21PM +0800, Yang Yingliang wrote: I find the number nr_dying_descendants is increasing: linux-dVpNUK:~ # find /sys

Re: cgroup pointed by sock is leaked on mode switch

2020-05-05 Thread Zefan Li
On 2020/5/6 9:50, Yang Yingliang wrotee: +cc lize...@huawei.com On 2020/5/6 0:06, Tejun Heo wrote: Hello, Yang. On Sat, May 02, 2020 at 06:27:21PM +0800, Yang Yingliang wrote: I find the number nr_dying_descendants is increasing: linux-dVpNUK:~ # find /sys/fs/cgroup/ -name cgroup.stat -exec g

Re: [stable] net: make skb_gso_segment error handling more robust

2015-06-14 Thread Zefan Li
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2015/5/5 6:38, Ben Hutchings wrote: > Brad Spengler pointed out this commit as a candidate for stable: > > commit 330966e501ffe282d7184fde4518d5e0c24bc7f8 > Author: Florian Westphal > Date: Mon Oct 20 13:49:17 2014 +0200 > > net: make skb_g

Re: [PATCH 1/2] connector: add cgroup release event report to proc connector

2015-05-27 Thread Zefan Li
On 2015/5/27 20:37, Dimitri John Ledkov wrote: > On 27 May 2015 at 12:22, Zefan Li wrote: >> On 2015/5/27 6:07, Dimitri John Ledkov wrote: >>> Add a kernel API to send a proc connector notification that a cgroup >>> has become empty. A userspace daemon can then act upo

Re: [PATCH 1/2] connector: add cgroup release event report to proc connector

2015-05-27 Thread Zefan Li
On 2015/5/27 6:07, Dimitri John Ledkov wrote: > Add a kernel API to send a proc connector notification that a cgroup > has become empty. A userspace daemon can then act upon such > information, and usually clean-up and remove such a group as it's no > longer needed. > > Currently there are two oth