mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 10:04:04 +02:00
mptcp: pm: add a build check for userspace_pm_dump_addr
This patch adds a build check for mptcp_userspace_pm_dump_addr() to make sure there is enough space in 'cb->ctx' to store an address id bitmap. Just in case info stored in 'cb->ctx' are increased later. Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20250221-net-next-mptcp-pm-misc-cleanup-3-v1-3-2b70ab1cee79@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
145dc6cc4a
commit
63132fb054
|
|
@ -643,6 +643,8 @@ int mptcp_userspace_pm_dump_addr(struct sk_buff *msg,
|
|||
struct sock *sk;
|
||||
void *hdr;
|
||||
|
||||
BUILD_BUG_ON(sizeof(struct id_bitmap) > sizeof(cb->ctx));
|
||||
|
||||
bitmap = (struct id_bitmap *)cb->ctx;
|
||||
|
||||
msk = mptcp_userspace_pm_get_sock(info);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user