瀏覽代碼

signal: Ensure no siginfo union member increases the size of struct siginfo

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Eric W. Biederman 8 年之前
父節點
當前提交
aba1be2f8c
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      kernel/signal.c

+ 1 - 0
kernel/signal.c

@@ -3688,6 +3688,7 @@ void __init signals_init(void)
 	/* If this check fails, the __ARCH_SI_PREAMBLE_SIZE value is wrong! */
 	BUILD_BUG_ON(__ARCH_SI_PREAMBLE_SIZE
 		!= offsetof(struct siginfo, _sifields._pad));
+	BUILD_BUG_ON(sizeof(struct siginfo) != SI_MAX_SIZE);
 
 	sigqueue_cachep = KMEM_CACHE(sigqueue, SLAB_PANIC);
 }