Skip to content

Commit

Permalink
x86, xsave: use BUG_ON() instead of BUILD_BUG_ON()
Browse files Browse the repository at this point in the history
All these structure sizes are runtime determined. So use a runtime
bug check.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Suresh Siddha authored and Ingo Molnar committed Aug 14, 2008
1 parent ed40595 commit f65bc21
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/x86/kernel/xsave.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f65bc21

Please sign in to comment.