Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1433274

Re: kthread_stop insanity (Re: [[DEBUG] force] 2642458962: BUG: unable to handle kernel paging request at ffffc90000997f18)

From Oleg Nesterov <oleg@redhat.com>
Newsgroups linux.kernel
Subject Re: kthread_stop insanity (Re: [[DEBUG] force] 2642458962: BUG: unable to handle kernel paging request at ffffc90000997f18)
Date 2016-06-28 22:20 +0200
Message-ID <rP7Ee-3d8-45@gated-at.bofh.it> (permalink)
References (1 earlier) <rOGb0-1Du-25@gated-at.bofh.it> <rOGXn-2br-11@gated-at.bofh.it> <rOI37-2Qk-17@gated-at.bofh.it> <rP6oO-2h2-17@gated-at.bofh.it> <rP6I9-2Di-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 06/28, Andy Lutomirski wrote:
>
> On Tue, Jun 28, 2016 at 11:58 AM, Oleg Nesterov <oleg@redhat.com> wrote:
> >
> > Then how (say) proc_pid_stack() can work? If it hits the task which is
> > alreay dead we are (probably) fine, valid_stack_ptr() should fail iiuc.
> >
> > But what if we race with the last schedule() ? "addr = *stack" can read
> > the already vfree'ed memory, no?
> >
> > Looks like print_context_stack/etc need probe_kernel_address or I missed
> > something.
>
> Yuck.  I suppose I could add a reference count to protect the stack.
> Would that simplify the kthread code?

Well yes, that is why I asked. So please tell me if you are going to
do this...

But we can fix kthread code without this hack which we do not need in
the long term anyway. Unfortunaly we need to cleanup kernel/smpboot.c
first. And I was going to do this a long ago for quite different reason ;)

So please forget unless you see another reason for this change.

Oleg.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

kthread_stop insanity (Re: [[DEBUG] force] 2642458962: BUG: unable to  handle kernel paging request at ffffc90000997f18) Andy Lutomirski <luto@kernel.org> - 2016-06-27 07:30 +0200
  Re: kthread_stop insanity (Re: [[DEBUG] force] 2642458962: BUG:  unable to handle kernel paging request at ffffc90000997f18) Peter Zijlstra <peterz@infradead.org> - 2016-06-27 10:30 +0200
  Re: kthread_stop insanity (Re: [[DEBUG] force] 2642458962: BUG:  unable to handle kernel paging request at ffffc90000997f18) Oleg Nesterov <oleg@redhat.com> - 2016-06-27 17:00 +0200
    Re: kthread_stop insanity (Re: [[DEBUG] force] 2642458962: BUG:  unable to handle kernel paging request at ffffc90000997f18) Andy Lutomirski <luto@amacapital.net> - 2016-06-27 17:50 +0200
      Re: kthread_stop insanity (Re: [[DEBUG] force] 2642458962: BUG:  unable to handle kernel paging request at ffffc90000997f18) Oleg Nesterov <oleg@redhat.com> - 2016-06-27 19:00 +0200
        Re: kthread_stop insanity (Re: [[DEBUG] force] 2642458962: BUG:  unable to handle kernel paging request at ffffc90000997f18) Oleg Nesterov <oleg@redhat.com> - 2016-06-28 21:00 +0200
          Re: kthread_stop insanity (Re: [[DEBUG] force] 2642458962: BUG:  unable to handle kernel paging request at ffffc90000997f18) Andy Lutomirski <luto@amacapital.net> - 2016-06-28 21:20 +0200
            Re: kthread_stop insanity (Re: [[DEBUG] force] 2642458962: BUG:  unable to handle kernel paging request at ffffc90000997f18) Oleg Nesterov <oleg@redhat.com> - 2016-06-28 22:20 +0200
              Re: kthread_stop insanity (Re: [[DEBUG] force] 2642458962: BUG:  unable to handle kernel paging request at ffffc90000997f18) Andy Lutomirski <luto@amacapital.net> - 2016-06-28 23:00 +0200
                Re: kthread_stop insanity (Re: [[DEBUG] force] 2642458962: BUG:  unable to handle kernel paging request at ffffc90000997f18) Linus Torvalds <torvalds@linux-foundation.org> - 2016-06-28 23:20 +0200
                Re: kthread_stop insanity (Re: [[DEBUG] force] 2642458962: BUG:  unable to handle kernel paging request at ffffc90000997f18) Linus Torvalds <torvalds@linux-foundation.org> - 2016-06-28 23:20 +0200
                Re: kthread_stop insanity (Re: [[DEBUG] force] 2642458962: BUG:  unable to handle kernel paging request at ffffc90000997f18) Andy Lutomirski <luto@amacapital.net> - 2016-06-28 23:30 +0200
                Re: kthread_stop insanity (Re: [[DEBUG] force] 2642458962: BUG:  unable to handle kernel paging request at ffffc90000997f18) Linus Torvalds <torvalds@linux-foundation.org> - 2016-06-28 23:40 +0200
                Re: kthread_stop insanity (Re: [[DEBUG] force] 2642458962: BUG:  unable to handle kernel paging request at ffffc90000997f18) Linus Torvalds <torvalds@linux-foundation.org> - 2016-06-28 23:50 +0200
                Re: kthread_stop insanity (Re: [[DEBUG] force] 2642458962: BUG:  unable to handle kernel paging request at ffffc90000997f18) Oleg Nesterov <oleg@redhat.com> - 2016-06-29 01:00 +0200
                Re: kthread_stop insanity (Re: [[DEBUG] force] 2642458962: BUG:  unable to handle kernel paging request at ffffc90000997f18) Oleg Nesterov <oleg@redhat.com> - 2016-06-29 01:10 +0200
                Re: kthread_stop insanity (Re: [[DEBUG] force] 2642458962: BUG:  unable to handle kernel paging request at ffffc90000997f18) Andy Lutomirski <luto@amacapital.net> - 2016-06-29 17:40 +0200
                [PATCH] kthread: to_live_kthread() needs try_get_task_stack() Oleg Nesterov <oleg@redhat.com> - 2016-06-29 20:10 +0200
                Re: [PATCH] kthread: to_live_kthread() needs try_get_task_stack() kbuild test robot <lkp@intel.com> - 2016-06-29 20:40 +0200
                Re: [PATCH] kthread: to_live_kthread() needs try_get_task_stack() Oleg Nesterov <oleg@redhat.com> - 2016-06-29 20:50 +0200
                Re: [PATCH] kthread: to_live_kthread() needs try_get_task_stack() kbuild test robot <lkp@intel.com> - 2016-06-29 21:00 +0200
                Re: [PATCH] kthread: to_live_kthread() needs try_get_task_stack() Andy Lutomirski <luto@amacapital.net> - 2016-06-30 01:10 +0200
          Re: kthread_stop insanity (Re: [[DEBUG] force] 2642458962: BUG:  unable to handle kernel paging request at ffffc90000997f18) Andy Lutomirski <luto@amacapital.net> - 2016-06-30 01:40 +0200
  Re: kthread_stop insanity (Re: [[DEBUG] force] 2642458962: BUG:  unable to handle kernel paging request at ffffc90000997f18) Linus Torvalds <torvalds@linux-foundation.org> - 2016-06-27 19:20 +0200

csiph-web