From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751834AbaGMT6q (ORCPT ); Sun, 13 Jul 2014 15:58:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:29276 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750827AbaGMT6i (ORCPT ); Sun, 13 Jul 2014 15:58:38 -0400 Date: Sun, 13 Jul 2014 21:57:08 +0200 From: Oleg Nesterov To: Vaibhav Shinde Cc: tj@kernel.org, Andrew Morton , linux-kernel@vger.kernel.org, Linus Torvalds Subject: Re: task's thread_info print in kernel oops Message-ID: <20140713195708.GA6528@redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/14, Vaibhav Shinde wrote: > > During the kernel oops i observed the below debug message which shows the > address of task's thread_info struct > > task: ffff880468e61a80 ti: ffff88026bc86000 task.ti: ffff88026bc86000 > > ti: > task.ti > As per my understanding, both the function calls will return the address of > thread_info() struct of the current task, > so it would be always the same. > > If so, could we apply the below change ? > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c I too do not know, but perhaps this can help to detect that PER_CPU(kernel_stack) or task->stack was corrupted. > index b4e8500..904aeef 100644 > --- a/kernel/printk/printk.c > +++ b/kernel/printk/printk.c > @@ -2902,9 +2902,8 @@ void show_regs_print_info(const char *log_lvl) > { > dump_stack_print_info(log_lvl); > > - printk("%stask: %p ti: %p task.ti: %p\n", > - log_lvl, current, current_thread_info(), > - task_thread_info(current)); > + printk("%stask: %p ti: %p\n", > + log_lvl, current, current_thread_info()); > } > > #endif > > > > Thanks, > Vaibhav