summaryrefslogtreecommitdiffstats
path: root/net/9p/client.c
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2010-10-19 05:47:02 +0200
committerEric Van Hensbergen <ericvh@gmail.com>2010-10-28 16:08:49 +0200
commit7b3bb3fe166702b504f1068359c9550d3b277eaf (patch)
tree8a3c8039f55126dbafb23a06d7b03a1e5abf3d24 /net/9p/client.c
parentfs/9p: Use generic_file_open with lookup_instantiate_filp (diff)
downloadlinux-7b3bb3fe166702b504f1068359c9550d3b277eaf.tar.xz
linux-7b3bb3fe166702b504f1068359c9550d3b277eaf.zip
net/9p: Return error if we fail to encode protocol data
We need to return error in case we fail to encode data in protocol buffer. This patch also return error in case of a failed copy_from_user. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'net/9p/client.c')
-rw-r--r--net/9p/client.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/9p/client.c b/net/9p/client.c
index bc7b03537699..e3cfdff37327 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -579,6 +579,8 @@ p9_client_rpc(struct p9_client *c, int8_t type, const char *fmt, ...)
va_start(ap, fmt);
err = p9pdu_vwritef(req->tc, c->proto_version, fmt, ap);
va_end(ap);
+ if (err)
+ goto reterr;
p9pdu_finalize(req->tc);
err = c->trans_mod->request(c, req);