mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kuniyuki Iwashima <kuniyu@amazon.com>
To: <buaajxlj@163.com>
Cc: <davem@davemloft.net>, <edumazet@google.com>, <horms@kernel.org>,
	<kuba@kernel.org>, <kuniyu@amazon.com>, <liangjie@lixiang.com>,
	<linux-kernel@vger.kernel.org>, <mhal@rbox.co>,
	<netdev@vger.kernel.org>, <pabeni@redhat.com>
Subject: Re: [PATCH net] af_unix: Correct comment to reference kfree_skb_reason hook
Date: Thu, 23 Jan 2025 18:11:13 -0800	[thread overview]
Message-ID: <20250124021113.63475-1-kuniyu@amazon.com> (raw)
In-Reply-To: <20250124015106.2226585-1-buaajxlj@163.com>

From: Liang Jie <buaajxlj@163.com>
Date: Fri, 24 Jan 2025 09:51:06 +0800
> From: Liang Jie <liangjie@lixiang.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@lixiang.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

      reply	other threads:[~2025-01-24  2:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-24  1:51 Liang Jie
2025-01-24  2:11 ` Kuniyuki Iwashima [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250124021113.63475-1-kuniyu@amazon.com \
    --to=kuniyu@amazon.com \
    --cc=buaajxlj@163.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=liangjie@lixiang.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhal@rbox.co \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®