From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933773AbcIPM2a (ORCPT ); Fri, 16 Sep 2016 08:28:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46174 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934008AbcIPM2T (ORCPT ); Fri, 16 Sep 2016 08:28:19 -0400 Date: Fri, 16 Sep 2016 07:28:16 -0500 From: Josh Poimboeuf To: tip-bot for Andy Lutomirski Cc: linux-tip-commits@vger.kernel.org, luto@kernel.org, hpa@zytor.com, mingo@kernel.org, dvlasenk@redhat.com, linux-kernel@vger.kernel.org, jann@thejh.net, peterz@infradead.org, torvalds@linux-foundation.org, brgerst@gmail.com, tglx@linutronix.de, bp@alien8.de Subject: Re: [tip:x86/asm] x86/dumpstack: Pin the target stack when dumping it Message-ID: <20160916122816.lxfa3kmjukjevlrh@treble> References: <20160916115557.xsgxgjeefnsrrpct@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160916115557.xsgxgjeefnsrrpct@treble> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 16 Sep 2016 12:28:18 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Archived-At: List-Archive: List-Post: On Fri, Sep 16, 2016 at 06:55:57AM -0500, Josh Poimboeuf wrote: > On Fri, Sep 16, 2016 at 02:17:46AM -0700, tip-bot for Andy Lutomirski wrote: > > Commit-ID: 1959a60182f48879635812a03a99c02231ea8677 > > Gitweb: http://git.kernel.org/tip/1959a60182f48879635812a03a99c02231ea8677 > > Author: Andy Lutomirski > > AuthorDate: Thu, 15 Sep 2016 22:45:45 -0700 > > Committer: Ingo Molnar > > CommitDate: Fri, 16 Sep 2016 09:18:53 +0200 > > > > x86/dumpstack: Pin the target stack when dumping it > > > > Specifically, pin the stack in save_stack_trace_tsk() and > > show_trace_log_lvl(). > > > > This will prevent a crash if the target task dies before or while > > dumping its stack once we start freeing task stacks early. > > This causes a hang: The problem is that show_stack_log_lvl() can be called with a NULL task_struct pointer to indicate 'current'. No idea why that convention exists -- IMO we should just require the caller to pass 'current' directly. -- Josh