From patchwork Mon Oct 12 13:27:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 270333 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D459C433E7 for ; Mon, 12 Oct 2020 13:43:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5A11622227 for ; Mon, 12 Oct 2020 13:43:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602510238; bh=zMPTSppgLzmbbQLiE/k+1g2l4o5RSNonPo1tZQMtE1U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=x3/E/VpNwWcHaoBm850VI4H2cd/j91WZc+f6FWMPHlSah5R0LKgLreuIUZ8NtN6ig MxR1h1UdkmcRrS3Cgd7CtCYl2mhHUxx2n9HbzFphxX3g3G2g5IG9IeRIKQk3G1MYYv OaBnp+jyk1yxXr92ejSgWM3A9XxAT9d0gHjkD160= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389409AbgJLNnz (ORCPT ); Mon, 12 Oct 2020 09:43:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:48194 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731030AbgJLNnA (ORCPT ); Mon, 12 Oct 2020 09:43:00 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D7E152074F; Mon, 12 Oct 2020 13:42:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602510180; bh=zMPTSppgLzmbbQLiE/k+1g2l4o5RSNonPo1tZQMtE1U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mt3hJ2r9Cwg5dtD/UcMgtp+Ju8ySrw7pdOCskWHyMM2V27AJKLk7BAcoeJdcDPPks idHjQAwLHrrOUPd8QzxFCJcP237XPxQG5Gr2GoSt4KPaNs8RwuStRE+vUuehCCPDo/ Dy6JkZ1ZlUyfjF2tJsmq5dt4HLvrPVRtfWCCmvGE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Howells , Sasha Levin Subject: [PATCH 5.4 73/85] rxrpc: The server keyring isnt network-namespaced Date: Mon, 12 Oct 2020 15:27:36 +0200 Message-Id: <20201012132636.359909507@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201012132632.846779148@linuxfoundation.org> References: <20201012132632.846779148@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: David Howells [ Upstream commit fea99111244bae44e7d82a973744d27ea1567814 ] The keyring containing the server's tokens isn't network-namespaced, so it shouldn't be looked up with a network namespace. It is expected to be owned specifically by the server, so namespacing is unnecessary. Fixes: a58946c158a0 ("keys: Pass the network namespace into request_key mechanism") Signed-off-by: David Howells Signed-off-by: Sasha Levin --- net/rxrpc/key.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rxrpc/key.c b/net/rxrpc/key.c index 32f46edcf7c67..64cbbd2f16944 100644 --- a/net/rxrpc/key.c +++ b/net/rxrpc/key.c @@ -941,7 +941,7 @@ int rxrpc_server_keyring(struct rxrpc_sock *rx, char __user *optval, if (IS_ERR(description)) return PTR_ERR(description); - key = request_key_net(&key_type_keyring, description, sock_net(&rx->sk), NULL); + key = request_key(&key_type_keyring, description, NULL); if (IS_ERR(key)) { kfree(description); _leave(" = %ld", PTR_ERR(key));