[MIPS] Ensure that ST0_FR is never set on a 32 bit kernel
Signed-off-by: Chris Dearman <chris@mips.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
committed by
Ralf Baechle
parent
4037500ebc
commit
bbaf238b5f
@@ -77,9 +77,8 @@ void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp)
|
||||
unsigned long status;
|
||||
|
||||
/* New thread loses kernel privileges. */
|
||||
status = regs->cp0_status & ~(ST0_CU0|ST0_CU1|KU_MASK);
|
||||
status = regs->cp0_status & ~(ST0_CU0|ST0_CU1|ST0_FR|KU_MASK);
|
||||
#ifdef CONFIG_64BIT
|
||||
status &= ~ST0_FR;
|
||||
status |= test_thread_flag(TIF_32BIT_REGS) ? 0 : ST0_FR;
|
||||
#endif
|
||||
status |= KU_USER;
|
||||
|
||||
Reference in New Issue
Block a user