Skip to content

Commit 3ec0934

Browse files
ziyao233KAGA-KOKO
authored andcommitted
LoongArch: Fix bitflag conflict for TIF_FIXADE
After LoongArch was converted to use the generic TIF bits in commit f962989 ("loongarch: Use generic TIF bits"), its TIF_FIXADE flag takes the same bit with TIF_RESTORE_SIGMASK in thread_info.flags. Such conflict causes TIF_FIXADE being considered cleared when TIF_RESTORE_SIGMASK is cleared during deliver of a signal. And since TIF_FIXADE determines whether unaligned access emulation works for a task, userspace making use of unaligned access will receive unexpected SIGBUS (and likely terminate) after receiving its first signal. This conflict looks like a simple typo, switch it to the free bit 19. Fixes: f962989 ("loongarch: Use generic TIF bits") Signed-off-by: Yao Zi <ziyao@disroot.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Wentao Guan <guanwentao@uniontech.com>
1 parent 41e871f commit 3ec0934

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/loongarch/include/asm/thread_info.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ register unsigned long current_stack_pointer __asm__("$sp");
7777
#define TIF_NOHZ 16 /* in adaptive nohz mode */
7878
#define TIF_USEDFPU 17 /* FPU was used by this task this quantum (SMP) */
7979
#define TIF_USEDSIMD 18 /* SIMD has been used this quantum */
80-
#define TIF_FIXADE 10 /* Fix address errors in software */
80+
#define TIF_FIXADE 19 /* Fix address errors in software */
8181
#define TIF_LOGADE 20 /* Log address errors to syslog */
8282
#define TIF_32BIT_REGS 21 /* 32-bit general purpose registers */
8383
#define TIF_32BIT_ADDR 22 /* 32-bit address space */

0 commit comments

Comments
 (0)