summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4session.h
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2016-08-27 23:44:04 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2016-08-28 14:23:22 -0400
commite09c978aae5bedfdb379be80363b024b7d82638b (patch)
treed218fe2842cef66c0d33648f1f12163a61f70a62 /fs/nfs/nfs4session.h
parent16590a228109e2f318d2cc6466221134cfab723a (diff)
downloadlinux-e09c978aae5bedfdb379be80363b024b7d82638b.tar.bz2
NFSv4.1: Fix Oopsable condition in server callback races
The slot table hasn't been an array since v3.7. Ensure that we use nfs4_lookup_slot() to access the slot correctly. Fixes: 87dda67e7386 ("NFSv4.1: Allow SEQUENCE to resize the slot table...") Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Cc: stable@vger.kernel.org # v3.8+
Diffstat (limited to 'fs/nfs/nfs4session.h')
-rw-r--r--fs/nfs/nfs4session.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/nfs4session.h b/fs/nfs/nfs4session.h
index 5b51298d1d03..33cace62b50b 100644
--- a/fs/nfs/nfs4session.h
+++ b/fs/nfs/nfs4session.h
@@ -78,6 +78,7 @@ extern int nfs4_setup_slot_table(struct nfs4_slot_table *tbl,
extern void nfs4_shutdown_slot_table(struct nfs4_slot_table *tbl);
extern struct nfs4_slot *nfs4_alloc_slot(struct nfs4_slot_table *tbl);
extern struct nfs4_slot *nfs4_lookup_slot(struct nfs4_slot_table *tbl, u32 slotid);
+extern bool nfs4_slot_seqid_in_use(struct nfs4_slot_table *tbl, u32 slotid, u32 seq_nr);
extern bool nfs4_try_to_lock_slot(struct nfs4_slot_table *tbl, struct nfs4_slot *slot);
extern void nfs4_free_slot(struct nfs4_slot_table *tbl, struct nfs4_slot *slot);
extern void nfs4_slot_tbl_drain_complete(struct nfs4_slot_table *tbl);