Skip to contentSkip to conversation

Patch "p9_client_readdir() fix" has been added to the 4.10-stable tree

PATCH [email protected] 1 participant 1 message Apr 30, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

p9_client_readdir() fix

to the 4.10-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
p9_client_readdir-fix.patch
and it can be found in the queue-4.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 71d6ad08379304128e4bdfaf0b4185d54375423e Mon Sep 17 00:00:00 2001

From: Al Viro <[email protected]>
Date: Fri, 14 Apr 2017 17:22:18 -0400
Subject: p9_client_readdir() fix

From: Al Viro <[email protected]>

commit 71d6ad08379304128e4bdfaf0b4185d54375423e upstream.

Don't assume that server is sane and won't return more data than asked for.

---
 net/9p/client.c |    4 ++++
 1 file changed, 4 insertions(+)
net/9p/client.c +4 -0
@@ -2101,6 +2101,10 @@ int p9_client_readdir(struct p9_fid *fid
 		trace_9p_protocol_dump(clnt, req->rc);
 		goto free_and_error;
 	}
+	if (rsize < count) {
+		pr_err("bogus RREADDIR count (%d > %d)\n", count, rsize);
+		count = rsize;
+	}
 
 	p9_debug(P9_DEBUG_9P, "<<< RREADDIR count %d\n", count);
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.10/p9_client_readdir-fix.patch