mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:38:11 +00:00
Kernel: Avoid deadlock when trying to send packets from the NetworkTask
fixes #6758
This commit is contained in:
parent
4d697855ea
commit
d8f92bdf96
4 changed files with 21 additions and 2 deletions
|
@ -197,7 +197,8 @@ KResult TCPSocket::send_tcp_packet(u16 flags, const UserOrKernelBuffer* payload,
|
|||
}
|
||||
|
||||
auto routing_decision = route_to(peer_address(), local_address(), bound_interface());
|
||||
VERIFY(!routing_decision.is_zero());
|
||||
if (routing_decision.is_zero())
|
||||
return EHOSTUNREACH;
|
||||
|
||||
auto packet_buffer = UserOrKernelBuffer::for_kernel_buffer(buffer.data());
|
||||
auto result = routing_decision.adapter->send_ipv4(
|
||||
|
@ -214,7 +215,8 @@ KResult TCPSocket::send_tcp_packet(u16 flags, const UserOrKernelBuffer* payload,
|
|||
void TCPSocket::send_outgoing_packets()
|
||||
{
|
||||
auto routing_decision = route_to(peer_address(), local_address(), bound_interface());
|
||||
VERIFY(!routing_decision.is_zero());
|
||||
if (routing_decision.is_zero())
|
||||
return;
|
||||
|
||||
auto now = kgettimeofday();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue