lkml.org 
[lkml]   [2002]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] BUG(): sched.c: Line 944

On 16 Sep 2002, Robert Love wrote:
>
> The current in_atomic() check fails with kernel preemption enabled since
> we set preempt_count to PREEMPT_ACTIVE in preempt_schedule().
>
> We need to additionally check whether PREEMPT_ACTIVE is set.

Would it not be a lot better to just mask off PREEMPT_ACTIVE() instead of
checking for it explicitly.

The in_interrupt() etc stuff already effectively do this by masking off
the HARDIRQ_MASK etc. I would prefer a patch to hardirq.h that just adds a
#define to make preempt_count() not contain PREEMPT_ACTIVE - and make the
PREEMPT_ACTIVE checks be a totally separate check (logic: it's not a
count, so it shouldn't show up in preempt_count())

> There is also still the issue that bugging out is a bit drastic and a
> hindrance to debugging; but I will tackle that later. For now, please
> apply this so we can at least boot with preemption enabled.

I certainly wouldn't mind the DEBUG/WARNING/FATAL infrastructure discussed
earlier..

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:22    [W:0.088 / U:1.768 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site