From: Latchesar Ionkov Date: Fri, 23 Sep 2005 04:43:50 +0000 (-0700) Subject: [PATCH] v9fs: allocate the Rwalk qid array from the right conv buffer X-Git-Tag: v2.6.14-rc3~51^2~64 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=5b067676234715051cbde87083c36c8ea83f77b8;p=linux-2.6-omap-h63xx.git [PATCH] v9fs: allocate the Rwalk qid array from the right conv buffer When v9fs_deserealize_fcall deserializes a Rwalk message, it incorrectly allocates space for the qid array in the source instead of the destination buffer. Signed-off-by: Latchesar Ionkov Cc: Eric Van Hensbergen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/9p/conv.c b/fs/9p/conv.c index ac2241db249..18121af99d3 100644 --- a/fs/9p/conv.c +++ b/fs/9p/conv.c @@ -651,7 +651,7 @@ v9fs_deserialize_fcall(struct v9fs_session_info *v9ses, u32 msgsize, break; case RWALK: rcall->params.rwalk.nwqid = buf_get_int16(bufp); - rcall->params.rwalk.wqids = buf_alloc(bufp, + rcall->params.rwalk.wqids = buf_alloc(dbufp, rcall->params.rwalk.nwqid * sizeof(struct v9fs_qid)); if (rcall->params.rwalk.wqids) for (i = 0; i < rcall->params.rwalk.nwqid; i++) {