From: sashiko-bot@kernel.org
To: "Bryam Vargas" <hexlabsecurity@proton.me>
Cc: linux-s390@vger.kernel.org, linux-rdma@vger.kernel.org,
"Heiko Carstens" <hca@linux.ibm.com>,
"Vasily Gorbik" <gor@linux.ibm.com>,
"Alexander Gordeev" <agordeev@linux.ibm.com>,
"Christian Borntraeger" <borntraeger@linux.ibm.com>
Subject: Re: [PATCH net 1/4] net/smc: take the socket spinlock across the failover cursor switch
Date: Sun, 15 Nov 2026 04:14:47 +0000 [thread overview]
Message-ID: <sashiko-outbox-215217@kernel.org> (raw)
In-Reply-To: <20261113-b4-disp-1a9ab9b0-v1-1-4a7c8d85d849@proton.me>
> From: Bryam Vargas <hexlabsecurity@proton.me>
>
> smc_switch_cursor() rewrites the send cursors, sndbuf_space and
> peer_rmbe_space under send_lock only. smc_cdc_tx_handler() updates
> tx_curs_fin, local_tx_ctrl_fin and sndbuf_space, and
> smc_cdc_msg_recv_action() updates the peer's consumer cursor and
> peer_rmbe_space, under bh_lock_sock(). A CDC completion handled during a
> link switch can credit its bytes twice and leave tx_curs_fin ahead of
> tx_curs_sent, or leave tx_curs_sent and the producer cursor out of step,
> so the resend writes at the wrong RMB offset. A CDC received at the same
> time can be counted twice in peer_rmbe_space.
>
> Take bh_lock_sock() around the link change and the cursor switch, in
> the order the receive path already uses (the socket spinlock, then
> send_lock).
>
> Fixes: c6f02ebeea3a ("net/smc: switch connections to alternate link")
> Reported-by: Sashiko <sashiko-bot@kernel.org>
> Closes: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261029-b4-disp-33001ace-v8-0-f9bb96e17827%40proton.me?part=4
> Cc: stable@vger.kernel.org
> Signed-off-by: Bryam Vargas <hexlabsecurity@proton.me>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261113-b4-disp-1a9ab9b0-v1-0-4a7c8d85d849@proton.me?part=1
next prev parent reply other threads:[~2026-11-15 4:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-14 4:14 [PATCH net 0/4] net/smc: fix the failover cursor switch and wrap rollover Bryam Vargas via B4 Relay
2026-11-14 4:14 ` Bryam Vargas
2026-11-14 4:14 ` [PATCH net 1/4] net/smc: take the socket spinlock across the failover cursor switch Bryam Vargas via B4 Relay
2026-11-14 4:14 ` Bryam Vargas
2026-11-15 4:14 ` sashiko-bot [this message]
2026-11-14 4:14 ` [PATCH net 2/4] net/smc: do not credit stale CDC completions after a link switch Bryam Vargas via B4 Relay
2026-11-14 4:14 ` Bryam Vargas
2026-11-15 4:14 ` sashiko-bot
2026-11-14 4:14 ` [PATCH net 3/4] net/smc: fix the failover catch-up across the cursor wrap rollover Bryam Vargas via B4 Relay
2026-11-14 4:14 ` Bryam Vargas
2026-11-15 4:14 ` sashiko-bot
2026-11-14 4:14 ` [PATCH net 4/4] net/smc: order the urgent mark " Bryam Vargas via B4 Relay
2026-11-14 4:14 ` Bryam Vargas
2026-11-15 4:14 ` sashiko-bot
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=sashiko-outbox-215217@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=hexlabsecurity@proton.me \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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.