From: Martin Stava Date: Tue, 5 Feb 2008 15:27:09 +0000 (-0600) Subject: 9p: fix bug in p9_clone_stat X-Git-Tag: v2.6.25-rc1~511^2~10 X-Git-Url: http://ftp.safe.ca/?a=commitdiff_plain;h=afcf0c13aeac04a39fa4d1eafdb75604b81af860;p=safe%2Fjmp%2Flinux-2.6 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 Signed-off-by: Eric Van Hensbergen --- diff --git a/net/9p/client.c b/net/9p/client.c index af91993..069d9aa 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; }