public inbox for [email protected]
 help / color / mirror / Atom feed
From: [email protected] (Eric W. Biederman)
To: Jens Axboe <[email protected]>
Cc: io-uring <[email protected]>,
	Linus Torvalds <[email protected]>
Subject: Re: [PATCH] io-wq: exclusively gate signal based exit on get_signal() return
Date: Mon, 27 Sep 2021 12:00:16 -0500	[thread overview]
Message-ID: <87r1da6jj3.fsf@disp2133> (raw)
In-Reply-To: <[email protected]> (Jens Axboe's message of "Mon, 27 Sep 2021 10:58:03 -0600")

Jens Axboe <[email protected]> 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" <[email protected]>

>
> 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 <[email protected]>
> Reported-by: Linus Torvalds <[email protected]>
> Signed-off-by: Jens Axboe <[email protected]>
>
> ---
>
> 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;
>  	}

      reply	other threads:[~2021-09-27 17:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-27 16:58 [PATCH] io-wq: exclusively gate signal based exit on get_signal() return Jens Axboe
2021-09-27 17:00 ` Eric W. Biederman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r1da6jj3.fsf@disp2133 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox