Netdev Archive mirror
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Kuniyuki Iwashima <kuniyu@amazon.com>
Cc: billy@starlabs.sg, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org,  kuni1840@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH v2 net] af_unix: Update unix_sk(sk)->oob_skb under sk_receive_queue lock.
Date: Fri, 10 May 2024 13:11:06 +0200	[thread overview]
Message-ID: <54a73bb8163716f724af91de3ed8b2bd59aa5d39.camel@redhat.com> (raw)
In-Reply-To: <20240510105400.32158-1-kuniyu@amazon.com>

On Fri, 2024-05-10 at 19:54 +0900, Kuniyuki Iwashima wrote:
> From: Paolo Abeni <pabeni@redhat.com>
> Date: Fri, 10 May 2024 12:44:58 +0200
> > On Fri, 2024-05-10 at 18:39 +0900, Kuniyuki Iwashima wrote:
> > > diff --git a/net/unix/garbage.c b/net/unix/garbage.c
> > > index 0104be9d4704..b87e48e2b51b 100644
> > > --- a/net/unix/garbage.c
> > > +++ b/net/unix/garbage.c
> > > @@ -342,10 +342,12 @@ static void __unix_gc(struct work_struct *work)
> > >  		scan_children(&u->sk, inc_inflight, &hitlist);
> > >  
> > >  #if IS_ENABLED(CONFIG_AF_UNIX_OOB)
> > > +		spin_lock(&u->sk.sk_receive_queue.lock);
> > >  		if (u->oob_skb) {
> > > -			kfree_skb(u->oob_skb);
> > > +			WARN_ON_ONCE(skb_unref(u->oob_skb));
> > 
> > Sorry for not asking this first, but it's not clear to me why the above
> > change (just the 'WARN_ON_ONCE' introduction) is needed and if it's
> > related to the addressed issue???
> 
> I think I added it to make it clear that here we don't actually free skb
> and consistent with manage_oob().
> 
> But I don't have strong preference as it will be removed soon.

Ok, thanks for the explanation. I'm fine with the above.

Acked-by: Paolo Abeni <pabeni@redhat.com>


  reply	other threads:[~2024-05-10 11:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-10  9:39 [PATCH v2 net] af_unix: Update unix_sk(sk)->oob_skb under sk_receive_queue lock Kuniyuki Iwashima
2024-05-10 10:44 ` Paolo Abeni
2024-05-10 10:54   ` Kuniyuki Iwashima
2024-05-10 11:11     ` Paolo Abeni [this message]
2024-05-12 14:47 ` Michal Luczaj
2024-05-13  6:12   ` Kuniyuki Iwashima
2024-05-13  6:40     ` Michal Luczaj
2024-05-13  7:44       ` Kuniyuki Iwashima
2024-05-13  9:14         ` Michal Luczaj
2024-05-13  9:24           ` Kuniyuki Iwashima
2024-05-13 10:15             ` Michal Luczaj
2024-05-13 12:44               ` Kuniyuki Iwashima

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=54a73bb8163716f724af91de3ed8b2bd59aa5d39.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=billy@starlabs.sg \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=kuni1840@gmail.com \
    --cc=kuniyu@amazon.com \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).