Steven Rostedt (Red Hat)
7717c6be69
tracing: Fix stacktrace skip depth in trace_buffer_unlock_commit_regs()
While cleaning the stacktrace code I unintentially changed the skip depth of
trace_buffer_unlock_commit_regs() from 0 to 6. kprobes uses this function,
and with skipping 6 call backs, it can easily produce no stack.
Here's how I tested it:
# echo 'p:ext4_sync_fs ext4_sync_fs ' > /sys/kernel/debug/tracing/kprobe_events
# echo 1 > /sys/kernel/debug/tracing/events/kprobes/enable
# cat /sys/kernel/debug/trace
sync-2394 [005] 502.457060: ext4_sync_fs: (ffffffff81317650)
sync-2394 [005] 502.457063: kernel_stack: <stack trace>
sync-2394 [005] 502.457086: ext4_sync_fs: (ffffffff81317650)
sync-2394 [005] 502.457087: kernel_stack: <stack trace>
sync-2394 [005] 502.457091: ext4_sync_fs: (ffffffff81317650)
After putting back the skip stack to zero, we have:
sync-2270 [000] 748.052693: ext4_sync_fs: (ffffffff81317650)
sync-2270 [000] 748.052695: kernel_stack: <stack trace>
=> iterate_supers (ffffffff8126412e)
=> sys_sync (ffffffff8129c4b6)
=> entry_SYSCALL_64_fastpath (ffffffff8181f0b2)
sync-2270 [000] 748.053017: ext4_sync_fs: (ffffffff81317650)
sync-2270 [000] 748.053019: kernel_stack: <stack trace>
=> iterate_supers (ffffffff8126412e)
=> sys_sync (ffffffff8129c4b6)
=> entry_SYSCALL_64_fastpath (ffffffff8181f0b2)
sync-2270 [000] 748.053381: ext4_sync_fs: (ffffffff81317650)
sync-2270 [000] 748.053383: kernel_stack: <stack trace>
=> iterate_supers (ffffffff8126412e)
=> sys_sync (ffffffff8129c4b6)
=> entry_SYSCALL_64_fastpath (ffffffff8181f0b2)
Cc: stable@vger.kernel.org # v4.4+
Fixes: 73dddbb57bb0 "tracing: Only create stacktrace option when STACKTRACE is configured"
Reported-by: Brendan Gregg <brendan.d.gregg@gmail.com>
Tested-by: Brendan Gregg <brendan.d.gregg@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2016-01-14 09:28:19 -05:00
..
2015-12-02 23:36:00 -05:00
2016-01-08 13:52:59 -08:00
2015-06-30 19:44:57 -07:00
2015-12-14 09:45:06 +01:00
2015-11-11 17:36:04 +01:00
2015-12-17 11:40:29 -08:00
2015-11-06 17:50:42 -08:00
2015-11-06 17:50:42 -08:00
2015-10-07 16:06:25 -07:00
2016-01-06 11:01:05 +01:00
2015-11-15 09:30:48 -08:00
2016-01-14 09:28:19 -05:00
2015-10-21 15:18:35 +01:00
2015-08-06 16:14:53 -04:00
2015-11-04 08:23:51 -05:00
2015-09-08 13:34:59 -07:00
2015-11-06 17:50:42 -08:00
2015-11-04 08:23:51 -05:00
2015-11-04 08:23:51 -05:00
2015-09-08 13:34:59 -07:00
2015-12-03 10:18:21 -05:00
2015-12-03 10:18:21 -05:00
2015-12-03 10:18:21 -05:00
2015-11-10 12:06:23 +01:00
2015-09-03 02:42:20 +02:00
2015-11-03 18:03:50 -08:00
2015-12-03 10:18:21 -05:00
2015-09-10 13:29:01 -07:00
2015-11-03 18:03:50 -08:00
2015-09-10 13:29:01 -07:00
2016-01-06 11:01:07 +01:00
2015-11-04 21:50:37 -08:00
2015-11-23 09:44:58 +01:00
2015-11-23 09:44:58 +01:00
2015-11-06 17:50:42 -08:00
2015-11-06 17:50:42 -08:00
2015-09-10 13:29:01 -07:00
2015-11-06 17:50:42 -08:00
2015-10-23 17:55:10 +09:00
2015-08-04 10:16:54 +02:00
2015-09-10 13:29:01 -07:00
2015-09-04 16:54:41 -07:00
2015-09-11 15:21:34 -07:00
2015-09-11 15:21:34 -07:00
2015-11-10 12:07:22 -08:00
2015-10-21 15:18:36 +01:00
2016-01-07 12:17:39 -05:00
2015-09-01 08:40:25 -07:00
2015-11-20 16:17:32 -08:00
2015-11-09 15:53:39 -08:00
2015-11-24 12:03:55 -08:00
2015-09-08 15:35:28 -07:00
2015-10-27 19:55:13 -07:00
2015-09-10 13:29:01 -07:00
2015-06-30 19:44:59 -07:00
2015-08-10 23:07:05 -04:00
2015-10-27 19:55:13 -07:00
2015-11-20 16:17:32 -08:00
2015-11-06 17:50:42 -08:00
2015-10-20 10:23:55 +02:00
2015-12-12 10:15:34 -08:00
2015-11-05 19:34:48 -08:00
2015-11-06 17:50:42 -08:00
2015-11-05 19:34:48 -08:00
2015-09-05 13:46:58 -07:00
2015-10-06 11:25:01 -07:00
2015-10-25 21:33:54 -04:00
2015-09-04 16:54:41 -07:00
2015-11-05 19:34:48 -08:00
2015-11-05 14:16:27 -08:00