提交 4c90c68a 编写于 作者: R Russ Ross 提交者: Linus Torvalds

[PATCH] 9p: fix marshalling bug in tcreate with empty extension field

Signed-off-by: NRuss Ross <russross@gmail.com>
Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 0e31f51d
...@@ -673,8 +673,10 @@ struct v9fs_fcall *v9fs_create_tcreate(u32 fid, char *name, u32 perm, u8 mode, ...@@ -673,8 +673,10 @@ struct v9fs_fcall *v9fs_create_tcreate(u32 fid, char *name, u32 perm, u8 mode,
struct cbuf *bufp = &buffer; struct cbuf *bufp = &buffer;
size = 4 + 2 + strlen(name) + 4 + 1; /* fid[4] name[s] perm[4] mode[1] */ size = 4 + 2 + strlen(name) + 4 + 1; /* fid[4] name[s] perm[4] mode[1] */
if (extended && extension!=NULL) if (extended) {
size += 2 + strlen(extension); /* extension[s] */ size += 2 + /* extension[s] */
(extension == NULL ? 0 : strlen(extension));
}
fc = v9fs_create_common(bufp, size, TCREATE); fc = v9fs_create_common(bufp, size, TCREATE);
if (IS_ERR(fc)) if (IS_ERR(fc))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册