]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
sctp: get netns from asoc and ep base
authorXin Long <lucien.xin@gmail.com>
Mon, 9 Dec 2019 05:45:18 +0000 (13:45 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Dec 2025 11:45:17 +0000 (12:45 +0100)
commit203a0dace3e2221d3cd110491aebe99b02de8bed
tree80a9c09225ae5278b465387316ac185a3954432a
parent05d5df4913739fbfe1033e104f044853c9107e81
sctp: get netns from asoc and ep base

[ Upstream commit 4e7696d90b51a1a73ce0e8174f3aff58b914619c ]

Commit 312434617cb1 ("sctp: cache netns in sctp_ep_common") set netns
in asoc and ep base since they're created, and it will never change.
It's a better way to get netns from asoc and ep base, comparing to
calling sock_net().

This patch is to replace them.

v1->v2:
  - no change.

Suggested-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: 1534ff77757e ("sctp: prevent possible shift-out-of-bounds in sctp_transport_update_rto")
Signed-off-by: Sasha Levin <sashal@kernel.org>
14 files changed:
net/sctp/associola.c
net/sctp/chunk.c
net/sctp/endpointola.c
net/sctp/input.c
net/sctp/output.c
net/sctp/outqueue.c
net/sctp/sm_make_chunk.c
net/sctp/sm_sideeffect.c
net/sctp/sm_statefuns.c
net/sctp/socket.c
net/sctp/stream.c
net/sctp/stream_interleave.c
net/sctp/transport.c
net/sctp/ulpqueue.c