[PATCH] marshalling bug in tcreate with empty extension field

From: Eric Van Hensbergen
Date: Fri Jul 28 2006 - 14:18:35 EST


Signed-off-by: Russ Ross <russross@xxxxxxxxx>
Signed-off-by: Eric Van Hensbergen <ericvh@xxxxxxxxx>
---
fs/9p/conv.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/9p/conv.c b/fs/9p/conv.c
index 1e89814..56d88c1 100644
--- a/fs/9p/conv.c
+++ b/fs/9p/conv.c
@@ -673,8 +673,10 @@ struct v9fs_fcall *v9fs_create_tcreate(u
struct cbuf *bufp = &buffer;

size = 4 + 2 + strlen(name) + 4 + 1; /* fid[4] name[s] perm[4] mode[1] */
- if (extended && extension!=NULL)
- size += 2 + strlen(extension); /* extension[s] */
+ if (extended) {
+ size += 2 + /* extension[s] */
+ (extension == NULL ? 0 : strlen(extension));
+ }

fc = v9fs_create_common(bufp, size, TCREATE);
if (IS_ERR(fc))
--
1.4.2.rc1.g83e1

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/