]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit23cc8cb24adf33511d52fb8f6036458b4d88c15d
tree232cce47c5de5b34db1c5e6866ee1c2581bbfb9a
parent8d25bcf56cdeef1d6669141242006302c563a1fc
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: 07a1075684e5 ('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