From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============2307476909384962351==" MIME-Version: 1.0 From: Oleg Nesterov To: lkp@lists.01.org Subject: Re: kthread_stop insanity (Re: [[DEBUG] force] 2642458962: BUG: unable to handle kernel paging request at ffffc90000997f18) Date: Wed, 29 Jun 2016 00:59:29 +0200 Message-ID: <20160628225929.GB8591@redhat.com> In-Reply-To: List-Id: --===============2307476909384962351== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 06/28, Andy Lutomirski wrote: > > On Tue, Jun 28, 2016 at 1:12 PM, Oleg Nesterov wrote: > > > > So please forget unless you see another reason for this change. > > > > But I might need to that anyway for procfs to read the the stack, > right? Do you see another way to handle that case? Well, we could use probe_kernel_text() and recheck tsk->stack !=3D NULL after this. But, > I'm thinking of adding: > > void *try_get_task_stack(struct task_struct *tsk); > void put_task_stack(struct task_struct *tsk); Yes, agreed, this looks better. Oleg. --===============2307476909384962351==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752509AbcF1XAp (ORCPT ); Tue, 28 Jun 2016 19:00:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54776 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752212AbcF1XAo (ORCPT ); Tue, 28 Jun 2016 19:00:44 -0400 Date: Wed, 29 Jun 2016 00:59:29 +0200 From: Oleg Nesterov To: Andy Lutomirski Cc: Andy Lutomirski , Linus Torvalds , Peter Zijlstra , Tejun Heo , LKP , LKML , kernel test robot Subject: Re: kthread_stop insanity (Re: [[DEBUG] force] 2642458962: BUG: unable to handle kernel paging request at ffffc90000997f18) Message-ID: <20160628225929.GB8591@redhat.com> References: <20160627145443.GA17145@redhat.com> <20160627170010.GA21628@redhat.com> <20160628185853.GA3998@redhat.com> <20160628201249.GA12471@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 28 Jun 2016 22:59:32 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/28, Andy Lutomirski wrote: > > On Tue, Jun 28, 2016 at 1:12 PM, Oleg Nesterov wrote: > > > > So please forget unless you see another reason for this change. > > > > But I might need to that anyway for procfs to read the the stack, > right? Do you see another way to handle that case? Well, we could use probe_kernel_text() and recheck tsk->stack != NULL after this. But, > I'm thinking of adding: > > void *try_get_task_stack(struct task_struct *tsk); > void put_task_stack(struct task_struct *tsk); Yes, agreed, this looks better. Oleg.