summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChuck Lever <cel@kernel.org>2026-09-08 09:42:25 -0400
committerChuck Lever <cel@kernel.org>2026-10-04 21:15:29 -0400
commitde7c581708a749f037f8a620ed04b0d03e1ac75f (patch)
treea43c90ae1fc39d2ff4df8708cd9c5ee93ebf264e /scripts
parente7a8721b7edb54a157623f9e31d71345333b5fb9 (diff)
SUNRPC: Carry a generated-codec context pointer in struct xdr_stream
A generated XDR codec function receives only an xdr_stream, yet some codecs need state that the stream does not carry. Passing that state as an additional argument changes the signature of every function on the path from the program entry point down to the one that consumes it, and for generated code it makes each function's argument list depend on an analysis of the entire specification. Add xdrgen_ctx to struct xdr_stream, a pointer that the layer initializing the stream sets aside for generated codecs to find, following the precedent of seq_file->private and netlink_callback->data. Every xdr_stream initializer clears it, so a codec never reads a residual value left in a stream that was allocated on the stack or taken from a transport's free pool. Acked-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: NeilBrown <neil@brown.name> Link: https://patch.msgid.link/20260908134234.512312-2-cel@kernel.org Signed-off-by: Chuck Lever <cel@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions