CB_SEQUENCE must appear first in the callback compound RPC. If it is not the first operation NFS4ERR_SEQUENCE_POS must be returned. If the first operation ni the CB_COMPOUND is not CB_SEQUENCE then NFS4ERR_OP_NOT_IN_SESSION must be returned. Signed-off-by: Ricardo Labiaga <ricardo.labiaga@xxxxxxxxxx> Signed-off-by: Benny Halevy <bhalevy@xxxxxxxxxxx> --- fs/nfs/callback_xdr.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c index 7b96b09..e0bd42b 100644 --- a/fs/nfs/callback_xdr.c +++ b/fs/nfs/callback_xdr.c @@ -558,6 +558,14 @@ static __be32 process_op(uint32_t minorversion, int nop, __func__, minorversion, nop, op_nr); #if defined(CONFIG_NFS_V4_1) if (minorversion == 1) { + if (op_nr == OP_CB_SEQUENCE) { + if (nop != 0) { + status = htonl(NFS4ERR_SEQUENCE_POS); + goto out; + } + } else if (nop == 0) + status = htonl(NFS4ERR_OP_NOT_IN_SESSION); + switch (op_nr) { case OP_CB_GETATTR: case OP_CB_RECALL: -- 1.6.0.2 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html