File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -617,15 +617,18 @@ static unsigned long backtrace_flag;
617
617
618
618
static void smp_send_all_cpu_backtrace (void )
619
619
{
620
- unsigned int this_cpu = smp_processor_id () ;
620
+ unsigned int this_cpu ;
621
621
int i ;
622
622
623
- if (test_and_set_bit (0 , & backtrace_flag ))
623
+ this_cpu = get_cpu ();;
624
+ if (test_and_set_bit (0 , & backtrace_flag )) {
624
625
/*
625
626
* If there is already a trigger_all_cpu_backtrace() in progress
626
627
* (backtrace_flag == 1), don't output double cpu dump infos.
627
628
*/
629
+ put_cpu ();
628
630
return ;
631
+ }
629
632
630
633
cpumask_copy (& backtrace_mask , cpu_online_mask );
631
634
cpu_clear (this_cpu , backtrace_mask );
@@ -637,6 +640,7 @@ static void smp_send_all_cpu_backtrace(void)
637
640
if (!cpus_empty (backtrace_mask ))
638
641
smp_cross_call_common (& backtrace_mask , IPI_CPU_BACKTRACE );
639
642
643
+ put_cpu ();
640
644
/* Wait for up to 10 seconds for all other CPUs to do the backtrace */
641
645
for (i = 0 ; i < 10 * 1000 ; i ++ ) {
642
646
if (cpumask_empty (& backtrace_mask ))
You can’t perform that action at this time.
0 commit comments