summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorNeil Brown <neilb@cse.unsw.edu.au>2003-04-12 13:04:22 -0700
committerJames Bottomley <jejb@raven.il.steeleye.com>2003-04-12 13:04:22 -0700
commit88d416dbdfa39bc9b7c4ab8e68176368262b0609 (patch)
treeeee196415b25b1d01512e38dee96a6d16f1f07a3 /include/linux
parent4fe1336464cfb2d5c8a67d956ab2277e277ffcf2 (diff)
[PATCH] kNFSd: NFSD binary compatibility breakage
The removal of "struct nfsctl_uidmap" from "nfsctl_fdparm" broke binary compatiblity on 64-bit platforms (strictly speaking: on all platforms with alignof(void *) > alignof(int)). The problem is that nfsctl_uidmap contained a "char *", which forced the alignment of the entire union to be 64 bits. With the removal of the uidmap, the required alignment drops to 32 bits. Since the first member is only 32 bits in size, this breaks compatibility with user-space. Patch below fixes the problem.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/nfsd/syscall.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/nfsd/syscall.h b/include/linux/nfsd/syscall.h
index 872af1fe9d7d..d512171f5bf8 100644
--- a/include/linux/nfsd/syscall.h
+++ b/include/linux/nfsd/syscall.h
@@ -91,6 +91,13 @@ struct nfsctl_arg {
struct nfsctl_export u_export;
struct nfsctl_fdparm u_getfd;
struct nfsctl_fsparm u_getfs;
+ /*
+ * The following dummy member is needed to preserve binary compatibility
+ * on platforms where alignof(void*)>alignof(int). It's needed because
+ * this union used to contain a member (u_umap) which contained a
+ * pointer.
+ */
+ void *u_ptr;
} u;
#define ca_svc u.u_svc
#define ca_client u.u_client