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

2021-01-22 Thread Miklos Szeredi
On Fri, Jan 22, 2021 at 6:59 AM Joseph Qi wrote: > > Hi Miklos, > > Any comments on this patch? Queued for 5.11. Thanks. Miklos

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

2021-01-21 Thread Joseph Qi
Hi Miklos, Any comments on this patch? Thanks, Joseph On 12/22/20 11:26 AM, 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

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_redirect

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... I can

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

2020-12-21 Thread Al Viro
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... I can put it through vfs.git#fixes, but IMO that would be better off in overlayfs

[PATCH v4] ovl: fix dentry leak in ovl_get_redirect

2020-12-21 Thread Liangyan
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_redirect lookup_fast ovl_get_redirect