From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=79.135.106.120 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796289471; b=TVn6whSsiP3qGqnelSC6rmKV9HuMyKqpp9oNVdIc2sAeBEoUB6B6ooSKIDtZMyXr75QZ QsPVS5JEjAx6ZgJEzy9k/SM8sG3Ad5lDoPap6OrTZ/aO4/+xvc5TAULQM2/DfwGCgxjZo IA1UYmpz+MzIO2wWO4IOA4zAaTpUf7hgicGrrGTLZt/6rh1tNJYiyQh1cysBT7boAlnpC gSqzRzBevZACAZmeqK2s7z4tkOX6/RcMlZd1jQ5jKGJ0pqdZmOpQ5VGV93wFeoLCCocQf Qm6Yxan4h2WzbIrbiCveWL0JZt1iCnTnY4koVy4FEq43ISwb5k0DQAz5z6eol33F4ag== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796289471; h=DMARC-Filter:DKIM-Signature:Date:To:From:Cc:Subject:Message-ID: In-Reply-To:References:Feedback-ID:X-Pm-Message-ID:MIME-Version: Content-Type:Content-Transfer-Encoding; bh=76fa+FmnIklD5TprHu41dj1XkDmuEpQoUpHxVN3U1+Y=; b=sDVyaX/esI9wUl9KWnavsgiKjZkuAek8uqo8v6xDFJ3UOKyq7R744nT2nY2WrTuRXP05 NFIWnXd92HvK0s9Xors4W7Db+EdWHqBAMa4BZbqfXEf2yR48fwhIoQ0yL48oxCsnalJPd 2lUjLp+xC5hfp7d7VoKC3BTcnNzBRo9jhnUw8kKhpqCzqJufisgl43PNjmQt95gzWDOwK i4wLK2fconmL3qdCRO+uv4vw6m8SZjpZApUmBnyrubZf6Y6KNceBfa2VCWpRn52JEDcI2 yyTxFboPNQhoyAvWb8TKg+3LlmJWl62n1duJsjs9uGnpmrm5zqpOa7tKIX/GtniGOWw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=proton.me; spf=pass smtp.mailfrom=proton.me; dkim=pass header.d=proton.me header.i=@proton.me header.a=rsa-sha256 header.s=protonmail2 header.b=cTGSqfDx; arc=none smtp.remote-ip=79.135.106.120 Received: from mail-106120.protonmail.ch (mail-106120.protonmail.ch [79.135.106.120]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 596F8606A33C; Thu, 3 Dec 2026 09:17:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 596F8606A33C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=proton.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=proton.me Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=proton.me header.i=@proton.me header.a=rsa-sha256 header.s=protonmail2 header.b=cTGSqfDx DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail2; t=1796289468; x=1796548668; bh=76fa+FmnIklD5TprHu41dj1XkDmuEpQoUpHxVN3U1+Y=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=cTGSqfDxto3LWx6NddtAql0yQO6L6Qr5LqmqIV4/US6BWNaJdgIl+kknw/B5/ofgV IT/lXX8jGDDTxpqnRnTZRbyc0ityU1U4H6ozM9ye0Gz3OwAWTMTFdUQ7GhV+Rhuy7U SGnG6UcBX70NS8GoJ8hUiA+qc+GoUuXd1GvCKUIqqicbAmPhYSdIbYLh+IN9OrqEg5 CJKq0e/LgVyNl9tA17I3YyvdfQx4KVGSeNVJmto6vVlbriVib+O4KX7OfgB1vUsHrt jai81LGHOv7zgyk4wwW40468NMoufEeqJXpV3Kju7VoTID2q5Owp7rpoYWynGLYDdu QISblLZeQRaVA== Date: Thu, 03 Dec 2026 09:17:40 +0000 To: Sidraya Jayagond From: Bryam Vargas Cc: Mahanta Jambigi , "D . Wythe" , Eric Dumazet , "David S . Miller" , Paolo Abeni , Jakub Kicinski , Dust Li , Stefan Raspl , Simon Horman , Guangguan Wang , Wen Gu , linux-s390@vger.kernel.org, linux-rdma@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Tony Lu , Ursula Braun , Hidayath Khan , Wenjia Zhang Subject: Re: [PATCH net v2 6/6] net/smc: update the urgent state under the socket spinlock Message-ID: <20261203091733.486365-1-hexlabsecurity@proton.me> In-Reply-To: References: <20261128-b4-disp-360e65c5-v2-0-d9c05004d430@proton.me> <20261128-b4-disp-360e65c5-v2-6-d9c05004d430@proton.me> Feedback-ID: 199661219:user:proton X-Pm-Message-ID: df75cd5f3b55f044982df1426c903b05ebba9068 X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 =3D=3D 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@pro= ton.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