diff -urb linux/kernel/signal.c linux-sig/kernel/signal.c --- linux/kernel/signal.c Wed Jan 3 20:45:26 2001 +++ linux-sig/kernel/signal.c Wed Apr 4 03:10:44 2001 @@ -606,6 +606,35 @@ } /* + * kill_posix_vm_info() send a signal to a thread which isn't blocking the signal + * and which is executing in the current process. This is what is used + * to get POSIX signal semantics. + */ + +int kill_posix_vm_info(int sig, struct siginfo *info, struct mm_struct* vm_ptr) { + int retval = -EINVAL; + if (vm_ptr != NULL) { + struct task_struct *p; + + retval = -ESRCH; + read_lock(&tasklist_lock); + for_each_task(p) { + if (p->mm == vm_ptr) { + if (!sigismember(&(p->blocked), sig)) { + int err = send_sig_info(sig, info, p); + + if (retval) + retval = err; + break; + } + } + } + read_unlock(&tasklist_lock); + } + return retval; +} + +/* * kill_sl_info() sends a signal to the session leader: this is used * to send SIGHUP to the controlling process of a terminal when * the connection is lost. diff -urb linux/mm/filemap.c linux-sig/mm/filemap.c --- linux/mm/filemap.c Wed Apr 4 02:59:10 2001 +++ linux-sig/mm/filemap.c Wed Apr 4 02:49:47 2001 @@ -1544,7 +1544,10 @@ sinfo.si_code = SI_ASYNCIO; sinfo.si_value = sigev->sigev_value; - send_sig_info(sigev->sigev_signo, &sinfo, task); +#ifdef AIO_DEBUG + printk("Sending signal to mm %x of process %d\n", task->mm, task->pid); +#endif + kill_posix_vm_info(sigev->sigev_signo, &sinfo, task->mm); } } @@ -2178,7 +2181,7 @@ */ if (!page_cache) { spin_unlock(&pagecache_lock); - page_cache = page_cache_alloc(); + page_cache = page_cache_alloc(NULL); /* * That could have slept, so go around to the * very beginning..