···4242#include <linux/sunrpc/svcauth_gss.h>4343#include <linux/sunrpc/addr.h>4444#include "xdr4.h"4545+#include "xdr4cb.h"4546#include "vfs.h"4647#include "current_stateid.h"4748···17951794 return nfs_ok;17961795}1797179617971797+static __be32 check_backchannel_attrs(struct nfsd4_channel_attrs *ca)17981798+{17991799+ ca->headerpadsz = 0;18001800+18011801+ /*18021802+ * These RPC_MAX_HEADER macros are overkill, especially since we18031803+ * don't even do gss on the backchannel yet. But this is still18041804+ * less than 1k. Tighten up this estimate in the unlikely event18051805+ * it turns out to be a problem for some client:18061806+ */18071807+ if (ca->maxreq_sz < NFS4_enc_cb_recall_sz + RPC_MAX_HEADER_WITH_AUTH)18081808+ return nfserr_toosmall;18091809+ if (ca->maxresp_sz < NFS4_dec_cb_recall_sz + RPC_MAX_REPHEADER_WITH_AUTH)18101810+ return nfserr_toosmall;18111811+ ca->maxresp_cached = 0;18121812+ if (ca->maxops < 2)18131813+ return nfserr_toosmall;18141814+18151815+ return nfs_ok;18161816+}18171817+17981818__be3217991819nfsd4_create_session(struct svc_rqst *rqstp,18001820 struct nfsd4_compound_state *cstate,···18321810 if (cr_ses->flags & ~SESSION4_FLAG_MASK_A)18331811 return nfserr_inval;18341812 status = check_forechannel_attrs(&cr_ses->fore_channel, nn);18131813+ if (status)18141814+ return status;18151815+ status = check_backchannel_attrs(&cr_ses->back_channel);18351816 if (status)18361817 return status;18371818 status = nfserr_jukebox;