new->cl_spo_must_allow.u.words[0] = exid->spo_must_allow[0];
        new->cl_spo_must_allow.u.words[1] = exid->spo_must_allow[1];
 
+       /* Contrived initial CREATE_SESSION response */
+       new->cl_cs_slot.sl_status = nfserr_seq_misordered;
+
        add_to_unconfirmed(new);
        swap(new, conf);
 out_copy:
        struct nfsd4_create_session *cr_ses = &u->create_session;
        struct sockaddr *sa = svc_addr(rqstp);
        struct nfs4_client *conf, *unconf;
+       struct nfsd4_clid_slot *cs_slot;
        struct nfs4_client *old = NULL;
        struct nfsd4_session *new;
        struct nfsd4_conn *conn;
-       struct nfsd4_clid_slot *cs_slot = NULL;
        __be32 status = 0;
        struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
 
        spin_lock(&nn->client_lock);
        unconf = find_unconfirmed_client(&cr_ses->clientid, true, nn);
        conf = find_confirmed_client(&cr_ses->clientid, true, nn);
-       WARN_ON_ONCE(conf && unconf);
+       if (!conf && !unconf) {
+               status = nfserr_stale_clientid;
+               goto out_free_conn;
+       }
 
-       if (conf) {
-               status = nfserr_wrong_cred;
-               if (!nfsd4_mach_creds_match(conf, rqstp))
-                       goto out_free_conn;
+       if (conf)
                cs_slot = &conf->cl_cs_slot;
-               status = check_slot_seqid(cr_ses->seqid, cs_slot->sl_seqid, 0);
-               if (status) {
-                       if (status == nfserr_replay_cache)
-                               status = nfsd4_replay_create_session(cr_ses, cs_slot);
+       else
+               cs_slot = &unconf->cl_cs_slot;
+       status = check_slot_seqid(cr_ses->seqid, cs_slot->sl_seqid, 0);
+       if (status) {
+               if (status == nfserr_replay_cache) {
+                       status = nfsd4_replay_create_session(cr_ses, cs_slot);
                        goto out_free_conn;
                }
-       } else if (unconf) {
+               goto out_cache_error;
+       }
+       cs_slot->sl_seqid++;
+       cr_ses->seqid = cs_slot->sl_seqid;
+
+       if (conf) {
+               status = nfserr_wrong_cred;
+               if (!nfsd4_mach_creds_match(conf, rqstp))
+                       goto out_cache_error;
+       } else {
                status = nfserr_clid_inuse;
                if (!same_creds(&unconf->cl_cred, &rqstp->rq_cred) ||
                    !rpc_cmp_addr(sa, (struct sockaddr *) &unconf->cl_addr)) {
                        trace_nfsd_clid_cred_mismatch(unconf, rqstp);
-                       goto out_free_conn;
+                       goto out_cache_error;
                }
                status = nfserr_wrong_cred;
                if (!nfsd4_mach_creds_match(unconf, rqstp))
-                       goto out_free_conn;
-               cs_slot = &unconf->cl_cs_slot;
-               status = check_slot_seqid(cr_ses->seqid, cs_slot->sl_seqid, 0);
-               if (status) {
-                       /* an unconfirmed replay returns misordered */
-                       status = nfserr_seq_misordered;
-                       goto out_free_conn;
-               }
+                       goto out_cache_error;
                old = find_confirmed_client_by_name(&unconf->cl_name, nn);
                if (old) {
                        status = mark_client_expired_locked(old);
                        if (status) {
                                old = NULL;
-                               goto out_free_conn;
+                               goto out_cache_error;
                        }
                        trace_nfsd_clid_replaced(&old->cl_clientid);
                }
                move_to_confirmed(unconf);
                conf = unconf;
-       } else {
-               status = nfserr_stale_clientid;
-               goto out_free_conn;
        }
        status = nfs_ok;
        /* Persistent sessions are not supported */
 
        memcpy(cr_ses->sessionid.data, new->se_sessionid.data,
               NFS4_MAX_SESSIONID_LEN);
-       cs_slot->sl_seqid++;
-       cr_ses->seqid = cs_slot->sl_seqid;
 
        /* cache solo and embedded create sessions under the client_lock */
        nfsd4_cache_create_session(cr_ses, cs_slot, status);
        if (old)
                expire_client(old);
        return status;
+
+out_cache_error:
+       nfsd4_cache_create_session(cr_ses, cs_slot, status);
 out_free_conn:
        spin_unlock(&nn->client_lock);
        free_conn(conn);