lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150224094940.63323081@gandalf.local.home>
Date:	Tue, 24 Feb 2015 09:49:40 -0500
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Trond Myklebust <trond.myklebust@...marydata.com>
Cc:	James Hogan <james.hogan@...tec.com>,
	Jeff Layton <jlayton@...marydata.com>,
	"J. Bruce Fields" <bfields@...hat.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...hat.com>,
	Stable Tree Mailing List <stable@...r.kernel.org>
Subject: Re: [PATCH] sunrpc: Fix trace events to store data in the struct

On Tue, 24 Feb 2015 08:36:48 -0500
Trond Myklebust <trond.myklebust@...marydata.com> wrote:

> > diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h
> > index b9c1dc6c825a..47dfcaebfaaf 100644
> > --- a/include/trace/events/sunrpc.h
> > +++ b/include/trace/events/sunrpc.h
> > @@ -503,18 +503,22 @@ TRACE_EVENT(svc_xprt_do_enqueue,
> >
> >         TP_STRUCT__entry(
> >                 __field(struct svc_xprt *, xprt)
> > -               __field(struct svc_rqst *, rqst)
> > +               __field_struct(struct sockaddr_storage, ss)
> > +               __field(unsigned long, flags);
> > +               __field(int, pid)
> >         ),
> >
> >         TP_fast_assign(
> >                 __entry->xprt = xprt;
> > -               __entry->rqst = rqst;
> > +               xprt ? memcpy(&__entry->ss, &xprt->xpt_remote, sizeof(__entry->ss)) : memset(&__entry->ss, 0, sizeof(__entry->ss));
> 
> How could xprt ever be NULL here, and even if it was, why the esoteric
> C instead of a simple 'if' statement?

If it can never be NULL here, then we do not need the conditional.

-- Steve
 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ