Commit f65bc214 authored by Suresh Siddha's avatar Suresh Siddha Committed by Ingo Molnar

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: default avatarSuresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent ed405958
...@@ -82,8 +82,7 @@ int save_i387_xstate(void __user *buf) ...@@ -82,8 +82,7 @@ int save_i387_xstate(void __user *buf)
if (!access_ok(VERIFY_WRITE, buf, sig_xstate_size)) if (!access_ok(VERIFY_WRITE, buf, sig_xstate_size))
return -EACCES; return -EACCES;
BUILD_BUG_ON(sizeof(struct user_i387_struct) != BUG_ON(sig_xstate_size < xstate_size);
sizeof(tsk->thread.xstate->fxsave));
if ((unsigned long)buf % 64) if ((unsigned long)buf % 64)
printk("save_i387_xstate: bad fpstate %p\n", buf); printk("save_i387_xstate: bad fpstate %p\n", buf);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment