* [PATCH] nfs: fix bad checking of callback operation's taglen
@ 2015-03-28 15:46 Kinglong Mee
0 siblings, 0 replies; only message in thread
From: Kinglong Mee @ 2015-03-28 15:46 UTC (permalink / raw)
To: Trond Myklebust; +Cc: Linux NFS Mailing List, kinglongmee
Does not need decrease of 12 here.
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
---
fs/nfs/callback_xdr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c
index 19ca95c..1737c2e 100644
--- a/fs/nfs/callback_xdr.c
+++ b/fs/nfs/callback_xdr.c
@@ -157,8 +157,8 @@ static __be32 decode_compound_hdr_arg(struct xdr_stream *xdr, struct cb_compound
if (unlikely(status != 0))
return status;
/* We do not like overly long tags! */
- if (hdr->taglen > CB_OP_TAGLEN_MAXSZ - 12) {
- printk("NFS: NFSv4 CALLBACK %s: client sent tag of length %u\n",
+ if (hdr->taglen > CB_OP_TAGLEN_MAXSZ) {
+ printk("NFS: NFSv4 CALLBACK %s: server sents tag of length %u\n",
__func__, hdr->taglen);
return htonl(NFS4ERR_RESOURCE);
}
--
2.3.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-03-28 15:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-28 15:46 [PATCH] nfs: fix bad checking of callback operation's taglen Kinglong Mee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).