Re: [PATCH net,v2] tcp: fix forever orphan socket caused by tcp_abort
From: Lorenzo Colitti
Date: Wed Aug 14 2024 - 03:35:18 EST
On Mon, Aug 12, 2024 at 7:53 PM Xueming Feng <kuro@xxxxxxxx> wrote:
> The -ENOENT code comes from the associate patch Lorenzo made for
> iproute2-ss; link attached below.
ENOENT does seem reasonable. It's the same thing that would happen if
userspace passed in a nonexistent cookie (we have a test for that).
I'd guess this could happen if userspace was trying to destroy a
socket but it lost the race against the process owning a socket
closing it?
> bh_unlock_sock(sk);
> local_bh_enable();
> - tcp_write_queue_purge(sk);
Is this not necessary in any other cases? What if there is
retransmitted data, shouldn't that be cleared?
Other than that, I have run the Android tests on this patch and they
all passed other than the test that checks that closing FIN_WAIT1
sockets can't be closed. That's expected to fail because it checking
that the kernel does not support what you are trying to support. I
uploaded a CL to fix that: https://r.android.com/3217682 .
Tested-By: Lorenzo Colitti <lorenzo@xxxxxxxxxx>