Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca04d396 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Thomas Gleixner:
 "This set of updates contains:

   - Another bugfix for the pathologic vm86 machinery.  Clear
     thread.vm86 on fork to prevent corrupting the parent state.  This
     comes along with an update to the vm86 selftest case

   - Fix another corner case in the ioapic setup code which causes a
     boot crash on some oddball systems

   - Fix the fallout from the dma allocation consolidation work, which
     leads to a NULL pointer dereference when the allocation code is
     called with a NULL device"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/vm86: Set thread.vm86 to NULL on fork/clone
  selftests/x86: Add a fork() to entry_from_vm86 to catch fork bugs
  x86/ioapic: Prevent NULL pointer dereference in setup_ioapic_dest()
  x86/dma-mapping: Fix arch_dma_alloc_attrs() oops with NULL dev
parents f5eab267 2459ee86
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2547,6 +2547,8 @@ void __init setup_ioapic_dest(void)
			mask = apic->target_cpus();

		chip = irq_data_get_irq_chip(idata);
		/* Might be lapic_chip for irq 0 */
		if (chip->irq_set_affinity)
			chip->irq_set_affinity(idata, mask, false);
	}
}
+3 −2
Original line number Diff line number Diff line
@@ -131,11 +131,12 @@ void dma_generic_free_coherent(struct device *dev, size_t size, void *vaddr,

bool arch_dma_alloc_attrs(struct device **dev, gfp_t *gfp)
{
	if (!*dev)
		*dev = &x86_dma_fallback_dev;

	*gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32);
	*gfp = dma_alloc_coherent_gfp_flags(*dev, *gfp);

	if (!*dev)
		*dev = &x86_dma_fallback_dev;
	if (!is_device_dma_capable(*dev))
		return false;
	return true;
+3 −0
Original line number Diff line number Diff line
@@ -84,6 +84,9 @@ EXPORT_SYMBOL_GPL(idle_notifier_unregister);
int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
{
	memcpy(dst, src, arch_task_struct_size);
#ifdef CONFIG_VM86
	dst->thread.vm86 = NULL;
#endif

	return fpu__copy(&dst->thread.fpu, &src->thread.fpu);
}
+4 −0
Original line number Diff line number Diff line
@@ -230,5 +230,9 @@ int main(void)
	}
	clearhandler(SIGSEGV);

	/* Make sure nothing explodes if we fork. */
	if (fork() > 0)
		return 0;

	return (nerrs == 0 ? 0 : 1);
}