mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
SUNRPC: Don't auto-disconnect from the local rpcbind socket
There is no need for the kernel to time out the AF_LOCAL connection to the rpcbind socket, and doing so is problematic because when it is time to reconnect, our process may no longer be using the same mount namespace. Reported-by: Nix <[email protected]> Signed-off-by: Trond Myklebust <[email protected]> Cc: Jeff Layton <[email protected]> Cc: [email protected] # 3.9.x
This commit is contained in:
parent
9a1b6bf818
commit
00326ed644
1 changed files with 8 additions and 0 deletions
|
|
@ -238,6 +238,14 @@ static int rpcb_create_local_unix(struct net *net)
|
|||
.program = &rpcb_program,
|
||||
.version = RPCBVERS_2,
|
||||
.authflavor = RPC_AUTH_NULL,
|
||||
/*
|
||||
* We turn off the idle timeout to prevent the kernel
|
||||
* from automatically disconnecting the socket.
|
||||
* Otherwise, we'd have to cache the mount namespace
|
||||
* of the caller and somehow pass that to the socket
|
||||
* reconnect code.
|
||||
*/
|
||||
.flags = RPC_CLNT_CREATE_NO_IDLE_TIMEOUT,
|
||||
};
|
||||
struct rpc_clnt *clnt, *clnt4;
|
||||
int result = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue