]> Pileus Git - ~andy/linux/commitdiff
SUNRPC: Ensure that SIGKILL will always terminate a synchronous RPC call.
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 3 Jan 2006 08:55:19 +0000 (09:55 +0100)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 6 Jan 2006 19:58:45 +0000 (14:58 -0500)
 ...and make sure that the "intr" flag also enables SIGHUP and SIGTERM to
 interrupt RPC calls too (as per the Solaris implementation).

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/lockd/svc.c
net/sunrpc/clnt.c

index 12a857c29e25e19177bc538cce81dfaa7b6ef8c7..71a30b416d1a279561ed04d011cac3e7ee4fb360 100644 (file)
@@ -178,6 +178,8 @@ lockd(struct svc_rqst *rqstp)
 
        }
 
+       flush_signals(current);
+
        /*
         * Check whether there's a new lockd process before
         * shutting down the hosts and clearing the slot.
@@ -192,8 +194,6 @@ lockd(struct svc_rqst *rqstp)
                        "lockd: new process, skipping host shutdown\n");
        wake_up(&lockd_exit);
 
-       flush_signals(current);
-
        /* Exit the RPC thread */
        svc_exit_thread(rqstp);
 
index f025b7e72353f38879a9dadec4e960c377ed9699..b23c0d328c9c958968840db0b58e542d6b8c84ea 100644 (file)
@@ -386,11 +386,11 @@ static const struct rpc_call_ops rpc_default_ops = {
  *     Export the signal mask handling for synchronous code that
  *     sleeps on RPC calls
  */
-#define RPC_INTR_SIGNALS (sigmask(SIGINT) | sigmask(SIGQUIT) | sigmask(SIGKILL))
+#define RPC_INTR_SIGNALS (sigmask(SIGHUP) | sigmask(SIGINT) | sigmask(SIGQUIT) | sigmask(SIGTERM))
  
 static void rpc_save_sigmask(sigset_t *oldset, int intr)
 {
-       unsigned long   sigallow = 0;
+       unsigned long   sigallow = sigmask(SIGKILL);
        sigset_t sigmask;
 
        /* Block all signals except those listed in sigallow */