summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorMartin KaFai Lau <martin.lau@kernel.org>2023-09-01 16:11:28 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2023-09-06 11:08:14 +0200
commit55d49f750b1cb1f177fb1b00ae02cba4613bcfb7 (patch)
treeeb75afa7db2898cb754f4628f9e9d4be5e0b05d8 /tools/perf/scripts/python
parenta96a44aba556c42b432929d37d60158aca21ad4c (diff)
downloadkernel-55d49f750b1cb1f177fb1b00ae02cba4613bcfb7.tar.gz
bpf: bpf_sk_storage: Fix the missing uncharge in sk_omem_alloc
The commit c83597fa5dc6 ("bpf: Refactor some inode/task/sk storage functions for reuse"), refactored the bpf_{sk,task,inode}_storage_free() into bpf_local_storage_unlink_nolock() which then later renamed to bpf_local_storage_destroy(). The commit accidentally passed the "bool uncharge_mem = false" argument to bpf_selem_unlink_storage_nolock() which then stopped the uncharge from happening to the sk->sk_omem_alloc. This missing uncharge only happens when the sk is going away (during __sk_destruct). This patch fixes it by always passing "uncharge_mem = true". It is a noop to the task/inode/cgroup storage because they do not have the map_local_storage_(un)charge enabled in the map_ops. A followup patch will be done in bpf-next to remove the uncharge_mem argument. A selftest is added in the next patch. Fixes: c83597fa5dc6 ("bpf: Refactor some inode/task/sk storage functions for reuse") Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20230901231129.578493-3-martin.lau@linux.dev
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
.12.y&id=a4574f63edc6f76fb46dcd65d3eb4d5a8e23ba38'>mm/memremap_pages: convert to 'struct range'Dan Williams 2020-10-13Merge tag 'block-5.10-2020-10-12' of git://git.kernel.dk/linux-blockLinus Torvalds 2020-10-06x86, powerpc: Rename memcpy_mcsafe() to copy_mc_to_{user, kernel}()Dan Williams 2020-09-24bdi: remove BDI_CAP_SYNCHRONOUS_IOChristoph Hellwig 2020-09-02nvdimm: simplify revalidate_disk handlingChristoph Hellwig 2020-08-14mm: add thp_sizeMatthew Wilcox (Oracle) 2020-07-01block: move ->make_request_fn to struct block_device_operationsChristoph Hellwig 2020-06-13Merge tag 'libnvdimm-for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/gi...Linus Torvalds 2020-06-08asm-generic: don't include <linux/mm.h> in cacheflush.hChristoph Hellwig 2020-05-27nvdimm: use bio_{start,end}_io_acctChristoph Hellwig 2020-05-13nvdimm/pmem: stop using ->queuedataChristoph Hellwig 2020-04-08Merge tag 'libnvdimm-for-5.7' of git://git.kernel.org/pub/scm/linux/kernel/gi...Linus Torvalds 2020-04-02dax: Move mandatory ->zero_page_range() check in alloc_dax()Vivek Goyal 2020-04-02dax, pmem: Add a dax operation zero_page_rangeVivek Goyal 2020-04-02pmem: Add functions for reading/writing page to/from pmemVivek Goyal 2020-03-27block: simplify queue allocationChristoph Hellwig 2020-01-31mm: Cleanup __put_devmap_managed_page() vs ->page_free()Dan Williams 2019-11-17libnvdimm/pmem: Delete include of nd-core.hDan Williams 2019-11-14libnvdimm/namespace: Differentiate between probe mapping and runtime mappingAneesh Kumar K.V 2019-09-05libnvdimm/pmem: Advance namespace seed for specific probe errorsAneesh Kumar K.V