Skip to content

Commit f93a1a0

Browse files
alcooperralfbaechle
authored andcommitted
MIPS: Fix crash that occurs when function tracing is enabled
A recent patch changed some irq routines from inlines to functions. These routines are called by the tracer code. Now that they're functions, if they are compiled for function tracing they will call the tracer and crash the system due to infinite recursion. The fix disables tracing in these functions by using "notrace" in the function definition. Signed-off-by: Al Cooper <[email protected]> Reviewed-by: David Daney <[email protected]> Pathchwork: https://patchwork.linux-mips.org/patch/4564/ Signed-off-by: Ralf Baechle <[email protected]>
1 parent 0ec7ec7 commit f93a1a0

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

arch/mips/lib/mips-atomic.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ __asm__(
5656
" .set pop \n"
5757
" .endm \n");
5858

59-
void arch_local_irq_disable(void)
59+
notrace void arch_local_irq_disable(void)
6060
{
6161
preempt_disable();
6262
__asm__ __volatile__(
@@ -93,7 +93,7 @@ __asm__(
9393
" .set pop \n"
9494
" .endm \n");
9595

96-
unsigned long arch_local_irq_save(void)
96+
notrace unsigned long arch_local_irq_save(void)
9797
{
9898
unsigned long flags;
9999
preempt_disable();
@@ -135,7 +135,7 @@ __asm__(
135135
" .set pop \n"
136136
" .endm \n");
137137

138-
void arch_local_irq_restore(unsigned long flags)
138+
notrace void arch_local_irq_restore(unsigned long flags)
139139
{
140140
unsigned long __tmp1;
141141

@@ -159,7 +159,7 @@ void arch_local_irq_restore(unsigned long flags)
159159
EXPORT_SYMBOL(arch_local_irq_restore);
160160

161161

162-
void __arch_local_irq_restore(unsigned long flags)
162+
notrace void __arch_local_irq_restore(unsigned long flags)
163163
{
164164
unsigned long __tmp1;
165165

0 commit comments

Comments
 (0)