瀏覽代碼

m68k: fix sigset_t accessor functions

The sigaddset/sigdelset/sigismember functions that are implemented with
bitfield insn cannot allow the sigset argument to be placed in a data
register since the sigset is wider than 32 bits.  Remove the "d"
constraint from the asm statements.

The effect of the bug is that sending RT signals does not work, the signal
number is truncated modulo 32.

Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: stable@vger.kernel.org
Andreas Schwab 13 年之前
父節點
當前提交
34fa78b59c
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      arch/m68k/include/asm/signal.h

+ 3 - 3
arch/m68k/include/asm/signal.h

@@ -41,7 +41,7 @@ struct k_sigaction {
 static inline void sigaddset(sigset_t *set, int _sig)
 static inline void sigaddset(sigset_t *set, int _sig)
 {
 {
 	asm ("bfset %0{%1,#1}"
 	asm ("bfset %0{%1,#1}"
-		: "+od" (*set)
+		: "+o" (*set)
 		: "id" ((_sig - 1) ^ 31)
 		: "id" ((_sig - 1) ^ 31)
 		: "cc");
 		: "cc");
 }
 }
@@ -49,7 +49,7 @@ static inline void sigaddset(sigset_t *set, int _sig)
 static inline void sigdelset(sigset_t *set, int _sig)
 static inline void sigdelset(sigset_t *set, int _sig)
 {
 {
 	asm ("bfclr %0{%1,#1}"
 	asm ("bfclr %0{%1,#1}"
-		: "+od" (*set)
+		: "+o" (*set)
 		: "id" ((_sig - 1) ^ 31)
 		: "id" ((_sig - 1) ^ 31)
 		: "cc");
 		: "cc");
 }
 }
@@ -65,7 +65,7 @@ static inline int __gen_sigismember(sigset_t *set, int _sig)
 	int ret;
 	int ret;
 	asm ("bfextu %1{%2,#1},%0"
 	asm ("bfextu %1{%2,#1},%0"
 		: "=d" (ret)
 		: "=d" (ret)
-		: "od" (*set), "id" ((_sig-1) ^ 31)
+		: "o" (*set), "id" ((_sig-1) ^ 31)
 		: "cc");
 		: "cc");
 	return ret;
 	return ret;
 }
 }