From nobody Tue Nov 26 05:47:24 2024 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B407D1E6DFF; Mon, 21 Oct 2024 10:25:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729506338; cv=none; b=T5almVC2OQeqseUqvKT+Lt5pBC3Vi2jF7d8ypA861h0FVeSogXQ1TsTPHvhWys9QbsZF/vgYQ5GPbrbMzM7GRMx/M0Jb+yGwHDmiYt3rj1R3qoAyhRNYgFK2lNa0FEJ/EeHj2cjDHh5NZacpj7SllnxgLHTldzVVzZ5yFBTbv9Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729506338; c=relaxed/simple; bh=aujMW00Tz/LXk1VmK4UgofAwp55ujLJBpC+8bH2uZLw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kRdnlnPYYdyeF9Y9bUncP6ZjGxbh8V3bEf855fZ5MwmHlk/fxsACLjYESHvJn8sEfG2QMWN1+2kxoQL9N/DaDZih4670hGT9cgKEC6sVpnQ8AU+XjwcIrwIpRd+v5SEx213t7ZePIH0eMREk9GlSlOk9LD+olX5gKXLHYn0M0zE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sAL4xlw3; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sAL4xlw3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 64107C4CEE7; Mon, 21 Oct 2024 10:25:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729506338; bh=aujMW00Tz/LXk1VmK4UgofAwp55ujLJBpC+8bH2uZLw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=sAL4xlw3EOcFhq8Ze+1tCiMBVi7sLPPgRP/1iS/Do6PGcOZ/MEyVXW2WFShECbW2I z6/w+VYIhKYX5jqbU8t2uulTQSTfNvBrTYQWjwKzdlh7DA39YHGb8iP273vBj35we4 29kQCw39gn2g3NkOhmwU0CJ+9Bst8Niyc0SIzsVPhgnaNWfNS8T+UPatrsriAjdlhb 4rDlZX1X4gYtJXsTVlC6b82JQPHr5TwZlA8W6JWzdqJfpWAIPhdFf/QDU7XNgolHT0 zTqAibKqyftfQYCnbITJa+BRQOGmMl0w7WdfqZBG3wpNjrX2uEniA6vIKdzesqo17X zio92G+mvzBmg== From: "Matthieu Baerts (NGI0)" Date: Mon, 21 Oct 2024 12:25:26 +0200 Subject: [PATCH net 1/3] mptcp: init: protect sched with rcu_read_lock Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241021-net-mptcp-sched-lock-v1-1-637759cf061c@kernel.org> References: <20241021-net-mptcp-sched-lock-v1-0-637759cf061c@kernel.org> In-Reply-To: <20241021-net-mptcp-sched-lock-v1-0-637759cf061c@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Gregory Detal , Shuah Khan Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, "Matthieu Baerts (NGI0)" , stable@vger.kernel.org X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2526; i=matttbe@kernel.org; h=from:subject:message-id; bh=aujMW00Tz/LXk1VmK4UgofAwp55ujLJBpC+8bH2uZLw=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBnFiwbLMt6vd2YjKYN5i9P4fBucg+w4SoWv1ZRC Vms5SrTVjqJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZxYsGwAKCRD2t4JPQmmg c2WqD/0SGcwgiZbF29BgW4VQjOdnUO+2B6BXgVvAezXQTm/aMfnlAIID1UBuZUtVAQiMD2O3gP9 Y3UO6Sf6JRJWTWczYk/sjBgt1kOHc2BPlitD1wVM82cymhXDy0jq+qZwSmS7wT0TLT49P8+AqET hMwJj5FNBqw9sJ3lZnnerblAy3bZVYh+n56beud5g7d2Fb4p0GiYV6IDJx/Y5FuG8fu97YOtMJ2 H1qp61sKb8FUwDKJhOY0n0WSPNZYLoM/KNMOdOQXjesG4GgpJO3TVs80hUt4rsKFg7h6Uv3GliY t+m523/gaWRH8VsLlvBavTxyRez3VyfwEJjGeZBP2LMBzKRjTgj6k0I+/rlvEap8KVfWxrFhp3S MWiWUVn13Gpi8qJtDHn5cEI0RVrU4u6r/498Ls1e1uKNTq0vKZCnZ4Yfny0bwhuF23Yu2iVtvjE goT4VEKYhMTcYo8E96fKVGCjdGuwu5NnOz02JrjnKu+0Wb7LIeLgSadzkV++d7olM/BgDq8GN2Z pGnj8goilzglyRUfFnW0PRF3+YkW4RjcsNk7iijdCKHKh3OFyR07cbT80DIskH9vGZ0kUSXS2kN udSXp8pfh/v7r04EOviFPcu3lez+Nd04Nj5Dxa4kDRE4qQi4/2/E49pUoBTtyh9HgCu8xF67Dwn LDwE8aXPv/thfKg== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 Enabling CONFIG_PROVE_RCU_LIST with its dependence CONFIG_RCU_EXPERT creates this splat when an MPTCP socket is created: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D WARNING: suspicious RCU usage 6.12.0-rc2+ #11 Not tainted ----------------------------- net/mptcp/sched.c:44 RCU-list traversed in non-reader section!! other info that might help us debug this: rcu_scheduler_active =3D 2, debug_locks =3D 1 no locks held by mptcp_connect/176. stack backtrace: CPU: 0 UID: 0 PID: 176 Comm: mptcp_connect Not tainted 6.12.0-rc2+ #11 Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 Call Trace: dump_stack_lvl (lib/dump_stack.c:123) lockdep_rcu_suspicious (kernel/locking/lockdep.c:6822) mptcp_sched_find (net/mptcp/sched.c:44 (discriminator 7)) mptcp_init_sock (net/mptcp/protocol.c:2867 (discriminator 1)) ? sock_init_data_uid (arch/x86/include/asm/atomic.h:28) inet_create.part.0.constprop.0 (net/ipv4/af_inet.c:386) ? __sock_create (include/linux/rcupdate.h:347 (discriminator 1)) __sock_create (net/socket.c:1576) __sys_socket (net/socket.c:1671) ? __pfx___sys_socket (net/socket.c:1712) ? do_user_addr_fault (arch/x86/mm/fault.c:1419 (discriminator 1)) __x64_sys_socket (net/socket.c:1728) do_syscall_64 (arch/x86/entry/common.c:52 (discriminator 1)) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) That's because when the socket is initialised, rcu_read_lock() is not used despite the explicit comment written above the declaration of mptcp_sched_find() in sched.c. Adding the missing lock/unlock avoids the warning. Fixes: 1730b2b2c5a5 ("mptcp: add sched in mptcp_sock") Cc: stable@vger.kernel.org Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/523 Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Reviewed-by: Simon Horman --- net/mptcp/protocol.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 6d0e201c3eb26aa6ca0ff27e5a65cb6f911012f2..d263091659e076587bc3406dfdc= b4409adb3247e 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -2864,8 +2864,10 @@ static int mptcp_init_sock(struct sock *sk) if (unlikely(!net->mib.mptcp_statistics) && !mptcp_mib_alloc(net)) return -ENOMEM; =20 + rcu_read_lock(); ret =3D mptcp_init_sched(mptcp_sk(sk), mptcp_sched_find(mptcp_get_scheduler(net))); + rcu_read_unlock(); if (ret) return ret; =20 --=20 2.45.2 From nobody Tue Nov 26 05:47:24 2024 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2A3681E7C1D; Mon, 21 Oct 2024 10:25:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729506342; cv=none; b=tLie9bEyrbqirB+iUT8fk82C+4eyTYvMu9niSPG5F4UDyBSnNhzc5QqpdUl6lOaBPz6XiVy9F1NWJS6IRtO58ufVhVm1zO/GWYXm8q4OBCWQW0oEYJKX+H3zOvHoepv9PHvBYYlBTbTrMxfl13X5rXpNZ+OLA22MorDDuMO2VAU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729506342; c=relaxed/simple; bh=sc8jhN+g3bazvvXRQ1yzerYMsmvb+DSO6M7l748KWNM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jZtddSxGZM46qB/sPPR7Bk1RgAG/dHjh9YS4BJ8pts+yQAd0Ta1gG5GsaDNpWnO8gL0elrQPolUMlxi/YoSNE8E3hn8mlziMguWGltAzEtApdQlOHKw3qidZKCOWb7NvjXFj4AuGqUa9xUfoI5j67vyeMx8braEsUv5sWqtHFr4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lZzbSBQc; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lZzbSBQc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CAE7DC4CEC3; Mon, 21 Oct 2024 10:25:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729506341; bh=sc8jhN+g3bazvvXRQ1yzerYMsmvb+DSO6M7l748KWNM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=lZzbSBQc2+bSfBSa+YylekSkUe/WIi+qG8ZDgwkdxuGQ8kmGGyHGHaKmfe/13z//T SqU/Ry1n54mntoVKwejzzEbkE2CCRBl5j/DcPbXQisLXLEIPYhbaQHuKZTNlyGjbMV YLCHEfaEKRF8J+Qkazzak7MwZaDLfxiJk6aJAi7q2TECGq5vTaBfAmcSZqlYGHZfLc 9KKWmH00Nx+5ZaLQcrPoTkotzRNSd96TnVfb7PBwGuxO4KbyULReI1hYCysjslzFYm x7R7/qVUHKjQ3Nf65vsBbWn4I0DYKjdb5Kw/FJWzW2q5iuXW0KwJqy1DebiwHgk0YT r4/Ljx55HWAdQ== From: "Matthieu Baerts (NGI0)" Date: Mon, 21 Oct 2024 12:25:27 +0200 Subject: [PATCH net 2/3] mptcp: remove unneeded lock when listing scheds Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241021-net-mptcp-sched-lock-v1-2-637759cf061c@kernel.org> References: <20241021-net-mptcp-sched-lock-v1-0-637759cf061c@kernel.org> In-Reply-To: <20241021-net-mptcp-sched-lock-v1-0-637759cf061c@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Gregory Detal , Shuah Khan Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, "Matthieu Baerts (NGI0)" , stable@vger.kernel.org X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1273; i=matttbe@kernel.org; h=from:subject:message-id; bh=sc8jhN+g3bazvvXRQ1yzerYMsmvb+DSO6M7l748KWNM=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBnFiwb5DB1p3KgSrPWEztR8Un4u7jVwmAXFuTBv n3DLRPi+ZyJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZxYsGwAKCRD2t4JPQmmg c+uHD/9p62xCprKBXbWLdGbx0fgrK90+4dPS30lanUOsqd6/tyuiaMHPIsTfpMdaWYaFLfXBQct 4wB4bQPmFaMV9zNdy5BNDR+PjAQ4NBrKzc4vVPVzFkMgaHk6ivnJvjOEDbjFlzUCqPdQS/Mh7ne ceFwVCdwDb2ao87QuxLmvIlT33QfaUgpJXydKmqs0hK4utjxOT1cH1DrkkawI+dDMpaLQVPkZ3D qXuc2Jre25UaylEDUMyft3Wlf64jKK1NlcuembIyxkT6PugriFjpit4c4qtrBp6wJXt8/1aMxzm UVAAWaBo+KKlJkx8kifoWh64fzVwEAu9MuivFm8Kdog0c0TqaYYuyGg2YCgHne+0Ubed3DZkLQ8 RtcOMDFtgmPdwDC7UCT1q4b+5lINxkoshqzMQl1VrLdDT1NIkD3+SZzhNwUFlY4SvO6XkRkEAmt WnC0+z3ZFKEu29GMx9D2BLVHSLVyP98O5kA7E/Kk2QdJl29GSFub8wieE4MZgSpeQpGMwIFUdPp FVOezhbF8GxSIT9zN286MLWxjpVTzReGx5Hw4UeklfoCKX493VULNrUoKDry6qXsbhgoDgFgSSV b2AotkxrijvmYryQXEoR+LFgQJM7VUAKAg/++Thk2sOFpKU9sGdIU+0BtTYek6WdnGbL7XxHMUH 9xI4guGWM8AjipA== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 mptcp_get_available_schedulers() needs to iterate over the schedulers' list only to read the names: it doesn't modify anything there. In this case, it is enough to hold the RCU read lock, no need to combine this with the associated spin lock. Fixes: 73c900aa3660 ("mptcp: add net.mptcp.available_schedulers") Cc: stable@vger.kernel.org Suggested-by: Paolo Abeni Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Reviewed-by: Simon Horman --- net/mptcp/sched.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/mptcp/sched.c b/net/mptcp/sched.c index 78ed508ebc1b8dd9f0e020cca1bdd86f24f0afeb..df7dbcfa3b71370cc4d7e4e4f16= cc1e41a50dddf 100644 --- a/net/mptcp/sched.c +++ b/net/mptcp/sched.c @@ -60,7 +60,6 @@ void mptcp_get_available_schedulers(char *buf, size_t max= len) size_t offs =3D 0; =20 rcu_read_lock(); - spin_lock(&mptcp_sched_list_lock); list_for_each_entry_rcu(sched, &mptcp_sched_list, list) { offs +=3D snprintf(buf + offs, maxlen - offs, "%s%s", @@ -69,7 +68,6 @@ void mptcp_get_available_schedulers(char *buf, size_t max= len) if (WARN_ON_ONCE(offs >=3D maxlen)) break; } - spin_unlock(&mptcp_sched_list_lock); rcu_read_unlock(); } =20 --=20 2.45.2 From nobody Tue Nov 26 05:47:24 2024 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 65CB51E882A; Mon, 21 Oct 2024 10:25:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729506345; cv=none; b=EoCSTsqGViAt4DchKRAUPNndBbLX88ts2gtZalbgtZwAMlR8E6SDmeFHJ44AdDtWHXKVydZcfhLrtJnqcYpMQY5YviUOHPH19nOzanx9nzwVXci2MuGoP1TJE166C+DyL7TEwzuxTrEA+ReiGajRqKoo3u9yZZRDyE1U3Ij1QNM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729506345; c=relaxed/simple; bh=+ERGzFcGqAZgfpbsL0KQxvrUj31An94qTY+Z0b8vfJE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WYkuieVHThfpRld6vF58uXgfy13wUNblYMCqd4Qp1Or+/KmM6JLQzYwD5sU7pGs7wMZiRWclveuu2z8ZJJbTT0vUc9T0vTgxYaiLDhavfAdEnqxxB+lBwm0sV2R4n+wS1766faZW41Vdo34o35jJfVeIudTzy4AwFG/5Nw1of2g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GuUI21m5; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GuUI21m5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3E47FC4CEC7; Mon, 21 Oct 2024 10:25:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729506345; bh=+ERGzFcGqAZgfpbsL0KQxvrUj31An94qTY+Z0b8vfJE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=GuUI21m5a/yWsJac7sD8+kBDPJD+CYdpshVHwDOoQmqMTdhTZcqeTowmsDw31oV/B zYB0qkvfSuxYO0DJN1sbVSU3LxfiaNSD3/58AD6xU/bZArXbP8uBOoqQpybIkwpb45 F2ZLicxg14s6sFrlMKX/09gD+JyfDaiyBJskdS4CWxY91IYwBrZMZHh36YI8DoV0Fw SFfo9p0r5x0AY98Rtfy/LPa/T6L0sgxn6WRzjPYHawIF9bJ28FQI68bo9QC4w5FGOw 4+rTXidRzu36GcjBo15xIFDeKgECBEI8EIXvbLUOdoKOFOC1a6/K1cPDoxEtH9Z8M6 CtM1IX2Sm/S4w== From: "Matthieu Baerts (NGI0)" Date: Mon, 21 Oct 2024 12:25:28 +0200 Subject: [PATCH net 3/3] selftests: mptcp: list sysctl data Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241021-net-mptcp-sched-lock-v1-3-637759cf061c@kernel.org> References: <20241021-net-mptcp-sched-lock-v1-0-637759cf061c@kernel.org> In-Reply-To: <20241021-net-mptcp-sched-lock-v1-0-637759cf061c@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Gregory Detal , Shuah Khan Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, "Matthieu Baerts (NGI0)" X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1473; i=matttbe@kernel.org; h=from:subject:message-id; bh=+ERGzFcGqAZgfpbsL0KQxvrUj31An94qTY+Z0b8vfJE=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBnFiwbvNXfL/mAHMg+fJSIDrYNm4eLaGOM+emu6 lHDnwXbmcyJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZxYsGwAKCRD2t4JPQmmg cwcFEADGP6qT9NnBcsX7XErC6uFJ6mZYSJOf1cgpzwCKy1+pIkPwVv4A/z+/8IoP83XUZj4CzRo gOra1Vb70O4crfXA8fd1QvwGQlLahPifZw9WIHUk+Dxs22Hrg+NXIyx2J+ti/TQjcVKd0o6mQMT V8AD3V+lS9C7qs9M1lJZeTbXMvEXJC7P/AH30tjkH0EnTbp806TzstqXL5eesKBszIMj+A8M35Y ZBIE+YyFTojrzx+gpEIvwKgn+DY6NDa5RxecDqh/NWsuthy9QvOeP3yr//ZFfsovn2Bo2r/X+Ji AIyz/lv9XeghxVTObyfyMjikmHZtgF+ZSbuLQxswLifKQBS6PFulx9nqyglBzbz8ePsK7OmL/Gr UYEROMVZBya7lLQNnjvQhhcPlDIWFO48CzTH/Rw4JkeM2DZQ+eKLNcgJSDl8/bl0UEgnIn7lzfa S1A6CNuYRk91XEGwcCqlpno8B50uSa6uopLTxvSWP0nb1hZ9kawg/Dki4sIY63Y9o0jWQKubv6P ye5DB2nZAnja8HrFAcFvwuHjAAvxtvowoBYVR/9OHHp7omS540iN4UdLC552yg9qb6+k3f4DEre 055G7F9NeT1w2RqaxsYKlWxY0tRJ5tesSv+0raeauOe6qelK+p8DggGqLj+AzyyBR6FVpn/1qjv IhOOm5oXpG1jJ7A== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 Listing all the values linked to the MPTCP sysctl knobs was not exercised in MPTCP test suite. Let's do that to avoid any regressions, but also to have a kernel with a debug kconfig verifying more assumptions. For the moment, we are not interested by the output, only to avoid crashes and warnings. Signed-off-by: Matthieu Baerts (NGI0) Reviewed-by: Simon Horman --- tools/testing/selftests/net/mptcp/mptcp_connect.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/tes= ting/selftests/net/mptcp/mptcp_connect.sh index 57325d57e4c6e3653019db2de09620d692143683..b48b4e56826a9cfdb3501242b70= 7ae2ebe29b220 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh @@ -259,6 +259,15 @@ check_mptcp_disabled() mptcp_lib_ns_init disabled_ns =20 print_larger_title "New MPTCP socket can be blocked via sysctl" + + # mainly to cover more code + if ! ip netns exec ${disabled_ns} sysctl net.mptcp >/dev/null; then + mptcp_lib_pr_fail "not able to list net.mptcp sysctl knobs" + mptcp_lib_result_fail "not able to list net.mptcp sysctl knobs" + ret=3D${KSFT_FAIL} + return 1 + fi + # net.mptcp.enabled should be enabled by default if [ "$(ip netns exec ${disabled_ns} sysctl net.mptcp.enabled | awk '{ pr= int $3 }')" -ne 1 ]; then mptcp_lib_pr_fail "net.mptcp.enabled sysctl is not 1 by default" --=20 2.45.2