Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a21048c8 authored by Eugene Syromiatnikov's avatar Eugene Syromiatnikov Committed by David S. Miller
Browse files

net/smc: use __aligned_u64 for 64-bit smc_diag fields



Commit 4b1b7d3b ("net/smc: add SMC-D diag support") introduced
new UAPI-exposed structure, struct smcd_diag_dmbinfo.  However,
it's not usable by compat binaries, as it has different layout there.
Probably, the most straightforward fix that will avoid similar issues
in the future is to use __aligned_u64 for 64-bit fields.

Fixes: 4b1b7d3b ("net/smc: add SMC-D diag support")
Signed-off-by: default avatarEugene Syromiatnikov <esyr@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6d4c4077
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ struct smc_diag_msg {
	struct inet_diag_sockid id;

	__u32		diag_uid;
	__u64	diag_inode;
	__aligned_u64	diag_inode;
};

/* Mode of a connection */
@@ -100,10 +100,10 @@ struct smc_diag_fallback {

struct smcd_diag_dmbinfo {		/* SMC-D Socket internals */
	__u32		linkid;		/* Link identifier */
	__u64 peer_gid;			/* Peer GID */
	__u64 my_gid;			/* My GID */
	__u64 token;			/* Token of DMB */
	__u64 peer_token;		/* Token of remote DMBE */
	__aligned_u64	peer_gid;	/* Peer GID */
	__aligned_u64	my_gid;		/* My GID */
	__aligned_u64	token;		/* Token of DMB */
	__aligned_u64	peer_token;	/* Token of remote DMBE */
};

#endif /* _UAPI_SMC_DIAG_H_ */