1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:48:14 +00:00
serenity/Kernel/Net
Andreas Kling b86443f0e1 Kernel: Lock weak pointer revocation during listed-ref-counted unref
When doing the last unref() on a listed-ref-counted object, we keep
the list locked while mutating the ref count. The destructor itself
is invoked after unlocking the list.

This was racy with weakable classes, since their weak pointer factory
still pointed to the object after we'd decided to destroy it. That
opened a small time window where someone could try to strong-ref a weak
pointer to an object after it was removed from the list, but just before
the destructor got invoked.

This patch closes the race window by explicitly revoking all weak
pointers while the list is locked.
2022-01-08 16:31:14 +01:00
..
Intel Kernel: Update E1000 link state using interrupt 2021-12-31 15:48:16 +01:00
NE2000 Kernel: Remove redundant (K)String::characters() calls 2021-12-30 14:16:03 +01:00
Realtek Kernel: Propagate overflow errors from Memory::page_round_up 2021-12-28 23:08:50 +01:00
ARP.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
EthernetFrameHeader.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
EtherType.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ICMP.h Kernel: Switch static_asserts of a type size to AK::AssertSize 2021-09-05 20:08:57 +02:00
IPv4.h Kernel: Remove unused String.h includes 2021-12-11 13:15:26 -08:00
IPv4Socket.cpp Kernel+AK: Eliminate a couple of temporary String allocations 2021-12-30 14:16:03 +01:00
IPv4Socket.h Kernel: Return the correct result for FIONREAD on datagram sockets 2021-12-16 22:21:35 +03:30
IPv4SocketTuple.h Kernel: Make IPv4SocketTuple operator== by reference 2021-09-16 17:17:13 +02:00
LocalSocket.cpp Kernel+AK: Eliminate a couple of temporary String allocations 2021-12-30 14:16:03 +01:00
LocalSocket.h Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
LoopbackAdapter.cpp Kernel: Convert network adapter names to Kernel::KString 2021-10-01 17:22:17 +00:00
LoopbackAdapter.h Kernel: Remove the kmalloc_eternal heap :^) 2021-12-28 21:02:38 +01:00
NetworkAdapter.cpp Kernel: Tighten String-related includes 2021-12-30 14:16:03 +01:00
NetworkAdapter.h Kernel+LibC: Add support for the IPv4 TOS field via the IP_TOS sockopt 2021-10-28 11:24:36 +02:00
NetworkingManagement.cpp Kernel: Remove the KString::try_create(String::formatted(...)) pattern 2021-12-28 01:55:22 -08:00
NetworkingManagement.h Kernel: Remove the kmalloc_eternal heap :^) 2021-12-28 21:02:38 +01:00
NetworkTask.cpp Kernel: Use MUST + Vector::try_append instead of Vector::append 2022-01-05 14:04:18 +01:00
NetworkTask.h Kernel: Avoid deadlock when trying to send packets from the NetworkTask 2021-04-30 23:11:56 +02:00
Routing.cpp Kernel: Add support for the MSG_DONTROUTE sys$sendmsg flag 2021-12-05 12:53:29 +01:00
Routing.h Kernel: Add support for the MSG_DONTROUTE sys$sendmsg flag 2021-12-05 12:53:29 +01:00
Socket.cpp Kernel: Lock socket mutex across {get,set}sockopt() and SO_ERROR updates 2021-12-28 18:52:38 +01:00
Socket.h Kernel: Lock socket mutex across {get,set}sockopt() and SO_ERROR updates 2021-12-28 18:52:38 +01:00
TCP.h Kernel: Switch static_asserts of a type size to AK::AssertSize 2021-09-05 20:08:57 +02:00
TCPSocket.cpp Kernel: Lock weak pointer revocation during listed-ref-counted unref 2022-01-08 16:31:14 +01:00
TCPSocket.h Kernel: Lock TCPSocket lookup table across destruction 2022-01-06 22:30:40 +01:00
UDP.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
UDPSocket.cpp Kernel: Remove unnecessary SocketHandle<T> class 2021-12-25 11:23:57 +01:00
UDPSocket.h Kernel: Remove unnecessary SocketHandle<T> class 2021-12-25 11:23:57 +01:00