aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2008-01-14 15:12:08 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-01-30 02:06:09 -0500
commitafc881124b8aff83c7a28269ef9d9cfce543256c (patch)
tree856e5196fb781622b21a1c3834f0bea1f0d09137 /net
parent67d60213627ec4391cc402bf95753eefde8522af (diff)
SUNRPC: rpcb_getport_sync() passes incorrect address size to rpc_create()
The variable "sin" is a pointer, so sizeof(sin) is the size of a pointer, not the size of thing that sin points to. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/rpcb_clnt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c
index 8cbdc0a2de46..fa5b8f202d5b 100644
--- a/net/sunrpc/rpcb_clnt.c
+++ b/net/sunrpc/rpcb_clnt.c
@@ -228,7 +228,7 @@ int rpcb_getport_sync(struct sockaddr_in *sin, u32 prog, u32 vers, int prot)
228 __FUNCTION__, NIPQUAD(sin->sin_addr.s_addr), prog, vers, prot); 228 __FUNCTION__, NIPQUAD(sin->sin_addr.s_addr), prog, vers, prot);
229 229
230 rpcb_clnt = rpcb_create(NULL, (struct sockaddr *)sin, 230 rpcb_clnt = rpcb_create(NULL, (struct sockaddr *)sin,
231 sizeof(sin), prot, 2, 0); 231 sizeof(*sin), prot, 2, 0);
232 if (IS_ERR(rpcb_clnt)) 232 if (IS_ERR(rpcb_clnt))
233 return PTR_ERR(rpcb_clnt); 233 return PTR_ERR(rpcb_clnt);
234 234