As soon as we re-enable the various functions within the HW, they may go
off and read data via a GGTT offset. Hence, if we have not yet restored
the GGTT PTE before then, they may read and even *write* random locations
in memory.
Detected by DMAR faults during resume.
Signed-off-by: Chris Wilson <chris(a)chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala(a)linux.intel.com>
Cc: Martin Peres <martin.peres(a)linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen(a)linux.intel.com>
Cc: stable(a)vger.kernel.org
---
drivers/gpu/drm/i915/gem/i915_gem_pm.c | 3 ---
drivers/gpu/drm/i915/i915_drv.c | 5 +++++
drivers/gpu/drm/i915/selftests/i915_gem.c | 6 ++++++
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_pm.c b/drivers/gpu/drm/i915/gem/i915_gem_pm.c
index b3993d24b83d..9b1129aaacfe 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_pm.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_pm.c
@@ -242,9 +242,6 @@ void i915_gem_resume(struct drm_i915_private *i915)
mutex_lock(&i915->drm.struct_mutex);
intel_uncore_forcewake_get(&i915->uncore, FORCEWAKE_ALL);
- i915_gem_restore_gtt_mappings(i915);
- i915_gem_restore_fences(i915);
-
if (i915_gem_init_hw(i915))
goto err_wedged;
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 7b2c81a8bbaa..1af4eba968c0 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1877,6 +1877,11 @@ static int i915_drm_resume(struct drm_device *dev)
if (ret)
DRM_ERROR("failed to re-enable GGTT\n");
+ mutex_lock(&dev_priv->drm.struct_mutex);
+ i915_gem_restore_gtt_mappings(dev_priv);
+ i915_gem_restore_fences(dev_priv);
+ mutex_unlock(&dev_priv->drm.struct_mutex);
+
intel_csr_ucode_resume(dev_priv);
i915_restore_state(dev_priv);
diff --git a/drivers/gpu/drm/i915/selftests/i915_gem.c b/drivers/gpu/drm/i915/selftests/i915_gem.c
index bb6dd54a6ff3..37593831b539 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem.c
@@ -118,6 +118,12 @@ static void pm_resume(struct drm_i915_private *i915)
with_intel_runtime_pm(&i915->runtime_pm, wakeref) {
intel_gt_sanitize(&i915->gt, false);
i915_gem_sanitize(i915);
+
+ mutex_lock(&i915->drm.struct_mutex);
+ i915_gem_restore_gtt_mappings(i915);
+ i915_gem_restore_fences(i915);
+ mutex_unlock(&i915->drm.struct_mutex);
+
i915_gem_resume(i915);
}
}
--
2.23.0
I'm announcing the release of the 4.9.192 kernel.
All users of the 4.9 kernel series must upgrade.
The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2
arch/arm/kvm/mmio.c | 7 ++
arch/x86/kernel/apic/apic.c | 4 -
drivers/bluetooth/btqca.c | 3 +
drivers/infiniband/hw/mlx4/mad.c | 4 -
drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 4 +
drivers/net/ethernet/ibm/ibmveth.c | 9 +--
drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 2
drivers/net/ethernet/renesas/ravb_main.c | 8 ++
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 6 --
drivers/net/ethernet/toshiba/tc35815.c | 2
drivers/net/ethernet/tundra/tsi108_eth.c | 5 +
drivers/net/usb/cx82310_eth.c | 3 -
drivers/net/usb/kalmia.c | 6 +-
drivers/net/wimax/i2400m/fw.c | 4 +
drivers/spi/spi-bcm2835aux.c | 57 +++++++--------------
fs/ceph/inode.c | 7 +-
fs/ceph/xattr.c | 8 ++
include/linux/ceph/buffer.h | 3 -
include/linux/gpio.h | 24 --------
net/core/netpoll.c | 6 +-
net/ipv4/tcp_output.c | 3 -
net/ipv6/mcast.c | 5 +
tools/hv/hv_kvp_daemon.c | 2
24 files changed, 83 insertions(+), 101 deletions(-)
Andrew Jones (1):
KVM: arm/arm64: Only skip MMIO insn once
Chen-Yu Tsai (1):
net: stmmac: dwmac-rk: Don't fail if phy regulator is absent
Eric Dumazet (1):
mld: fix memory leak in mld_del_delrec()
Feng Sun (1):
net: fix skb use after free in netpoll
Fuqian Huang (1):
net: tundra: tsi108: use spin_lock_irqsave instead of spin_lock_irq in IRQ context
Greg Kroah-Hartman (1):
Linux 4.9.192
Linus Torvalds (1):
Revert "x86/apic: Include the LDR when clearing out APIC registers"
Luis Henriques (3):
ceph: fix buffer free while holding i_ceph_lock in __ceph_setxattr()
ceph: fix buffer free while holding i_ceph_lock in fill_inode()
libceph: allow ceph_buffer_put() to receive a NULL ceph_buffer
Martin Sperl (3):
spi: bcm2835aux: unifying code between polling and interrupt driven code
spi: bcm2835aux: remove dangerous uncontrolled read of fifo
spi: bcm2835aux: fix corruptions for longer spi transfers
Matthias Kaehlcke (1):
Bluetooth: btqca: Add a short delay before downloading the NVM
Nathan Chancellor (1):
net: tc35815: Explicitly check NET_IP_ALIGN is not zero in tc35815_rx
Rob Herring (1):
spi: bcm2835aux: ensure interrupts are enabled for shared handler
Tho Vu (1):
ravb: Fix use-after-free ravb_tstamp_skb
Thomas Falcon (1):
ibmveth: Convert multicast list size for little-endian system
Vitaly Kuznetsov (1):
Tools: hv: kvp: eliminate 'may be used uninitialized' warning
Wenwen Wang (6):
cxgb4: fix a memory leak bug
net: myri10ge: fix memory leaks
cx82310_eth: fix a memory leak bug
net: kalmia: fix memory leaks
wimax/i2400m: fix a memory leak bug
IB/mlx4: Fix memory leaks
Willem de Bruijn (1):
tcp: inherit timestamp on mtu probe
YueHaibing (1):
gpio: Fix build error of function redefinition
I'm announcing the release of the 4.4.192 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:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2
arch/arm/kvm/mmio.c | 7 ++
arch/x86/kernel/apic/apic.c | 4 -
drivers/bluetooth/btqca.c | 3 +
drivers/infiniband/hw/mlx4/mad.c | 4 -
drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 4 +
drivers/net/ethernet/ibm/ibmveth.c | 9 +--
drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 2
drivers/net/ethernet/renesas/ravb_main.c | 8 ++
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 6 --
drivers/net/ethernet/toshiba/tc35815.c | 2
drivers/net/ethernet/tundra/tsi108_eth.c | 5 +
drivers/net/usb/cx82310_eth.c | 3 -
drivers/net/usb/kalmia.c | 6 +-
drivers/net/wimax/i2400m/fw.c | 4 +
drivers/spi/spi-bcm2835aux.c | 57 +++++++--------------
fs/ceph/xattr.c | 8 ++
include/linux/ceph/buffer.h | 3 -
include/linux/gpio.h | 24 --------
net/core/netpoll.c | 6 +-
tools/hv/hv_kvp_daemon.c | 2
21 files changed, 74 insertions(+), 95 deletions(-)
Andrew Jones (1):
KVM: arm/arm64: Only skip MMIO insn once
Chen-Yu Tsai (1):
net: stmmac: dwmac-rk: Don't fail if phy regulator is absent
Feng Sun (1):
net: fix skb use after free in netpoll
Fuqian Huang (1):
net: tundra: tsi108: use spin_lock_irqsave instead of spin_lock_irq in IRQ context
Greg Kroah-Hartman (1):
Linux 4.4.192
Linus Torvalds (1):
Revert "x86/apic: Include the LDR when clearing out APIC registers"
Luis Henriques (2):
ceph: fix buffer free while holding i_ceph_lock in __ceph_setxattr()
libceph: allow ceph_buffer_put() to receive a NULL ceph_buffer
Martin Sperl (3):
spi: bcm2835aux: unifying code between polling and interrupt driven code
spi: bcm2835aux: remove dangerous uncontrolled read of fifo
spi: bcm2835aux: fix corruptions for longer spi transfers
Matthias Kaehlcke (1):
Bluetooth: btqca: Add a short delay before downloading the NVM
Nathan Chancellor (1):
net: tc35815: Explicitly check NET_IP_ALIGN is not zero in tc35815_rx
Rob Herring (1):
spi: bcm2835aux: ensure interrupts are enabled for shared handler
Tho Vu (1):
ravb: Fix use-after-free ravb_tstamp_skb
Thomas Falcon (1):
ibmveth: Convert multicast list size for little-endian system
Vitaly Kuznetsov (1):
Tools: hv: kvp: eliminate 'may be used uninitialized' warning
Wenwen Wang (6):
cxgb4: fix a memory leak bug
net: myri10ge: fix memory leaks
cx82310_eth: fix a memory leak bug
net: kalmia: fix memory leaks
wimax/i2400m: fix a memory leak bug
IB/mlx4: Fix memory leaks
YueHaibing (1):
gpio: Fix build error of function redefinition
This is the start of the stable review cycle for the 4.14.143 release.
There are 40 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Tue 10 Sep 2019 12:09:36 PM UTC.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.143-r…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.14.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.14.143-rc1
John S. Gruber <JohnSGruber(a)gmail.com>
x86/boot: Preserve boot_params.secure_boot from sanitizing
Eric Dumazet <edumazet(a)google.com>
mld: fix memory leak in mld_del_delrec()
Vlad Buslov <vladbu(a)mellanox.com>
net: sched: act_sample: fix psample group handling on overwrite
Eric Dumazet <edumazet(a)google.com>
tcp: remove empty skb from write queue in error cases
Willem de Bruijn <willemb(a)google.com>
tcp: inherit timestamp on mtu probe
Chen-Yu Tsai <wens(a)csie.org>
net: stmmac: dwmac-rk: Don't fail if phy regulator is absent
Cong Wang <xiyou.wangcong(a)gmail.com>
net_sched: fix a NULL pointer deref in ipt action
Feng Sun <loyou85(a)gmail.com>
net: fix skb use after free in netpoll
Linus Torvalds <torvalds(a)linux-foundation.org>
Revert "x86/apic: Include the LDR when clearing out APIC registers"
Martin Sperl <kernel(a)martin.sperl.org>
spi: bcm2835aux: fix corruptions for longer spi transfers
Martin Sperl <kernel(a)martin.sperl.org>
spi: bcm2835aux: remove dangerous uncontrolled read of fifo
Martin Sperl <kernel(a)martin.sperl.org>
spi: bcm2835aux: unifying code between polling and interrupt driven code
Luis Henriques <lhenriques(a)suse.com>
libceph: allow ceph_buffer_put() to receive a NULL ceph_buffer
Andrew Jones <drjones(a)redhat.com>
KVM: arm/arm64: Only skip MMIO insn once
Luis Henriques <lhenriques(a)suse.com>
ceph: fix buffer free while holding i_ceph_lock in fill_inode()
Luis Henriques <lhenriques(a)suse.com>
ceph: fix buffer free while holding i_ceph_lock in __ceph_build_xattrs_blob()
Luis Henriques <lhenriques(a)suse.com>
ceph: fix buffer free while holding i_ceph_lock in __ceph_setxattr()
Wenwen Wang <wenwen(a)cs.uga.edu>
IB/mlx4: Fix memory leaks
Vitaly Kuznetsov <vkuznets(a)redhat.com>
Tools: hv: kvp: eliminate 'may be used uninitialized' warning
Dexuan Cui <decui(a)microsoft.com>
Input: hyperv-keyboard: Use in-place iterator API in the channel callback
Benjamin Tissoires <benjamin.tissoires(a)redhat.com>
HID: cp2112: prevent sleeping function called from invalid context
Andrea Righi <andrea.righi(a)canonical.com>
kprobes: Fix potential deadlock in kprobe_optimizer()
Tho Vu <tho.vu.wh(a)rvc.renesas.com>
ravb: Fix use-after-free ravb_tstamp_skb
Wenwen Wang <wenwen(a)cs.uga.edu>
wimax/i2400m: fix a memory leak bug
Wenwen Wang <wenwen(a)cs.uga.edu>
net: kalmia: fix memory leaks
Wenwen Wang <wenwen(a)cs.uga.edu>
cx82310_eth: fix a memory leak bug
Darrick J. Wong <darrick.wong(a)oracle.com>
vfs: fix page locking deadlocks when deduping files
Wenwen Wang <wenwen(a)cs.uga.edu>
lan78xx: Fix memory leaks
Wenwen Wang <wenwen(a)cs.uga.edu>
net: myri10ge: fix memory leaks
Wenwen Wang <wenwen(a)cs.uga.edu>
liquidio: add cleanup in octeon_setup_iq()
Wenwen Wang <wenwen(a)cs.uga.edu>
cxgb4: fix a memory leak bug
Alexandre Courbot <acourbot(a)chromium.org>
drm/mediatek: set DMA max segment size
Alexandre Courbot <acourbot(a)chromium.org>
drm/mediatek: use correct device to import PRIME buffers
YueHaibing <yuehaibing(a)huawei.com>
gpio: Fix build error of function redefinition
Thomas Falcon <tlfalcon(a)linux.ibm.com>
ibmveth: Convert multicast list size for little-endian system
Fabian Henneke <fabian.henneke(a)gmail.com>
Bluetooth: hidp: Let hidp_send_message return number of queued bytes
Matthias Kaehlcke <mka(a)chromium.org>
Bluetooth: btqca: Add a short delay before downloading the NVM
Nathan Chancellor <natechancellor(a)gmail.com>
net: tc35815: Explicitly check NET_IP_ALIGN is not zero in tc35815_rx
Dexuan Cui <decui(a)microsoft.com>
hv_netvsc: Fix a warning of suspicious RCU usage
Fuqian Huang <huangfq.daxian(a)gmail.com>
net: tundra: tsi108: use spin_lock_irqsave instead of spin_lock_irq in IRQ context
-------------
Diffstat:
Makefile | 4 +-
arch/x86/include/asm/bootparam_utils.h | 1 +
arch/x86/kernel/apic/apic.c | 4 --
drivers/bluetooth/btqca.c | 3 ++
drivers/gpu/drm/mediatek/mtk_drm_drv.c | 49 +++++++++++++++--
drivers/gpu/drm/mediatek/mtk_drm_drv.h | 2 +
drivers/hid/hid-cp2112.c | 8 ++-
drivers/infiniband/hw/mlx4/mad.c | 4 +-
drivers/input/serio/hyperv-keyboard.c | 35 +++---------
.../net/ethernet/cavium/liquidio/request_manager.c | 4 +-
drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 4 +-
drivers/net/ethernet/ibm/ibmveth.c | 9 ++--
drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 2 +-
drivers/net/ethernet/renesas/ravb_main.c | 8 ++-
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 6 +--
drivers/net/ethernet/toshiba/tc35815.c | 2 +-
drivers/net/ethernet/tundra/tsi108_eth.c | 5 +-
drivers/net/hyperv/netvsc_drv.c | 9 +++-
drivers/net/usb/cx82310_eth.c | 3 +-
drivers/net/usb/kalmia.c | 6 +--
drivers/net/usb/lan78xx.c | 8 +--
drivers/net/wimax/i2400m/fw.c | 4 +-
drivers/spi/spi-bcm2835aux.c | 62 +++++++---------------
fs/ceph/caps.c | 5 +-
fs/ceph/inode.c | 7 +--
fs/ceph/snap.c | 4 +-
fs/ceph/super.h | 2 +-
fs/ceph/xattr.c | 19 +++++--
fs/read_write.c | 49 ++++++++++++++---
include/linux/ceph/buffer.h | 3 +-
include/linux/gpio.h | 24 ---------
include/net/act_api.h | 4 +-
include/net/psample.h | 1 +
kernel/kprobes.c | 8 +--
net/bluetooth/hidp/core.c | 9 +++-
net/core/netpoll.c | 6 +--
net/ipv4/tcp.c | 29 ++++++----
net/ipv4/tcp_output.c | 3 +-
net/ipv6/mcast.c | 5 +-
net/psample/psample.c | 2 +-
net/sched/act_bpf.c | 2 +-
net/sched/act_connmark.c | 2 +-
net/sched/act_csum.c | 2 +-
net/sched/act_gact.c | 2 +-
net/sched/act_ife.c | 2 +-
net/sched/act_ipt.c | 11 ++--
net/sched/act_mirred.c | 2 +-
net/sched/act_nat.c | 2 +-
net/sched/act_pedit.c | 2 +-
net/sched/act_police.c | 2 +-
net/sched/act_sample.c | 7 ++-
net/sched/act_simple.c | 2 +-
net/sched/act_skbedit.c | 2 +-
net/sched/act_skbmod.c | 2 +-
net/sched/act_tunnel_key.c | 2 +-
net/sched/act_vlan.c | 2 +-
tools/hv/hv_kvp_daemon.c | 2 +-
virt/kvm/arm/mmio.c | 7 +++
58 files changed, 278 insertions(+), 199 deletions(-)