summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/state.h
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2012-02-13 22:56:19 +0100
committerJ. Bruce Fields <bfields@redhat.com>2012-02-14 23:01:58 +0100
commitbf5c43c8f155e755b0fc3dfa76f9f8c6e2c0161f (patch)
tree6c36ab623d4f5cb2ce9606ffa3f1dd53b3550848 /fs/nfsd/state.h
parentnfsd4: rearrange struct nfsd4_slot (diff)
downloadlinux-bf5c43c8f155e755b0fc3dfa76f9f8c6e2c0161f.tar.xz
linux-bf5c43c8f155e755b0fc3dfa76f9f8c6e2c0161f.zip
nfsd4: check for uninitialized slot
This fixes an oops when a buggy client tries to use an initial seqid of 0 on a new slot, which we may misinterpret as a replay. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/state.h')
-rw-r--r--fs/nfsd/state.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h
index 122217fe9155..d8f52a0f4988 100644
--- a/fs/nfsd/state.h
+++ b/fs/nfsd/state.h
@@ -134,6 +134,7 @@ struct nfsd4_slot {
u16 sl_opcnt;
#define NFSD4_SLOT_INUSE (1 << 0)
#define NFSD4_SLOT_CACHETHIS (1 << 1)
+#define NFSD4_SLOT_INITIALIZED (1 << 2)
u8 sl_flags;
char sl_data[];
};