OSDN Git Service

sunrpc: Fix latency trace point crashes
authorChuck Lever <chuck.lever@oracle.com>
Tue, 1 May 2018 15:37:19 +0000 (11:37 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 1 May 2018 17:46:14 +0000 (13:46 -0400)
commit98eb6cf25f0317395d9a799d18f3d46ba26a00d3
tree232cce47c5de5b34db1c5e6866ee1c2581bbfb9a
parent054f155721d7af1f343ed52bea246626d8450ca8
sunrpc: Fix latency trace point crashes

If the rpc_task survived longer than the transport, task->tk_xprt
points to freed memory by the time rpc_count_iostats_metrics runs.
Replace the references to task->tk_xprt with references to the
task's tk_client.

Reported-by: syzbot+27db1f90e2b972a5f2d3@syzkaller.appspotmail.com
Fixes: 40bf7eb304b5 ('sunrpc: Add static trace point to report ...')
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
include/trace/events/sunrpc.h