Patch "NFS: Avoid RCU usage in tracepoints" has been added to the 4.14-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
NFS: Avoid RCU usage in tracepoints
to the 4.14-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:
nfs-avoid-rcu-usage-in-tracepoints.patch
and it can be found in the queue-4.14 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
3944369db701f075092357b511fd9f5755771585Mon Sep 17 00:00:00 2001
From: Anna Schumaker <[email protected]>
Date: Wed, 1 Nov 2017 15:48:43 -0400
Subject: NFS: Avoid RCU usage in tracepoints
From: Anna Schumaker <[email protected]>
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().
--- fs/nfs/nfs4trace.h | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-)
fs/nfs/nfs4trace.h +6 -18
@@ -202,17 +202,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(
@@ -1133,9 +1129,7 @@ DECLARE_EVENT_CLASS(nfs4_inode_callback_ __field(dev_t, dev) __field(u32, fhandle) __field(u64, fileid) -__string (dstaddr, clp ? -rpc_peeraddr2str (clp->cl_rpcclient, -RPC_DISPLAY_ADDR ) :"unknown" ) +__string (dstaddr, clp ? clp->cl_hostname :"unknown" ) ), TP_fast_assign(
@@ -1148,9 +1142,7 @@ DECLARE_EVENT_CLASS(nfs4_inode_callback_ __entry->fileid =0 ; __entry->dev =0 ; } -__assign_str (dstaddr, clp ? -rpc_peeraddr2str (clp->cl_rpcclient, -RPC_DISPLAY_ADDR ) :"unknown" ) +__assign_str (dstaddr, clp ? clp->cl_hostname :"unknown" ) ), TP_printk(
@@ -1192,9 +1184,7 @@ DECLARE_EVENT_CLASS(nfs4_inode_stateid_c __field(dev_t, dev) __field(u32, fhandle) __field(u64, fileid) -__string (dstaddr, clp ? -rpc_peeraddr2str (clp->cl_rpcclient, - RPC_DISPLAY_ADDR) : "unknown") + __string(dstaddr, clp ? clp->cl_hostname : "unknown") __field(int, stateid_seq)__field (u32, stateid_hash) ),
@@ -1209,9 +1199,7 @@ DECLARE_EVENT_CLASS(nfs4_inode_stateid_c __entry->fileid =0 ; __entry->dev =0 ; } -__assign_str (dstaddr, clp ? -rpc_peeraddr2str (clp->cl_rpcclient, -RPC_DISPLAY_ADDR ) :"unknown" ) +__assign_str (dstaddr, clp ? clp->cl_hostname :"unknown" ) __entry->stateid_seq =be32_to_cpu (stateid->seqid); __entry->stateid_hash =
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/nfs-avoid-rcu-usage-in-tracepoints.patch queue-4.14/nfs-fix-ugly-referral-attributes.patch queue-4.14/nfs-fix-typo-in-nomigration-mount-option.patch queue-4.14/nfs-revalidate-.-etc-correctly-on-open.patch queue-4.14/nfs-revert-nfs-move-the-flock-open-mode-check-into-nfs_flock.patch