net: sock: remove the unnecessary check in proto_register
Subsystems (3)
PATCH 1/1 net: sock: remove the unnecessary check in proto_register
From: Tonghao Zhang <[email protected]>
tw_prot_cleanup will check the twsk_prot.
--- net/core/sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/core/sock.c +1 -1
@@ -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) {
Signature · 1 line
2.27.0
This patch was applied to netdev/net-next.git (refs/heads/master):
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
Quoted 9 lines · On Thu, 22 Apr 2021 21:41:51 +0800 you wrote:
From: Tonghao Zhang <[email protected]>
tw_prot_cleanupwill check thetwsk_prot.Fixes 0f5907af3913 ("net: Fix potential memory leak in proto_register()")Cc Miaohe Lin <[email protected]>Signed-off-by Tonghao Zhang <[email protected]>[...]
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
Hi:
Quoted 10 lines · On 2021/4/24 4:20, [email protected] wrote:
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
Quoted 5 lines · On Thu, 22 Apr 2021 21:41:51 +0800 you wrote:
From: Tonghao Zhang <[email protected]>
tw_prot_cleanupwill check thetwsk_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.
Quoted 17 lines
Quoted 4 lines
Cc Miaohe Lin <[email protected]>Signed-off-by Tonghao Zhang <[email protected]>[...]
Here is the summary with links:
- net: sock: remove the unnecessary check inproto_registerhttps://git.kernel.org/netdev/net-next/c/ed744d819379You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html.