Re: [git pull] vfs.git sysv pile

From: Jan Kara
Date: Fri Mar 03 2023 - 04:26:24 EST


On Thu 02-03-23 19:26:36, Al Viro wrote:
> On Thu, Mar 02, 2023 at 10:59:31AM +0100, Jan Kara wrote:
> > OK, I think your changes to ext2_rename() in PATCH 1 leak a reference and
> > mapping of old_page
>
> In which case? ext2_delete_entry() failing?
>
> - ext2_delete_entry(old_de, old_page, old_page_addr);
> + err = ext2_delete_entry(old_de, old_page, old_page_addr);
> + if (err)
> + goto out_dir;
>
> and on out_dir: we have
> out_dir:
> if (dir_de)
> ext2_put_page(dir_page, dir_page_addr);
> out_old:
> ext2_put_page(old_page, old_page_addr);
> out:
> return err;
>
> How is the old_page leaked here?

Ah, sorry, I got confused by the diff. Now that I'm looking into the full
source, it's all fine. Sorry for the noise.

Honza

--
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR