lkml.org 
[lkml]   [2016]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: kthread_stop insanity (Re: [[DEBUG] force] 2642458962: BUG: unable to handle kernel paging request at ffffc90000997f18)
    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.

    \
     
     \ /
      Last update: 2016-06-28 22:41    [W:2.929 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site