From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C706AC64ED6 for ; Mon, 13 Feb 2023 16:45:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231130AbjBMQpa (ORCPT ); Mon, 13 Feb 2023 11:45:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230476AbjBMQp0 (ORCPT ); Mon, 13 Feb 2023 11:45:26 -0500 Received: from smtp-fw-80007.amazon.com (smtp-fw-80007.amazon.com [99.78.197.218]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E1F31ADD2; Mon, 13 Feb 2023 08:45:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1676306716; x=1707842716; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZDQJ3j66lvSghE+5Zg2rbIchPj9PWcZWgtulopzngrk=; b=kdBquCPHSoGkZOZ2DHiDK+ob59X+3m2ANDGJ5KLf547NQragOaKeZs5n x/DHS7aJKRu9GlS4/8KG58GiaUesAtCFHfqzgUsDCA1ImtAv+n/vdt5Ey axCnXRQ8Y9GsL7tNJXBW4xnTbmO+XSTbDtQ0lUuG0kQXZ1MhXaHPiu0oU U=; X-IronPort-AV: E=Sophos;i="5.97,294,1669075200"; d="scan'208";a="181364611" Received: from pdx4-co-svc-p1-lb2-vlan3.amazon.com (HELO email-inbound-relay-pdx-2c-m6i4x-e7094f15.us-west-2.amazon.com) ([10.25.36.214]) by smtp-border-fw-80007.pdx80.corp.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Feb 2023 16:45:09 +0000 Received: from EX13MTAUWB001.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan3.pdx.amazon.com [10.236.137.198]) by email-inbound-relay-pdx-2c-m6i4x-e7094f15.us-west-2.amazon.com (Postfix) with ESMTPS id 38B58417A3; Mon, 13 Feb 2023 16:45:05 +0000 (UTC) Received: from EX19D004ANA001.ant.amazon.com (10.37.240.138) by EX13MTAUWB001.ant.amazon.com (10.43.161.207) with Microsoft SMTP Server (TLS) id 15.0.1497.45; Mon, 13 Feb 2023 16:45:05 +0000 Received: from 88665a182662.ant.amazon.com (10.43.162.56) by EX19D004ANA001.ant.amazon.com (10.37.240.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.1118.24; Mon, 13 Feb 2023 16:45:03 +0000 From: Kuniyuki Iwashima To: CC: , , , , , Subject: Re: [REGRESSION] 5.15.88 and onwards no longer return EADDRINUSE from bind Date: Mon, 13 Feb 2023 08:44:55 -0800 Message-ID: <20230213164455.36911-1-kuniyu@amazon.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.43.162.56] X-ClientProxiedBy: EX13D34UWA002.ant.amazon.com (10.43.160.245) To EX19D004ANA001.ant.amazon.com (10.37.240.138) Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Willy Tarreau Date: Mon, 13 Feb 2023 08:52:34 +0100 > Hi Greg, > > On Mon, Feb 13, 2023 at 08:25:34AM +0100, Greg KH wrote: > > On Mon, Feb 13, 2023 at 05:27:03AM +0100, Willy Tarreau wrote: > > > Hi, > > > > > > [CCed netdev] > > > > > > On Sun, Feb 12, 2023 at 10:38:40PM -0500, Winter wrote: > > > > Hi all, > > > > > > > > I'm facing the same issue as > > > > https://lore.kernel.org/stable/CAFsF8vL4CGFzWMb38_XviiEgxoKX0GYup=JiUFXUOmagdk9CRg@mail.gmail.com/, > > > > but on 5.15. I've bisected it across releases to 5.15.88, and can reproduce > > > > on 5.15.93. > > > > > > > > However, I cannot seem to find the identified problematic commit in the 5.15 > > > > branch, so I'm unsure if this is a different issue or not. > > > > > > > > There's a few ways to reproduce this issue, but the one I've been using is > > > > running libuv's (https://github.com/libuv/libuv) tests, specifically tests > > > > 271 and 277. > > > > > > >From the linked patch: > > > > > > https://lore.kernel.org/stable/20221228144337.512799851@linuxfoundation.org/ > > > > But that commit only ended up in 6.0.y, not 5.15, so how is this an > > issue in 5.15.y? > > Hmmm I plead -ENOCOFFEE on my side, I hadn't notice the "can't find the > problematic commit", you're right indeed. > > However if the issue happened in 5.15.88, the only part touching the > network listening area is this one which may introduce an EINVAL on > one listening path, but that seems unrelated to me given that it's > only for ULP that libuv doesn't seem to be using: > > dadd0dcaa67d ("net/ulp: prevent ULP without clone op from entering the LISTEN status") This commit accidentally backports a part of 7a7160edf1bf ("net: Return errno in sk->sk_prot->get_port().") and removed err = -EADDRINUSE in inet_csk_listen_start(). Then, listen() will return 0 even if ->get_port() actually fails and returns 1. I can send a small revert or a whole backport, but which is preferable ? The original patch is not for stable, but it will make future backports easy. Thanks, Kuniyuki