summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMartin Stava <martin.stava@gmail.com>2008-02-05 16:27:09 +0100
committerEric Van Hensbergen <ericvh@opteron.homeip.net>2008-02-07 02:20:44 +0100
commitafcf0c13aeac04a39fa4d1eafdb75604b81af860 (patch)
tree9f3cab296191512f6bd3d88ca2a553fdaadd55f8 /net
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86 (diff)
downloadlinux-afcf0c13aeac04a39fa4d1eafdb75604b81af860.tar.xz
linux-afcf0c13aeac04a39fa4d1eafdb75604b81af860.zip
9p: fix bug in p9_clone_stat
This patch fixes a bug in the copying of 9P stat information where string references weren't being updated properly. Signed-off-by: Martin Sava <martin.stava@gmail.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'net')
-rw-r--r--net/9p/client.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/9p/client.c b/net/9p/client.c
index af9199364049..069d9aa14205 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -901,16 +901,21 @@ static struct p9_stat *p9_clone_stat(struct p9_stat *st, int dotu)
memmove(ret, st, sizeof(struct p9_stat));
p = ((char *) ret) + sizeof(struct p9_stat);
memmove(p, st->name.str, st->name.len);
+ ret->name.str = p;
p += st->name.len;
memmove(p, st->uid.str, st->uid.len);
+ ret->uid.str = p;
p += st->uid.len;
memmove(p, st->gid.str, st->gid.len);
+ ret->gid.str = p;
p += st->gid.len;
memmove(p, st->muid.str, st->muid.len);
+ ret->muid.str = p;
p += st->muid.len;
if (dotu) {
memmove(p, st->extension.str, st->extension.len);
+ ret->extension.str = p;
p += st->extension.len;
}