]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/commit
sched: panic on corrupted stack end
authorJann Horn <jannh@google.com>
Wed, 1 Jun 2016 09:55:07 +0000 (11:55 +0200)
committerSharif Inamdar <isharif@nvidia.com>
Wed, 2 Nov 2016 10:16:23 +0000 (15:46 +0530)
commit640e0313180c0ea4ee92df5be840d7cf5a513215
treedb44dba5b867ed541e20aaad417d0f7edc70a8b1
parented077c24ba15c7d29ec9d9cb118b7f77979d09b0
sched: panic on corrupted stack end

commit 29d6455178a09e1dc340380c582b13356227e8df upstream.

Until now, hitting this BUG_ON caused a recursive oops (because oops
handling involves do_exit(), which calls into the scheduler, which in
turn raises an oops), which caused stuff below the stack to be
overwritten until a panic happened (e.g.  via an oops in interrupt
context, caused by the overwritten CPU index in the thread_info).

Just panic directly.

Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/sched/core.c