From: Bruce Fields <bfields@fieldses.org>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
Scott Mayhew <smayhew@redhat.com>
Subject: Re: [PATCH] SUNRPC: Fix oops in the rpc_xdr_buf event class
Date: Thu, 12 Nov 2020 16:03:13 -0500 [thread overview]
Message-ID: <20201112210313.GJ9243@fieldses.org> (raw)
In-Reply-To: <7F720342-6027-44B3-BAF2-F1F43721C407@oracle.com>
On Thu, Nov 12, 2020 at 03:39:07PM -0500, Chuck Lever wrote:
>
>
> > On Nov 12, 2020, at 3:17 PM, Scott Mayhew <smayhew@redhat.com> wrote:
> >
> > Backchannel rpc tasks don't have task->tk_client set, so it's necessary
> > to check it for NULL before dereferencing.
> >
> > Fixes: c509f15a5801 ("SUNRPC: Split the xdr_buf event class")
> >
> > Signed-off-by: Scott Mayhew <smayhew@redhat.com>
> > ---
> > include/trace/events/sunrpc.h | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h
> > index 2477014e3fa6..2a03263b5f9d 100644
> > --- a/include/trace/events/sunrpc.h
> > +++ b/include/trace/events/sunrpc.h
> > @@ -68,7 +68,8 @@ DECLARE_EVENT_CLASS(rpc_xdr_buf_class,
> >
> > TP_fast_assign(
> > __entry->task_id = task->tk_pid;
> > - __entry->client_id = task->tk_client->cl_clid;
> > + __entry->client_id = task->tk_client ?
> > + task->tk_client->cl_clid : -1;
> > __entry->head_base = xdr->head[0].iov_base;
> > __entry->head_len = xdr->head[0].iov_len;
> > __entry->tail_base = xdr->tail[0].iov_base;
> > --
> > 2.25.4
> >
>
> Bruce, can you take this one for v5.10-rc ?
Yep, thanks, I'll send another pull request in a few days.
--b.
prev parent reply other threads:[~2020-11-12 21:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-12 20:17 [PATCH] SUNRPC: Fix oops in the rpc_xdr_buf event class Scott Mayhew
2020-11-12 20:21 ` Scott Mayhew
2020-11-12 20:39 ` Chuck Lever
2020-11-12 21:03 ` 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=20201112210313.GJ9243@fieldses.org \
--to=bfields@fieldses.org \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=smayhew@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox