Re: [PATCH net-next V3] ptp: fix corrupted list in ptp_open

From: Richard Cochran
Date: Fri Nov 03 2023 - 19:18:55 EST


On Fri, Nov 03, 2023 at 09:15:03PM +0800, Edward Adam Davis wrote:
> There is no lock protection when writing ptp->tsevqs in ptp_open(),
> ptp_release(), which can cause data corruption, use mutex lock to avoid this
> issue.

The problem is the bogus call to ptp_release() in ptp_read().

Just delete that.

No need for another mutex.

Thanks,
Richard