Skip to content
Commit 8c26ecd8 authored by Chuck Lever's avatar Chuck Lever Committed by Greg Kroah-Hartman
Browse files

tracing: Introduce helpers to safely handle dynamic-sized sockaddrs

[ Upstream commit d07c9ad6

 ]

Enable a struct sockaddr to be stored in a trace record as a
dynamically-sized field. The common cases are AF_INET and AF_INET6
which are different sizes, and are vastly smaller than a struct
sockaddr_storage.

These are safer because, when used properly, the size of the
sockaddr destination field in each trace record is now guaranteed
to be the same as the source address that is being copied into it.

Link: https://lore.kernel.org/all/164182978641.8391.8277203495236105391.stgit@bazille.1015granger.net/
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Stable-dep-of: 948f072a

 ("SUNRPC: always free ctxt when freeing deferred request")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 78517717
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment