diff options
author | Matthieu Baerts (NGI0) <matttbe@kernel.org> | 2024-02-23 21:17:56 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-02-27 03:42:12 +0100 |
commit | 14d29ec5302caac945267b9586fad01ecddc700c (patch) | |
tree | 9808e30ca708893e9dae19499c91e9b5133cdc4f /.clang-format | |
parent | mptcp: check the protocol in tcp_sk() with DEBUG_NET (diff) | |
download | linux-14d29ec5302caac945267b9586fad01ecddc700c.tar.xz linux-14d29ec5302caac945267b9586fad01ecddc700c.zip |
mptcp: check the protocol in mptcp_sk() with DEBUG_NET
Fuzzers and static checkers might not detect when mptcp_sk() is used
with a non mptcp_sock structure.
This is similar to the parent commit, where it is easy to use mptcp_sk()
with a TCP sock, e.g. with a subflow sk.
So a new simple check is done when CONFIG_DEBUG_NET is enabled to tell
kernel devs when a non-MPTCP socket is being used as an MPTCP one.
'mptcp_sk()' macro is then defined differently: with an extra WARN to
complain when an unexpected socket is being used.
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://lore.kernel.org/r/20240223-upstream-net-next-20240223-misc-improvements-v1-4-b6c8a10396bd@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to '.clang-format')
0 files changed, 0 insertions, 0 deletions