All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Vaibhav Shinde <v.bhav.shinde@gmail.com>
Cc: tj@kernel.org, Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: task's thread_info print in kernel oops
Date: Sun, 13 Jul 2014 21:57:08 +0200	[thread overview]
Message-ID: <20140713195708.GA6528@redhat.com> (raw)
In-Reply-To: <CAB5gott47+n7r_XUgxQHfxtc5zG78Ecn_xSQ4jp3fj9Ryd8QoQ@mail.gmail.com>

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


       reply	other threads:[~2014-07-13 19:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAB5gott47+n7r_XUgxQHfxtc5zG78Ecn_xSQ4jp3fj9Ryd8QoQ@mail.gmail.com>
2014-07-13 19:57 ` Oleg Nesterov [this message]
2014-07-14 20:48 ` task's thread_info print in kernel oops Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140713195708.GA6528@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=v.bhav.shinde@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.