Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934175AbcJYQJl (ORCPT ); Tue, 25 Oct 2016 12:09:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49820 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932298AbcJYQJl (ORCPT ); Tue, 25 Oct 2016 12:09:41 -0400 Date: Tue, 25 Oct 2016 18:08:07 +0200 From: Oleg Nesterov To: Roman Penyaev Cc: Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Tejun Heo , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/1] workqueue: ignore dead tasks in a workqueue sleep hook Message-ID: <20161025160806.GA13257@redhat.com> References: <20161025110357.8821-1-roman.penyaev@profitbricks.com> <20161025125615.GA4326@redhat.com> <20161025141920.GC4326@redhat.com> <20161025155712.GA12546@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161025155712.GA12546@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 25 Oct 2016 16:09:40 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 645 Lines: 24 sorry for noise, forgot to mention... On 10/25, Oleg Nesterov wrote: > > On 10/25, Oleg Nesterov wrote: > > > > void oops_end_exit(void) > > { > > current->flags &= ~PF_WQ_WORKER; > > perhaps sonething else; > > } > > > > called by oops_end() before rewind_stack_do_exit() ? > > and "perhaps sonething else" above should probably clear current->plug, > it likely points to "struct blk_plug" on stack. > > and perhaps call task_work_run(). Currently only irq_thread() uses the > "destructor" work on stack, but think can have more users. and, probably absorb some code from do_exit(), say set_fs(USER_DS) and/or PF_EXITING check. Oleg.