diff options
author | Song Liu <[email protected]> | 2020-01-23 10:11:46 -0800 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2020-01-28 21:20:18 +0100 |
commit | 003461559ef7a9bd0239bae35a22ad8924d6e9ad (patch) | |
tree | 9121b588c0ec57dbd78ff7186e218b4d3d59e20a /scripts/gdb/linux/clk.py | |
parent | b0be0eff1a5ab77d588b76bd8b1c92d5d17b3f73 (diff) |
perf/core: Fix mlock accounting in perf_mmap()
Decreasing sysctl_perf_event_mlock between two consecutive perf_mmap()s of
a perf ring buffer may lead to an integer underflow in locked memory
accounting. This may lead to the undesired behaviors, such as failures in
BPF map creation.
Address this by adjusting the accounting logic to take into account the
possibility that the amount of already locked memory may exceed the
current limit.
Fixes: c4b75479741c ("perf/core: Make the mlock accounting simple again")
Suggested-by: Alexander Shishkin <[email protected]>
Signed-off-by: Song Liu <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Cc: <[email protected]>
Acked-by: Alexander Shishkin <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'scripts/gdb/linux/clk.py')
0 files changed, 0 insertions, 0 deletions