[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <lsq.1518323471.483168562@decadent.org.uk>
Date: Sun, 11 Feb 2018 04:31:11 +0000
From: Ben Hutchings <ben@...adent.org.uk>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
CC: akpm@...ux-foundation.org, "Dave Jones" <davej@...emonkey.org.uk>,
"Anna Schumaker" <Anna.Schumaker@...app.com>
Subject: [PATCH 3.16 091/136] NFS: Avoid RCU usage in tracepoints
3.16.54-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Anna Schumaker <Anna.Schumaker@...app.com>
commit 3944369db701f075092357b511fd9f5755771585 upstream.
There isn't an obvious way to acquire and release the RCU lock during a
tracepoint, so we can't use the rpc_peeraddr2str() function here.
Instead, rely on the client's cl_hostname, which should have similar
enough information without needing an rcu_dereference().
Reported-by: Dave Jones <davej@...emonkey.org.uk>
Signed-off-by: Anna Schumaker <Anna.Schumaker@...app.com>
[bwh: Backported to 3.16: Drop changes in
nfs4_inode{,_stateid}_callback_event()]
Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
---
fs/nfs/nfs4trace.h | 24 ++++++------------------
1 file changed, 6 insertions(+), 18 deletions(-)
--- a/fs/nfs/nfs4trace.h
+++ b/fs/nfs/nfs4trace.h
@@ -201,17 +201,13 @@ DECLARE_EVENT_CLASS(nfs4_clientid_event,
TP_ARGS(clp, error),
TP_STRUCT__entry(
- __string(dstaddr,
- rpc_peeraddr2str(clp->cl_rpcclient,
- RPC_DISPLAY_ADDR))
+ __string(dstaddr, clp->cl_hostname)
__field(int, error)
),
TP_fast_assign(
__entry->error = error;
- __assign_str(dstaddr,
- rpc_peeraddr2str(clp->cl_rpcclient,
- RPC_DISPLAY_ADDR));
+ __assign_str(dstaddr, clp->cl_hostname);
),
TP_printk(
Powered by blists - more mailing lists