Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1432172
| From | Linus Torvalds <torvalds@linux-foundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: kthread_stop insanity (Re: [[DEBUG] force] 2642458962: BUG: unable to handle kernel paging request at ffffc90000997f18) |
| Date | 2016-06-27 19:20 +0200 |
| Message-ID | <rOImt-3d4-13@gated-at.bofh.it> (permalink) |
| References | <rOxhn-4pl-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sun, Jun 26, 2016 at 10:22 PM, Andy Lutomirski <luto@kernel.org> wrote:
>
> kthread_stop is *sick*.
>
> struct kthread self;
>
>
> current->vfork_done = &self.exited;
>
>
> do_exit(ret);
>
> And then some other thread goes and waits for the completion, which is
> *on the stack*, which, in any sane world (e.g. with my series
> applied), is long gone by then.
Yeah. To be fair, that used to work. And the waiter does actually get
a reference to the task struct, and with the lifetime of the stack
historically being the same as the task struct, it was even being
fairly careful about it.
But yes, it's disgusting, and doesn't work in the new world order, and
I think it should be fairly easy to fix. Although getting the lifetime
right for a separately allocated "struct kthread_struct" might be a
bit exciting.
Linus
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll 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