aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/task-analyzer.py
diff options
context:
space:
mode:
authorSumitra Sharma <[email protected]>2023-06-23 08:16:44 -0700
committerDaniel Borkmann <[email protected]>2023-06-29 15:32:25 +0200
commitda1a055d01ed0c18402dd1f1934096ac4bb36ada (patch)
tree7f993a1587f1b359b9e81b45d11b3e7eadcd5b6e /tools/perf/scripts/python/task-analyzer.py
parent3a8a670eeeaa40d87bd38a587438952741980c18 (diff)
lib/test_bpf: Call page_address() on page acquired with GFP_KERNEL flag
generate_test_data() acquires a page with alloc_page(GFP_KERNEL). The GFP_KERNEL is typical for kernel-internal allocations. The caller requires ZONE_NORMAL or a lower zone for direct access. Therefore the page cannot come from ZONE_HIGHMEM. Thus there's no need to map it with kmap(). Also, the kmap() is being deprecated in favor of kmap_local_page() [1]. Hence, use a plain page_address() directly. Since the page passed to the page_address() is not from the highmem zone, the page_address() function will always return a valid kernel virtual address and will not return NULL. Hence, remove the check 'if (!ptr)'. Remove the unused variable 'ptr' and label 'err_free_page'. [1] https://lore.kernel.org/all/[email protected]/ Reported-by: kernel test robot <[email protected]> Suggested-by: Fabio M. De Francesco <[email protected]> Signed-off-by: Sumitra Sharma <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Reviewed-by: Fabio M. De Francesco <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions