Re: [PATCH] io-wq: exclusively gate signal based exit on get_signal() return

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

 



Jens Axboe <axboe@xxxxxxxxx> writes:

> io-wq threads block all signals, except SIGKILL and SIGSTOP. We should not
> need any extra checking of signal_pending or fatal_signal_pending, rely
> exclusively on whether or not get_signal() tells us to exit.
>
> The original debugging of this issue led to the false positive that we
> were exiting on non-fatal signals, but that is not the case. The issue
> was around races with nr_workers accounting.

Acked-by: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx>

>
> Fixes: 87c169665578 ("io-wq: ensure we exit if thread group is exiting")
> Fixes: 15e20db2e0ce ("io-wq: only exit on fatal signals")
> Reported-by: Eric W. Biederman <ebiederm@xxxxxxxxxxxx>
> Reported-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
>
> ---
>
> diff --git a/fs/io-wq.c b/fs/io-wq.c
> index c2360cdc403d..5bf8aa81715e 100644
> --- a/fs/io-wq.c
> +++ b/fs/io-wq.c
> @@ -584,10 +584,7 @@ static int io_wqe_worker(void *data)
>  
>  			if (!get_signal(&ksig))
>  				continue;
> -			if (fatal_signal_pending(current) ||
> -			    signal_group_exit(current->signal))
> -				break;
> -			continue;
> +			break;
>  		}
>  		last_timeout = !ret;
>  	}



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux