Returning negative values repeatedly from a SOCK_FILTER ebpf prog stalls kernel thread

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Problem is title. 

To trigger, I attached an EBPF prof that just returned -1, and send ~1000 packets through it.

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).

Not sure where the missing refcnt subs are, must admit unfamiliarity with the network code.

Please let me know if I need to add anything. 

Thanks





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux