[PATCH bpf 0/2] tcp_bpf: Fix the sk_mem_uncharge logic in tcp_bpf_sendmsg

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

 



From: Zijian Zhang <zijianzhang@xxxxxxxxxxxxx>

When apply_bytes are not zero, sk_mem_uncharge for __SK_REDIRECT and
__SK_DROP in tcp_bpf_sendmsg has some problem. Added a selftest to trigger
the memory accounting WARNING, and fixed the sk_mem_uncharge logic in
tcp_bpf_sendmsg

Zijian Zhang (2):
  selftests/bpf: Add apply_bytes test to test_txmsg_redir_wait_sndmem in
    test_sockmap
  tcp_bpf: Fix the sk_mem_uncharge logic in tcp_bpf_sendmsg

 net/ipv4/tcp_bpf.c                         | 11 ++++-------
 tools/testing/selftests/bpf/test_sockmap.c |  6 +++++-
 2 files changed, 9 insertions(+), 8 deletions(-)

-- 
2.20.1





[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