Edward Adam Davis 1bea2c3e6d 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 <richardcochran@gmail.com>
Reported-and-tested-by: syzbot+df3f3ef31f60781fa911@syzkaller.appspotmail.com
Fixes: 8f5de6fb2453 ("ptp: support multiple timestamp event readers")
Signed-off-by: Edward Adam Davis <eadavis@qq.com>
Link: https://lore.kernel.org/r/tencent_CD19564FFE8DA8A5918DFE92325D92DD8107@qq.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-11-08 18:47:07 -08:00
..
2023-11-01 06:28:35 -10:00
2023-11-01 15:28:33 -10:00
2023-10-30 09:47:13 -10:00
2023-11-01 12:50:12 -10:00
2023-11-01 14:46:51 -10:00
2023-11-01 12:30:07 -10:00
2023-11-01 14:46:51 -10:00
2023-09-28 12:12:07 -06:00
2023-11-01 15:28:33 -10:00
2023-11-01 14:46:51 -10:00
2023-11-01 09:34:55 -10:00
2023-11-01 15:28:33 -10:00
2023-10-13 08:52:57 -07:00
2023-10-30 19:09:55 -10:00
2023-11-01 15:28:33 -10:00
2023-10-31 17:21:54 -10:00
2023-11-01 15:28:33 -10:00
2023-11-01 06:28:35 -10:00
2023-10-31 18:32:51 -10:00
2023-10-31 17:44:17 -10:00
2023-10-31 17:21:54 -10:00
2023-10-31 05:10:11 -10:00
2023-11-01 15:28:33 -10:00
2023-11-01 15:28:33 -10:00
2023-11-01 09:34:55 -10:00
2023-10-30 19:09:55 -10:00
2023-10-31 15:33:26 -10:00
2023-11-01 15:28:33 -10:00
2023-10-16 23:00:46 +02:00
2023-10-05 11:03:20 -07:00
2023-11-01 15:28:33 -10:00
2023-10-27 12:00:35 +02:00
2023-10-31 17:21:54 -10:00
2023-11-01 12:30:07 -10:00
2023-10-31 18:50:13 -10:00
2023-11-01 15:28:33 -10:00
2023-11-01 09:34:55 -10:00
2023-10-22 07:11:10 -10:00
2023-10-31 17:21:54 -10:00
2023-10-31 17:53:00 -10:00
2023-11-01 14:46:51 -10:00
2023-11-08 18:47:07 -08:00
2023-10-30 13:14:27 +00:00
2023-11-01 12:50:12 -10:00
2023-11-01 14:46:51 -10:00
2023-10-30 13:20:58 +00:00
2023-10-19 10:26:26 +03:00
2023-11-01 06:28:35 -10:00
2023-10-12 11:52:23 -07:00
2023-10-17 19:25:42 +02:00
2023-11-01 15:28:33 -10:00
2023-11-01 06:28:35 -10:00
2023-11-01 15:28:33 -10:00
2023-10-30 19:09:55 -10:00
2023-11-01 10:46:48 -10:00