Skip to contentSkip to conversation

x86-ldt-use-vfree_atomic-to-free-ldt-entries.patch removed from -mm tree

merged [email protected] 1 participant 1 message Dec 14, 2016

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: x86/ldt: use vfree_atomic() to free ldt entries
has been removed from the -mm tree. Its filename was
x86-ldt-use-vfree_atomic-to-free-ldt-entries.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Andrey Ryabinin <[email protected]>
Subject: x86/ldt: use vfree_atomic() to free ldt entries

vfree() is going to use sleeping lock. free_ldt_struct() may be called with disabled preemption, therefore we must use vfree_atomic() here.

E.g. call trace:

	vfree()
	free_ldt_struct()
	destroy_context_ldt()
	__mmdrop()
	finish_task_switch()
	schedule_tail()
	ret_from_fork()

---

 arch/x86/kernel/ldt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/ldt.c renamed from arch/x86/kernel/ldt.c~x86-ldt-use-vfree_atomic-to-free-ldt-entries +1 -1
diff -puN arch/x86/kernel/ldt.c~x86-ldt-use-vfree_atomic-to-free-ldt-entries arch/x86/kernel/ldt.c
@@ -93,7 +93,7 @@ static void free_ldt_struct(struct ldt_s
 
 	paravirt_free_ldt(ldt->entries, ldt->size);
 	if (ldt->size * LDT_ENTRY_SIZE > PAGE_SIZE)
-		vfree(ldt->entries);
+		vfree_atomic(ldt->entries);
 	else
 		free_page((unsigned long)ldt->entries);
 	kfree(ldt);

_

Patches currently in -mm which might be from [email protected] are