[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250124021113.63475-1-kuniyu@amazon.com>
Date: Thu, 23 Jan 2025 18:11:13 -0800
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <buaajxlj@....com>
CC: <davem@...emloft.net>, <edumazet@...gle.com>, <horms@...nel.org>,
<kuba@...nel.org>, <kuniyu@...zon.com>, <liangjie@...iang.com>,
<linux-kernel@...r.kernel.org>, <mhal@...x.co>, <netdev@...r.kernel.org>,
<pabeni@...hat.com>
Subject: Re: [PATCH net] af_unix: Correct comment to reference kfree_skb_reason hook
From: Liang Jie <buaajxlj@....com>
Date: Fri, 24 Jan 2025 09:51:06 +0800
> From: Liang Jie <liangjie@...iang.com>
>
> The comment in unix_release_sock has been updated to correctly reference
> kfree_skb_reason instead of kfree_skb, for clarity on how passed file
> descriptors are handled during socket closure.
>
> Fixes: c32f0bd7d483 ("af_unix: Set drop reason in unix_release_sock().")
This is net-next material and Fixes tag is not needed.
I don't think we need to update the comment though..
kfree_skb 'hook' generally means skb->destructor() and _reason is
not relevant here.
kfree_skb
kfree_skb_reason
sk_skb_reason_drop
__kfree_skb
skb_release_all
skb_release_head_state
skb->destructor / unix_destruct_scm <--
> Signed-off-by: Liang Jie <liangjie@...iang.com>
> ---
> net/unix/af_unix.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
> index 34945de1fb1f..47dd3749ce32 100644
> --- a/net/unix/af_unix.c
> +++ b/net/unix/af_unix.c
> @@ -717,7 +717,7 @@ static void unix_release_sock(struct sock *sk, int embrion)
> if (state == TCP_LISTEN)
> unix_release_sock(skb->sk, 1);
>
> - /* passed fds are erased in the kfree_skb hook */
> + /* passed fds are erased in the kfree_skb_reason hook */
> kfree_skb_reason(skb, SKB_DROP_REASON_SOCKET_CLOSE);
> }
>
> --
> 2.25.1
Powered by blists - more mailing lists