From: Suresh Siddha Date: Wed, 13 Aug 2008 18:38:15 +0000 (-0700) Subject: x86, xsave: use BUG_ON() instead of BUILD_BUG_ON() X-Git-Tag: v2.6.28-rc1~699^2^8~7 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=f65bc214e042916135256620f900e9599d65e0cb;p=linux-2.6-omap-h63xx.git x86, xsave: use BUG_ON() instead of BUILD_BUG_ON() All these structure sizes are runtime determined. So use a runtime bug check. Signed-off-by: Suresh Siddha Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/kernel/xsave.c b/arch/x86/kernel/xsave.c index bb097b1644d..07713d64deb 100644 --- a/arch/x86/kernel/xsave.c +++ b/arch/x86/kernel/xsave.c @@ -82,8 +82,7 @@ int save_i387_xstate(void __user *buf) if (!access_ok(VERIFY_WRITE, buf, sig_xstate_size)) return -EACCES; - BUILD_BUG_ON(sizeof(struct user_i387_struct) != - sizeof(tsk->thread.xstate->fxsave)); + BUG_ON(sig_xstate_size < xstate_size); if ((unsigned long)buf % 64) printk("save_i387_xstate: bad fpstate %p\n", buf);