From: Eric Van Hensbergen Date: Fri, 17 Oct 2008 17:45:23 +0000 (-0500) Subject: 9p: fix oops in protocol stat parsing error path. X-Git-Tag: v2.6.28-rc1~95^2~1 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=f0a0ac2ee50c62cf4ad9b06cf8a12435cc5ac44d;p=linux-2.6-omap-h63xx.git 9p: fix oops in protocol stat parsing error path. When we get an error on parsing a stat due to a protocol bug, we can generate an oops during cleanup because we didn't initialize the string pointers in the stat structure. Signed-off-by: Eric Van Hensbergen --- diff --git a/net/9p/protocol.c b/net/9p/protocol.c index 84fa2127187..29be5243908 100644 --- a/net/9p/protocol.c +++ b/net/9p/protocol.c @@ -215,9 +215,9 @@ p9pdu_vreadf(struct p9_fcall *pdu, int optional, const char *fmt, va_list ap) struct p9_wstat *stbuf = va_arg(ap, struct p9_wstat *); - stbuf->extension = NULL; + memset(stbuf, 0, sizeof(struct p9_wstat)); stbuf->n_uid = stbuf->n_gid = stbuf->n_muid = - -1; + -1; errcode = p9pdu_readf(pdu, optional, "wwdQdddqssss?sddd",