Patch "SUNRPC: Fix tracepoint storage issues with svc_recv and svc_rqst_status" has been added to the 4.4-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
SUNRPC: Fix tracepoint storage issues with svc_recv and svc_rqst_status
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
sunrpc-fix-tracepoint-storage-issues-with-svc_recv-and-svc_rqst_status.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
e9d4bf219c83d09579bc62512fea2ca10f025d93Mon Sep 17 00:00:00 2001
From: Trond Myklebust <[email protected]>
Date: Tue, 10 Oct 2017 17:31:42 -0400
Subject: SUNRPC: Fix tracepoint storage issues with svc_recv and svc_rqst_status
From: Trond Myklebust <[email protected]>
commit e9d4bf219c83d09579bc62512fea2ca10f025d93 upstream.
There is no guarantee that either the request or the svc_xprt exist by the time we get round to printing the trace message.
--- include/trace/events/sunrpc.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)
include/trace/events/sunrpc.h +10 -7
@@ -455,20 +455,22 @@ TRACE_EVENT(svc_recv, TP_ARGS(rqst, status),TP_STRUCT__entry ( -__field (struct sockaddr *,addr )__field (__be32 ,xid )__field (int, status) __field(unsigned long, flags) + __dynamic_array(unsigned char, addr, rqst->rq_addrlen) ),TP_fast_assign ( - __entry->addr = (struct sockaddr *)&rqst->rq_addr; __entry->xid = status > 0 ? rqst->rq_xid : 0; __entry->status = status; __entry->flags = rqst->rq_flags; +memcpy (__get_dynamic_array (addr), + &rqst->rq_addr, rqst->rq_addrlen); ), -TP_printk ("addr=%pIScp xid=0x%x status=%d flags=%s" , __entry->addr, +TP_printk ("addr=%pIScp xid=0x%x status=%d flags=%s" , + (struct sockaddr *)__get_dynamic_array (addr),be32_to_cpu (__entry->xid), __entry->status,show_rqstp_flags (__entry->flags)) );
@@ -480,22 +482,23 @@ DECLARE_EVENT_CLASS(svc_rqst_status, TP_ARGS(rqst, status),TP_STRUCT__entry ( -__field (struct sockaddr *,addr )__field (__be32 ,xid ) -__field (int, dropme)__field (int, status) __field(unsigned long, flags) + __dynamic_array(unsigned char, addr, rqst->rq_addrlen) ),TP_fast_assign ( - __entry->addr = (struct sockaddr *)&rqst->rq_addr; __entry->xid = rqst->rq_xid; __entry->status = status; __entry->flags = rqst->rq_flags; +memcpy (__get_dynamic_array (addr), + &rqst->rq_addr, rqst->rq_addrlen); ),TP_printk ("addr=%pIScp rq_xid=0x%x status=%d flags=%s" , - __entry->addr,be32_to_cpu (__entry->xid), + (struct sockaddr *)__get_dynamic_array (addr), +be32_to_cpu (__entry->xid), __entry->status,show_rqstp_flags (__entry->flags)) );
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/nfsd-deal-with-revoked-delegations-appropriately.patch queue-4.4/sunrpc-fix-tracepoint-storage-issues-with-svc_recv-and-svc_rqst_status.patch