Skip to contentSkip to conversation

ptp: ptp_read should not release queue

PATCH Applied Edward Adam Davis 2 participants 2 messages Nov 7, 2023 – Nov 9, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v9 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 [email protected]
Fixes 8f5de6fb2453 ("ptp: support multiple timestamp event readers")
---
 drivers/ptp/ptp_chardev.c | 2 --
 1 file changed, 2 deletions(-)
drivers/ptp/ptp_chardev.c +0 -2
index 473b6d992507..3f7a74788802 100644
@@ -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;
 }
Signature · 1 line
2.25.1
#1 lore raw
This series was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This series was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:

Quoted 10 lines · On Tue, 7 Nov 2023 16:00:40 +0800 you wrote:

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 [email protected]
Fixes 8f5de6fb2453 ("ptp: support multiple timestamp event readers")

[...]

Here is the summary with links:
- [net,V9,1/2] ptp: ptp_read should not release queue

    https://git.kernel.org/netdev/net/c/b714ca2ccf6a
  - [net,V9,2/2] ptp: fix corrupted list in ptp_open
    https://git.kernel.org/netdev/net/c/1bea2c3e6df8

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html