Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6026107iob; Tue, 10 May 2022 08:45:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJys2D5uDO0KE2jdJdN/WDawpg8r1VQ2eehz9dzMqTnMzGMK+d7Er3mpjzDBQ2vAvnCBCa0v X-Received: by 2002:a63:28d:0:b0:3c5:ea46:6491 with SMTP id 135-20020a63028d000000b003c5ea466491mr17363000pgc.58.1652197501763; Tue, 10 May 2022 08:45:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652197501; cv=none; d=google.com; s=arc-20160816; b=0iDaVhLewvBIULwyL/lyep0ysYZXUbWiBRJitwu9bol9+MSPvALlmkfugzV9NzWSfY LjxblFYpbVNdiwszHWoJwTrABl3TaTxRePdrD8vvSLfIqYwJ2lnAPMuS0rMb6seRR2jX kfg14zH8DMDT0OkIoDRGTahS0vgqCnjfa+nZT23qcmwnB3HHceA2G6eN9TYunXueas+d /rbdzwd7vakT+nhsWCDWAvYEfnEiPTXBi0xkEn70ucAF5sm4bV2/TqlE5mHI05dE8r12 +PuzslbibNllTr/ZOXdYkCenkhqCGDzFz/yChhucmWOSuHrXKKcaUwXkC+1fT/9hU2E5 302w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Gk95CWncLM7CZxULYOAFx3jdfsIAlUZphExBkxOwxv8=; b=PPMiqbsLe9x4RzayOP1GUY8QT93nAAHYqPsZC24/WNh6LsUFoq4Tel5aAu7aJmthXX sFSnuyeqthZC+66WlIZ593SydWzlZ7AIIPX6xVuk4YZU0Q3fBBiqx+4C9is4R6tg9WR7 f61J1JeDA2Sz8I5ox0Stek32OtOlWo7f29KYybb+jSafWotTjBYHwMf7F5srv6xu/Wkj gETh4di+dC1FkWaT/34KKGW1bdmI/pcxkmwh2X8N2eEIWxFFsNqT3jls2AUGV0VCTQ8S 31u3vf1kL+/inu+AAcScpmSBhbhvHXvLK//TBKqCD/hmybSxResmRrvryVRRZ/oQqAQz +7rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mQUrdJCj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y15-20020a056a00190f00b0050a9644da4esi19525876pfi.335.2022.05.10.08.44.46; Tue, 10 May 2022 08:45:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mQUrdJCj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245396AbiEJNwU (ORCPT + 99 others); Tue, 10 May 2022 09:52:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243605AbiEJNfy (ORCPT ); Tue, 10 May 2022 09:35:54 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B29222C0D3E; Tue, 10 May 2022 06:24:56 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4EFF460C1C; Tue, 10 May 2022 13:24:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 505D4C385C2; Tue, 10 May 2022 13:24:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652189095; bh=Lx98zUlyk0W158fveUZIRuOcG6TRDnGJ1FQPgqbBrfk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mQUrdJCjg7S5FvgOf+EEiBmfUhA+grQeyMEJz/2GeMNWuQg2M+hjkpS/YIrtg5Ysg kxdw2YpuUpf4KStFITYySrKlBJtQtm5lcodzxv6e1sxwUuHqDFfI7a3rl8XreX+0TM SqcXgS90fensSp8MXbQCAoHxeuwquyrFmg3878LU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "wanghai (M)" , Trond Myklebust Subject: [PATCH 5.10 11/70] Revert "SUNRPC: attempt AF_LOCAL connect on setup" Date: Tue, 10 May 2022 15:07:30 +0200 Message-Id: <20220510130733.198286305@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220510130732.861729621@linuxfoundation.org> References: <20220510130732.861729621@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Trond Myklebust commit a3d0562d4dc039bca39445e1cddde7951662e17d upstream. This reverts commit 7073ea8799a8cf73db60270986f14e4aae20fa80. We must not try to connect the socket while the transport is under construction, because the mechanisms to safely tear it down are not in place. As the code stands, we end up leaking the sockets on a connection error. Reported-by: wanghai (M) Cc: stable@vger.kernel.org Signed-off-by: Trond Myklebust Signed-off-by: Greg Kroah-Hartman --- net/sunrpc/xprtsock.c | 3 --- 1 file changed, 3 deletions(-) --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -2826,9 +2826,6 @@ static struct rpc_xprt *xs_setup_local(s } xprt_set_bound(xprt); xs_format_peer_addresses(xprt, "local", RPCBIND_NETID_LOCAL); - ret = ERR_PTR(xs_local_setup_socket(transport)); - if (ret) - goto out_err; break; default: ret = ERR_PTR(-EAFNOSUPPORT);