* [PATCH -rt] remove in_interrupt() BUG_ON in exit path [not found] <20071030223635.719787685@mvista.com> @ 2007-10-30 22:40 ` Daniel Walker 2007-10-30 23:44 ` Steven Rostedt 0 siblings, 1 reply; 4+ messages in thread From: Daniel Walker @ 2007-10-30 22:40 UTC (permalink / raw) To: mingo; +Cc: linux-kernel, linux-rt-users, rostedt, kraj As you can see from the patch there is already a case to catch this type of problem. This BUG_ON() adds a resursive OOPS , since BUG() causes an OOPS and the OOPS just calls do_exit() , and do_exit() just causes another OOPS with this BUG_ON().. If we call panic() here then it's clear what the problem was, instead of causing an endless recursive crash. Signed-off-by: Daniel Walker <dwalker@mvista.com> --- kernel/exit.c | 1 - 1 file changed, 1 deletion(-) Index: linux-2.6.23.1/kernel/exit.c =================================================================== --- linux-2.6.23.1.orig/kernel/exit.c +++ linux-2.6.23.1/kernel/exit.c @@ -895,7 +895,6 @@ fastcall NORET_TYPE void do_exit(long co WARN_ON(atomic_read(&tsk->fs_excl)); - BUG_ON(in_interrupt()); if (unlikely(in_interrupt())) panic("Aiee, killing interrupt handler!"); if (unlikely(!tsk->pid)) -- -- ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -rt] remove in_interrupt() BUG_ON in exit path 2007-10-30 22:40 ` [PATCH -rt] remove in_interrupt() BUG_ON in exit path Daniel Walker @ 2007-10-30 23:44 ` Steven Rostedt 2007-10-30 23:43 ` Daniel Walker 0 siblings, 1 reply; 4+ messages in thread From: Steven Rostedt @ 2007-10-30 23:44 UTC (permalink / raw) To: Daniel Walker; +Cc: mingo, linux-kernel, linux-rt-users, kraj -- On Tue, 30 Oct 2007, Daniel Walker wrote: > As you can see from the patch there is already a case to catch this type > of problem. This BUG_ON() adds a resursive OOPS , since BUG() causes an OOPS > and the OOPS just calls do_exit() , and do_exit() just causes another OOPS with > this BUG_ON().. If we call panic() here then it's clear what the problem was, > instead of causing an endless recursive crash. > > Signed-off-by: Daniel Walker <dwalker@mvista.com> > > --- > kernel/exit.c | 1 - > 1 file changed, 1 deletion(-) > > Index: linux-2.6.23.1/kernel/exit.c > =================================================================== > --- linux-2.6.23.1.orig/kernel/exit.c > +++ linux-2.6.23.1/kernel/exit.c > @@ -895,7 +895,6 @@ fastcall NORET_TYPE void do_exit(long co > > WARN_ON(atomic_read(&tsk->fs_excl)); > > - BUG_ON(in_interrupt()); > if (unlikely(in_interrupt())) > panic("Aiee, killing interrupt handler!"); > if (unlikely(!tsk->pid)) I did this change once before, while debugging. I had the same issue. This BUG_ON was giving me recursive crashes that prevented me knowing WTF was going on. I thought I even submitted a patch to remove it. Perhaps I forgot to. Nope, I did! http://www.ussg.iu.edu/hypermail/linux/kernel/0707.0/1804.html Since the change is added by the preempt-realtime-core.patch, I'll just remove it from there. IOW, I'll fold this into that patch. -- Steve ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -rt] remove in_interrupt() BUG_ON in exit path 2007-10-30 23:44 ` Steven Rostedt @ 2007-10-30 23:43 ` Daniel Walker 2007-10-30 23:53 ` Steven Rostedt 0 siblings, 1 reply; 4+ messages in thread From: Daniel Walker @ 2007-10-30 23:43 UTC (permalink / raw) To: Steven Rostedt; +Cc: mingo, linux-kernel, linux-rt-users, kraj On Tue, 2007-10-30 at 19:44 -0400, Steven Rostedt wrote: > I did this change once before, while debugging. I had the same issue. This > BUG_ON was giving me recursive crashes that prevented me knowing WTF was > going on. I thought I even submitted a patch to remove it. Perhaps I > forgot to. Nope, I did! > > http://www.ussg.iu.edu/hypermail/linux/kernel/0707.0/1804.html I wonder if Ingo had his reasons for keeping it.. They're may have been a benefit to doing a BUG_ON at one point .. I don't know .. Daniel ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -rt] remove in_interrupt() BUG_ON in exit path 2007-10-30 23:43 ` Daniel Walker @ 2007-10-30 23:53 ` Steven Rostedt 0 siblings, 0 replies; 4+ messages in thread From: Steven Rostedt @ 2007-10-30 23:53 UTC (permalink / raw) To: Daniel Walker; +Cc: mingo, linux-kernel, linux-rt-users, kraj -- On Tue, 30 Oct 2007, Daniel Walker wrote: > On Tue, 2007-10-30 at 19:44 -0400, Steven Rostedt wrote: > > > I did this change once before, while debugging. I had the same issue. This > > BUG_ON was giving me recursive crashes that prevented me knowing WTF was > > going on. I thought I even submitted a patch to remove it. Perhaps I > > forgot to. Nope, I did! > > > > http://www.ussg.iu.edu/hypermail/linux/kernel/0707.0/1804.html > > I wonder if Ingo had his reasons for keeping it.. They're may have been > a benefit to doing a BUG_ON at one point .. I don't know .. > I don't know. But since we now know at least two people got burned by this BUG_ON being there (you and me). Maybe this was added before panic did a dump_stack. Which I have no idea why the mainline doesn't dump_stack on panic. Hmm, I think I'll send a patch to see what people say ;-) -- Steve ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-10-30 23:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20071030223635.719787685@mvista.com>
2007-10-30 22:40 ` [PATCH -rt] remove in_interrupt() BUG_ON in exit path Daniel Walker
2007-10-30 23:44 ` Steven Rostedt
2007-10-30 23:43 ` Daniel Walker
2007-10-30 23:53 ` Steven Rostedt
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®