]> git.karo-electronics.de Git - karo-tx-linux.git/commit
SUNRPC: Fix autobind on cloned rpc clients
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 3 Oct 2008 20:48:34 +0000 (16:48 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 2 Feb 2009 16:28:11 +0000 (08:28 -0800)
commit010703af998cf0c3927cb587d88641ed5a3ef358
treea4705df26bab52a5d2869f06fe380f1c72d62357
parentbdd35ffe1d8b1a4197dd459eef653028bf521327
SUNRPC: Fix autobind on cloned rpc clients

commit 9a4bd29fe8f6d3f015fe1c8e5450eb62cfebfcc9 upstream.

Despite the fact that cloned rpc clients won't have the cl_autobind flag
set, they may still find themselves calling rpcb_getport_async(). For this
to happen, it suffices for a _parent_ rpc_clnt to use autobinding, in which
case any clone may find itself triggering the !xprt_bound() case in
call_bind().

The correct fix for this is to walk back up the tree of cloned rpc clients,
in order to find the parent that 'owns' the transport, either because it
has clnt->cl_autobind set, or because it originally created the
transport...

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/sunrpc/rpcb_clnt.c