All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: sock: remove the unnecessary check in proto_register
@ 2021-04-22 13:41 xiangxia.m.yue
  2021-04-23 20:20 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 3+ messages in thread
From: xiangxia.m.yue @ 2021-04-22 13:41 UTC (permalink / raw)
  To: netdev; +Cc: Tonghao Zhang, Miaohe Lin

From: Tonghao Zhang <xiangxia.m.yue@gmail.com>

tw_prot_cleanup will check the twsk_prot.

Fixes: 0f5907af3913 ("net: Fix potential memory leak in proto_register()")
Cc: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
---
 net/core/sock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/sock.c b/net/core/sock.c
index 5ec90f99e102..c761c4a0b66b 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -3531,7 +3531,7 @@ int proto_register(struct proto *prot, int alloc_slab)
 	return ret;
 
 out_free_timewait_sock_slab:
-	if (alloc_slab && prot->twsk_prot)
+	if (alloc_slab)
 		tw_prot_cleanup(prot->twsk_prot);
 out_free_request_sock_slab:
 	if (alloc_slab) {
-- 
2.27.0


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

* Re: [PATCH] net: sock: remove the unnecessary check in proto_register
  2021-04-22 13:41 [PATCH] net: sock: remove the unnecessary check in proto_register xiangxia.m.yue
@ 2021-04-23 20:20 ` patchwork-bot+netdevbpf
  2021-04-25  2:16   ` Miaohe Lin
  0 siblings, 1 reply; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-04-23 20:20 UTC (permalink / raw)
  To: Tonghao Zhang; +Cc: netdev, linmiaohe

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Thu, 22 Apr 2021 21:41:51 +0800 you wrote:
> From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
> 
> tw_prot_cleanup will check the twsk_prot.
> 
> Fixes: 0f5907af3913 ("net: Fix potential memory leak in proto_register()")
> Cc: Miaohe Lin <linmiaohe@huawei.com>
> Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
> 
> [...]

Here is the summary with links:
  - net: sock: remove the unnecessary check in proto_register
    https://git.kernel.org/netdev/net-next/c/ed744d819379

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] 3+ messages in thread

* Re: [PATCH] net: sock: remove the unnecessary check in proto_register
  2021-04-23 20:20 ` patchwork-bot+netdevbpf
@ 2021-04-25  2:16   ` Miaohe Lin
  0 siblings, 0 replies; 3+ messages in thread
From: Miaohe Lin @ 2021-04-25  2:16 UTC (permalink / raw)
  To: patchwork-bot+netdevbpf, Tonghao Zhang; +Cc: netdev

Hi:
On 2021/4/24 4:20, patchwork-bot+netdevbpf@kernel.org wrote:
> Hello:
> 
> This patch was applied to netdev/net-next.git (refs/heads/master):
> 
> On Thu, 22 Apr 2021 21:41:51 +0800 you wrote:
>> From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
>>
>> tw_prot_cleanup will check the twsk_prot.
>>
>> Fixes: 0f5907af3913 ("net: Fix potential memory leak in proto_register()")

Thanks for the patch. But I don't think this Fixes tag is needed as this is a cleanup
and do not fix anything.

Thanks.

>> Cc: Miaohe Lin <linmiaohe@huawei.com>
>> Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
>>
>> [...]
> 
> Here is the summary with links:
>   - net: sock: remove the unnecessary check in proto_register
>     https://git.kernel.org/netdev/net-next/c/ed744d819379
> 
> 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] 3+ messages in thread

end of thread, other threads:[~2021-04-25  2:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-22 13:41 [PATCH] net: sock: remove the unnecessary check in proto_register xiangxia.m.yue
2021-04-23 20:20 ` patchwork-bot+netdevbpf
2021-04-25  2:16   ` Miaohe Lin

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.