Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1505554
| From | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] x86/dumpstack: on oops do not rewind stack for kthread |
| Date | 2016-10-21 10:10 +0200 |
| Message-ID | <suD3Q-2RW-25@gated-at.bofh.it> (permalink) |
| References | <sjS6e-2q3-7@gated-at.bofh.it> <suuDg-5F6-13@gated-at.bofh.it> <suB22-1nm-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, 21 Oct 2016, Peter Zijlstra wrote: > We need to preserve the entire struct kthread on the stack, kthread just > abuses that pointer to stash an on-stack kthread descriptor. See > kthread(): > > current->vfork_done = &self.exited; > > Its a horrible horrible thing kthread does. I suppose there might have > been some intent by keeping that exited completion last in the > structure, but *shudder*. > > But yes, leaving enough stack to not clobber that might keep this horror > show working. > > ISTR talk about alternative schemes for this a long time ago, but I > cannot recall :-( The simplest solution would be to stick struct kthread into task_struct, but that's bloat. But we can allocate it seperately along with kthread_create_info. That's pretty straight forward. Thanks, tglx
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH 1/2] x86/dumpstack: on oops do not rewind stack for kthread Andy Lutomirski <luto@amacapital.net> - 2016-10-21 01:10 +0200
Re: [PATCH 1/2] x86/dumpstack: on oops do not rewind stack for kthread Peter Zijlstra <peterz@infradead.org> - 2016-10-21 08:00 +0200
Re: [PATCH 1/2] x86/dumpstack: on oops do not rewind stack for kthread Thomas Gleixner <tglx@linutronix.de> - 2016-10-21 10:10 +0200
csiph-web