Netdev List
 help / color / mirror / Atom feed
From: Bryam Vargas <hexlabsecurity@proton.me>
To: Sidraya Jayagond <sidraya@linux.ibm.com>
Cc: Mahanta Jambigi <mjambigi@linux.ibm.com>,
	"D . Wythe" <alibuda@linux.alibaba.com>,
	Eric Dumazet <edumazet@kernel.org>,
	"David S . Miller" <davem@davemloft.net>,
	Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>,
	Dust Li <dust.li@linux.alibaba.com>,
	Stefan Raspl <raspl@linux.ibm.com>,
	Simon Horman <horms@kernel.org>,
	Guangguan Wang <guangguan.wang@linux.alibaba.com>,
	Wen Gu <guwen@linux.alibaba.com>,
	linux-s390@vger.kernel.org, linux-rdma@vger.kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Tony Lu <tonylu@linux.alibaba.com>,
	Ursula Braun <ubraun@linux.ibm.com>,
	Hidayath Khan <hidayath@linux.ibm.com>,
	Wenjia Zhang <wenjia@linux.ibm.com>
Subject: Re: [PATCH net v2 6/6] net/smc: update the urgent state under the socket spinlock
Date: Thu, 03 Dec 2026 09:17:40 +0000	[thread overview]
Message-ID: <20261203091733.486365-1-hexlabsecurity@proton.me> (raw)
In-Reply-To: <cba71de0-4d7e-4bb2-8e08-ed7ecf0883f4@linux.ibm.com>

On 01/12/26 3:02 pm, Sidraya Jayagond wrote:
> Changing the test to "> 0" fixes that case. smc_rx_update_consumer()
> then sees skip_pend and takes its diff == 1 branch.
>
> A zero-length recv(MSG_OOB) still sets SMC_URG_READ, but it never
> computes skip_pend or calls smc_rx_update_consumer(), so it leaves
> the byte behind at any distance. Doing both outside the len > 0
> check would cover that as well.
>
> Could you add this as a follow-up patch with the same Fixes tag?
[...]

It is 7/7 of v3, with both changes:
https://lore.kernel.org/all/20261203-b4-disp-ba1ad55e-v3-7-6834ff90c5d0@proton.me/

After a one-byte send(MSG_OOB) to a reader that has read everything,
recv(MSG_OOB) returns the byte on net and with v2, and the sender's
next send() of 4096 bytes times out. With 7/7 the 4096 bytes arrive.
A zero-length recv(MSG_OOB) gives the same two results. With "> 0"
and the smc_rx_update_consumer() call left inside the len > 0 check,
the zero-length case still times out.

Thanks for the review and the tags.

Bryam


      reply	other threads:[~2026-12-03  9:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-28 14:23 [PATCH net v2 0/6] net/smc: fix the failover cursor switch and wrap rollover Bryam Vargas via B4 Relay
2026-11-28 14:23 ` [PATCH net v2 1/6] net/smc: take the socket spinlock across the failover cursor switch Bryam Vargas via B4 Relay
2026-12-01  8:47   ` Sidraya Jayagond
2026-11-28 14:23 ` [PATCH net v2 2/6] net/smc: do not credit stale CDC completions after a link switch Bryam Vargas via B4 Relay
2026-12-01  9:00   ` Sidraya Jayagond
2026-12-03  9:17     ` Bryam Vargas
2026-11-28 14:23 ` [PATCH net v2 3/6] net/smc: store each cursor once in smc_switch_cursor() Bryam Vargas via B4 Relay
2026-12-01  9:03   ` Sidraya Jayagond
2026-11-28 14:23 ` [PATCH net v2 4/6] net/smc: fix the failover catch-up across the cursor wrap rollover Bryam Vargas via B4 Relay
2026-12-01  9:08   ` Sidraya Jayagond
2026-11-28 14:23 ` [PATCH net v2 5/6] net/smc: order the urgent mark " Bryam Vargas via B4 Relay
2026-12-01  8:18   ` Sidraya Jayagond
2026-12-03  9:17     ` Bryam Vargas
2026-11-28 14:23 ` [PATCH net v2 6/6] net/smc: update the urgent state under the socket spinlock Bryam Vargas via B4 Relay
2026-12-01  9:32   ` Sidraya Jayagond
2026-12-03  9:17     ` Bryam Vargas [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=20261203091733.486365-1-hexlabsecurity@proton.me \
    --to=hexlabsecurity@proton.me \
    --cc=alibuda@linux.alibaba.com \
    --cc=davem@davemloft.net \
    --cc=dust.li@linux.alibaba.com \
    --cc=edumazet@kernel.org \
    --cc=guangguan.wang@linux.alibaba.com \
    --cc=guwen@linux.alibaba.com \
    --cc=hidayath@linux.ibm.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mjambigi@linux.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=raspl@linux.ibm.com \
    --cc=sidraya@linux.ibm.com \
    --cc=tonylu@linux.alibaba.com \
    --cc=ubraun@linux.ibm.com \
    --cc=wenjia@linux.ibm.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