NFS and 2.1.117 and oddities

Alan Cox (alan@lxorguk.ukuu.org.uk)
Sat, 22 Aug 98 00:11 BST


Can someone cast more eyes over the following code. This is executed
before the wait on page sleep in the NFS and during synchronous RPC
execution.

Linus claim is that the emacs/netscape oddities are because a signal was
delivered at one of these points. I can follow some of his logic in
concluding that. For that to be the case the following code contains
a bug so can anyone see anything obviously wrong in the following
subroutine (or anything not so obviously wrong 8))

void rpc_clnt_sigmask(struct rpc_clnt *clnt, sigset_t *oldset)
{
unsigned long sigallow = sigmask(SIGKILL);
unsigned long irqflags;

/* Turn off various signals */
if (clnt->cl_intr) {
struct k_sigaction *action = current->sig->action;
if (action[SIGINT-1].sa.sa_handler == SIG_DFL)
sigallow |= sigmask(SIGINT);
if (action[SIGQUIT-1].sa.sa_handler == SIG_DFL)
sigallow |= sigmask(SIGQUIT);
}
spin_lock_irqsave(&current->sigmask_lock, irqflags);
*oldset = current->blocked;
siginitsetinv(&current->blocked, sigallow & ~oldset->sig[0]);
recalc_sigpending(current);
spin_unlock_irqrestore(&current->sigmask_lock, irqflags);
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html