net: fix sock_timestamping_bind_phc() to release device
Subsystems (3)
PATCH 1/1 net: fix sock_timestamping_bind_phc() to release device
Don't forget to release the device in sock_timestamping_bind_phc() after it was used to get the vclock indices.
Fixes d463126e23f1 ("net: sock: extend SO_TIMESTAMPING for PHC binding")
Signed-off-by Miroslav Lichvar <[email protected]>
Cc Yangbo Lu <[email protected]>
--- net/core/sock.c | 2 ++ 1 file changed, 2 insertions(+)
net/core/sock.c +2 -0
@@ -844,6 +844,8 @@ static int sock_timestamping_bind_phc(struct sock *sk, int phc_index) } num =ethtool_get_phc_vclocks (dev, &vclock_index); +dev_put (dev); +for (i =0 ; i < num; i++) {if (*(vclock_index + i) == phc_index) { match = true;
Signature · 1 line
2.33.1
This patch was applied to netdev/net.git (master) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <[email protected]>:
Quoted 8 lines · On Tue, 11 Jan 2022 16:10:53 +0100 you wrote:
Don't forget to release the device in
sock_timestamping_bind_phc()after it was used to get the vclock indices.Fixes d463126e23f1 ("net: sock: extend SO_TIMESTAMPING for PHC binding")Signed-off-by Miroslav Lichvar <[email protected]>Cc Yangbo Lu <[email protected]>[...]
Here is the summary with links:
- [net] net: fix sock_timestamping_bind_phc() to release device
https://git.kernel.org/netdev/net/c/2a4d75bfe412
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html