2.2 keventd fix
PATCH 1/1 2.2 keventd fix
In the 2.2 version of keventd flush_scheduled_tasks() always oopses. It adds a tq_struct with NULL routine to kick keventd to life which is skipped by 2.4 run_task_queue() but the 2.2 one tries to execute it.
The following patch fixes that, I also added some spin locking from the 2.4 version which seems to be added after the backport. (patch against 2.2.20)
kernel/context.c +4 -1
@@ -101,8 +101,10 @@if (signal_pending (curtask)) {while (waitpid (-1 , (unsigned int *)0 , __WALL|WNOHANG ) >0 ) ; +spin_lock_irq (&curtask->sigmask_lock);flush_signals (curtask);recalc_sigpending (curtask); +spin_unlock_irq (&curtask->sigmask_lock); } } }
@@ -119,7 +121,8 @@* The caller should hold no spinlocks and should hold no semaphores which could * cause the scheduled tasks to block. */ -static struct tq_struct dummy_task; +static void dummy_routine (void *whatever) {} +static struct tq_struct dummy_task = { routine: dummy_routine };void flush_scheduled_tasks (void ) {
Signature · 1 line
Andreas Bombe <[email protected]> DSA key 0x04880A44