Re: [PATCH net v2 6/6] net/smc: update the urgent state under the socket spinlock

From: Bryam Vargas

Date: Thu Dec 03 2026 - 04:18:07 EST


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@xxxxxxxxx/

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