All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] rds: memory leak in __rds_conn_create()
@ 2021-12-14 10:46 Hangyu Hua
  2021-12-14 11:09 ` Sharath Srinivasan
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Hangyu Hua @ 2021-12-14 10:46 UTC (permalink / raw)
  To: santosh.shilimkar, davem, kuba
  Cc: netdev, linux-rdma, rds-devel, linux-kernel, Hangyu Hua

__rds_conn_create() did not release conn->c_path when loop_trans != 0 and
trans->t_prefer_loopback != 0 and is_outgoing == 0.

Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
---
 net/rds/connection.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/rds/connection.c b/net/rds/connection.c
index a3bc4b54d491..b4cc699c5fad 100644
--- a/net/rds/connection.c
+++ b/net/rds/connection.c
@@ -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;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net] rds: memory leak in __rds_conn_create()
  2021-12-14 10:46 [PATCH net] rds: memory leak in __rds_conn_create() Hangyu Hua
@ 2021-12-14 11:09 ` Sharath Srinivasan
  2021-12-14 13:00 ` patchwork-bot+netdevbpf
  2021-12-14 17:39 ` Santosh Shilimkar
  2 siblings, 0 replies; 4+ messages in thread
From: Sharath Srinivasan @ 2021-12-14 11:09 UTC (permalink / raw)
  To: Hangyu Hua, santosh.shilimkar, davem, kuba
  Cc: netdev, linux-rdma, rds-devel, linux-kernel

On 12/14/21 02:46, Hangyu Hua wrote:

> __rds_conn_create() did not release conn->c_path when loop_trans != 0 and
> trans->t_prefer_loopback != 0 and is_outgoing == 0.

Probably a good idea to include:

Fixes: aced3ce57cd3 ("RDS tcp loopback connection can hang")

> Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
With that,

Reviewed-by: Sharath Srinivasan <sharath.srinivasan@oracle.com>

Thanks,
Sharath

> ---
>   net/rds/connection.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/net/rds/connection.c b/net/rds/connection.c
> index a3bc4b54d491..b4cc699c5fad 100644
> --- a/net/rds/connection.c
> +++ b/net/rds/connection.c
> @@ -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;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net] rds: memory leak in __rds_conn_create()
  2021-12-14 10:46 [PATCH net] rds: memory leak in __rds_conn_create() Hangyu Hua
  2021-12-14 11:09 ` Sharath Srinivasan
@ 2021-12-14 13:00 ` patchwork-bot+netdevbpf
  2021-12-14 17:39 ` Santosh Shilimkar
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-12-14 13:00 UTC (permalink / raw)
  To: Hangyu Hua
  Cc: santosh.shilimkar, davem, kuba, netdev, linux-rdma, rds-devel,
	linux-kernel

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:

On Tue, 14 Dec 2021 18:46:59 +0800 you wrote:
> __rds_conn_create() did not release conn->c_path when loop_trans != 0 and
> trans->t_prefer_loopback != 0 and is_outgoing == 0.
> 
> Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
> ---
>  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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net] rds: memory leak in __rds_conn_create()
  2021-12-14 10:46 [PATCH net] rds: memory leak in __rds_conn_create() Hangyu Hua
  2021-12-14 11:09 ` Sharath Srinivasan
  2021-12-14 13:00 ` patchwork-bot+netdevbpf
@ 2021-12-14 17:39 ` Santosh Shilimkar
  2 siblings, 0 replies; 4+ messages in thread
From: Santosh Shilimkar @ 2021-12-14 17:39 UTC (permalink / raw)
  To: Hangyu Hua
  Cc: David S . Miller, kuba, netdev, linux-rdma, rds-devel, linux-kernel



> On Dec 14, 2021, at 2:46 AM, Hangyu Hua <hbh25y@gmail.com> wrote:
> 
> __rds_conn_create() did not release conn->c_path when loop_trans != 0 and
> trans->t_prefer_loopback != 0 and is_outgoing == 0.
> 
> Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
> ---
> net/rds/connection.c | 1 +
> 1 file changed, 1 insertion(+)

Looks good to me. Thanks !!

Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-12-14 17:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-14 10:46 [PATCH net] rds: memory leak in __rds_conn_create() Hangyu Hua
2021-12-14 11:09 ` Sharath Srinivasan
2021-12-14 13:00 ` patchwork-bot+netdevbpf
2021-12-14 17:39 ` Santosh Shilimkar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.