File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -541,6 +541,12 @@ static inline unsigned long current_top_of_stack(void)
541
541
#endif
542
542
}
543
543
544
+ static inline bool on_thread_stack (void )
545
+ {
546
+ return (unsigned long )(current_top_of_stack () -
547
+ current_stack_pointer ) < THREAD_SIZE ;
548
+ }
549
+
544
550
#ifdef CONFIG_PARAVIRT
545
551
#include <asm/paravirt.h>
546
552
#else
Original file line number Diff line number Diff line change @@ -141,8 +141,7 @@ void ist_begin_non_atomic(struct pt_regs *regs)
141
141
* will catch asm bugs and any attempt to use ist_preempt_enable
142
142
* from double_fault.
143
143
*/
144
- BUG_ON ((unsigned long )(current_top_of_stack () -
145
- current_stack_pointer ) >= THREAD_SIZE );
144
+ BUG_ON (!on_thread_stack ());
146
145
147
146
preempt_enable_no_resched ();
148
147
}
You can’t perform that action at this time.
0 commit comments