Re: [PATCH 4/6] libmultipath: io_err_stat: call io_destroy() before free_io_err_pathvec()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 24, 2023 at 06:49:35PM +0200, mwilck@xxxxxxxx wrote:
> From: Martin Wilck <mwilck@xxxxxxxx>
> 
> Signed-off-by: Martin Wilck <mwilck@xxxxxxxx>
> ---
>  libmultipath/io_err_stat.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libmultipath/io_err_stat.c b/libmultipath/io_err_stat.c
> index c474c34..1982915 100644
> --- a/libmultipath/io_err_stat.c
> +++ b/libmultipath/io_err_stat.c
> @@ -751,6 +751,6 @@ void stop_io_err_stat_thread(void)
>  		pthread_cancel(io_err_stat_thr);
>  
>  	pthread_join(io_err_stat_thr, NULL);
> -	free_io_err_pathvec();
>  	io_destroy(ioctx);
> +	free_io_err_pathvec();

This looks to me like another reason why we don't want the
cancel_inflight_io() function in free_io_err_stat_path(). I don't think
it's valid to call io_cancel(), which cancel_inflight_io() does, after
you call io_destroy().

-Ben

>  }
> -- 
> 2.42.0





[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux