All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: netdev@vger.kernel.org, Cong Wang <cong.wang@bytedance.com>,
	shaozhengchao <shaozhengchao@huawei.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Tom Herbert <tom@herbertland.com>,
	Eric Dumazet <edumazet@google.com>
Subject: Re: [Patch net] kcm: fix a race condition in kcm_recvmsg()
Date: Tue, 25 Oct 2022 16:02:22 -0700	[thread overview]
Message-ID: <20221025160222.5902e899@kernel.org> (raw)
In-Reply-To: <20221023023044.149357-1-xiyou.wangcong@gmail.com>

On Sat, 22 Oct 2022 19:30:44 -0700 Cong Wang wrote:
> +			spin_lock_bh(&mux->rx_lock);
>  			KCM_STATS_INCR(kcm->stats.rx_msgs);
>  			skb_unlink(skb, &sk->sk_receive_queue);
> +			spin_unlock_bh(&mux->rx_lock);

Why not switch to __skb_unlink() at the same time?
Abundance of caution?

Adding Eric who was fixing KCM bugs recently.

  reply	other threads:[~2022-10-25 23:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-23  2:30 [Patch net] kcm: fix a race condition in kcm_recvmsg() Cong Wang
2022-10-25 23:02 ` Jakub Kicinski [this message]
2022-10-25 23:49   ` Eric Dumazet
2022-10-28 19:24     ` Cong Wang
2022-10-28 19:21   ` Cong Wang
2022-10-28 23:27     ` Jakub Kicinski
2022-11-01 20:52 ` Cong Wang

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=20221025160222.5902e899@kernel.org \
    --to=kuba@kernel.org \
    --cc=cong.wang@bytedance.com \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shaozhengchao@huawei.com \
    --cc=tom@herbertland.com \
    --cc=xiyou.wangcong@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.