public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: task's thread_info print in kernel oops
       [not found] <CAB5gott47+n7r_XUgxQHfxtc5zG78Ecn_xSQ4jp3fj9Ryd8QoQ@mail.gmail.com>
@ 2014-07-13 19:57 ` Oleg Nesterov
  2014-07-14 20:48 ` Andrew Morton
  1 sibling, 0 replies; 2+ messages in thread
From: Oleg Nesterov @ 2014-07-13 19:57 UTC (permalink / raw)
  To: Vaibhav Shinde; +Cc: tj, Andrew Morton, linux-kernel, Linus Torvalds

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: <current_thread_info()>
> task.ti <task_thread_info(current)
>
> 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: task's thread_info print in kernel oops
       [not found] <CAB5gott47+n7r_XUgxQHfxtc5zG78Ecn_xSQ4jp3fj9Ryd8QoQ@mail.gmail.com>
  2014-07-13 19:57 ` task's thread_info print in kernel oops Oleg Nesterov
@ 2014-07-14 20:48 ` Andrew Morton
  1 sibling, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2014-07-14 20:48 UTC (permalink / raw)
  To: Vaibhav Shinde; +Cc: tj, linux-kernel, oleg, Linus Torvalds

On Mon, 14 Jul 2014 00:46:55 +0530 Vaibhav Shinde <v.bhav.shinde@gmail.com> wrote:

> Dear All,
> 
> 
> 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: <current_thread_info()>
> task.ti <task_thread_info(current)
> 
> 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
> 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());
>  }

ia64 defines __HAVE_THREAD_FUNCTIONS and implements a custom
task_thread_info().  Whether the resulting output is useful I cannot
say...



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-07-14 20:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CAB5gott47+n7r_XUgxQHfxtc5zG78Ecn_xSQ4jp3fj9Ryd8QoQ@mail.gmail.com>
2014-07-13 19:57 ` task's thread_info print in kernel oops Oleg Nesterov
2014-07-14 20:48 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox