summaryrefslogtreecommitdiffstats
path: root/net/9p
diff options
context:
space:
mode:
authorEric Van Hensbergen <ericvh@gmail.com>2008-10-17 12:45:23 -0500
committerEric Van Hensbergen <ericvh@gmail.com>2008-10-17 12:45:23 -0500
commitf0a0ac2ee50c62cf4ad9b06cf8a12435cc5ac44d (patch)
tree6d1b42f61f3a7fc069d100b73579e42418c1ec8a /net/9p
parent57c7b4e68edf3b4fe7f977db9ad437e0f7f7c382 (diff)
downloadop-kernel-dev-f0a0ac2ee50c62cf4ad9b06cf8a12435cc5ac44d.zip
op-kernel-dev-f0a0ac2ee50c62cf4ad9b06cf8a12435cc5ac44d.tar.gz
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 <ericvh@gmail.com>
Diffstat (limited to 'net/9p')
-rw-r--r--net/9p/protocol.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/9p/protocol.c b/net/9p/protocol.c
index 84fa2127..29be524 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",
OpenPOWER on IntegriCloud