[Devel] [PATCH] fs/fuse kio: fix fuse_mutex leak in pcs_fuse_stat_fini()

Andrey Zaitsev azaitsev at virtuozzo.com
Thu Jul 4 11:37:58 MSK 2019


ok for me

03.07.2019 15:09, Pavel Butsykin пишет:
> Signed-off-by: Pavel Butsykin <pbutsykin at virtuozzo.com>
> ---
>   fs/fuse/kio/pcs/fuse_stat.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/fs/fuse/kio/pcs/fuse_stat.c b/fs/fuse/kio/pcs/fuse_stat.c
> index bc3879d33de9..580f655e7567 100644
> --- a/fs/fuse/kio/pcs/fuse_stat.c
> +++ b/fs/fuse/kio/pcs/fuse_stat.c
> @@ -848,8 +848,10 @@ fail1:
>   void pcs_fuse_stat_fini(struct pcs_fuse_stat *stat)
>   {
>   	mutex_lock(&fuse_mutex);
> -	if (!stat->kio_stat)
> +	if (!stat->kio_stat) {
> +		mutex_unlock(&fuse_mutex);
>   		return;
> +	}
>   
>   	if (fuse_control_sb) {
>   		if (stat->iostat)
> @@ -864,6 +866,7 @@ void pcs_fuse_stat_fini(struct pcs_fuse_stat *stat)
>   			fuse_kio_rm_dentry(stat->cs_stats);
>   		fuse_kio_rm_dentry(stat->kio_stat);
>   	}
> +	stat->kio_stat = NULL;
>   	mutex_unlock(&fuse_mutex);
>   
>   	cancel_delayed_work_sync(&stat->work);





More information about the Devel mailing list