[Title] Fixed a bug that mount.v9fs failed
authordon.hong <don.hong@samsung.com>
Thu, 15 Mar 2012 13:09:30 +0000 (22:09 +0900)
committerdon.hong <don.hong@samsung.com>
Thu, 15 Mar 2012 13:09:30 +0000 (22:09 +0900)
[Type] BugFix
[Module]
[Priority]
[CQ#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

Change-Id: I0b71bc2377a88629d3835e2fce0022434fe392c1

net/9p/client.c

index 8af95b2dddd62eb4baa6205c776681bf09b91a64..d37e2ee0763178fa9d8cc91cfbf5b604c13c4bb7 100644 (file)
@@ -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);