lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250227-dinge-jazzkonzert-3f68e3839fac@brauner>
Date: Thu, 27 Feb 2025 20:01:39 +0100
From: Christian Brauner <brauner@...nel.org>
To: NeilBrown <neilb@...e.de>
Cc: Alexander Viro <viro@...iv.linux.org.uk>, Jan Kara <jack@...e.cz>, 
	Chuck Lever <chuck.lever@...cle.com>, Jeff Layton <jlayton@...nel.org>, 
	Trond Myklebust <trondmy@...nel.org>, Anna Schumaker <anna@...nel.org>, linux-nfs@...r.kernel.org, 
	Ilya Dryomov <idryomov@...il.com>, Xiubo Li <xiubli@...hat.com>, ceph-devel@...r.kernel.org, 
	Miklos Szeredi <miklos@...redi.hu>, linux-fsdevel@...r.kernel.org, 
	Richard Weinberger <richard@....at>, Anton Ivanov <anton.ivanov@...bridgegreys.com>, 
	Johannes Berg <johannes@...solutions.net>, linux-um@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/6] ceph: return the correct dentry on mkdir

On Thu, Feb 27, 2025 at 12:32:55PM +1100, NeilBrown wrote:
> ceph already splices the correct dentry (in splice_dentry()) from the
> result of mkdir but does nothing more with it.
> 
> Now that ->mkdir can return a dentry, return the correct dentry.
> 
> Note that previously ceph_mkdir() could call
>    ceph_init_inode_acls()
> on the inode from the wrong dentry, which would be NULL.  This
> is safe as ceph_init_inode_acls() checks for NULL, but is not
> strictly correct.  With this patch, the inode for the returned dentry
> is passed to ceph_init_inode_acls().
> 
> Reviewed-by: Viacheslav Dubeyko <Slava.Dubeyko@....com>
> Signed-off-by: NeilBrown <neilb@...e.de>
> ---
>  fs/ceph/dir.c | 24 ++++++++++++++++--------
>  1 file changed, 16 insertions(+), 8 deletions(-)
> 
> diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
> index 39e0f240de06..5e98394e2dca 100644
> --- a/fs/ceph/dir.c
> +++ b/fs/ceph/dir.c
> @@ -1099,6 +1099,7 @@ static struct dentry *ceph_mkdir(struct mnt_idmap *idmap, struct inode *dir,
>  	struct ceph_client *cl = mdsc->fsc->client;
>  	struct ceph_mds_request *req;
>  	struct ceph_acl_sec_ctx as_ctx = {};
> +	struc dentry *ret;

Forgot to mention that I fixed this when I applied.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ