diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-02 14:41:11 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-02 14:41:11 -0500 |
commit | 597b0d21626da4e6f09f132442caf0cc2b0eb47c (patch) | |
tree | 13c0074bb20f7b05a471e78d4ff52c665a10266a /fs | |
parent | 2640c9a90fa596871e142f42052608864335f102 (diff) | |
parent | 87917239204d67a316cb89751750f86c9ed3640b (diff) |
Merge branch 'kvm-updates/2.6.29' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm
* 'kvm-updates/2.6.29' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm: (140 commits)
KVM: MMU: handle large host sptes on invlpg/resync
KVM: Add locking to virtual i8259 interrupt controller
KVM: MMU: Don't treat a global pte as such if cr4.pge is cleared
MAINTAINERS: Maintainership changes for kvm/ia64
KVM: ia64: Fix kvm_arch_vcpu_ioctl_[gs]et_regs()
KVM: x86: Rework user space NMI injection as KVM_CAP_USER_NMI
KVM: VMX: Fix pending NMI-vs.-IRQ race for user space irqchip
KVM: fix handling of ACK from shared guest IRQ
KVM: MMU: check for present pdptr shadow page in walk_shadow
KVM: Consolidate userspace memory capability reporting into common code
KVM: Advertise the bug in memory region destruction as fixed
KVM: use cpumask_var_t for cpus_hardware_enabled
KVM: use modern cpumask primitives, no cpumask_t on stack
KVM: Extract core of kvm_flush_remote_tlbs/kvm_reload_remote_mmus
KVM: set owner of cpu and vm file operations
anon_inodes: use fops->owner for module refcount
x86: KVM guest: kvm_get_tsc_khz: return khz, not lpj
KVM: MMU: prepopulate the shadow on invlpg
KVM: MMU: skip global pgtables on sync due to cr3 switch
KVM: MMU: collapse remote TLB flushes on root sync
...
Diffstat (limited to 'fs')
-rw-r--r-- | fs/anon_inodes.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c index c16d9be1b017..3bbdb9d02376 100644 --- a/fs/anon_inodes.c +++ b/fs/anon_inodes.c | |||
@@ -79,9 +79,12 @@ int anon_inode_getfd(const char *name, const struct file_operations *fops, | |||
79 | if (IS_ERR(anon_inode_inode)) | 79 | if (IS_ERR(anon_inode_inode)) |
80 | return -ENODEV; | 80 | return -ENODEV; |
81 | 81 | ||
82 | if (fops->owner && !try_module_get(fops->owner)) | ||
83 | return -ENOENT; | ||
84 | |||
82 | error = get_unused_fd_flags(flags); | 85 | error = get_unused_fd_flags(flags); |
83 | if (error < 0) | 86 | if (error < 0) |
84 | return error; | 87 | goto err_module; |
85 | fd = error; | 88 | fd = error; |
86 | 89 | ||
87 | /* | 90 | /* |
@@ -128,6 +131,8 @@ err_dput: | |||
128 | dput(dentry); | 131 | dput(dentry); |
129 | err_put_unused_fd: | 132 | err_put_unused_fd: |
130 | put_unused_fd(fd); | 133 | put_unused_fd(fd); |
134 | err_module: | ||
135 | module_put(fops->owner); | ||
131 | return error; | 136 | return error; |
132 | } | 137 | } |
133 | EXPORT_SYMBOL_GPL(anon_inode_getfd); | 138 | EXPORT_SYMBOL_GPL(anon_inode_getfd); |