]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
sctp: Hold sock lock while iterating over address list
authorStefan Wiehler <stefan.wiehler@nokia.com>
Tue, 28 Oct 2025 16:12:28 +0000 (17:12 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Nov 2025 20:37:43 +0000 (15:37 -0500)
commite791743714a3b46da28846b1337db2ddb0093e01
tree0ae493e839e28bbe88c3cca759e6d7d9abc46881
parent89eac1e150dbd42963e13d23828cb8c4e0763196
sctp: Hold sock lock while iterating over address list

[ Upstream commit f1fc201148c7e684c10a72b6a3375597f28d1ef6 ]

Move address list traversal in inet_assoc_attr_size() under the sock
lock to avoid holding the RCU read lock.

Suggested-by: Xin Long <lucien.xin@gmail.com>
Fixes: 8f840e47f190 ("sctp: add the sctp_diag.c file")
Signed-off-by: Stefan Wiehler <stefan.wiehler@nokia.com>
Acked-by: Xin Long <lucien.xin@gmail.com>
Link: https://patch.msgid.link/20251028161506.3294376-4-stefan.wiehler@nokia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/sctp/diag.c