diff options
| author | Namhyung Kim <[email protected]> | 2023-10-20 13:47:40 -0700 |
|---|---|---|
| committer | Namhyung Kim <[email protected]> | 2023-10-25 10:02:47 -0700 |
| commit | 6a070573f290f99a6129ac3e13b9df521a1a65de (patch) | |
| tree | 61889f17e90cc264f7645ecbdf1a5065622a68eb /lib/crypto/mpi/mpi-mod.c | |
| parent | d99317f214ca3d381f7b17a75c41263885664e06 (diff) | |
perf lock contention: Check race in tstamp elem creation
When pelem is NULL, it'd create a new entry with zero data. But it
might be preempted by IRQ/NMI just before calling bpf_map_update_elem()
then there's a chance to call it twice for the same pid. So it'd be
better to use BPF_NOEXIST flag and check the return value to prevent
the race.
Signed-off-by: Namhyung Kim <[email protected]>
Acked-by: Ian Rogers <[email protected]>
Cc: Hao Luo <[email protected]>
Cc: Song Liu <[email protected]>
Cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'lib/crypto/mpi/mpi-mod.c')
0 files changed, 0 insertions, 0 deletions