]>
Commit | Line | Data |
---|---|---|
77a1b479 GKH |
1 | From bb06c388fa20ae24cfe80c52488de718a7e3a53f Mon Sep 17 00:00:00 2001 |
2 | From: zhengbin <zhengbin13@huawei.com> | |
3 | Date: Wed, 13 Mar 2019 16:01:37 +0800 | |
4 | Subject: 9p/net: fix memory leak in p9_client_create | |
5 | ||
6 | From: zhengbin <zhengbin13@huawei.com> | |
7 | ||
8 | commit bb06c388fa20ae24cfe80c52488de718a7e3a53f upstream. | |
9 | ||
10 | If msize is less than 4096, we should close and put trans, destroy | |
11 | tagpool, not just free client. This patch fixes that. | |
12 | ||
13 | Link: http://lkml.kernel.org/m/1552464097-142659-1-git-send-email-zhengbin13@huawei.com | |
14 | Cc: stable@vger.kernel.org | |
15 | Fixes: 574d356b7a02 ("9p/net: put a lower bound on msize") | |
16 | Reported-by: Hulk Robot <hulkci@huawei.com> | |
17 | Signed-off-by: zhengbin <zhengbin13@huawei.com> | |
18 | Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr> | |
19 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
20 | ||
21 | --- | |
22 | net/9p/client.c | 2 +- | |
23 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
24 | ||
25 | --- a/net/9p/client.c | |
26 | +++ b/net/9p/client.c | |
27 | @@ -1065,7 +1065,7 @@ struct p9_client *p9_client_create(const | |
28 | p9_debug(P9_DEBUG_ERROR, | |
29 | "Please specify a msize of at least 4k\n"); | |
30 | err = -EINVAL; | |
31 | - goto free_client; | |
32 | + goto close_trans; | |
33 | } | |
34 | ||
35 | err = p9_client_version(clnt); |