Skip to content

Commit

Permalink
sunrpc/auth_gss: fix decoder callback prototypes
Browse files Browse the repository at this point in the history
Declare the p_decode callbacks with the proper prototype instead of
casting to kxdrdproc_t and losing all type safety.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Jeff Layton <[email protected]>
Acked-by: Trond Myklebust <[email protected]>
  • Loading branch information
Christoph Hellwig committed May 15, 2017
1 parent 605d712 commit 305c624
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion net/sunrpc/auth_gss/gss_rpc_upcall.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ enum {
[GSSX_##proc] = { \
.p_proc = GSSX_##proc, \
.p_encode = gssx_enc_##name, \
.p_decode = (kxdrdproc_t)gssx_dec_##name, \
.p_decode = gssx_dec_##name, \
.p_arglen = GSSX_ARG_##name##_sz, \
.p_replen = GSSX_RES_##name##_sz, \
.p_statidx = GSSX_##proc, \
Expand Down
3 changes: 2 additions & 1 deletion net/sunrpc/auth_gss/gss_rpc_xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -790,8 +790,9 @@ void gssx_enc_accept_sec_context(struct rpc_rqst *req,

int gssx_dec_accept_sec_context(struct rpc_rqst *rqstp,
struct xdr_stream *xdr,
struct gssx_res_accept_sec_context *res)
void *data)
{
struct gssx_res_accept_sec_context *res = data;
u32 value_follows;
int err;
struct page *scratch;
Expand Down
2 changes: 1 addition & 1 deletion net/sunrpc/auth_gss/gss_rpc_xdr.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ void gssx_enc_accept_sec_context(struct rpc_rqst *req,
const void *data);
int gssx_dec_accept_sec_context(struct rpc_rqst *rqstp,
struct xdr_stream *xdr,
struct gssx_res_accept_sec_context *res);
void *data);
#define gssx_enc_release_handle NULL
#define gssx_dec_release_handle NULL
#define gssx_enc_get_mic NULL
Expand Down

0 comments on commit 305c624

Please sign in to comment.