summaryrefslogtreecommitdiff
path: root/drivers/sn
diff options
context:
space:
mode:
authorSven Schnelle <svens@linux.ibm.com>2019-12-09 11:03:12 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-31 14:37:55 +0300
commit51ff11e50d8b2bbde8b790b4e7cdd5688d5aef94 (patch)
tree5911ad3ec30205a5208046466fc3cc06f0102058 /drivers/sn
parent031fbffac8ad65041b7308fd3b12f05471a980bc (diff)
downloadlinux-51ff11e50d8b2bbde8b790b4e7cdd5688d5aef94.tar.xz
s390/ftrace: fix endless recursion in function_graph tracer
[ Upstream commit 6feeee8efc53035c3195b02068b58ae947538aa4 ] The following sequence triggers a kernel stack overflow on s390x: mount -t tracefs tracefs /sys/kernel/tracing cd /sys/kernel/tracing echo function_graph > current_tracer [crash] This is because preempt_count_{add,sub} are in the list of traced functions, which can be demonstrated by: echo preempt_count_add >set_ftrace_filter echo function_graph > current_tracer [crash] The stack overflow happens because get_tod_clock_monotonic() gets called by ftrace but itself calls preempt_{disable,enable}(), which leads to a endless recursion. Fix this by using preempt_{disable,enable}_notrace(). Fixes: 011620688a71 ("s390/time: ensure get_clock_monotonic() returns monotonic values") Signed-off-by: Sven Schnelle <svens@linux.ibm.com> Reviewed-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/sn')
0 files changed, 0 insertions, 0 deletions