Received: by 10.192.165.148 with SMTP id m20csp699729imm; Wed, 25 Apr 2018 06:25:09 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/v9ATCXGAmbHFEw9QPOuY9XT55mzjK4s9GCcaWqDczCFu5HPB0T55v0FMlJgIeLttGw95l X-Received: by 10.98.63.78 with SMTP id m75mr27684708pfa.176.1524662709832; Wed, 25 Apr 2018 06:25:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524662709; cv=none; d=google.com; s=arc-20160816; b=DTib2eHQlidj9aTh0RMBNLiGckrhH3B44blIjTDYSKFAjThCTZdpliV+YpFvMWSQZp NnM1BsQaVXHXy1acBY67tgincIPRqZjldhkboJjLQNOv4xoQ+0qIMpMOdyoVRq7LFGKU PscdXB5Ner8wzu7yfxxVG/vsC8MuU4en+uQv+spBVIyT0sZbEQ6CFRDMKL6gVnFP3qFX WAZMdOSKIwCu+qzP4C9wT7Lb/0EDpnn5Qhes6zmziUWiVyxFcd68X36zduFEKIcEDu9w SOjl8G58ayE8PaFwJ5Jb4yo8G/wxHIq74KuofnBtyI/o2ln5BKnelOmfI60fzZ78HhZf Jflg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:to :from:date:arc-authentication-results; bh=wKGYQCK9k5w3wFb6OXelZ84HwszSiiD2+EhDJmiPWzY=; b=JePHnTbNpqSLMXKMhaR8p8m6b8Zjp/3zhPCiWAzKwXpe4QqJUKef6XiblS/vIhmBUf lwilbNEOrkJSyL+GOaDPBi3tcP6QIQxCvRz5UtaKFgcYP7PXvZLMWr0UmcuHghfQvGOf c4sX3OHg5XIKkLv+L7Oenr3i0NVdzXNysHIDg9KNmyati1NRsF6xNYsoKpvWnbzoc98s YY8Zl5OC8Dh6vwB2dceDZrvgYEKliC6WVJG1+WSTOQz3EPnlb32zMJSFHGFVBlmMxdZ5 eCpz3JLXNgJwyPMIqpwXoyP6R+8n/gnHN+C8ZF/pyP1htuKitiF+MXaF9jXcs+W2LSEk g74Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x19si13764224pgc.261.2018.04.25.06.24.55; Wed, 25 Apr 2018 06:25:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754074AbeDYNWc (ORCPT + 99 others); Wed, 25 Apr 2018 09:22:32 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:55314 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752722AbeDYNWb (ORCPT ); Wed, 25 Apr 2018 09:22:31 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 11C3BFA466; Wed, 25 Apr 2018 13:22:31 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.34.27.30]) by smtp.corp.redhat.com (Postfix) with SMTP id 39183215CDCB; Wed, 25 Apr 2018 13:22:29 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Wed, 25 Apr 2018 15:22:30 +0200 (CEST) Date: Wed, 25 Apr 2018 15:22:28 +0200 From: Oleg Nesterov To: Andrey Grodzovsky , Michel =?iso-8859-1?Q?D=E4nzer?= , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, David.Panariti@amd.com, ebiederm@xmission.com, Alexander.Deucher@amd.com, akpm@linux-foundation.org, Christian.Koenig@amd.com Subject: Re: [PATCH 2/3] drm/scheduler: Don't call wait_event_killable for signaled process. Message-ID: <20180425132228.GC7592@redhat.com> References: <1524583836-12130-1-git-send-email-andrey.grodzovsky@amd.com> <1524583836-12130-3-git-send-email-andrey.grodzovsky@amd.com> <7313704c-0693-0bb9-8818-99cd2b7c0ca0@daenzer.net> <20180424194418.GE25142@phenom.ffwll.local> <20180424214027.GG25142@phenom.ffwll.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180424214027.GG25142@phenom.ffwll.local> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Wed, 25 Apr 2018 13:22:31 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Wed, 25 Apr 2018 13:22:31 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'oleg@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/24, Daniel Vetter wrote: > > wait_event_killabel doesn't check for fatal_signal_pending before calling > schedule, so definitely has a nice race there. This is fine. See the signal_pending_state() check in __schedule(). And this doesn't differ from wait_event_interruptible(), it too doesn't check signal_pending(), we rely on schedule() which must not block if the caller is signalled/killed. The problem is that it is not clear what should fatal_signal_pending() or even signal_pending() mean after exit_signals(). Oleg.