lkml.org 
[lkml]   [2000]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH]: minor bug at schedule()
From
Date

Hi

I have found that we run botton handlers (in schedule()) when
we are in the middle of an interrupt. I think that is illegal, and
moved the test to the beginning of the function. In the case that the
running of the bottom handlers before the test is on purpose, could
somebody put a comment there, please.

I also remove an unneeded return.

Later, Juan.

diff -urN --exclude-from=/home/lfcia/quintela/work/kernel/exclude base/kernel/sched.c working/kernel/sched.c
--- base/kernel/sched.c Wed Sep 6 00:37:32 2000
+++ working/kernel/sched.c Fri Sep 8 00:43:11 2000
@@ -504,6 +504,9 @@
struct list_head *tmp;
int this_cpu, c;

+ if (in_interrupt())
+ goto scheduling_in_interrupt;
+
if (!current->active_mm) BUG();
if (tq_scheduler)
goto handle_tq_scheduler;
@@ -512,9 +515,6 @@
prev = current;
this_cpu = prev->processor;

- if (in_interrupt())
- goto scheduling_in_interrupt;
-
release_kernel_lock(prev, this_cpu);

/* Do "administrative" work here while we don't hold any locks */
@@ -696,7 +696,6 @@
scheduling_in_interrupt:
printk("Scheduling in interrupt\n");
BUG();
- return;
}

static inline void __wake_up_common (wait_queue_head_t *q, unsigned int mode,

--
In theory, practice and theory are the same, but in practice they
are different -- Larry McVoy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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