mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-20 16:46:23 +08:00
SUNRPC: Ensure that SIGKILL will always terminate a synchronous RPC call.
...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>
This commit is contained in:
parent
fe650407a8
commit
2bd615797e
@ -178,6 +178,8 @@ lockd(struct svc_rqst *rqstp)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
flush_signals(current);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check whether there's a new lockd process before
|
* Check whether there's a new lockd process before
|
||||||
* shutting down the hosts and clearing the slot.
|
* shutting down the hosts and clearing the slot.
|
||||||
@ -192,8 +194,6 @@ lockd(struct svc_rqst *rqstp)
|
|||||||
"lockd: new process, skipping host shutdown\n");
|
"lockd: new process, skipping host shutdown\n");
|
||||||
wake_up(&lockd_exit);
|
wake_up(&lockd_exit);
|
||||||
|
|
||||||
flush_signals(current);
|
|
||||||
|
|
||||||
/* Exit the RPC thread */
|
/* Exit the RPC thread */
|
||||||
svc_exit_thread(rqstp);
|
svc_exit_thread(rqstp);
|
||||||
|
|
||||||
|
@ -386,11 +386,11 @@ static const struct rpc_call_ops rpc_default_ops = {
|
|||||||
* Export the signal mask handling for synchronous code that
|
* Export the signal mask handling for synchronous code that
|
||||||
* sleeps on RPC calls
|
* 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)
|
static void rpc_save_sigmask(sigset_t *oldset, int intr)
|
||||||
{
|
{
|
||||||
unsigned long sigallow = 0;
|
unsigned long sigallow = sigmask(SIGKILL);
|
||||||
sigset_t sigmask;
|
sigset_t sigmask;
|
||||||
|
|
||||||
/* Block all signals except those listed in sigallow */
|
/* Block all signals except those listed in sigallow */
|
||||||
|
Loading…
Reference in New Issue
Block a user