[PATCH 4/4] fix tboot

From: KOSAKI Motohiro
Date: Mon Apr 18 2011 - 19:38:01 EST


Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx>
---
arch/x86/kernel/tboot.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/tboot.c b/arch/x86/kernel/tboot.c
index 998e972..0f0d1a3 100644
--- a/arch/x86/kernel/tboot.c
+++ b/arch/x86/kernel/tboot.c
@@ -110,7 +110,6 @@ static struct mm_struct tboot_mm = {
.mmap_sem = __RWSEM_INITIALIZER(init_mm.mmap_sem),
.page_table_lock = __SPIN_LOCK_UNLOCKED(init_mm.page_table_lock),
.mmlist = LIST_HEAD_INIT(init_mm.mmlist),
- .cpu_vm_mask = CPU_MASK_ALL,
};

static inline void switch_to_tboot_pt(void)
@@ -337,9 +336,18 @@ static struct notifier_block tboot_cpu_notifier __cpuinitdata =

static __init int tboot_late_init(void)
{
+ int ret;
+
if (!tboot_enabled())
return 0;

+ ret = mm_init_cpumask(&tboot_mm, 0);
+ if (ret) {
+ pr_warning("tboot: Allocation failure, disable tboot.\n");
+ tboot = NULL;
+ return ret;
+ }
+
tboot_create_trampoline();

atomic_set(&ap_wfs_count, 0);
--
1.7.3.1




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/