Messages in this thread | | | Date | Mon, 23 May 2016 19:16:16 -0700 | Subject | Re: [PATCH v3 3/3] sched, x86: Check that we're on the right stack in schedule and __might_sleep | From | Linus Torvalds <> |
| |
On Mon, May 23, 2016 at 7:09 PM, Andy Lutomirski <luto@amacapital.net> wrote: > > What about this silly fix? (Pardon the probable whitespace damage.)
That looks fine to me, and has a reason for it.
That said, I'm not convinced about the preempt_enable/preempt_disable excuse: that would be horribly buggy anyway, and has nothing to do with IST's. Why protect against random insane bugs?
So the "3*" certainly doesn't hurt, but and I won't argue more against it, but it looks pretty magical and made-up. Might as well just add/subtract one. You can never protect against people who intentionally write buggy code, and if it's protecting against unintentional buggy code I don't see why the IST case is so special when it's just a tiny fraction of code..
Linus
| |