rds: memory leak in __rds_conn_create()
Subsystems (4)
PATCH 1/1 rds: memory leak in __rds_conn_create()
__rds_conn_create() did not release conn->c_path when loop_trans != 0 and trans->t_prefer_loopback != 0 and is_outgoing == 0.
--- net/rds/connection.c | 1 + 1 file changed, 1 insertion(+)
net/rds/connection.c +1 -0
@@ -253,6 +253,7 @@ static struct rds_connection *__rds_conn_create(struct net *net,* should end up here, but if it * does, reset/destroy the connection. */ +kfree (conn->c_path);kmem_cache_free (rds_conn_slab, conn); conn =ERR_PTR (-EOPNOTSUPP ); goto out;
Signature · 1 line
2.25.1
Quoted 2 lines · Hangyu Hua
__rds_conn_create()did not releaseconn->c_pathwhenloop_trans!= 0 andtrans->t_prefer_loopback!= 0 andis_outgoing== 0.
Probably a good idea to include:
Quoted 1 line
Signed-off-by Hangyu Hua <[email protected]>
With that,
Thanks,
Sharath
Quoted 16 lines
--- net/rds/connection.c | 1 + 1 file changed, 1 insertion(+)net/rds/connection.c +1
-0@@ -253,6 +253,7 @@ static struct rds_connection *__rds_conn_create(struct net *net,* should end up here, but if it * does, reset/destroy the connection. */ +kfree (conn->c_path);kmem_cache_free (rds_conn_slab, conn); conn =ERR_PTR (-EOPNOTSUPP ); goto out;
This patch was applied to netdev/net.git (master) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <[email protected]>:
Quoted 7 lines · On Tue, 14 Dec 2021 18:46:59 +0800 you wrote:
__rds_conn_create()did not releaseconn->c_pathwhenloop_trans!= 0 andtrans->t_prefer_loopback!= 0 andis_outgoing== 0.Signed-off-by Hangyu Hua <[email protected]>--- net/rds/connection.c | 1 + 1 file changed, 1 insertion(+)
Here is the summary with links:
- [net] rds: memory leak in __rds_conn_create()
https://git.kernel.org/netdev/net/c/5f9562ebe710
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
Quoted 11 lines · Hangyu Hua
__rds_conn_create()did not releaseconn->c_pathwhenloop_trans!= 0 andtrans->t_prefer_loopback!= 0 andis_outgoing== 0.Signed-off-by Hangyu Hua <[email protected]>---
net/rds/connection.c| 1 +1 file changed, 1 insertion(+)
Looks good to me. Thanks !!