Hi Chengguang,

On Tue, Nov 19, 2019 at 07:37:44PM +0800, Chengguang Xu wrote:
> There are some potential resource leaks in error case
> of erofs_fill_super(), so add proper error handling
> for it.
> 
> Signed-off-by: Chengguang Xu <[email protected]>
> ---
>  fs/erofs/super.c | 31 +++++++++++++++++++++++--------
>  1 file changed, 23 insertions(+), 8 deletions(-)
> 
> diff --git a/fs/erofs/super.c b/fs/erofs/super.c
> index 0e369494f2f2..06e721bd1c8c 100644
> --- a/fs/erofs/super.c
> +++ b/fs/erofs/super.c
> @@ -369,7 +369,7 @@ static int erofs_fill_super(struct super_block *sb, void 
> *data, int silent)
>       sb->s_fs_info = sbi;
>       err = erofs_read_superblock(sb);
>       if (err)
> -             return err;
> +             goto free;

Could you give some hints what is the potential leak exactly?
Actually, it was modified on purpose recently, see the following threads:
https://lore.kernel.org/r/[email protected]
and
https://lore.kernel.org/r/[email protected]

Thanks,
Gao Xiang

Reply via email to