summaryrefslogtreecommitdiff
path: root/net/handshake/genl.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2023-09-21 09:07:40 -0400
committerJakub Kicinski <kuba@kernel.org>2023-10-02 12:34:21 -0700
commita6b07a51b161ba1ad3d81919955fe77b697f9d48 (patch)
tree69b5a338fb249d8f73322b1824c2e335da11af8b /net/handshake/genl.c
parentaf54c197a90b804b57eb7ae4256aaeb5c46216c5 (diff)
handshake: Fix sign of socket file descriptor fields
Socket file descriptors are signed integers. Use nla_get/put_s32 for those to avoid implicit signed conversion in the netlink protocol. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://lore.kernel.org/r/169530165057.8905.8650469415145814828.stgit@oracle-102.nfsv4bat.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/handshake/genl.c')
-rw-r--r--net/handshake/genl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/handshake/genl.c b/net/handshake/genl.c
index 233be5cbfec9..f55d14d7b726 100644
--- a/net/handshake/genl.c
+++ b/net/handshake/genl.c
@@ -18,7 +18,7 @@ static const struct nla_policy handshake_accept_nl_policy[HANDSHAKE_A_ACCEPT_HAN
/* HANDSHAKE_CMD_DONE - do */
static const struct nla_policy handshake_done_nl_policy[HANDSHAKE_A_DONE_REMOTE_AUTH + 1] = {
[HANDSHAKE_A_DONE_STATUS] = { .type = NLA_U32, },
- [HANDSHAKE_A_DONE_SOCKFD] = { .type = NLA_U32, },
+ [HANDSHAKE_A_DONE_SOCKFD] = { .type = NLA_S32, },
[HANDSHAKE_A_DONE_REMOTE_AUTH] = { .type = NLA_U32, },
};