HomeFreeBSD

ibcore: Protect against concurrent access to hardware stats.

Description

ibcore: Protect against concurrent access to hardware stats.

Currently access to hardware stats buffer isn't protected, this can
result in multiple writes and reads at the same time to the same
memory location. This can lead to providing an incorrect value to
the user. Add a mutex to protect against it.

Linux commit:
e945130b52bea65d15f9bdf54949d4cb7a88db7f

Reviewed by: kib
Sponsored by: Mellanox Technologies // NVIDIA Networking

(cherry picked from commit 912e98cedee2590748a9893d3152b11694de3379)

Details

Provenance
hselaskyAuthored on Jun 16 2021, 1:01 PM
Parents
rGf919e2521470: mlx5core: Make sure error code is propagated on error.
Branches
Unknown
Tags
Unknown