ladybird/Kernel/Net
Sergey Bugaev 4717009e3e Kernel: Hold less locks when receiving ICMP packets
* We don't have to lock the "all IPv4 sockets" in exclusive mode, shared mode is
  enough for just reading the list (as opposed to modifying it).
* We don't have to lock socket's own lock at all, the IPv4Socket::did_receive()
  implementation takes care of this.
* Most importantly, we don't have to hold the "all IPv4 sockets" across the
  IPv4Socket::did_receive() call(s). We can copy the current ICMP socket list
  while holding the lock, then release the lock, and then call
  IPv4Socket::did_receive() on all the ICMP sockets in our list.

These changes fix a deadlock triggered by receiving ICMP messages when using tap
networking setup (as opposed to QEMU's default user/SLIRP networking) on the host.
2021-02-12 15:37:28 +01:00
..
ARP.h Everywhere: Re-format with clang-format-11 2020-12-31 21:51:00 +01:00
E1000NetworkAdapter.cpp Everywhere: Replace dbgln<flag>(...) with dbgln_if(flag, ...) 2021-02-08 18:08:55 +01:00
E1000NetworkAdapter.h Everywhere: Re-format with clang-format-11 2020-12-31 21:51:00 +01:00
EthernetFrameHeader.h Everywhere: Re-format with clang-format-11 2020-12-31 21:51:00 +01:00
EtherType.h
ICMP.h Everywhere: Re-format with clang-format-11 2020-12-31 21:51:00 +01:00
IPv4.h Everywhere: Re-format with clang-format-11 2020-12-31 21:51:00 +01:00
IPv4Socket.cpp Kernel: Convert all *Builder::appendf() => appendff() 2021-02-09 19:18:13 +01:00
IPv4Socket.h Kernel: Improve ProcFS behavior in low memory conditions 2021-01-03 22:12:19 +01:00
IPv4SocketTuple.h SinglyLinkedList: Remove unused includes 2020-10-08 09:54:41 +02:00
LocalSocket.cpp Kernel: Convert all *Builder::appendf() => appendff() 2021-02-09 19:18:13 +01:00
LocalSocket.h Kernel: Improve ProcFS behavior in low memory conditions 2021-01-03 22:12:19 +01:00
LoopbackAdapter.cpp Everywhere: Replace a bundle of dbg with dbgln. 2021-01-11 11:55:47 +01:00
LoopbackAdapter.h
NE2000NetworkAdapter.cpp Everywhere: Replace dbgln<flag>(...) with dbgln_if(flag, ...) 2021-02-08 18:08:55 +01:00
NE2000NetworkAdapter.h Kernel: Add NE2000 network card driver 2021-02-05 09:35:02 +01:00
NetworkAdapter.cpp Kernel: Use KResult a bit more in the IPv4 networking code 2021-01-31 12:13:16 +01:00
NetworkAdapter.h Kernel: Use KResult a bit more in the IPv4 networking code 2021-01-31 12:13:16 +01:00
NetworkTask.cpp Kernel: Hold less locks when receiving ICMP packets 2021-02-12 15:37:28 +01:00
NetworkTask.h
Routing.cpp Meta: Split debug defines into multiple headers. 2021-01-26 21:20:00 +01:00
Routing.h Kernel: Move block condition evaluation out of the Scheduler 2020-11-30 13:17:02 +01:00
RTL8139NetworkAdapter.cpp Meta: Split debug defines into multiple headers. 2021-01-26 21:20:00 +01:00
RTL8139NetworkAdapter.h
Socket.cpp Everywhere: Replace dbgln<flag>(...) with dbgln_if(flag, ...) 2021-02-08 18:08:55 +01:00
Socket.h Kernel: Improve ProcFS behavior in low memory conditions 2021-01-03 22:12:19 +01:00
TCP.h Everywhere: Re-format with clang-format-11 2020-12-31 21:51:00 +01:00
TCPSocket.cpp Everywhere: Replace dbgln<flag>(...) with dbgln_if(flag, ...) 2021-02-08 18:08:55 +01:00
TCPSocket.h Kernel: Use KResult a bit more in the IPv4 networking code 2021-01-31 12:13:16 +01:00
UDP.h Everywhere: Re-format with clang-format-11 2020-12-31 21:51:00 +01:00
UDPSocket.cpp Kernel: Use KResult a bit more in the IPv4 networking code 2021-01-31 12:13:16 +01:00
UDPSocket.h Kernel/Net: Make IPv4Socket::protocol_receive() take a ReadonlyBytes 2020-12-18 19:22:26 +01:00