Re: [PATCH 1/2] nfsd4: fix cached replies to solo SEQUENCE compounds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 19, 2017 at 05:19:40PM -0400, Olga Kornievskaia wrote:
> On Thu, Oct 19, 2017 at 5:04 PM, Olga Kornievskaia <aglo@xxxxxxxxx> wrote:
> > I got this crash upon receiving the SEQUENCE that reused the slot that
> > was used by the ctrl-c-ed COPY.

Yeah, I was being inconsistent about what "NFSD4_SLOT_CACHED" meant--in
replay_matches_cache I'm assuming opcnt and cred are still stored, but I
wasn't storing them in nfsd4_store_cache_entry.  Not sure why that
didn't triger in my tests.

Does this help?

--b.

diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index ace89bf45a0b..4b2107d11d5e 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2296,14 +2296,15 @@ nfsd4_store_cache_entry(struct nfsd4_compoundres *resp)
 
 	slot->sl_flags |= NFSD4_SLOT_INITIALIZED;
 	free_svc_cred(&slot->sl_cred);
+	copy_cred(&slot->sl_cred, &resp->rqstp->rq_cred);
+	slot->sl_opcnt = resp->opcnt;
+	slot->sl_status = resp->cstate.status;
+
 	if (!nfsd4_cache_this(resp)) {
 		slot->sl_flags &= ~NFSD4_SLOT_CACHED;
 		return;
 	}
 	slot->sl_flags |= NFSD4_SLOT_CACHED;
-	copy_cred(&slot->sl_cred, &resp->rqstp->rq_cred);
-	slot->sl_opcnt = resp->opcnt;
-	slot->sl_status = resp->cstate.status;
 
 	base = resp->cstate.data_offset;
 	slot->sl_datalen = buf->len - base;
--
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



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux