Re: [PATCH v4] ovl: fix dentry leak in ovl_get_redirect

2021-01-07 Thread Liangyan
ping On 20/12/22 上午11:06, Liangyan wrote: We need to lock d_parent->d_lock before dget_dlock, or this may have d_lockref updated parallelly like calltrace below which will cause dentry->d_lockref leak and risk a crash. CPU 0CPU 1 ovl_set_re

Re: [PATCH v4] ovl: fix dentry leak in ovl_get_redirect

2020-12-22 Thread Liangyan
Thanks Viro. @Miklos, can you please advise? On 20/12/22 上午11:26, Al Viro wrote: On Tue, Dec 22, 2020 at 11:06:26AM +0800, Liangyan wrote: Cc: Fixes: a6c606551141 ("ovl: redirect on rename-dir") Signed-off-by: Liangyan Reviewed-by: Joseph Qi Suggested-by: Al Viro Fine by me

[PATCH v4] ovl: fix dentry leak in ovl_get_redirect

2020-12-21 Thread Liangyan
direct on rename-dir") Signed-off-by: Liangyan Reviewed-by: Joseph Qi Suggested-by: Al Viro --- fs/overlayfs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c index 28a075b5f5b2..d1efa3a5a503 100644 --- a/fs/overlayfs/dir.c +++ b/fs/

[PATCH v3] ovl: fix dentry leak in ovl_get_redirect

2020-12-21 Thread Liangyan
rename-dir") Signed-off-by: Liangyan Reviewed-by: Joseph Qi Suggested-by: Al Viro --- fs/overlayfs/dir.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c index 28a075b5f5b2..e9aa4a12ad82 100644 --- a/fs/overlayfs/dir.c +++ b/fs/

Re: [PATCH v2] ovl: fix dentry leak in ovl_get_redirect

2020-12-21 Thread Liangyan
Exactly, i missed this definition of d_lock and treat it as a single member in dentry. #define d_lock d_lockref.lock Thanks for the explanation. i will post a new patch as your suggestion. Regards, Liangyan On 20/12/22 上午1:35, Al Viro wrote: On Tue, Dec 22, 2020 at 12:51:27AM +0800

Re: [PATCH v2] ovl: fix dentry leak in ovl_get_redirect

2020-12-21 Thread Liangyan
:26 PM, Al Viro wrote: On Sun, Dec 20, 2020 at 08:09:27PM +0800, Liangyan wrote: +++ b/fs/overlayfs/dir.c @@ -973,6 +973,7 @@ static char *ovl_get_redirect(struct dentry *dentry, bool abs_redirect) for (d = dget(dentry); !IS_ROOT(d);) { const char *name;

Re: [PATCH v2] ovl: fix dentry leak in ovl_get_redirect

2020-12-20 Thread Liangyan
Guys, any comments on this patch? This issue should exist in latest upstream. On 20/12/20 下午8:09, Liangyan wrote: We need to lock d_parent->d_lock before dget_dlock, or this may have d_lockref updated parallelly like calltrace below which will cause dentry->d_lockref leak and risk a

[PATCH v2] ovl: fix dentry leak in ovl_get_redirect

2020-12-20 Thread Liangyan
0088 CR3: 0005e3f74006 CR4: 003606a0 [   49.834085] DR0: DR1: DR2: [   49.835792] DR3: DR6: fffe0ff0 DR7: 0400 Fixes: a6c606551141 ("ovl: redirect on rename-dir") Signed-off-by: Liangyan S

[PATCH] ovl: fix dentry leak in ovl_get_redirect

2020-12-18 Thread Liangyan
0088 CR3: 0005e3f74006 CR4: 003606a0 [   49.834085] DR0: DR1: DR2: [   49.835792] DR3: DR6: fffe0ff0 DR7: 0400 Fixes: a6c606551141 ("ovl: redirect on rename-dir") Signed-off-by: Liangyan S

[tip: sched/urgent] sched/fair: Don't assign runtime for throttled cfs_rq

2019-09-03 Thread tip-bot2 for Liangyan
The following commit has been merged into the sched/urgent branch of tip: Commit-ID: 5e2d2cc2588bd3307ce3937acbc2ed03c830a861 Gitweb: https://git.kernel.org/tip/5e2d2cc2588bd3307ce3937acbc2ed03c830a861 Author:Liangyan AuthorDate:Mon, 26 Aug 2019 20:16:33 +08:00 Committer

Re: [PATCH] sched/fair: don't assign runtime for throttled cfs_rq

2019-08-26 Thread Liangyan
On 19/8/27 上午1:38, bseg...@google.com wrote: Valentin Schneider writes: On 23/08/2019 21:00, bseg...@google.com wrote: [...] Could you mention in the message that this a throttled cfs_rq can have account_cfs_rq_runtime called on it because it is throttled before idle_balance, and the

[PATCH v3] sched/fair: don't assign runtime for throttled cfs_rq

2019-08-26 Thread Liangyan
ottled until that distribute_cfs_runtime is called. Signed-off-by: Liangyan Reviewed-by: Ben Segall Reviewed-by: Valentin Schneider --- kernel/sched/fair.c | 5 + 1 file changed, 5 insertions(+) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index bc9cfeaac8bd..500f5db0de0b 100644 --- a/kernel/

[PATCH v2] sched/fair: don't assign runtime for throttled cfs_rq

2019-08-24 Thread Liangyan
id the above incorrect type cast. Signed-off-by: Liangyan Reviewed-by: Ben Segall Reviewed-by: Valentin Schneider --- kernel/sched/fair.c | 5 + 1 file changed, 5 insertions(+) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index bc9cfeaac8bd..ac3ae694d850 100644 --- a/kernel/

Re: [PATCH] sched/fair: Add missing unthrottle_cfs_rq()

2019-08-23 Thread Liangyan
ere we expect negative values, and pull in a comment from the mailing list that didn't make it in [1]. [1]: https://lkml.kernel.org/r/BANLkTi=nmcxkx6ebdqcjydj5kkyg2n1...@mail.gmail.com Cc: Fixes: ec12cb7f31e2 ("sched: Accumulate per-cfs_rq cpu usage and charge against bandwidth") Repor

[PATCH] sched/fair: don't assign runtime for throttled cfs_rq

2019-08-14 Thread Liangyan
mit prevents cfs_rq to be assgined new runtime if it has been throttled to avoid the above incorrect type cast. Signed-off-by: Liangyan --- kernel/sched/fair.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 81fd8a2a605b..b14d67d28138 100644

[PATCH] sched/fair: don't restart enqueued cfs quota slack timer

2019-06-02 Thread Liangyan
e although they have remaining quota. Signed-off-by: Liangyan --- kernel/sched/fair.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index d90a64620072..fdb03c752f97 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4411,