Revert "net: do not leave a dangling sk pointer, when socket creation fails"
authorIgnat Korchagin <ignat@cloudflare.com>
Mon, 14 Oct 2024 15:38:08 +0000 (16:38 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 16 Oct 2024 01:43:08 +0000 (18:43 -0700)
commit18429e6e0c2ad26250862a786964d8c73400d9a0
treed4680ce134db3b56d799c0ea59ca6d38e27f34fb
parent48156296a08c615a6baae514096c4b2e543d1157
Revert "net: do not leave a dangling sk pointer, when socket creation fails"

This reverts commit 6cd4a78d962bebbaf8beb7d2ead3f34120e3f7b2.

inet/inet6->create() implementations have been fixed to explicitly NULL the
allocated sk object on error.

A warning was put in place to make sure any future changes will not leave
a dangling pointer in pf->create() implementations.

So this code is now redundant.

Suggested-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: Ignat Korchagin <ignat@cloudflare.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20241014153808.51894-10-ignat@cloudflare.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/sock.c