commit 84b59f6487d82d3ab4247a099aba66d4d17e8b08 upstream
When checking whether the response is large enough to be able to contain
the received random bytes in tpm_get_random() and tpm2_get_random(),
they fail to take account the header size, which should be added to the
minimum size. This commit fixes this issue.
Cc: stable(a)vger.kernel.org
Fixes: c659af78eb7b ("tpm: Check size of response before accessing data")
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen(a)linux.intel.com>
---
For v4.14 and v4.18. Fixed a merge conflict.
drivers/char/tpm/tpm-interface.c | 3 ++-
drivers/char/tpm/tpm2-cmd.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
index e8822b3d10e1..a107ee2466da 100644
--- a/drivers/char/tpm/tpm-interface.c
+++ b/drivers/char/tpm/tpm-interface.c
@@ -1323,7 +1323,8 @@ int tpm_get_random(struct tpm_chip *chip, u8 *out, size_t max)
}
rlength = be32_to_cpu(tpm_cmd.header.out.length);
- if (rlength < offsetof(struct tpm_getrandom_out, rng_data) +
+ if (rlength < TPM_HEADER_SIZE +
+ offsetof(struct tpm_getrandom_out, rng_data) +
recd) {
total = -EFAULT;
break;
diff --git a/drivers/char/tpm/tpm2-cmd.c b/drivers/char/tpm/tpm2-cmd.c
index d31b09099216..79b00bc4a7c2 100644
--- a/drivers/char/tpm/tpm2-cmd.c
+++ b/drivers/char/tpm/tpm2-cmd.c
@@ -371,7 +371,8 @@ int tpm2_get_random(struct tpm_chip *chip, u8 *out, size_t max)
recd = min_t(u32, be16_to_cpu(cmd.params.getrandom_out.size),
num_bytes);
rlength = be32_to_cpu(cmd.header.out.length);
- if (rlength < offsetof(struct tpm2_get_random_out, buffer) +
+ if (rlength < TPM_HEADER_SIZE +
+ offsetof(struct tpm2_get_random_out, buffer) +
recd)
return -EFAULT;
memcpy(dest, cmd.params.getrandom_out.buffer, recd);
--
2.19.1
This is the start of the stable review cycle for the 4.20.3 release.
There are 57 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 Thu Jan 17 15:48:32 UTC 2019.
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.20.3-rc1…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.20.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.20.3-rc1
Filipe Manana <fdmanana(a)suse.com>
Btrfs: use nofs context when initializing security xattrs to avoid deadlock
Filipe Manana <fdmanana(a)suse.com>
Btrfs: fix deadlock when enabling quotas due to concurrent snapshot creation
Filipe Manana <fdmanana(a)suse.com>
Btrfs: fix access to available allocation bits when starting balance
Vasily Averin <vvs(a)virtuozzo.com>
sunrpc: use-after-free in svc_process_common()
Jan Stancek <jstancek(a)redhat.com>
mm: page_mapped: don't assume compound page is huge or THP
Theodore Ts'o <tytso(a)mit.edu>
ext4: fix special inode number checks in __ext4_iget()
Theodore Ts'o <tytso(a)mit.edu>
ext4: track writeback errors using the generic tracking infrastructure
Theodore Ts'o <tytso(a)mit.edu>
ext4: use ext4_write_inode() when fsyncing w/o a journal
Theodore Ts'o <tytso(a)mit.edu>
ext4: avoid kernel warning when writing the superblock to a dead device
Theodore Ts'o <tytso(a)mit.edu>
ext4: fix a potential fiemap/page fault deadlock w/ inline_data
Theodore Ts'o <tytso(a)mit.edu>
ext4: make sure enough credits are reserved for dioread_nolock writes
Ilya Dryomov <idryomov(a)gmail.com>
rbd: don't return 0 on unmap if RBD_DEV_FLAG_REMOVING is set
Lyude Paul <lyude(a)redhat.com>
drm/amdgpu: Don't fail resume process if resuming atomic state fails
Lyude Paul <lyude(a)redhat.com>
drm/amdgpu: Don't ignore rc from drm_dp_mst_topology_mgr_resume()
Chris Wilson <chris(a)chris-wilson.co.uk>
drm/i915: Unwind failure on pinning the gen7 ppgtt
Ivan Mironov <mironov.ivan(a)gmail.com>
drm/fb-helper: Partially bring back workaround for bugs of SDL 1.2
Jerry (Fangzhi) Zuo <Jerry.Zuo(a)amd.com>
drm/amd/display: Fix MST dp_blank REG_WAIT timeout
Marc Zyngier <marc.zyngier(a)arm.com>
PCI: dwc: Move interrupt acking into the proper callback
Marc Zyngier <marc.zyngier(a)arm.com>
PCI: dwc: Take lock when ACKing an interrupt
Marc Zyngier <marc.zyngier(a)arm.com>
PCI: dwc: Use interrupt masking instead of disabling
Alex Deucher <alexander.deucher(a)amd.com>
drm/amdgpu: Add new VegaM pci id
Alex Williamson <alex.williamson(a)redhat.com>
vfio/type1: Fix unmap overflow off-by-one
Christian Lamparter <chunkeey(a)gmail.com>
mtd: rawnand: qcom: fix memory corruption that causes panic
Yi Zeng <yizeng(a)asrmicro.com>
i2c: dev: prevent adapter retries and timeout being set as minus value
Jean-Philippe Brucker <jean-philippe.brucker(a)arm.com>
ACPI/IORT: Fix rc_dma_get_range()
Hans de Goede <hdegoede(a)redhat.com>
ACPI / PMIC: xpower: Fix TS-pin current-source handling
Hans de Goede <hdegoede(a)redhat.com>
ACPI: power: Skip duplicate power resource references in _PRx
Michal Hocko <mhocko(a)suse.com>
mm, memcg: fix reclaim deadlock with writeback
Qian Cai <cai(a)lca.pw>
mm/usercopy.c: no check page span for stack objects
Christoph Lameter <cl(a)linux.com>
slab: alien caches must not be initialized if the allocation of the alien cache failed
Shakeel Butt <shakeelb(a)google.com>
fork, memcg: fix cached_stacks case
Jack Stocker <jackstocker.93(a)gmail.com>
USB: Add USB_QUIRK_DELAY_CTRL_MSG quirk for Corsair K70 RGB
Icenowy Zheng <icenowy(a)aosc.io>
USB: storage: add quirk for SMI SM3350
Icenowy Zheng <icenowy(a)aosc.io>
USB: storage: don't insert sane sense for SPC3+ when bad sense specified
Daniele Palmas <dnlplm(a)gmail.com>
usb: cdc-acm: send ZLP for Telit 3G Intel based modems
Bartosz Golaszewski <bgolaszewski(a)baylibre.com>
ARM: davinci: da830-evm: fix label names in GPIO lookup entries
Bartosz Golaszewski <bgolaszewski(a)baylibre.com>
ARM: davinci: dm644x-evm: fix label names in GPIO lookup entries
Bartosz Golaszewski <bgolaszewski(a)baylibre.com>
ARM: davinci: omapl138-hawk: fix label names in GPIO lookup entries
Bartosz Golaszewski <bgolaszewski(a)baylibre.com>
ARM: davinci: da850-evm: fix label names in GPIO lookup entries
Bartosz Golaszewski <bgolaszewski(a)baylibre.com>
ARM: davinci: dm355-evm: fix label names in GPIO lookup entries
Joe Perches <joe(a)perches.com>
cifs: check kzalloc return
Ross Lagerwall <ross.lagerwall(a)citrix.com>
cifs: Fix potential OOB access of lock element array
Pavel Shilovsky <pshilov(a)microsoft.com>
CIFS: Fix credit computation for compounded requests
Pavel Shilovsky <pshilov(a)microsoft.com>
CIFS: Do not hide EINTR after sending network packets
Pavel Shilovsky <pshilov(a)microsoft.com>
CIFS: Do not set credits to 1 if the server didn't grant anything
Pavel Shilovsky <pshilov(a)microsoft.com>
CIFS: Fix adjustment of credits for MTU requests
Kailang Yang <kailang(a)realtek.com>
ALSA: hda/realtek - Disable headset Mic VREF for headset mode of ALC225
Kailang Yang <kailang(a)realtek.com>
ALSA: hda/realtek - Add unplug function into unplug state of Headset Mode for ALC225
Kailang Yang <kailang(a)realtek.com>
ALSA: hda/realtek - Support Dell headset mode for New AIO platform
WANG Chao <chao.wang(a)ucloud.cn>
x86, modpost: Replace last remnants of RETPOLINE with CONFIG_RETPOLINE
Quentin Perret <quentin.perret(a)arm.com>
cpufreq: scmi: Fix frequency invariance in slow path
Viresh Kumar <viresh.kumar(a)linaro.org>
cpufreq: scpi/scmi: Fix freeing of dynamic OPPs
Larry Finger <Larry.Finger(a)lwfinger.net>
staging: rtl8188eu: Fix module loading from tasklet for WEP encryption
Larry Finger <Larry.Finger(a)lwfinger.net>
staging: rtl8188eu: Fix module loading from tasklet for CCMP encryption
Saranya Gopal <saranya.gopal(a)intel.com>
usbcore: Select only first configuration for non-UAC3 compliant devices
Filipe Manana <fdmanana(a)suse.com>
Btrfs: fix deadlock when using free space tree due to block group creation
Breno Leitao <leitao(a)debian.org>
powerpc/tm: Unset MSR[TS] if not recheckpointing
-------------
Diffstat:
Makefile | 4 +-
arch/arm/mach-davinci/board-da830-evm.c | 4 +-
arch/arm/mach-davinci/board-da850-evm.c | 4 +-
arch/arm/mach-davinci/board-dm355-evm.c | 4 +-
arch/arm/mach-davinci/board-dm644x-evm.c | 4 +-
arch/arm/mach-davinci/board-omapl138-hawk.c | 4 +-
arch/powerpc/kernel/signal_32.c | 18 +++-
arch/powerpc/kernel/signal_64.c | 20 +++-
arch/x86/kernel/cpu/bugs.c | 2 +-
drivers/acpi/arm64/iort.c | 3 +-
drivers/acpi/pmic/intel_pmic_xpower.c | 41 +++++--
drivers/acpi/power.c | 22 ++++
drivers/block/rbd.c | 9 +-
drivers/cpufreq/scmi-cpufreq.c | 8 +-
drivers/cpufreq/scpi-cpufreq.c | 4 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 37 ++++---
drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 +-
drivers/gpu/drm/drm_fb_helper.c | 126 +++++++++++++---------
drivers/gpu/drm/i915/i915_gem_gtt.c | 15 ++-
drivers/i2c/i2c-dev.c | 6 ++
drivers/mtd/nand/raw/qcom_nandc.c | 20 ++--
drivers/opp/core.c | 63 ++++++++++-
drivers/pci/controller/dwc/pcie-designware-host.c | 37 ++++---
drivers/staging/rtl8188eu/core/rtw_security.c | 6 +-
drivers/usb/class/cdc-acm.c | 7 ++
drivers/usb/core/generic.c | 9 +-
drivers/usb/core/quirks.c | 3 +-
drivers/usb/storage/scsiglue.c | 8 +-
drivers/usb/storage/unusual_devs.h | 12 +++
drivers/vfio/vfio_iommu_type1.c | 2 +-
fs/btrfs/ctree.c | 16 +--
fs/btrfs/qgroup.c | 14 ++-
fs/btrfs/volumes.c | 39 ++++---
fs/btrfs/xattr.c | 8 ++
fs/cifs/file.c | 8 +-
fs/cifs/misc.c | 34 +++---
fs/cifs/smb2file.c | 4 +-
fs/cifs/smb2pdu.c | 8 +-
fs/cifs/transport.c | 63 +++++++----
fs/ext4/fsync.c | 16 ++-
fs/ext4/inline.c | 6 +-
fs/ext4/inode.c | 5 +-
fs/ext4/super.c | 2 +-
include/linux/compiler-gcc.h | 2 +-
include/linux/module.h | 2 +-
include/linux/pm_opp.h | 5 +
include/linux/sunrpc/svc.h | 5 +-
include/trace/events/sunrpc.h | 6 +-
kernel/fork.c | 1 +
mm/memory.c | 23 ++++
mm/slab.c | 6 +-
mm/usercopy.c | 9 +-
mm/util.c | 2 +-
net/sunrpc/svc.c | 11 +-
net/sunrpc/svc_xprt.c | 5 +-
net/sunrpc/svcsock.c | 2 +-
scripts/mod/modpost.c | 2 +-
sound/pci/hda/patch_realtek.c | 18 +++-
59 files changed, 578 insertions(+), 251 deletions(-)
This is the start of the stable review cycle for the 4.19.16 release.
There are 50 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 Thu Jan 17 15:48:36 UTC 2019.
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.19.16-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.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.19.16-rc1
Filipe Manana <fdmanana(a)suse.com>
Btrfs: use nofs context when initializing security xattrs to avoid deadlock
Filipe Manana <fdmanana(a)suse.com>
Btrfs: fix deadlock when enabling quotas due to concurrent snapshot creation
Filipe Manana <fdmanana(a)suse.com>
Btrfs: fix access to available allocation bits when starting balance
Will Deacon <will.deacon(a)arm.com>
arm64: compat: Don't pull syscall number from regs in arm_compat_syscall
Christoffer Dall <christoffer.dall(a)arm.com>
KVM: arm/arm64: Fix VMID alloc race by reverting to lock-less
Vasily Averin <vvs(a)virtuozzo.com>
sunrpc: use-after-free in svc_process_common()
Jan Stancek <jstancek(a)redhat.com>
mm: page_mapped: don't assume compound page is huge or THP
Theodore Ts'o <tytso(a)mit.edu>
ext4: fix special inode number checks in __ext4_iget()
Theodore Ts'o <tytso(a)mit.edu>
ext4: track writeback errors using the generic tracking infrastructure
Theodore Ts'o <tytso(a)mit.edu>
ext4: use ext4_write_inode() when fsyncing w/o a journal
Theodore Ts'o <tytso(a)mit.edu>
ext4: avoid kernel warning when writing the superblock to a dead device
Theodore Ts'o <tytso(a)mit.edu>
ext4: fix a potential fiemap/page fault deadlock w/ inline_data
Theodore Ts'o <tytso(a)mit.edu>
ext4: make sure enough credits are reserved for dioread_nolock writes
Ilya Dryomov <idryomov(a)gmail.com>
rbd: don't return 0 on unmap if RBD_DEV_FLAG_REMOVING is set
Lyude Paul <lyude(a)redhat.com>
drm/amdgpu: Don't fail resume process if resuming atomic state fails
Lyude Paul <lyude(a)redhat.com>
drm/amdgpu: Don't ignore rc from drm_dp_mst_topology_mgr_resume()
Chris Wilson <chris(a)chris-wilson.co.uk>
drm/i915: Unwind failure on pinning the gen7 ppgtt
Ivan Mironov <mironov.ivan(a)gmail.com>
drm/fb-helper: Partially bring back workaround for bugs of SDL 1.2
Neil Armstrong <narmstrong(a)baylibre.com>
drm/fb_helper: Allow leaking fbdev smem_start
Jerry (Fangzhi) Zuo <Jerry.Zuo(a)amd.com>
drm/amd/display: Fix MST dp_blank REG_WAIT timeout
Marc Zyngier <marc.zyngier(a)arm.com>
PCI: dwc: Move interrupt acking into the proper callback
Marc Zyngier <marc.zyngier(a)arm.com>
PCI: dwc: Take lock when ACKing an interrupt
Marc Zyngier <marc.zyngier(a)arm.com>
PCI: dwc: Use interrupt masking instead of disabling
Alex Deucher <alexander.deucher(a)amd.com>
drm/amdgpu: Add new VegaM pci id
Alex Williamson <alex.williamson(a)redhat.com>
vfio/type1: Fix unmap overflow off-by-one
Christian Lamparter <chunkeey(a)gmail.com>
mtd: rawnand: qcom: fix memory corruption that causes panic
Yi Zeng <yizeng(a)asrmicro.com>
i2c: dev: prevent adapter retries and timeout being set as minus value
Jean-Philippe Brucker <jean-philippe.brucker(a)arm.com>
ACPI/IORT: Fix rc_dma_get_range()
Hans de Goede <hdegoede(a)redhat.com>
ACPI / PMIC: xpower: Fix TS-pin current-source handling
Hans de Goede <hdegoede(a)redhat.com>
ACPI: power: Skip duplicate power resource references in _PRx
Michal Hocko <mhocko(a)suse.com>
mm, memcg: fix reclaim deadlock with writeback
Qian Cai <cai(a)lca.pw>
mm/usercopy.c: no check page span for stack objects
Christoph Lameter <cl(a)linux.com>
slab: alien caches must not be initialized if the allocation of the alien cache failed
Jack Stocker <jackstocker.93(a)gmail.com>
USB: Add USB_QUIRK_DELAY_CTRL_MSG quirk for Corsair K70 RGB
Icenowy Zheng <icenowy(a)aosc.io>
USB: storage: add quirk for SMI SM3350
Icenowy Zheng <icenowy(a)aosc.io>
USB: storage: don't insert sane sense for SPC3+ when bad sense specified
Daniele Palmas <dnlplm(a)gmail.com>
usb: cdc-acm: send ZLP for Telit 3G Intel based modems
Ross Lagerwall <ross.lagerwall(a)citrix.com>
cifs: Fix potential OOB access of lock element array
Pavel Shilovsky <pshilov(a)microsoft.com>
CIFS: Fix credit computation for compounded requests
Pavel Shilovsky <pshilov(a)microsoft.com>
CIFS: Do not hide EINTR after sending network packets
Pavel Shilovsky <pshilov(a)microsoft.com>
CIFS: Do not set credits to 1 if the server didn't grant anything
Pavel Shilovsky <pshilov(a)microsoft.com>
CIFS: Fix adjustment of credits for MTU requests
Kailang Yang <kailang(a)realtek.com>
ALSA: hda/realtek - Disable headset Mic VREF for headset mode of ALC225
Kailang Yang <kailang(a)realtek.com>
ALSA: hda/realtek - Add unplug function into unplug state of Headset Mode for ALC225
Kailang Yang <kailang(a)realtek.com>
ALSA: hda/realtek - Support Dell headset mode for New AIO platform
WANG Chao <chao.wang(a)ucloud.cn>
x86, modpost: Replace last remnants of RETPOLINE with CONFIG_RETPOLINE
Quentin Perret <quentin.perret(a)arm.com>
cpufreq: scmi: Fix frequency invariance in slow path
Larry Finger <Larry.Finger(a)lwfinger.net>
staging: rtl8188eu: Fix module loading from tasklet for WEP encryption
Larry Finger <Larry.Finger(a)lwfinger.net>
staging: rtl8188eu: Fix module loading from tasklet for CCMP encryption
Filipe Manana <fdmanana(a)suse.com>
Btrfs: fix deadlock when using free space tree due to block group creation
-------------
Diffstat:
Makefile | 4 +-
arch/arm64/kernel/sys_compat.c | 9 +-
arch/arm64/kernel/syscall.c | 9 +-
arch/x86/kernel/cpu/bugs.c | 2 +-
drivers/acpi/arm64/iort.c | 3 +-
drivers/acpi/pmic/intel_pmic_xpower.c | 41 ++++--
drivers/acpi/power.c | 22 ++++
drivers/block/rbd.c | 9 +-
drivers/cpufreq/scmi-cpufreq.c | 4 +-
drivers/gpu/drm/Kconfig | 20 +++
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 37 ++++--
drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 +-
drivers/gpu/drm/drm_fb_helper.c | 151 ++++++++++++++--------
drivers/gpu/drm/i915/i915_gem_gtt.c | 15 ++-
drivers/i2c/i2c-dev.c | 6 +
drivers/mtd/nand/raw/qcom_nandc.c | 20 +--
drivers/pci/controller/dwc/pcie-designware-host.c | 37 ++++--
drivers/staging/rtl8188eu/core/rtw_security.c | 6 +-
drivers/usb/class/cdc-acm.c | 7 +
drivers/usb/core/quirks.c | 3 +-
drivers/usb/storage/scsiglue.c | 8 +-
drivers/usb/storage/unusual_devs.h | 12 ++
drivers/vfio/vfio_iommu_type1.c | 2 +-
fs/btrfs/ctree.c | 16 ++-
fs/btrfs/qgroup.c | 14 +-
fs/btrfs/volumes.c | 39 +++---
fs/btrfs/xattr.c | 8 ++
fs/cifs/file.c | 8 +-
fs/cifs/smb2file.c | 4 +-
fs/cifs/smb2pdu.c | 8 +-
fs/cifs/transport.c | 63 ++++++---
fs/ext4/fsync.c | 16 ++-
fs/ext4/inline.c | 6 +-
fs/ext4/inode.c | 5 +-
fs/ext4/super.c | 2 +-
include/linux/compiler-gcc.h | 2 +-
include/linux/module.h | 2 +-
include/linux/sunrpc/svc.h | 5 +-
include/trace/events/sunrpc.h | 6 +-
mm/memory.c | 23 ++++
mm/slab.c | 6 +-
mm/usercopy.c | 9 +-
mm/util.c | 2 +-
net/sunrpc/svc.c | 11 +-
net/sunrpc/svc_xprt.c | 5 +-
net/sunrpc/svcsock.c | 2 +-
scripts/mod/modpost.c | 2 +-
sound/pci/hda/patch_realtek.c | 18 ++-
virt/kvm/arm/arm.c | 23 ++--
50 files changed, 509 insertions(+), 228 deletions(-)
Another drive-by fix. If slots < 0, or drm_dp_init_vcpi() fails, we'll
end up returning from the function without dropping the topology ref
that we grabbed at the very start. This would result in an MST hub
and/or it's ports staying around even after the MST topology has been
removed from the system.
So, fix this by making sure that we always drop the topology ref to port
when returning from this function.
Additionally: it looks like this bug exists pre-topology & malloc krefs,
so let's also make sure this gets backported to stable.
Signed-off-by: Lyude Paul <lyude(a)redhat.com>
Fixes: ad7f8a1f9ced ("drm/helper: add Displayport multi-stream helper (v0.6)")
Cc: David Airlie <airlied(a)linux.ie>
Cc: Daniel Vetter <daniel(a)ffwll.ch>
Cc: <stable(a)vger.kernel.org> # v3.17+
---
drivers/gpu/drm/drm_dp_mst_topology.c | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
index d99560c5c693..403f035dc8b8 100644
--- a/drivers/gpu/drm/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/drm_dp_mst_topology.c
@@ -3177,28 +3177,29 @@ EXPORT_SYMBOL(drm_dp_atomic_release_vcpi_slots);
bool drm_dp_mst_allocate_vcpi(struct drm_dp_mst_topology_mgr *mgr,
struct drm_dp_mst_port *port, int pbn, int slots)
{
- int ret;
+ int rc;
+ bool ret = false;
- port = drm_dp_mst_topology_get_port_validated(mgr, port);
- if (!port)
+ if (slots < 0)
return false;
- if (slots < 0)
+ port = drm_dp_mst_topology_get_port_validated(mgr, port);
+ if (!port)
return false;
if (port->vcpi.vcpi > 0) {
DRM_DEBUG_KMS("payload: vcpi %d already allocated for pbn %d - requested pbn %d\n",
port->vcpi.vcpi, port->vcpi.pbn, pbn);
if (pbn == port->vcpi.pbn) {
- drm_dp_mst_topology_put_port(port);
- return true;
+ ret = true;
+ goto out;
}
}
- ret = drm_dp_init_vcpi(mgr, &port->vcpi, pbn, slots);
- if (ret) {
+ rc = drm_dp_init_vcpi(mgr, &port->vcpi, pbn, slots);
+ if (rc) {
DRM_DEBUG_KMS("failed to init vcpi slots=%d max=63 ret=%d\n",
- DIV_ROUND_UP(pbn, mgr->pbn_div), ret);
+ DIV_ROUND_UP(pbn, mgr->pbn_div), rc);
goto out;
}
DRM_DEBUG_KMS("initing vcpi for pbn=%d slots=%d\n",
@@ -3206,10 +3207,10 @@ bool drm_dp_mst_allocate_vcpi(struct drm_dp_mst_topology_mgr *mgr,
/* Keep port allocated until it's payload has been removed */
drm_dp_mst_get_port_malloc(port);
- drm_dp_mst_topology_put_port(port);
- return true;
+ ret = true;
out:
- return false;
+ drm_dp_mst_topology_put_port(port);
+ return ret;
}
EXPORT_SYMBOL(drm_dp_mst_allocate_vcpi);
--
2.20.1
This is the start of the stable review cycle for the 4.14.94 release.
There are 27 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 Thu Jan 17 15:48:28 UTC 2019.
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.94-rc…
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.94-rc1
Christoffer Dall <christoffer.dall(a)arm.com>
KVM: arm/arm64: Fix VMID alloc race by reverting to lock-less
Vasily Averin <vvs(a)virtuozzo.com>
sunrpc: use-after-free in svc_process_common()
Theodore Ts'o <tytso(a)mit.edu>
ext4: track writeback errors using the generic tracking infrastructure
Theodore Ts'o <tytso(a)mit.edu>
ext4: use ext4_write_inode() when fsyncing w/o a journal
Theodore Ts'o <tytso(a)mit.edu>
ext4: avoid kernel warning when writing the superblock to a dead device
Theodore Ts'o <tytso(a)mit.edu>
ext4: fix a potential fiemap/page fault deadlock w/ inline_data
Theodore Ts'o <tytso(a)mit.edu>
ext4: make sure enough credits are reserved for dioread_nolock writes
Ilya Dryomov <idryomov(a)gmail.com>
rbd: don't return 0 on unmap if RBD_DEV_FLAG_REMOVING is set
Ivan Mironov <mironov.ivan(a)gmail.com>
drm/fb-helper: Partially bring back workaround for bugs of SDL 1.2
Yi Zeng <yizeng(a)asrmicro.com>
i2c: dev: prevent adapter retries and timeout being set as minus value
Hans de Goede <hdegoede(a)redhat.com>
ACPI / PMIC: xpower: Fix TS-pin current-source handling
Hans de Goede <hdegoede(a)redhat.com>
ACPI: power: Skip duplicate power resource references in _PRx
Michal Hocko <mhocko(a)suse.com>
mm, memcg: fix reclaim deadlock with writeback
Jan Stancek <jstancek(a)redhat.com>
mm: page_mapped: don't assume compound page is huge or THP
Christoph Lameter <cl(a)linux.com>
slab: alien caches must not be initialized if the allocation of the alien cache failed
Jack Stocker <jackstocker.93(a)gmail.com>
USB: Add USB_QUIRK_DELAY_CTRL_MSG quirk for Corsair K70 RGB
Icenowy Zheng <icenowy(a)aosc.io>
USB: storage: add quirk for SMI SM3350
Icenowy Zheng <icenowy(a)aosc.io>
USB: storage: don't insert sane sense for SPC3+ when bad sense specified
Daniele Palmas <dnlplm(a)gmail.com>
usb: cdc-acm: send ZLP for Telit 3G Intel based modems
Ross Lagerwall <ross.lagerwall(a)citrix.com>
cifs: Fix potential OOB access of lock element array
Pavel Shilovsky <pshilov(a)microsoft.com>
CIFS: Do not hide EINTR after sending network packets
Pavel Shilovsky <pshilov(a)microsoft.com>
CIFS: Fix adjustment of credits for MTU requests
Kailang Yang <kailang(a)realtek.com>
ALSA: hda/realtek - Disable headset Mic VREF for headset mode of ALC225
Kailang Yang <kailang(a)realtek.com>
ALSA: hda/realtek - Add unplug function into unplug state of Headset Mode for ALC225
Kailang Yang <kailang(a)realtek.com>
ALSA: hda/realtek - Support Dell headset mode for New AIO platform
WANG Chao <chao.wang(a)ucloud.cn>
x86, modpost: Replace last remnants of RETPOLINE with CONFIG_RETPOLINE
Rik van Riel <riel(a)redhat.com>
x86,kvm: move qemu/guest FPU switching out to vcpu_run
-------------
Diffstat:
Makefile | 4 +-
arch/x86/include/asm/kvm_host.h | 13 ++++
arch/x86/kernel/cpu/bugs.c | 2 +-
arch/x86/kvm/x86.c | 34 ++++-----
drivers/acpi/pmic/intel_pmic_xpower.c | 41 ++++++++---
drivers/acpi/power.c | 22 ++++++
drivers/block/rbd.c | 9 ++-
drivers/gpu/drm/drm_fb_helper.c | 126 ++++++++++++++++++++--------------
drivers/i2c/i2c-dev.c | 6 ++
drivers/usb/class/cdc-acm.c | 7 ++
drivers/usb/core/quirks.c | 3 +-
drivers/usb/storage/scsiglue.c | 8 ++-
drivers/usb/storage/unusual_devs.h | 12 ++++
fs/cifs/file.c | 8 +--
fs/cifs/smb2file.c | 4 +-
fs/cifs/smb2pdu.c | 8 ++-
fs/cifs/transport.c | 2 +-
fs/ext4/fsync.c | 16 +++--
fs/ext4/inline.c | 6 +-
fs/ext4/inode.c | 3 +-
fs/ext4/super.c | 2 +-
include/linux/compiler-gcc.h | 2 +-
include/linux/kvm_host.h | 2 +-
include/linux/module.h | 2 +-
include/linux/sunrpc/svc.h | 5 +-
mm/memory.c | 23 +++++++
mm/slab.c | 6 +-
mm/util.c | 2 +-
net/sunrpc/svc.c | 11 +--
net/sunrpc/svc_xprt.c | 5 +-
net/sunrpc/svcsock.c | 2 +-
scripts/mod/modpost.c | 2 +-
sound/pci/hda/patch_realtek.c | 18 ++++-
virt/kvm/arm/arm.c | 23 +++----
34 files changed, 300 insertions(+), 139 deletions(-)
This is the start of the stable review cycle for the 4.9.151 release.
There are 16 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 Thu Jan 17 15:48:25 UTC 2019.
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.9.151-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.9.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.9.151-rc1
Vasily Averin <vvs(a)virtuozzo.com>
sunrpc: use-after-free in svc_process_common()
Theodore Ts'o <tytso(a)mit.edu>
ext4: avoid kernel warning when writing the superblock to a dead device
Theodore Ts'o <tytso(a)mit.edu>
ext4: fix a potential fiemap/page fault deadlock w/ inline_data
Theodore Ts'o <tytso(a)mit.edu>
ext4: make sure enough credits are reserved for dioread_nolock writes
Ilya Dryomov <idryomov(a)gmail.com>
rbd: don't return 0 on unmap if RBD_DEV_FLAG_REMOVING is set
Yi Zeng <yizeng(a)asrmicro.com>
i2c: dev: prevent adapter retries and timeout being set as minus value
Hans de Goede <hdegoede(a)redhat.com>
ACPI: power: Skip duplicate power resource references in _PRx
Jan Stancek <jstancek(a)redhat.com>
mm: page_mapped: don't assume compound page is huge or THP
Christoph Lameter <cl(a)linux.com>
slab: alien caches must not be initialized if the allocation of the alien cache failed
Jack Stocker <jackstocker.93(a)gmail.com>
USB: Add USB_QUIRK_DELAY_CTRL_MSG quirk for Corsair K70 RGB
Icenowy Zheng <icenowy(a)aosc.io>
USB: storage: add quirk for SMI SM3350
Icenowy Zheng <icenowy(a)aosc.io>
USB: storage: don't insert sane sense for SPC3+ when bad sense specified
Daniele Palmas <dnlplm(a)gmail.com>
usb: cdc-acm: send ZLP for Telit 3G Intel based modems
Ross Lagerwall <ross.lagerwall(a)citrix.com>
cifs: Fix potential OOB access of lock element array
Pavel Shilovsky <pshilov(a)microsoft.com>
CIFS: Do not hide EINTR after sending network packets
Kailang Yang <kailang(a)realtek.com>
ALSA: hda/realtek - Disable headset Mic VREF for headset mode of ALC225
-------------
Diffstat:
Makefile | 4 ++--
drivers/acpi/power.c | 22 ++++++++++++++++++++++
drivers/block/rbd.c | 9 ++++-----
drivers/i2c/i2c-dev.c | 6 ++++++
drivers/usb/class/cdc-acm.c | 7 +++++++
drivers/usb/core/quirks.c | 3 ++-
drivers/usb/storage/scsiglue.c | 8 ++++++--
drivers/usb/storage/unusual_devs.h | 12 ++++++++++++
fs/cifs/file.c | 8 ++++----
fs/cifs/smb2file.c | 4 ++--
fs/cifs/transport.c | 2 +-
fs/ext4/inline.c | 6 +++---
fs/ext4/inode.c | 3 ++-
fs/ext4/super.c | 2 +-
include/linux/sunrpc/svc.h | 5 ++++-
mm/slab.c | 6 ++++--
mm/util.c | 2 +-
net/sunrpc/svc.c | 9 ++++++---
net/sunrpc/svc_xprt.c | 5 +++--
net/sunrpc/svcsock.c | 2 +-
sound/pci/hda/patch_realtek.c | 16 +++++++++++++++-
21 files changed, 108 insertions(+), 33 deletions(-)