kernel-ark/virt/kvm
Yann Droneaud 24009b0549 kvm: use anon_inode_getfd() with O_CLOEXEC flag
KVM uses anon_inode_get() to allocate file descriptors as part
of some of its ioctls. But those ioctls are lacking a flag argument
allowing userspace to choose options for the newly opened file descriptor.

In such case it's advised to use O_CLOEXEC by default so that
userspace is allowed to choose, without race, if the file descriptor
is going to be inherited across exec().

This patch set O_CLOEXEC flag on all file descriptors created
with anon_inode_getfd() to not leak file descriptors across exec().

Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
Link: http://lkml.kernel.org/r/cover.1377372576.git.ydroneaud@opteya.com
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
2013-08-26 13:19:35 +03:00
..
arm KVM fixes for 3.11 2013-07-03 13:21:40 -07:00
assigned-dev.c KVM: Move irq routing to generic code 2013-04-26 20:27:17 +02:00
async_pf.c KVM: do not release the error page 2012-08-06 16:04:58 +03:00
async_pf.h
coalesced_mmio.c KVM: make checks stricter in coalesced_mmio_in_range() 2011-12-27 11:17:07 +02:00
coalesced_mmio.h KVM: Make coalesced mmio use a device per zone 2011-09-25 19:17:57 +03:00
eventfd.c kvm: exclude ioeventfd from counting kvm_io_range limit 2013-06-04 11:49:38 +03:00
ioapic.c KVM: Set TMR when programming ioapic entry 2013-04-16 16:32:40 -03:00
ioapic.h KVM: Set TMR when programming ioapic entry 2013-04-16 16:32:40 -03:00
iodev.h
iommu.c kvm: Obey read-only mappings in iommu 2013-01-27 12:41:41 +02:00
irq_comm.c KVM: Fix RTC interrupt coalescing tracking 2013-06-27 14:20:53 +03:00
irqchip.c KVM: Move irq routing setup to irqchip.c 2013-04-26 20:27:18 +02:00
Kconfig KVM: Introduce CONFIG_HAVE_KVM_IRQ_ROUTING 2013-04-26 20:27:14 +02:00
kvm_main.c kvm: use anon_inode_getfd() with O_CLOEXEC flag 2013-08-26 13:19:35 +03:00