Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759066AbcJYP6s (ORCPT ); Tue, 25 Oct 2016 11:58:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32944 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752973AbcJYP6q (ORCPT ); Tue, 25 Oct 2016 11:58:46 -0400 Date: Tue, 25 Oct 2016 17:57:12 +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: <20161025155712.GA12546@redhat.com> References: <20161025110357.8821-1-roman.penyaev@profitbricks.com> <20161025125615.GA4326@redhat.com> <20161025141920.GC4326@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161025141920.GC4326@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.26]); Tue, 25 Oct 2016 15:58:46 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 452 Lines: 17 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. Oleg.