From: Kuniyuki Iwashima <kuniyu@amazon.com>
To: <horms@kernel.org>
Cc: <billy@starlabs.sg>, <davem@davemloft.net>, <edumazet@google.com>,
<kuba@kernel.org>, <kuni1840@gmail.com>, <kuniyu@amazon.com>,
<mhal@rbox.co>, <netdev@vger.kernel.org>, <pabeni@redhat.com>
Subject: Re: [PATCH v3 net] af_unix: Update unix_sk(sk)->oob_skb under sk_receive_queue lock.
Date: Tue, 14 May 2024 11:42:02 +0900 [thread overview]
Message-ID: <20240514024202.10366-1-kuniyu@amazon.com> (raw)
In-Reply-To: <20240513165747.GT2787@kernel.org>
From: Simon Horman <horms@kernel.org>
Date: Mon, 13 May 2024 17:57:47 +0100
> On Mon, May 13, 2024 at 10:06:28PM +0900, Kuniyuki Iwashima wrote:
>
> ...
>
> > @@ -2666,13 +2681,19 @@ static struct sk_buff *manage_oob(struct sk_buff *skb, struct sock *sk,
> > } else if (flags & MSG_PEEK) {
> > skb = NULL;
> > } else {
> > - skb_unlink(skb, &sk->sk_receive_queue);
> > + __skb_unlink(skb, &sk->sk_receive_queue);
> > WRITE_ONCE(u->oob_skb, NULL);
> > - if (!WARN_ON_ONCE(skb_unref(skb)))
> > - kfree_skb(skb);
> > + unlinked_skb = skb;
> > skb = skb_peek(&sk->sk_receive_queue);
> > }
> > }
> > +
> > + spin_unlock(&sk->sk_receive_queue.lock);
> > +
> > + if (unlinked_skb) {
> > + WARN_ON_ONCE(skb_unref(skb));
> > + kfree_skb(skb);
>
> Hi Iwashima-san,
>
> Here skb is kfree'd.
Ah, I apparently made a typo...
Will fix in v4, thanks!
prev parent reply other threads:[~2024-05-14 2:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-13 13:06 [PATCH v3 net] af_unix: Update unix_sk(sk)->oob_skb under sk_receive_queue lock Kuniyuki Iwashima
2024-05-13 16:57 ` Simon Horman
2024-05-14 2:42 ` 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=20240514024202.10366-1-kuniyu@amazon.com \
--to=kuniyu@amazon.com \
--cc=billy@starlabs.sg \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuni1840@gmail.com \
--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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).