summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorzhengbin <zhengbin13@huawei.com>2019-03-13 16:01:37 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-03-23 08:18:59 +0100
commitf314a706df8b33c37bba0f1c20e6cae5511340b8 (patch)
tree7afd6a53304e57c5c8f5ca4e8631b106bf60a20c /net
parent010feb981f7581aa4986a21bac188310d6afe5b2 (diff)
downloadlinux-stable-f314a706df8b33c37bba0f1c20e6cae5511340b8.tar.gz
linux-stable-f314a706df8b33c37bba0f1c20e6cae5511340b8.tar.bz2
linux-stable-f314a706df8b33c37bba0f1c20e6cae5511340b8.zip
9p/net: fix memory leak in p9_client_create
commit bb06c388fa20ae24cfe80c52488de718a7e3a53f upstream. If msize is less than 4096, we should close and put trans, destroy tagpool, not just free client. This patch fixes that. Link: http://lkml.kernel.org/m/1552464097-142659-1-git-send-email-zhengbin13@huawei.com Cc: stable@vger.kernel.org Fixes: 574d356b7a02 ("9p/net: put a lower bound on msize") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: zhengbin <zhengbin13@huawei.com> Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/9p/client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/9p/client.c b/net/9p/client.c
index dfbf810f5e95..f99111380cca 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -1065,7 +1065,7 @@ struct p9_client *p9_client_create(const char *dev_name, char *options)
p9_debug(P9_DEBUG_ERROR,
"Please specify a msize of at least 4k\n");
err = -EINVAL;
- goto free_client;
+ goto close_trans;
}
err = p9_client_version(clnt);