Ingo Molnar made a patch to reveal this bug, but as yet nobody has
submitted a fix. The patch to detect it is below:
--- exit.c.old Tue Sep 23 00:10:59 1997
+++ exit.c Mon Oct 13 21:48:09 1997
@@ -390,10 +390,18 @@
}
}
+#include <linux/kernel_stat.h>
+#define NOSCHEDULE_ON() int __curr_ctx = kstat.context_swtch;
+#define NOSCHEDULE_OFF() if (__curr_ctx != kstat.context_swtch) \
+ printk("Hey! illegal scheduling at: %d:%s.\n", \
+ __LINE__,__FILE__);
+
static inline void close_files(struct files_struct * files)
{
int i, j;
+ NOSCHEDULE_ON();
+
j = 0;
for (;;) {
unsigned long set = files->open_fds.fds_bits[j];
@@ -408,6 +416,8 @@
set >>= 1;
}
}
+
+ NOSCHEDULE_OFF();
}
static inline void __exit_files(struct task_struct *tsk)
-Dan