summaryrefslogtreecommitdiff
path: root/virt
diff options
context:
space:
mode:
authorSrinivasarao P <spathi@codeaurora.org>2018-08-02 12:00:59 +0530
committerSrinivasarao P <spathi@codeaurora.org>2018-08-03 17:05:13 +0530
commitfacb909e66d37224f564750e8ebc693b91934ec6 (patch)
treef51a18d81912d42bc1dcf9d4bd3b4a644680a1db /virt
parent508ac0adfc5bc7a0ec3fc81e2ac9371e3add6d6c (diff)
parent4b2d6badbc4057bd43e442eb20141fb40c549f6d (diff)
Merge android-4.4.144 (4b2d6ba) into msm-4.4
* refs/heads/tmp-4b2d6ba Linux 4.4.144 ubi: fastmap: Erase outdated anchor PEBs during attach ubi: Fix Fastmap's update_vol() ubi: Fix races around ubi_refill_pools() ubi: Be more paranoid while seaching for the most recent Fastmap ubi: Rework Fastmap attach base code ubi: Introduce vol_ignored() clk: tegra: Fix PLL_U post divider and initial rate on Tegra30 block: do not use interruptible wait anywhere x86/cpu: Re-apply forced caps every time CPU caps are re-read x86/xen: Add call of speculative_store_bypass_ht_init() to PV paths x86/bugs: Rename SSBD_NO to SSB_NO x86/speculation, KVM: Implement support for VIRT_SPEC_CTRL/LS_CFG x86/bugs: Rework spec_ctrl base and mask logic x86/bugs: Remove x86_spec_ctrl_set() x86/bugs: Expose x86_spec_ctrl_base directly x86/bugs: Unify x86_spec_ctrl_{set_guest, restore_host} x86/speculation: Rework speculative_store_bypass_update() x86/speculation: Add virtualized speculative store bypass disable support x86/bugs, KVM: Extend speculation control for VIRT_SPEC_CTRL x86/speculation: Handle HT correctly on AMD x86/cpufeatures: Add FEATURE_ZEN x86/cpu/AMD: Fix erratum 1076 (CPB bit) x86/cpufeatures: Disentangle SSBD enumeration x86/cpufeatures: Disentangle MSR_SPEC_CTRL enumeration from IBRS x86/speculation: Use synthetic bits for IBRS/IBPB/STIBP x86/cpu: Make alternative_msr_write work for 32-bit code x86/bugs: Fix the parameters alignment and missing void x86/bugs: Make cpu_show_common() static x86/bugs: Fix __ssb_select_mitigation() return type Documentation/spec_ctrl: Do some minor cleanups proc: Use underscores for SSBD in 'status' x86/bugs: Rename _RDS to _SSBD x86/speculation: Make "seccomp" the default mode for Speculative Store Bypass seccomp: Move speculation migitation control to arch code seccomp: Add filter flag to opt-out of SSB mitigation seccomp: Use PR_SPEC_FORCE_DISABLE prctl: Add force disable speculation seccomp: Enable speculation flaw mitigations proc: Provide details on speculation flaw mitigations nospec: Allow getting/setting on non-current task x86/speculation: Add prctl for Speculative Store Bypass mitigation x86/process: Allow runtime control of Speculative Store Bypass x86/process: Optimize TIF_NOTSC switch x86/process: Correct and optimize TIF_BLOCKSTEP switch x86/process: Optimize TIF checks in __switch_to_xtra() prctl: Add speculation control prctls x86/speculation: Create spec-ctrl.h to avoid include hell x86/bugs/AMD: Add support to disable RDS on Fam[15, 16, 17]h if requested x86/bugs: Whitelist allowed SPEC_CTRL MSR values x86/bugs/intel: Set proper CPU features and setup RDS x86/bugs: Provide boot parameters for the spec_store_bypass_disable mitigation x86/cpufeatures: Add X86_FEATURE_RDS x86/bugs: Expose /sys/../spec_store_bypass x86/cpu/intel: Add Knights Mill to Intel family x86/cpu: Rename Merrifield2 to Moorefield x86/bugs, KVM: Support the combination of guest and host IBRS x86/bugs: Read SPEC_CTRL MSR during boot and re-use reserved bits x86/bugs: Concentrate bug reporting into a separate function x86/bugs: Concentrate bug detection into a separate function x86/nospec: Simplify alternative_msr_write() x86/amd: don't set X86_BUG_SYSRET_SS_ATTRS when running under Xen xen: set cpu capabilities from xen_start_kernel() selftest/seccomp: Fix the seccomp(2) signature selftest/seccomp: Fix the flag name SECCOMP_FILTER_FLAG_TSYNC x86/speculation: Remove Skylake C2 from Speculation Control microcode blacklist x86/speculation: Move firmware_restrict_branch_speculation_*() from C to CPP x86/speculation: Use IBRS if available before calling into firmware x86/spectre_v2: Don't check microcode versions when running under hypervisors x86/speculation: Use Indirect Branch Prediction Barrier in context switch x86/mm: Give each mm TLB flush generation a unique ID x86/mm: Factor out LDT init from context init x86/xen: Zero MSR_IA32_SPEC_CTRL before suspend x86/speculation: Add <asm/msr-index.h> dependency x86/speculation: Fix up array_index_nospec_mask() asm constraint x86/speculation: Clean up various Spectre related details x86/speculation: Correct Speculation Control microcode blacklist again x86/speculation: Update Speculation Control microcode blacklist x86/entry/64/compat: Clear registers for compat syscalls, to reduce speculation attack surface x86/asm/entry/32: Simplify pushes of zeroed pt_regs->REGs x86/pti: Mark constant arrays as __initconst x86/cpuid: Fix up "virtual" IBRS/IBPB/STIBP feature bits on Intel x86/cpufeatures: Clean up Spectre v2 related CPUID flags x86/speculation: Add basic IBPB (Indirect Branch Prediction Barrier) support x86/cpufeature: Blacklist SPEC_CTRL/PRED_CMD on early Spectre v2 microcodes x86/pti: Do not enable PTI on CPUs which are not vulnerable to Meltdown x86/msr: Add definitions for new speculation control MSRs x86/cpufeatures: Add AMD feature bits for Speculation Control x86/cpufeatures: Add Intel feature bits for Speculation Control x86/cpufeatures: Add CPUID_7_EDX CPUID leaf x86/paravirt: Make native_save_fl() extern inline xhci: Fix perceived dead host due to runtime suspend race with event handler skbuff: Unconditionally copy pfmemalloc in __skb_clone() net: Don't copy pfmemalloc flag in __copy_skb_header() tg3: Add higher cpu clock for 5762. ptp: fix missing break in switch net: phy: fix flag masking in __set_phy_supported net/ipv4: Set oif in fib_compute_spec_dst lib/rhashtable: consider param->min_size when setting initial table size ipv6: fix useless rol32 call on hash ipv4: Return EINVAL when ping_group_range sysctl doesn't map to user ns mm: memcg: fix use after free in mem_cgroup_iter() ARC: mm: allow mprotect to make stack mappings executable ARC: Fix CONFIG_SWAP ALSA: rawmidi: Change resized buffers atomically fat: fix memory allocation failure handling of match_strdup() x86/MCE: Remove min interval polling limitation KVM/Eventfd: Avoid crash when assign and deassign specific eventfd in parallel. Conflicts: drivers/mtd/ubi/wl.c sound/core/rawmidi.c Change-Id: I277fe9260a764e7923ddc90e7327d9aa5865a038 Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/eventfd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
index 49001fa84ead..1203829316b2 100644
--- a/virt/kvm/eventfd.c
+++ b/virt/kvm/eventfd.c
@@ -119,8 +119,12 @@ irqfd_shutdown(struct work_struct *work)
{
struct kvm_kernel_irqfd *irqfd =
container_of(work, struct kvm_kernel_irqfd, shutdown);
+ struct kvm *kvm = irqfd->kvm;
u64 cnt;
+ /* Make sure irqfd has been initalized in assign path. */
+ synchronize_srcu(&kvm->irq_srcu);
+
/*
* Synchronize with the wait-queue and unhook ourselves to prevent
* further events.
@@ -387,7 +391,6 @@ kvm_irqfd_assign(struct kvm *kvm, struct kvm_irqfd *args)
idx = srcu_read_lock(&kvm->irq_srcu);
irqfd_update(kvm, irqfd);
- srcu_read_unlock(&kvm->irq_srcu, idx);
list_add_tail(&irqfd->list, &kvm->irqfds.items);
@@ -419,6 +422,7 @@ kvm_irqfd_assign(struct kvm *kvm, struct kvm_irqfd *args)
irqfd->consumer.token, ret);
#endif
+ srcu_read_unlock(&kvm->irq_srcu, idx);
return 0;
fail: