Skip to contentSkip to conversation

nfs: fix bad checking of callback operation's taglen

PATCH New Kinglong Mee 1 participant 1 message Mar 28, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nfs: fix bad checking of callback operation's taglen

Does not need decrease of 12 here.

---
 fs/nfs/callback_xdr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/nfs/callback_xdr.c +2 -2
index 19ca95c..1737c2e 100644
@@ -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);
 	}
Signature · 1 line
2.3.4