summaryrefslogtreecommitdiffstats
path: root/net/9p
diff options
context:
space:
mode:
authorzhengbin2019-03-13 09:01:37 +0100
committerGreg Kroah-Hartman2019-03-23 20:09:38 +0100
commit85bdc9daff4038720aa01de1ce7234659583b027 (patch)
tree495c621067cfa051e800614b8b584d3bd264c7bf /net/9p
parent9p: use inode->i_lock to protect i_size_write() under 32-bit (diff)
downloadkernel-qcow2-linux-85bdc9daff4038720aa01de1ce7234659583b027.tar.gz
kernel-qcow2-linux-85bdc9daff4038720aa01de1ce7234659583b027.tar.xz
kernel-qcow2-linux-85bdc9daff4038720aa01de1ce7234659583b027.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/9p')
-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 75b7bf7c7f07..23ec6187dc07 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -1073,7 +1073,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);