Commit 88d416db authored by Neil Brown's avatar Neil Brown Committed by James Bottomley

[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.
parent 4fe13364
...@@ -91,6 +91,13 @@ struct nfsctl_arg { ...@@ -91,6 +91,13 @@ struct nfsctl_arg {
struct nfsctl_export u_export; struct nfsctl_export u_export;
struct nfsctl_fdparm u_getfd; struct nfsctl_fdparm u_getfd;
struct nfsctl_fsparm u_getfs; 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; } u;
#define ca_svc u.u_svc #define ca_svc u.u_svc
#define ca_client u.u_client #define ca_client u.u_client
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment