Steven Rostedt (Google) edfaf679b7 SUNRPC: Fix rpcgss_context trace event acceptor field
commit a4833e3abae132d613ce7da0e0c9a9465d1681fa upstream.

The rpcgss_context trace event acceptor field is a dynamically sized
string that records the "data" parameter. But this parameter is also
dependent on the "len" field to determine the size of the data.

It needs to use __string_len() helper macro where the length can be passed
in. It also incorrectly uses strncpy() to save it instead of
__assign_str(). As these macros can change, it is not wise to open code
them in trace events.

As of commit c759e609030c ("tracing: Remove __assign_str_len()"),
__assign_str() can be used for both __string() and __string_len() fields.
Before that commit, __assign_str_len() is required to be used. This needs
to be noted for backporting. (In actuality, commit c1fa617caeb0 ("tracing:
Rework __assign_str() and __string() to not duplicate getting the string")
is the commit that makes __string_str_len() obsolete).

Cc: stable@vger.kernel.org
Fixes: 0c77668ddb4e ("SUNRPC: Introduce trace points in rpc_auth_gss.ko")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-27 17:05:23 +02:00
..
2024-01-05 15:13:30 +01:00
2020-11-30 12:54:01 +00:00
2021-06-29 10:53:52 -07:00
2021-09-08 11:50:24 -07:00
2021-09-23 23:21:34 +08:00
2024-03-26 18:21:32 -04:00
2019-11-08 11:23:37 +01:00
2021-06-29 10:53:52 -07:00
2023-04-05 11:25:00 +02:00
2024-04-10 16:19:24 +02:00
2021-05-31 22:48:24 -04:00
2024-04-10 16:19:24 +02:00