diff --git a/src/afs/LINUX/osi_machdep.h b/src/afs/LINUX/osi_machdep.h index a9ff198ed5..c402a23880 100644 --- a/src/afs/LINUX/osi_machdep.h +++ b/src/afs/LINUX/osi_machdep.h @@ -31,45 +31,7 @@ #endif #ifdef RECALC_SIGPENDING_TAKES_VOID -/* Principal of maximum uselessness says we need to provide this */ -static inline int _has_pending_signals(sigset_t *signal, sigset_t *blocked) -{ - unsigned long ready; - long i; - - switch (_NSIG_WORDS) { - default: - for (i = _NSIG_WORDS, ready = 0; --i >= 0 ;) - ready |= signal->sig[i] &~ blocked->sig[i]; - break; - - case 4: ready = signal->sig[3] &~ blocked->sig[3]; - ready |= signal->sig[2] &~ blocked->sig[2]; - ready |= signal->sig[1] &~ blocked->sig[1]; - ready |= signal->sig[0] &~ blocked->sig[0]; - break; - - case 2: ready = signal->sig[1] &~ blocked->sig[1]; - ready |= signal->sig[0] &~ blocked->sig[0]; - break; - - case 1: ready = signal->sig[0] &~ blocked->sig[0]; - } - return ready != 0; -} - -#define PENDING(p,b) _has_pending_signals(&(p)->signal, (b)) -static inline void _recalc_sigpending_tsk(struct task_struct *t) -{ - t->sigpending = PENDING(&t->pending, &t->blocked) || -#ifdef STRUCT_TASK_STRUCT_HAS_SIG - PENDING(&t->sig->shared_pending, &t->blocked); -#else - PENDING(&t->signal->shared_pending, &t->blocked); -#endif -} - -#define RECALC_SIGPENDING(X) _recalc_sigpending_tsk(X) +#define RECALC_SIGPENDING(X) recalc_sigpending() #else #define RECALC_SIGPENDING(X) recalc_sigpending(X) #endif diff --git a/src/afs/LINUX/osi_misc.c b/src/afs/LINUX/osi_misc.c index 8146233285..a3ac7dd399 100644 --- a/src/afs/LINUX/osi_misc.c +++ b/src/afs/LINUX/osi_misc.c @@ -450,14 +450,6 @@ void osi_linux_mask() { SIG_UNLOCK(current); } -void osi_linux_unmask() { - SIG_LOCK(rxk_ListenerTask); - sigemptyset(&rxk_ListenerTask->blocked); - flush_signals(rxk_ListenerTask); - RECALC_SIGPENDING(rxk_ListenerTask); - SIG_UNLOCK(rxk_ListenerTask); -} - void osi_linux_rxkreg() { rxk_ListenerTask = current; } diff --git a/src/afs/LINUX/osi_module.c b/src/afs/LINUX/osi_module.c index a1af1684b0..211ba33b53 100644 --- a/src/afs/LINUX/osi_module.c +++ b/src/afs/LINUX/osi_module.c @@ -41,7 +41,6 @@ asmlinkage int (*sys_settimeofdayp)(struct timeval *tv, struct timezone *tz); #if !defined(AFS_ALPHA_LINUX20_ENV) asmlinkage int (*sys_socketcallp)(int call, long *args); #endif /* no socketcall on alpha */ -asmlinkage int (*sys_killp)(int pid, int signal); asmlinkage long (*sys_setgroupsp)(int gidsetsize, gid_t *grouplist); #ifdef EXPORTED_SYS_CALL_TABLE @@ -196,7 +195,7 @@ int init_module(void) { #if defined(AFS_IA64_LINUX20_ENV) unsigned long kernel_gp; - static struct fptr sys_kill, sys_settimeofday, sys_setgroups; + static struct fptr sys_settimeofday, sys_setgroups; #endif extern int afs_syscall(); extern long afs_xsetgroups(); @@ -322,21 +321,16 @@ error cant support this yet. kernel_gp = ((struct fptr *)printk)->gp; sys_settimeofdayp = (void *) &sys_settimeofday; - sys_killp = (void *) &sys_kill; ((struct fptr *)sys_settimeofdayp)->ip = SYSCALL2POINTER sys_call_table[__NR_settimeofday - 1024]; ((struct fptr *)sys_settimeofdayp)->gp = kernel_gp; - ((struct fptr *)sys_killp)->ip = - SYSCALL2POINTER sys_call_table[__NR_kill - 1024]; - ((struct fptr *)sys_killp)->gp = kernel_gp; #else /* !AFS_IA64_LINUX20_ENV */ sys_settimeofdayp = SYSCALL2POINTER sys_call_table[__NR_settimeofday]; #ifdef __NR_socketcall sys_socketcallp = SYSCALL2POINTER sys_call_table[__NR_socketcall]; #endif /* no socketcall on alpha */ - sys_killp = SYSCALL2POINTER sys_call_table[__NR_kill]; #endif /* AFS_IA64_LINUX20_ENV */ /* setup AFS entry point. */ diff --git a/src/afs/afs_osi.c b/src/afs/afs_osi.c index cea0d04c71..277786a83d 100644 --- a/src/afs/afs_osi.c +++ b/src/afs/afs_osi.c @@ -289,9 +289,6 @@ void afs_osi_MaskSignals(){ /* unmask signals in rxk listener */ void afs_osi_UnmaskRxkSignals(){ -#ifdef AFS_LINUX22_ENV - osi_linux_unmask(); -#endif } /* register rxk listener proc info */ diff --git a/src/rx/LINUX/rx_knet.c b/src/rx/LINUX/rx_knet.c index 235253a8af..eb6ccdb87e 100644 --- a/src/rx/LINUX/rx_knet.c +++ b/src/rx/LINUX/rx_knet.c @@ -17,6 +17,7 @@ RCSID("$Header$"); +#include #ifdef AFS_LINUX22_ENV #include "../rx/rx_kcommon.h" #if defined(AFS_LINUX24_ENV) @@ -175,11 +176,18 @@ int osi_NetReceive(osi_socket so, struct sockaddr_in *from, void osi_StopListener(void) { - extern int (*sys_killp)(); + struct task_struct *listener; extern int rxk_ListenerPid; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) + read_lock(&tasklist_lock); +#endif + listener = find_task_by_pid(rxk_ListenerPid); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) + read_unlock(&tasklist_lock); +#endif while (rxk_ListenerPid) { - (void) (*sys_killp)(rxk_ListenerPid, SIGKILL); + force_sig(SIGKILL, listener); afs_osi_Sleep(&rxk_ListenerPid); } sock_release(rx_socket);