projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
57c7b4e
)
9p: fix oops in protocol stat parsing error path.
author
Eric Van Hensbergen
<ericvh@gmail.com>
Fri, 17 Oct 2008 17:45:23 +0000
(12:45 -0500)
committer
Eric Van Hensbergen
<ericvh@gmail.com>
Fri, 17 Oct 2008 17:45:23 +0000
(12:45 -0500)
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>
net/9p/protocol.c
patch
|
blob
|
blame
|
history
diff --git
a/net/9p/protocol.c
b/net/9p/protocol.c
index 84fa21271876b3323347bbcd70eb7aa2e7408c6a..29be5243908674e7bc00d6063adbfc925449bcc0 100644
(file)
--- 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",