From: Chuck Lever Date: Mon, 14 Jan 2008 20:12:08 +0000 (-0500) Subject: SUNRPC: rpcb_getport_sync() passes incorrect address size to rpc_create() X-Git-Tag: v2.6.25-rc1~1146^2~10 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afc881124b8aff83c7a28269ef9d9cfce543256c;p=linux-2.6 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 Signed-off-by: Trond Myklebust --- diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c index 8cbdc0a2de..fa5b8f202d 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) __FUNCTION__, NIPQUAD(sin->sin_addr.s_addr), prog, vers, prot); rpcb_clnt = rpcb_create(NULL, (struct sockaddr *)sin, - sizeof(sin), prot, 2, 0); + sizeof(*sin), prot, 2, 0); if (IS_ERR(rpcb_clnt)) return PTR_ERR(rpcb_clnt);