diff options
| author | Edward Adam Davis <[email protected]> | 2023-11-07 08:00:41 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2023-11-09 02:47:07 +0000 |
| commit | 1bea2c3e6df8caf45d18384abfb707f47e9ff993 (patch) | |
| tree | 247a0999ede72aabbdd2c4acf9ada9a843947ebd /tools/testing/selftests/bpf/prog_tests/tcpbpf_user.c | |
| parent | ptp: ptp_read should not release queue (diff) | |
| download | kernel-1bea2c3e6df8caf45d18384abfb707f47e9ff993.tar.gz kernel-1bea2c3e6df8caf45d18384abfb707f47e9ff993.zip | |
ptp: fix corrupted list in ptp_open
There is no lock protection when writing ptp->tsevqs in ptp_open() and
ptp_release(), which can cause data corruption, use spin lock to avoid this
issue.
Moreover, ptp_release() should not be used to release the queue in ptp_read(),
and it should be deleted altogether.
Acked-by: Richard Cochran <[email protected]>
Reported-and-tested-by: [email protected]
Fixes: 8f5de6fb2453 ("ptp: support multiple timestamp event readers")
Signed-off-by: Edward Adam Davis <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/tcpbpf_user.c')
0 files changed, 0 insertions, 0 deletions
