From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751050AbdEIXFX (ORCPT ); Tue, 9 May 2017 19:05:23 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:36264 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750747AbdEIXFW (ORCPT ); Tue, 9 May 2017 19:05:22 -0400 Date: Tue, 9 May 2017 16:05:20 -0700 From: Andrew Morton To: David Rientjes Cc: Alexander Viro , linux-kernel@vger.kernel.org, Jan Kara , Davide Libenzi Subject: Re: [patch] fs, epoll: short circuit fetching events if thread has been killed Message-Id: <20170509160520.a394a93544419eb53d2d0879@linux-foundation.org> In-Reply-To: References: X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 3 May 2017 17:22:53 -0700 (PDT) David Rientjes wrote: > We've encountered zombies that are waiting for a thread to exit that are > looping in ep_poll() almost endlessly although there is a pending SIGKILL > as a result of a group exit. > > This happens because we always find ep_events_available() and fetch more > events and never are able to check for signal_pending() that would break > from the loop and return -EINTR. > > Special case fatal signals and break immediately to guarantee that we > loop to fetch more events and delay making a timely exit. > > It would also be possible to simply move the check for signal_pending() > higher than checking for ep_events_available(), but there have been no > reports of delayed signal handling other than SIGKILL preventing zombies > from exiting that would be fixed by this. Any thoughts on the priority of this? -stable? If so, why?