public inbox for kernel-tls-handshake@lists.linux.dev
 help / color / mirror / Atom feed
* [Patch net-next] net/handshake: use sockfd_put() helper
@ 2024-08-26 18:26 A K M Fazla Mehrab
  2024-08-26 18:44 ` Chuck Lever
  2024-08-27 23:20 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 4+ messages in thread
From: A K M Fazla Mehrab @ 2024-08-26 18:26 UTC (permalink / raw)
  To: netdev; +Cc: kernel-tls-handshake, chuck.lever, A K M Fazla Mehrab

Replace fput() with sockfd_put() in handshake_nl_done_doit().

Signed-off-by: A K M Fazla Mehrab <a.mehrab@bytedance.com>
---
 net/handshake/netlink.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/handshake/netlink.c b/net/handshake/netlink.c
index 89637e732866..7e46d130dce2 100644
--- a/net/handshake/netlink.c
+++ b/net/handshake/netlink.c
@@ -153,7 +153,7 @@ int handshake_nl_done_doit(struct sk_buff *skb, struct genl_info *info)
 	if (!req) {
 		err = -EBUSY;
 		trace_handshake_cmd_done_err(net, req, sock->sk, err);
-		fput(sock->file);
+		sockfd_put(sock);
 		return err;
 	}
 
@@ -164,7 +164,7 @@ int handshake_nl_done_doit(struct sk_buff *skb, struct genl_info *info)
 		status = nla_get_u32(info->attrs[HANDSHAKE_A_DONE_STATUS]);
 
 	handshake_complete(req, status, info);
-	fput(sock->file);
+	sockfd_put(sock);
 	return 0;
 }
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Patch net-next] net/handshake: use sockfd_put() helper
  2024-08-26 18:26 [Patch net-next] net/handshake: use sockfd_put() helper A K M Fazla Mehrab
@ 2024-08-26 18:44 ` Chuck Lever
  2024-08-26 22:24   ` [External] " A K M Fazla Mehrab .
  2024-08-27 23:20 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 4+ messages in thread
From: Chuck Lever @ 2024-08-26 18:44 UTC (permalink / raw)
  To: A K M Fazla Mehrab; +Cc: netdev, kernel-tls-handshake

Hi-

On Mon, Aug 26, 2024 at 06:26:52PM +0000, A K M Fazla Mehrab wrote:
> Replace fput() with sockfd_put() in handshake_nl_done_doit().

The patch description needs to explain why. Lacking any other
context, I assume this is a clean-up for consistency with other
sockfd_lookup() call sites and that no behavior change is expected.

Reviewed-by: Chuck Lever <chuck.lever@oracle.com>


> Signed-off-by: A K M Fazla Mehrab <a.mehrab@bytedance.com>
> ---
>  net/handshake/netlink.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/net/handshake/netlink.c b/net/handshake/netlink.c
> index 89637e732866..7e46d130dce2 100644
> --- a/net/handshake/netlink.c
> +++ b/net/handshake/netlink.c
> @@ -153,7 +153,7 @@ int handshake_nl_done_doit(struct sk_buff *skb, struct genl_info *info)
>  	if (!req) {
>  		err = -EBUSY;
>  		trace_handshake_cmd_done_err(net, req, sock->sk, err);
> -		fput(sock->file);
> +		sockfd_put(sock);
>  		return err;
>  	}
>  
> @@ -164,7 +164,7 @@ int handshake_nl_done_doit(struct sk_buff *skb, struct genl_info *info)
>  		status = nla_get_u32(info->attrs[HANDSHAKE_A_DONE_STATUS]);
>  
>  	handshake_complete(req, status, info);
> -	fput(sock->file);
> +	sockfd_put(sock);
>  	return 0;
>  }
>  
> -- 
> 2.20.1
> 

-- 
Chuck Lever

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [External] Re: [Patch net-next] net/handshake: use sockfd_put() helper
  2024-08-26 18:44 ` Chuck Lever
@ 2024-08-26 22:24   ` A K M Fazla Mehrab .
  0 siblings, 0 replies; 4+ messages in thread
From: A K M Fazla Mehrab . @ 2024-08-26 22:24 UTC (permalink / raw)
  To: Chuck Lever; +Cc: netdev, kernel-tls-handshake

Hi,

On Mon, Aug 26, 2024 at 11:45 AM Chuck Lever <chuck.lever@oracle.com> wrote:
>
> Hi-
>
> On Mon, Aug 26, 2024 at 06:26:52PM +0000, A K M Fazla Mehrab wrote:
> > Replace fput() with sockfd_put() in handshake_nl_done_doit().
>
> The patch description needs to explain why. Lacking any other
> context, I assume this is a clean-up for consistency with other
> sockfd_lookup() call sites and that no behavior change is expected.

Yeah, this is indeed a clean-up and no behavior change is expected. I
will be careful to add more context in future patches.

Thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Patch net-next] net/handshake: use sockfd_put() helper
  2024-08-26 18:26 [Patch net-next] net/handshake: use sockfd_put() helper A K M Fazla Mehrab
  2024-08-26 18:44 ` Chuck Lever
@ 2024-08-27 23:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-08-27 23:20 UTC (permalink / raw)
  To: A K M Fazla Mehrab .; +Cc: netdev, kernel-tls-handshake, chuck.lever

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 26 Aug 2024 18:26:52 +0000 you wrote:
> Replace fput() with sockfd_put() in handshake_nl_done_doit().
> 
> Signed-off-by: A K M Fazla Mehrab <a.mehrab@bytedance.com>
> ---
>  net/handshake/netlink.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Here is the summary with links:
  - [net-next] net/handshake: use sockfd_put() helper
    https://git.kernel.org/netdev/net-next/c/85d4cf56e95a

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-08-27 23:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-26 18:26 [Patch net-next] net/handshake: use sockfd_put() helper A K M Fazla Mehrab
2024-08-26 18:44 ` Chuck Lever
2024-08-26 22:24   ` [External] " A K M Fazla Mehrab .
2024-08-27 23:20 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox