diff options
author | Takashi Iwai <tiwai@suse.de> | 2024-10-25 10:54:09 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2024-10-25 10:54:09 +0200 |
commit | 0216ded72db896b24cbdd8cd6531482571b25cf6 (patch) | |
tree | 56b578e29657bd3df8236c5f0cf6b8f13c17232a /net/socket.c | |
parent | 52345d35622026b99271edc1c58ad7cfef3b7567 (diff) | |
parent | 04177158cf98a79744937893b100020d77e6f9ac (diff) |
Merge branch 'topic/compress-accel' into for-next
Pull compress-offload API extension for accel operation mode
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/socket.c b/net/socket.c index 601ad74930ef..042451f01c65 100644 --- a/net/socket.c +++ b/net/socket.c @@ -1574,8 +1574,13 @@ int __sock_create(struct net *net, int family, int type, int protocol, rcu_read_unlock(); err = pf->create(net, sock, protocol, kern); - if (err < 0) + if (err < 0) { + /* ->create should release the allocated sock->sk object on error + * but it may leave the dangling pointer + */ + sock->sk = NULL; goto out_module_put; + } /* * Now to bump the refcnt of the [loadable] module that owns this |