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-next>] [day] [month] [year] [list]
Message-Id: <3e2f763f7701d7ff6915b52a3c80fd1f550ae951.1440482404.git.panand@redhat.com>
Date:	Tue, 25 Aug 2015 11:34:20 +0530
From:	Pratyush Anand <panand@...hat.com>
To:	bfields@...ldses.org
Cc:	rostedt@...dmis.org, linux-nfs@...r.kernel.org,
	Pratyush Anand <panand@...hat.com>,
	Ingo Molnar <mingo@...hat.com>,
	"J. Bruce Fields" <bfields@...hat.com>,
	Jeff Layton <jlayton@...marydata.com>,
	linux-kernel@...r.kernel.org (open list),
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	Trond Myklebust <trond.myklebust@...marydata.com>
Subject: [PATCH 2/2] net: sunrpc: fix trace print of &xprt->xpt_remote

TP_printk() for svc_xprt_dequeue intends to print address of
xprt->xpt_remote, however it prints address of another structure where
xprt->xpt_remote has been copied.

This patch fixes the above behaviour.

Signed-off-by: Pratyush Anand <panand@...hat.com>
---
 include/trace/events/sunrpc.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h
index 937e482d80e9..37b6af1a911a 100644
--- a/include/trace/events/sunrpc.h
+++ b/include/trace/events/sunrpc.h
@@ -556,19 +556,19 @@ TRACE_EVENT(svc_xprt_dequeue,
 
 	TP_STRUCT__entry(
 		__field(struct svc_xprt *, xprt)
-		__field_struct(struct sockaddr_storage, ss)
+		__field(struct sockaddr *, addr)
 		__field(unsigned long, flags)
 	),
 
 	TP_fast_assign(
-		__entry->xprt = xprt,
-		xprt ? memcpy(&__entry->ss, &xprt->xpt_remote, sizeof(__entry->ss)) : memset(&__entry->ss, 0, sizeof(__entry->ss));
+		__entry->xprt = xprt;
+		__entry->addr =
+			xprt ? (struct sockaddr *)&xprt->xpt_remote : NULL;
 		__entry->flags = xprt ? xprt->xpt_flags : 0;
 	),
 
 	TP_printk("xprt=0x%p addr=%pIScp flags=%s", __entry->xprt,
-		(struct sockaddr *)&__entry->ss,
-		show_svc_xprt_flags(__entry->flags))
+		__entry->addr, show_svc_xprt_flags(__entry->flags))
 );
 
 TRACE_EVENT(svc_wake_up,
-- 
2.4.3

--
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