diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-13 21:20:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-13 21:20:39 -0400 |
commit | b1847a041aba157bdf1643bd151e98dc44366b1c (patch) | |
tree | 60240c03d6af4831fc4a202e471ae87a53caaf11 /net | |
parent | 2918cd81f58aa9748acf961240c006394f474047 (diff) | |
parent | 24fc6f00b64985773b5abd592c4cb2e30bad7584 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
[SPARC64]: Fix inline directive in pci_iommu.c
[SPARC64]: Fix arg passing to compat_sys_ipc().
[SPARC]: Fix section mismatch warnings in pci.c and pcic.c
[SUNRPC]: Make sure on-stack cmsg buffer is properly aligned.
[SPARC]: avoid CHILD_MAX and OPEN_MAX constants
[SPARC64]: Fix SBUS IOMMU allocation code.
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/svcsock.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index 593f62ff8521..2772fee93881 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c | |||
@@ -452,6 +452,8 @@ union svc_pktinfo_u { | |||
452 | struct in_pktinfo pkti; | 452 | struct in_pktinfo pkti; |
453 | struct in6_pktinfo pkti6; | 453 | struct in6_pktinfo pkti6; |
454 | }; | 454 | }; |
455 | #define SVC_PKTINFO_SPACE \ | ||
456 | CMSG_SPACE(sizeof(union svc_pktinfo_u)) | ||
455 | 457 | ||
456 | static void svc_set_cmsg_data(struct svc_rqst *rqstp, struct cmsghdr *cmh) | 458 | static void svc_set_cmsg_data(struct svc_rqst *rqstp, struct cmsghdr *cmh) |
457 | { | 459 | { |
@@ -491,8 +493,11 @@ svc_sendto(struct svc_rqst *rqstp, struct xdr_buf *xdr) | |||
491 | struct svc_sock *svsk = rqstp->rq_sock; | 493 | struct svc_sock *svsk = rqstp->rq_sock; |
492 | struct socket *sock = svsk->sk_sock; | 494 | struct socket *sock = svsk->sk_sock; |
493 | int slen; | 495 | int slen; |
494 | char buffer[CMSG_SPACE(sizeof(union svc_pktinfo_u))]; | 496 | union { |
495 | struct cmsghdr *cmh = (struct cmsghdr *)buffer; | 497 | struct cmsghdr hdr; |
498 | long all[SVC_PKTINFO_SPACE / sizeof(long)]; | ||
499 | } buffer; | ||
500 | struct cmsghdr *cmh = &buffer.hdr; | ||
496 | int len = 0; | 501 | int len = 0; |
497 | int result; | 502 | int result; |
498 | int size; | 503 | int size; |
@@ -745,8 +750,11 @@ svc_udp_recvfrom(struct svc_rqst *rqstp) | |||
745 | struct svc_sock *svsk = rqstp->rq_sock; | 750 | struct svc_sock *svsk = rqstp->rq_sock; |
746 | struct svc_serv *serv = svsk->sk_server; | 751 | struct svc_serv *serv = svsk->sk_server; |
747 | struct sk_buff *skb; | 752 | struct sk_buff *skb; |
748 | char buffer[CMSG_SPACE(sizeof(union svc_pktinfo_u))]; | 753 | union { |
749 | struct cmsghdr *cmh = (struct cmsghdr *)buffer; | 754 | struct cmsghdr hdr; |
755 | long all[SVC_PKTINFO_SPACE / sizeof(long)]; | ||
756 | } buffer; | ||
757 | struct cmsghdr *cmh = &buffer.hdr; | ||
750 | int err, len; | 758 | int err, len; |
751 | struct msghdr msg = { | 759 | struct msghdr msg = { |
752 | .msg_name = svc_addr(rqstp), | 760 | .msg_name = svc_addr(rqstp), |