lkml.org 
[lkml]   [2002]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] BUG(): sched.c: Line 944
From
Date
On Tue, 2002-09-17 at 04:12, Robert Love wrote:

> I implemented exactly what you detailed, with one change: we need to
> check kernel_locked() before setting lock_depth because it is valid to
> exit() while holding the BKL. Aside from kernel code that does it
> intentionally, crashed code (e.g. modules) would have the same problem.

fsck, this is non-ending... obviously, this is insufficient:
preempt_count will equal two if the BKL was previously held and
in_atomic() will trip.

This should work:

if (likely(!kernel_locked())
tsk->lock_depth = -2;
else {
/* compensate for BKL; we still cannot preempt */
preempt_enable_no_resched();
}

look sane?

Now, remind me why this is all worth it...

Robert Love

-
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.091 / U:1.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site