Re: [PATCH] fs: export kern_path_locked

2021-02-18 Thread Al Viro
On Tue, Feb 16, 2021 at 06:00:34PM +, Al Viro wrote: > Sigh... OK, so we want something like > user_path_create() > vfs_mknod() > created = true > grab bindlock > > drop bindlock > if failed && created > vfs_unlink() > done_pa

Re: [PATCH] fs: export kern_path_locked

2021-02-16 Thread Al Viro
On Tue, Feb 16, 2021 at 05:31:33PM +0300, Denis Kirjanov wrote: > We had a change like that: > Author: WANG Cong > Date: Mon Jan 23 11:17:35 2017 -0800 > > af_unix: move unix_mknod() out of bindlock > > Dmitry reported a deadlock scenario: > > unix_bind() path: > u->bindlock

Re: [PATCH] fs: export kern_path_locked

2021-02-16 Thread Denis Kirjanov
On 2/14/21, Al Viro wrote: > On Fri, Jan 29, 2021 at 01:18:55PM +, Christoph Hellwig wrote: >> On Fri, Jan 29, 2021 at 04:11:05PM +0300, Denis Kirjanov wrote: >> > Do you mean just: >> >> We'll still need to lock the parent inode. > > Not just "lock", we wouldd need to have the lock _held_ acr

Re: [PATCH] fs: export kern_path_locked

2021-02-14 Thread Al Viro
On Fri, Jan 29, 2021 at 01:18:55PM +, Christoph Hellwig wrote: > On Fri, Jan 29, 2021 at 04:11:05PM +0300, Denis Kirjanov wrote: > > Do you mean just: > > We'll still need to lock the parent inode. Not just "lock", we wouldd need to have the lock _held_ across the entire sequence. Without th

Re: [PATCH] fs: export kern_path_locked

2021-01-27 Thread Christoph Hellwig
On Mon, Jan 25, 2021 at 06:49:37PM +0300, Denis Kirjanov wrote: > the function is used outside and we have a prototype > defined in namei.h Huh? It is only used in drivers/base/devtmpfs.c, and kernel/audit_*.c. Absolutely no need to export it for that.

[PATCH] fs: export kern_path_locked

2021-01-25 Thread Denis Kirjanov
the function is used outside and we have a prototype defined in namei.h Signed-off-by: Denis Kirjanov --- fs/namei.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/namei.c b/fs/namei.c index 78443a85480a..3de3b3642302 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -2450,6 +2450,7 @@ struct