lkml.org 
[lkml]   [2008]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 3/3] 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 <suresh.b.siddha@intel.com>
---

Index: tip/arch/x86/kernel/xsave.c
===================================================================
--- tip.orig/arch/x86/kernel/xsave.c 2008-08-11 15:44:33.000000000 -0700
+++ tip/arch/x86/kernel/xsave.c 2008-08-11 15:45:09.000000000 -0700
@@ -82,8 +82,7 @@
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);
--



\
 
 \ /
  Last update: 2008-08-13 20:45    [W:0.153 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site