[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_AD33049E711B744BDD1B3225A1BA3DBB9A08@qq.com>
Date: Mon, 6 Nov 2023 22:31:27 +0800
From: Edward Adam Davis <eadavis@...com>
To: richardcochran@...il.com
Cc: davem@...emloft.net,
eadavis@...com,
habetsm.xilinx@...il.com,
jeremy@...ine.org,
linux-kernel@...r.kernel.org,
netdev@...r.kernel.org,
reibax@...il.com,
syzbot+df3f3ef31f60781fa911@...kaller.appspotmail.com
Subject: [PATCH net-next V8 1/2] ptp: ptp_read should not release queue
Firstly, queue is not the memory allocated in ptp_read;
Secondly, other processes may block at ptp_read and wait for conditions to be
met to perform read operations.
Reported-and-tested-by: syzbot+df3f3ef31f60781fa911@...kaller.appspotmail.com
Fixes: 8f5de6fb2453 ("ptp: support multiple timestamp event readers")
Signed-off-by: Edward Adam Davis <eadavis@...com>
---
drivers/ptp/ptp_chardev.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/ptp/ptp_chardev.c b/drivers/ptp/ptp_chardev.c
index 473b6d992507..3f7a74788802 100644
--- a/drivers/ptp/ptp_chardev.c
+++ b/drivers/ptp/ptp_chardev.c
@@ -588,7 +588,5 @@ ssize_t ptp_read(struct posix_clock_context *pccontext, uint rdflags,
free_event:
kfree(event);
exit:
- if (result < 0)
- ptp_release(pccontext);
return result;
}
--
2.25.1
Powered by blists - more mailing lists