From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23074C433DB for ; Thu, 25 Mar 2021 12:06:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E84F661A1B for ; Thu, 25 Mar 2021 12:06:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229659AbhCYMF4 (ORCPT ); Thu, 25 Mar 2021 08:05:56 -0400 Received: from out01.mta.xmission.com ([166.70.13.231]:36992 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229734AbhCYMFl (ORCPT ); Thu, 25 Mar 2021 08:05:41 -0400 Received: from in02.mta.xmission.com ([166.70.13.52]) by out01.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1lPOk7-007TfG-SD; Thu, 25 Mar 2021 06:05:39 -0600 Received: from ip68-227-160-95.om.om.cox.net ([68.227.160.95] helo=fess.xmission.com) by in02.mta.xmission.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1lPOk6-006NWb-TI; Thu, 25 Mar 2021 06:05:39 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Stefan Metzmacher Cc: Sasha Levin , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Jens Axboe References: <20210325112459.1926846-1-sashal@kernel.org> <20210325112459.1926846-43-sashal@kernel.org> Date: Thu, 25 Mar 2021 07:04:38 -0500 In-Reply-To: (Stefan Metzmacher's message of "Thu, 25 Mar 2021 12:34:18 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1lPOk6-006NWb-TI;;;mid=;;;hst=in02.mta.xmission.com;;;ip=68.227.160.95;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX18Lb2JrSghaFx8NMQ2AKONsIk2+oPW0fMQ= X-SA-Exim-Connect-IP: 68.227.160.95 X-SA-Exim-Mail-From: ebiederm@xmission.com Subject: Re: [PATCH AUTOSEL 5.11 43/44] signal: don't allow STOP on PF_IO_WORKER threads X-SA-Exim-Version: 4.2.1 (built Sat, 08 Feb 2020 21:53:50 +0000) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org Stefan Metzmacher writes: > Am 25.03.21 um 12:24 schrieb Sasha Levin: >> From: "Eric W. Biederman" >> >> [ Upstream commit 4db4b1a0d1779dc159f7b87feb97030ec0b12597 ] >> >> Just like we don't allow normal signals to IO threads, don't deliver a >> STOP to a task that has PF_IO_WORKER set. The IO threads don't take >> signals in general, and have no means of flushing out a stop either. >> >> Longer term, we may want to look into allowing stop of these threads, >> as it relates to eg process freezing. For now, this prevents a spin >> issue if a SIGSTOP is delivered to the parent task. >> >> Reported-by: Stefan Metzmacher >> Signed-off-by: Jens Axboe >> Signed-off-by: "Eric W. Biederman" >> Signed-off-by: Sasha Levin >> --- >> kernel/signal.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/kernel/signal.c b/kernel/signal.c >> index 55526b941011..00a3840f6037 100644 >> --- a/kernel/signal.c >> +++ b/kernel/signal.c >> @@ -288,7 +288,8 @@ bool task_set_jobctl_pending(struct task_struct *task, unsigned long mask) >> JOBCTL_STOP_SIGMASK | JOBCTL_TRAPPING)); >> BUG_ON((mask & JOBCTL_TRAPPING) && !(mask & JOBCTL_PENDING_MASK)); >> >> - if (unlikely(fatal_signal_pending(task) || (task->flags & PF_EXITING))) >> + if (unlikely(fatal_signal_pending(task) || >> + (task->flags & (PF_EXITING | PF_IO_WORKER)))) >> return false; >> >> if (mask & JOBCTL_STOP_SIGMASK) >> > > Again, why is this proposed for 5.11 and 5.10 already? Has the bit about the io worker kthreads been backported? If so this isn't horrible. If not this is nonsense. Eric