From 8a2a47f561f1f24b376a38a4f60f5917367c8dee Mon Sep 17 00:00:00 2001 From: "don.hong" Date: Thu, 15 Mar 2012 22:09:30 +0900 Subject: [PATCH] [Title] Fixed a bug that mount.v9fs failed [Type] BugFix [Module] [Priority] [CQ#] [Redmine#] [Problem] [Cause] [Solution] [TestCase] Change-Id: I0b71bc2377a88629d3835e2fce0022434fe392c1 --- net/9p/client.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/9p/client.c b/net/9p/client.c index 8af95b2dddd6..d37e2ee07631 100644 --- a/net/9p/client.c +++ b/net/9p/client.c @@ -191,6 +191,8 @@ static struct p9_req_t *p9_tag_alloc(struct p9_client *c, u16 tag) req->wq = NULL; return ERR_PTR(-ENOMEM); } + memset(req->tc, 0, sizeof(struct p9_fcall)); + memset(req->rc, 0, sizeof(struct p9_fcall)); req->tc->sdata = (char *) req->tc + sizeof(struct p9_fcall); req->tc->capacity = c->msize; req->rc->sdata = (char *) req->rc + sizeof(struct p9_fcall); @@ -663,6 +665,7 @@ struct p9_client *p9_client_create(const char *dev_name, char *options) if (!clnt) return ERR_PTR(-ENOMEM); + memset(clnt, 0, sizeof(struct p9_client)); clnt->trans_mod = NULL; clnt->trans = NULL; spin_lock_init(&clnt->lock); -- 2.34.1