From: "J. Bruce Fields" <bfields@fieldses.org>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH] SUNRPC: Fix general protection fault in trace_rpc_xdr_overflow()
Date: Fri, 6 Nov 2020 17:28:02 -0500 [thread overview]
Message-ID: <20201106222802.GG26028@fieldses.org> (raw)
In-Reply-To: <160346406748.79082.3077185849414818247.stgit@klimt.1015granger.net>
Also applied.--b.
On Fri, Oct 23, 2020 at 10:41:07AM -0400, Chuck Lever wrote:
> The TP_fast_assign() section is careful enough not to dereference
> xdr->rqst if it's NULL. The TP_STRUCT__entry section is not.
>
> Fixes: 5582863f450c ("SUNRPC: Add XDR overflow trace event")
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
> include/trace/events/sunrpc.h | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h
> index f45b3c01370c..2477014e3fa6 100644
> --- a/include/trace/events/sunrpc.h
> +++ b/include/trace/events/sunrpc.h
> @@ -655,10 +655,10 @@ TRACE_EVENT(rpc_xdr_overflow,
> __field(size_t, tail_len)
> __field(unsigned int, page_len)
> __field(unsigned int, len)
> - __string(progname,
> - xdr->rqst->rq_task->tk_client->cl_program->name)
> - __string(procedure,
> - xdr->rqst->rq_task->tk_msg.rpc_proc->p_name)
> + __string(progname, xdr->rqst ?
> + xdr->rqst->rq_task->tk_client->cl_program->name : "unknown")
> + __string(procedure, xdr->rqst ?
> + xdr->rqst->rq_task->tk_msg.rpc_proc->p_name : "unknown")
> ),
>
> TP_fast_assign(
>
prev parent reply other threads:[~2020-11-06 22:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-23 14:41 [PATCH] SUNRPC: Fix general protection fault in trace_rpc_xdr_overflow() Chuck Lever
2020-11-06 22:28 ` J. Bruce Fields [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201106222802.GG26028@fieldses.org \
--to=bfields@fieldses.org \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.