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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230116111621.rffhrhkdggszwlnu@quack3>
Date:   Mon, 16 Jan 2023 12:16:21 +0100
From:   Jan Kara <jack@...e.cz>
To:     Christoph Hellwig <hch@....de>
Cc:     jack@...e.com, linux-ext4@...r.kernel.org
Subject: Re: [PATCH] ext2: propagate errors from ext2_prepare_chunk

On Mon 16-01-23 09:52:05, Christoph Hellwig wrote:
> Propagate errors from ext2_prepare_chunk to the callers and handle them
> there.  While touching the prototype also turn update_times into a bool
> from the current int used as bool.
> 
> Signed-off-by: Christoph Hellwig <hch@....de>


> diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c
> index c056957221a225..18b3d5af77240b 100644
> --- a/fs/ext2/namei.c
> +++ b/fs/ext2/namei.c
> @@ -370,7 +370,10 @@ static int ext2_rename (struct user_namespace * mnt_userns,
>  			err = PTR_ERR(new_de);
>  			goto out_dir;
>  		}
> -		ext2_set_link(new_dir, new_de, new_page, page_addr, old_inode, 1);
> +		err = ext2_set_link(new_dir, new_de, new_page, page_addr,
> +				    old_inode, true);
> +		if (err)
> +			goto out_dir;
>  		ext2_put_page(new_page, page_addr);

AFAICT we need to call ext2_put_page(new_page, page_addr) also in case of
error here. I'll fix it up on commit. Thanks for the patch.

								Honza
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ