[<prev] [next>] [day] [month] [year] [list]
Message-ID: <4RZ8dWmGaDHrnGI9qP6fnpa2uTfn8K2AWmMOkikYrT8c-L_1Rym92dEjoFhoXop6lwC4C69CNVTteY6SuGg-ymq3WsJ5b64SL0r9r0jIVwk=@protonmail.com>
Date: Sat, 22 Jun 2024 12:15:17 +0000
From: Zac Ecob <zacecob@...tonmail.com>
To: "bpf@...r.kernel.org" <bpf@...r.kernel.org>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Returning negative values repeatedly from a SOCK_FILTER ebpf prog stalls kernel thread
Problem is title. Attached is files for repro. Working on v6.10-rc4.
After doing some investigation, the `sk_wmem_alloc` member of `struct sk` seems to only be increasing, presumably missing some refcnt_dec somewhere.
At a certain point, in `sock_alloc_send_pskb`, we fail the check:
`
if (sk_wmem_alloc_get(sk) < READ_ONCE(sk->sk_sndbuf))
`
Upon which we enter `sock_wait_for_wmem` and schedule a massive timeout (at least that's what happened in my tests)
Please let me know if I need to add anything.
Thanks
Not sure where the missing refcnt subs are, must admit unfamiliarity with the network code.
Download attachment "repro.tar.xz" of type "application/x-xz" (2172 bytes)
Powered by blists - more mailing lists