drm_atomic_helper_async_check() declares the plane, old_plane_state and
new_plane_state variables to iterate over all planes of the atomic
state and make sure only one plane is enabled.
Unfortunately gcc is not smart enough to figure out that the check on
n_planes is enough to guarantee that plane, new_plane_state and
old_plane_state are initialized.
Explicitly initialize those variables to NULL to make gcc happy.
Fixes: fef9df8b5945 ("drm/atomic: initial support for asynchronous plane update")
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Boris Brezillon <boris.brezillon(a)bootlin.com>
Reviewed-by: Sean Paul <seanpaul(a)chromium.org>
---
Changes in v2:
- Cc stable
- Add Sean's R-b
- Fix a typo in the commit message
---
drivers/gpu/drm/drm_atomic_helper.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index f7ccfebd3ca8..80be74df7ba6 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -1538,8 +1538,9 @@ int drm_atomic_helper_async_check(struct drm_device *dev,
{
struct drm_crtc *crtc;
struct drm_crtc_state *crtc_state;
- struct drm_plane *plane;
- struct drm_plane_state *old_plane_state, *new_plane_state;
+ struct drm_plane *plane = NULL;
+ struct drm_plane_state *old_plane_state = NULL;
+ struct drm_plane_state *new_plane_state = NULL;
const struct drm_plane_helper_funcs *funcs;
int i, n_planes = 0;
--
2.14.1
Async plane update is supposed to work only when updating the FB or FB
position of an already enabled plane. That does not apply to requests
where the plane was previously disabled or assigned to a different
CTRC.
Check old_plane_state->crtc value to make sure async plane update is
allowed.
Fixes: fef9df8b5945 ("drm/atomic: initial support for asynchronous plane update")
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Boris Brezillon <boris.brezillon(a)bootlin.com>
Reviewed-by: Eric Anholt <eric(a)anholt.net>
---
Changes in v2:
- Cc stable
- Add Eric's R-b
---
drivers/gpu/drm/drm_atomic_helper.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 866a2cc72ef6..f7ccfebd3ca8 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -1555,7 +1555,8 @@ int drm_atomic_helper_async_check(struct drm_device *dev,
if (n_planes != 1)
return -EINVAL;
- if (!new_plane_state->crtc)
+ if (!new_plane_state->crtc ||
+ old_plane_state->crtc != new_plane_state->crtc)
return -EINVAL;
funcs = plane->helper_private;
--
2.14.1
I'm announcing the release of the 4.4.144 kernel.
All users of the 4.4 kernel series must upgrade.
The updated 4.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.4.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/ABI/testing/sysfs-devices-system-cpu | 1
Documentation/kernel-parameters.txt | 45 ++
Documentation/spec_ctrl.txt | 94 ++++
Makefile | 2
arch/arc/include/asm/page.h | 2
arch/arc/include/asm/pgtable.h | 2
arch/x86/entry/entry_64_compat.S | 75 ++-
arch/x86/include/asm/apm.h | 6
arch/x86/include/asm/barrier.h | 2
arch/x86/include/asm/cpufeature.h | 7
arch/x86/include/asm/cpufeatures.h | 37 +
arch/x86/include/asm/disabled-features.h | 3
arch/x86/include/asm/efi.h | 7
arch/x86/include/asm/intel-family.h | 10
arch/x86/include/asm/irqflags.h | 2
arch/x86/include/asm/mmu.h | 15
arch/x86/include/asm/mmu_context.h | 25 -
arch/x86/include/asm/msr-index.h | 22 +
arch/x86/include/asm/nospec-branch.h | 54 ++
arch/x86/include/asm/required-features.h | 3
arch/x86/include/asm/spec-ctrl.h | 80 +++
arch/x86/include/asm/thread_info.h | 6
arch/x86/include/asm/tlbflush.h | 12
arch/x86/kernel/Makefile | 1
arch/x86/kernel/cpu/amd.c | 38 +
arch/x86/kernel/cpu/bugs.c | 427 +++++++++++++++++++--
arch/x86/kernel/cpu/common.c | 121 +++++
arch/x86/kernel/cpu/cpu.h | 3
arch/x86/kernel/cpu/intel.c | 73 +++
arch/x86/kernel/cpu/mcheck/mce.c | 3
arch/x86/kernel/irqflags.S | 26 +
arch/x86/kernel/ldt.c | 4
arch/x86/kernel/process.c | 224 +++++++++--
arch/x86/kernel/smpboot.c | 5
arch/x86/kvm/svm.c | 2
arch/x86/kvm/vmx.c | 2
arch/x86/mm/tlb.c | 33 +
arch/x86/platform/efi/efi_64.c | 3
arch/x86/xen/enlighten.c | 16
arch/x86/xen/smp.c | 5
arch/x86/xen/suspend.c | 16
block/blk-core.c | 10
drivers/base/cpu.c | 8
drivers/clk/tegra/clk-tegra30.c | 11
drivers/mtd/ubi/attach.c | 139 +++++-
drivers/mtd/ubi/eba.c | 4
drivers/mtd/ubi/fastmap-wl.c | 6
drivers/mtd/ubi/fastmap.c | 51 ++
drivers/mtd/ubi/ubi.h | 46 ++
drivers/mtd/ubi/wl.c | 114 ++++-
drivers/net/ethernet/broadcom/tg3.c | 9
drivers/net/phy/phy_device.c | 7
drivers/ptp/ptp_chardev.c | 1
drivers/usb/host/xhci.c | 40 +
drivers/usb/host/xhci.h | 4
fs/fat/inode.c | 20
fs/proc/array.c | 26 +
include/linux/cpu.h | 2
include/linux/nospec.h | 10
include/linux/sched.h | 9
include/linux/seccomp.h | 3
include/linux/skbuff.h | 12
include/net/ipv6.h | 2
include/uapi/linux/prctl.h | 12
include/uapi/linux/seccomp.h | 4
kernel/seccomp.c | 21 -
kernel/sys.c | 21 +
lib/rhashtable.c | 17
mm/memcontrol.c | 2
net/core/skbuff.c | 1
net/ipv4/fib_frontend.c | 1
net/ipv4/sysctl_net_ipv4.c | 5
sound/core/rawmidi.c | 20
tools/testing/selftests/seccomp/seccomp_bpf.c | 98 ++++
virt/kvm/eventfd.c | 6
75 files changed, 1981 insertions(+), 275 deletions(-)
Alan Jenkins (1):
block: do not use interruptible wait anywhere
Alexander Sergeyev (1):
x86/speculation: Remove Skylake C2 from Speculation Control microcode blacklist
Alexey Brodkin (1):
ARC: Fix CONFIG_SWAP
Andy Lutomirski (2):
x86/mm: Give each mm TLB flush generation a unique ID
x86/cpu: Re-apply forced caps every time CPU caps are re-read
Andy Shevchenko (1):
x86/cpu: Rename Merrifield2 to Moorefield
Arnd Bergmann (1):
x86/pti: Mark constant arrays as __initconst
Borislav Petkov (4):
Documentation/spec_ctrl: Do some minor cleanups
x86/speculation: Use synthetic bits for IBRS/IBPB/STIBP
x86/cpu/AMD: Fix erratum 1076 (CPB bit)
x86/bugs: Unify x86_spec_ctrl_{set_guest, restore_host}
Colin Ian King (1):
ipv6: fix useless rol32 call on hash
Dan Williams (2):
x86/entry/64/compat: Clear registers for compat syscalls, to reduce speculation attack surface
x86/speculation: Fix up array_index_nospec_mask() asm constraint
Dave Hansen (1):
x86/mm: Factor out LDT init from context init
David Ahern (1):
net/ipv4: Set oif in fib_compute_spec_dst
David Woodhouse (14):
x86/cpufeatures: Add CPUID_7_EDX CPUID leaf
x86/cpufeatures: Add Intel feature bits for Speculation Control
x86/cpufeatures: Add AMD feature bits for Speculation Control
x86/msr: Add definitions for new speculation control MSRs
x86/pti: Do not enable PTI on CPUs which are not vulnerable to Meltdown
x86/cpufeature: Blacklist SPEC_CTRL/PRED_CMD on early Spectre v2 microcodes
x86/speculation: Add basic IBPB (Indirect Branch Prediction Barrier) support
x86/cpufeatures: Clean up Spectre v2 related CPUID flags
x86/cpuid: Fix up "virtual" IBRS/IBPB/STIBP feature bits on Intel
x86/speculation: Update Speculation Control microcode blacklist
x86/speculation: Correct Speculation Control microcode blacklist again
x86/speculation: Use IBRS if available before calling into firmware
x86/amd: don't set X86_BUG_SYSRET_SS_ATTRS when running under Xen
x86/bugs/AMD: Add support to disable RDS on Fam[15, 16, 17]h if requested
Davidlohr Bueso (1):
lib/rhashtable: consider param->min_size when setting initial table size
Denys Vlasenko (1):
x86/asm/entry/32: Simplify pushes of zeroed pt_regs->REGs
Dewet Thibaut (1):
x86/MCE: Remove min interval polling limitation
Greg Kroah-Hartman (1):
Linux 4.4.144
Gustavo A. R. Silva (1):
ptp: fix missing break in switch
Heiner Kallweit (1):
net: phy: fix flag masking in __set_phy_supported
Ingo Molnar (2):
x86/speculation: Clean up various Spectre related details
x86/speculation: Move firmware_restrict_branch_speculation_*() from C to CPP
Jim Mattson (1):
x86/cpu: Make alternative_msr_write work for 32-bit code
Jing Xia (1):
mm: memcg: fix use after free in mem_cgroup_iter()
Jiri Kosina (2):
x86/bugs: Fix __ssb_select_mitigation() return type
x86/bugs: Make cpu_show_common() static
Juergen Gross (3):
x86/xen: Zero MSR_IA32_SPEC_CTRL before suspend
xen: set cpu capabilities from xen_start_kernel()
x86/xen: Add call of speculative_store_bypass_ht_init() to PV paths
Kees Cook (5):
nospec: Allow getting/setting on non-current task
proc: Provide details on speculation flaw mitigations
seccomp: Enable speculation flaw mitigations
seccomp: Add filter flag to opt-out of SSB mitigation
x86/speculation: Make "seccomp" the default mode for Speculative Store Bypass
Konrad Rzeszutek Wilk (14):
x86/spectre_v2: Don't check microcode versions when running under hypervisors
x86/bugs: Concentrate bug detection into a separate function
x86/bugs: Concentrate bug reporting into a separate function
x86/bugs: Read SPEC_CTRL MSR during boot and re-use reserved bits
x86/bugs, KVM: Support the combination of guest and host IBRS
x86/bugs: Expose /sys/../spec_store_bypass
x86/cpufeatures: Add X86_FEATURE_RDS
x86/bugs: Provide boot parameters for the spec_store_bypass_disable mitigation
x86/bugs/intel: Set proper CPU features and setup RDS
x86/bugs: Whitelist allowed SPEC_CTRL MSR values
x86/bugs: Rename _RDS to _SSBD
proc: Use underscores for SSBD in 'status'
x86/bugs: Fix the parameters alignment and missing void
x86/bugs: Rename SSBD_NO to SSB_NO
Kyle Huey (2):
x86/process: Optimize TIF checks in __switch_to_xtra()
x86/process: Correct and optimize TIF_BLOCKSTEP switch
Lan Tianyu (1):
KVM/Eventfd: Avoid crash when assign and deassign specific eventfd in parallel.
Linus Torvalds (1):
x86/nospec: Simplify alternative_msr_write()
Lucas Stach (1):
clk: tegra: Fix PLL_U post divider and initial rate on Tegra30
Mathias Nyman (1):
xhci: Fix perceived dead host due to runtime suspend race with event handler
Mickaël Salaün (2):
selftest/seccomp: Fix the flag name SECCOMP_FILTER_FLAG_TSYNC
selftest/seccomp: Fix the seccomp(2) signature
Nick Desaulniers (1):
x86/paravirt: Make native_save_fl() extern inline
OGAWA Hirofumi (1):
fat: fix memory allocation failure handling of match_strdup()
Peter Zijlstra (1):
x86/speculation: Add <asm/msr-index.h> dependency
Piotr Luc (1):
x86/cpu/intel: Add Knights Mill to Intel family
Richard Weinberger (5):
ubi: Introduce vol_ignored()
ubi: Rework Fastmap attach base code
ubi: Be more paranoid while seaching for the most recent Fastmap
ubi: Fix races around ubi_refill_pools()
ubi: Fix Fastmap's update_vol()
Sanjeev Bansal (1):
tg3: Add higher cpu clock for 5762.
Sascha Hauer (1):
ubi: fastmap: Erase outdated anchor PEBs during attach
Stefano Brivio (2):
net: Don't copy pfmemalloc flag in __copy_skb_header()
skbuff: Unconditionally copy pfmemalloc in __skb_clone()
Takashi Iwai (1):
ALSA: rawmidi: Change resized buffers atomically
Thomas Gleixner (18):
x86/speculation: Create spec-ctrl.h to avoid include hell
prctl: Add speculation control prctls
x86/process: Optimize TIF_NOTSC switch
x86/process: Allow runtime control of Speculative Store Bypass
x86/speculation: Add prctl for Speculative Store Bypass mitigation
prctl: Add force disable speculation
seccomp: Use PR_SPEC_FORCE_DISABLE
seccomp: Move speculation migitation control to arch code
x86/cpufeatures: Disentangle MSR_SPEC_CTRL enumeration from IBRS
x86/cpufeatures: Disentangle SSBD enumeration
x86/cpufeatures: Add FEATURE_ZEN
x86/speculation: Handle HT correctly on AMD
x86/bugs, KVM: Extend speculation control for VIRT_SPEC_CTRL
x86/speculation: Rework speculative_store_bypass_update()
x86/bugs: Expose x86_spec_ctrl_base directly
x86/bugs: Remove x86_spec_ctrl_set()
x86/bugs: Rework spec_ctrl base and mask logic
x86/speculation, KVM: Implement support for VIRT_SPEC_CTRL/LS_CFG
Tim Chen (1):
x86/speculation: Use Indirect Branch Prediction Barrier in context switch
Tom Lendacky (1):
x86/speculation: Add virtualized speculative store bypass disable support
Tyler Hicks (1):
ipv4: Return EINVAL when ping_group_range sysctl doesn't map to user ns
Vineet Gupta (1):
ARC: mm: allow mprotect to make stack mappings executable
Fyi.
Please find attached.
Mohammad Ali Tajick Ghanbary
Associate Prof. of Mycology & Plant Pathology
Department of Plant Protection
College of Agronomic Sciences
Sari Agricultural Sciences and Natural Resources University
P.O.Box 578
Sari,IRAN
Office & fax : +98 11 33687567
Mobile : +98 911 254 6616
From: Christoffer Dall <christoffer.dall(a)arm.com>
When the VCPU is blocked (for example from WFI) we don't inject the
physical timer interrupt if it should fire while the CPU is blocked, but
instead we just wake up the VCPU and expect kvm_timer_vcpu_load to take
care of injecting the interrupt.
Unfortunately, kvm_timer_vcpu_load() doesn't actually do that, it only
has support to schedule a soft timer if the emulated phys timer is
expected to fire in the future.
Follow the same pattern as kvm_timer_update_state() and update the irq
state after potentially scheduling a soft timer.
Reported-by: Andre Przywara <andre.przywara(a)arm.com>
Cc: Stable <stable(a)vger.kernel.org> # 4.15+
Fixes: bbdd52cfcba29 ("KVM: arm/arm64: Avoid phys timer emulation in vcpu entry/exit")
Signed-off-by: Christoffer Dall <christoffer.dall(a)arm.com>
---
virt/kvm/arm/arch_timer.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/virt/kvm/arm/arch_timer.c b/virt/kvm/arm/arch_timer.c
index 18ff6203079d..17cecc96f735 100644
--- a/virt/kvm/arm/arch_timer.c
+++ b/virt/kvm/arm/arch_timer.c
@@ -487,6 +487,7 @@ void kvm_timer_vcpu_load(struct kvm_vcpu *vcpu)
{
struct arch_timer_cpu *timer = &vcpu->arch.timer_cpu;
struct arch_timer_context *vtimer = vcpu_vtimer(vcpu);
+ struct arch_timer_context *ptimer = vcpu_ptimer(vcpu);
if (unlikely(!timer->enabled))
return;
@@ -502,6 +503,10 @@ void kvm_timer_vcpu_load(struct kvm_vcpu *vcpu)
/* Set the background timer for the physical timer emulation. */
phys_timer_emulate(vcpu);
+
+ /* If the timer fired while we weren't running, inject it now */
+ if (kvm_timer_should_fire(ptimer) != ptimer->irq.level)
+ kvm_timer_update_irq(vcpu, !ptimer->irq.level, ptimer);
}
bool kvm_timer_should_notify_user(struct kvm_vcpu *vcpu)
--
2.14.4