The most trivial example of a race condition can be demonstrated by this
sequence where mm_list contains just one entry:
CPU A CPU B
-> sgx_release()
-> sgx_mmu_notifier_release()
-> list_del_rcu()
<- list_del_rcu()
-> kref_put()
-> sgx_encl_release()
-> synchronize_srcu()
-> cleanup_srcu_struct()
A sequence similar to this has also been spotted in tests under high
stress:
[ +0.000008] WARNING: CPU: 3 PID: 7620 at kernel/rcu/srcutree.c:374 cleanup_srcu_struct+0xed/0x100
Albeit not spotted in the tests, it's also entirely possible that the
following scenario could happen:
CPU A CPU B
-> sgx_release()
-> sgx_mmu_notifier_release()
-> list_del_rcu()
-> kref_put()
-> sgx_encl_release()
-> cleanup_srcu_struct()
<- cleanup_srcu_struct()
-> synchronize_srcu()
This scenario would lead into use-after free in cleaup_srcu_struct().
Fix this by taking a reference to the enclave in
sgx_mmu_notifier_release().
Cc: stable(a)vger.kernel.org
Fixes: 1728ab54b4be ("x86/sgx: Add a page reclaimer")
Suggested-by: Sean Christopherson <seanjc(a)google.com>
Reported-by: Haitao Huang <haitao.huang(a)linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko(a)kernel.org>
---
v5:
- To make sure that the instance does not get deleted use kref_get()
kref_put(). This also removes the need for additional
synchronize_srcu().
v4:
- Rewrite the commit message.
- Just change the call order. *_expedited() is out of scope for this
bug fix.
v3: Fine-tuned tags, and added missing change log for v2.
v2: Switch to synchronize_srcu_expedited().
arch/x86/kernel/cpu/sgx/encl.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/kernel/cpu/sgx/encl.c b/arch/x86/kernel/cpu/sgx/encl.c
index ee50a5010277..5ecbcf94ec2a 100644
--- a/arch/x86/kernel/cpu/sgx/encl.c
+++ b/arch/x86/kernel/cpu/sgx/encl.c
@@ -465,6 +465,7 @@ static void sgx_mmu_notifier_release(struct mmu_notifier *mn,
spin_lock(&encl_mm->encl->mm_lock);
list_for_each_entry(tmp, &encl_mm->encl->mm_list, list) {
if (tmp == encl_mm) {
+ kref_get(&encl_mm->encl->refcount);
list_del_rcu(&encl_mm->list);
break;
}
@@ -474,6 +475,7 @@ static void sgx_mmu_notifier_release(struct mmu_notifier *mn,
if (tmp == encl_mm) {
synchronize_srcu(&encl_mm->encl->srcu);
mmu_notifier_put(mn);
+ kref_put(&encl_mm->encl->refcount, sgx_encl_release);
}
}
--
2.30.0
Reporting a port as connected if nothing is attached to them leads to
any i2c transactions on this port trying to use an uninitialized i2c
adapter, fix this.
Let's account for this case even if branch devices have no good reason
to report a port as unplugged with their peer device type set to 'none'.
Fixes: db1a07956968 ("drm/dp_mst: Handle SST-only branch device case")
References: https://gitlab.freedesktop.org/drm/intel/-/issues/2987
References: https://gitlab.freedesktop.org/drm/intel/-/issues/1963
Cc: Wayne Lin <Wayne.Lin(a)amd.com>
Cc: Lyude Paul <lyude(a)redhat.com>
Cc: <stable(a)vger.kernel.org> # v5.5+
Cc: intel-gfx(a)lists.freedesktop.org
Signed-off-by: Imre Deak <imre.deak(a)intel.com>
---
drivers/gpu/drm/drm_dp_mst_topology.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
index e82b596d646c..deb7995f42fa 100644
--- a/drivers/gpu/drm/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/drm_dp_mst_topology.c
@@ -4224,6 +4224,7 @@ drm_dp_mst_detect_port(struct drm_connector *connector,
switch (port->pdt) {
case DP_PEER_DEVICE_NONE:
+ break;
case DP_PEER_DEVICE_MST_BRANCHING:
if (!port->mcs)
ret = connector_status_connected;
--
2.25.1
This is the start of the stable review cycle for the 4.19.173 release.
There are 37 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, 04 Feb 2021 13:29:33 +0000.
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.173-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.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.173-rc1
Pengcheng Yang <yangpc(a)wangsu.com>
tcp: fix TLP timer not set when CA_STATE changes from DISORDER to OPEN
Ivan Vecera <ivecera(a)redhat.com>
team: protect features update by RCU to avoid deadlock
Pan Bian <bianpan2016(a)163.com>
NFC: fix possible resource leak
Pan Bian <bianpan2016(a)163.com>
NFC: fix resource leak when target index is invalid
Takeshi Misawa <jeliantsurux(a)gmail.com>
rxrpc: Fix memory leak in rxrpc_lookup_local
Bartosz Golaszewski <bgolaszewski(a)baylibre.com>
iommu/vt-d: Don't dereference iommu_device if IOMMU_API is not built
David Woodhouse <dwmw(a)amazon.co.uk>
iommu/vt-d: Gracefully handle DMAR units with no supported address widths
Dan Carpenter <dan.carpenter(a)oracle.com>
can: dev: prevent potential information leak in can_fill_info()
Roi Dayan <roid(a)nvidia.com>
net/mlx5: Fix memory leak on flow table creation error flow
Johannes Berg <johannes.berg(a)intel.com>
mac80211: pause TX while changing interface type
Johannes Berg <johannes.berg(a)intel.com>
iwlwifi: pcie: reschedule in long-running memory reads
Johannes Berg <johannes.berg(a)intel.com>
iwlwifi: pcie: use jiffies for memory read spin time limit
Trond Myklebust <trond.myklebust(a)hammerspace.com>
pNFS/NFSv4: Fix a layout segment leak in pnfs_layout_process()
Kamal Heib <kamalheib1(a)gmail.com>
RDMA/cxgb4: Fix the reported max_recv_sge value
Eyal Birger <eyal.birger(a)gmail.com>
xfrm: fix disable_xfrm sysctl when used on xfrm interfaces
Shmulik Ladkani <shmulik(a)metanetworks.com>
xfrm: Fix oops in xfrm_replay_advance_bmp
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nft_dynset: add timeout extension to template
Max Krummenacher <max.oss.09(a)gmail.com>
ARM: imx: build suspend-imx6.S with arm instruction set
Roger Pau Monne <roger.pau(a)citrix.com>
xen-blkfront: allow discard-* nodes to be optional
Lorenzo Bianconi <lorenzo(a)kernel.org>
mt7601u: fix rx buffer refcounting
Lorenzo Bianconi <lorenzo(a)kernel.org>
mt7601u: fix kernel crash unplugging the device
Andrea Righi <andrea.righi(a)canonical.com>
leds: trigger: fix potential deadlock with libata
David Woodhouse <dwmw(a)amazon.co.uk>
xen: Fix XenStore initialisation for XS_LOCAL
Jay Zhou <jianjay.zhou(a)huawei.com>
KVM: x86: get smi pending status correctly
Like Xu <like.xu(a)linux.intel.com>
KVM: x86/pmu: Fix HW_REF_CPU_CYCLES event pseudo-encoding in intel_arch_events[]
Claudiu Beznea <claudiu.beznea(a)microchip.com>
drivers: soc: atmel: add null entry at the end of at91_soc_allowed_list[]
Sudeep Holla <sudeep.holla(a)arm.com>
drivers: soc: atmel: Avoid calling at91_soc_init on non AT91 SoCs
Laurent Badel <laurentbadel(a)eaton.com>
PM: hibernate: flush swap writer after marking
Giacinto Cifelli <gciofono(a)gmail.com>
net: usb: qmi_wwan: added support for Thales Cinterion PLSx3 modem family
Johannes Berg <johannes.berg(a)intel.com>
wext: fix NULL-ptr-dereference with cfg80211's lack of commit()
Koen Vandeputte <koen.vandeputte(a)citymesh.com>
ARM: dts: imx6qdl-gw52xx: fix duplicate regulator naming
Sean Young <sean(a)mess.org>
media: rc: ensure that uevent can be read directly after rc device register
Takashi Iwai <tiwai(a)suse.de>
ALSA: hda/via: Apply the workaround generically for Clevo machines
Roger Pau Monne <roger.pau(a)citrix.com>
xen/privcmd: allow fetching resource sizes
Baoquan He <bhe(a)redhat.com>
kernel: kexec: remove the lock operation of system_transition_mutex
Kai-Heng Feng <kai.heng.feng(a)canonical.com>
ACPI: sysfs: Prefer "compatible" modalias
Josef Bacik <josef(a)toxicpanda.com>
nbd: freeze the queue while we're adding connections
-------------
Diffstat:
Makefile | 4 +-
arch/arm/boot/dts/imx6qdl-gw52xx.dtsi | 2 +-
arch/arm/mach-imx/suspend-imx6.S | 1 +
arch/x86/kvm/pmu_intel.c | 2 +-
arch/x86/kvm/x86.c | 5 +++
drivers/acpi/device_sysfs.c | 20 +++-------
drivers/block/nbd.c | 8 ++++
drivers/block/xen-blkfront.c | 20 ++++------
drivers/infiniband/hw/cxgb4/qp.c | 2 +-
drivers/iommu/dmar.c | 45 ++++++++++++++++-------
drivers/leds/led-triggers.c | 10 +++--
drivers/media/rc/rc-main.c | 4 +-
drivers/net/can/dev.c | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 1 +
drivers/net/team/team.c | 6 +--
drivers/net/usb/qmi_wwan.c | 1 +
drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 14 ++++---
drivers/net/wireless/mediatek/mt7601u/dma.c | 5 +--
drivers/soc/atmel/soc.c | 13 +++++++
drivers/xen/privcmd.c | 25 ++++++++++---
drivers/xen/xenbus/xenbus_probe.c | 31 ++++++++++++++++
fs/nfs/pnfs.c | 1 +
include/linux/intel-iommu.h | 2 +
include/net/tcp.h | 2 +-
kernel/kexec_core.c | 2 -
kernel/power/swap.c | 2 +-
net/ipv4/tcp_input.c | 10 +++--
net/ipv4/tcp_recovery.c | 5 ++-
net/mac80211/ieee80211_i.h | 1 +
net/mac80211/iface.c | 6 +++
net/netfilter/nft_dynset.c | 4 +-
net/nfc/netlink.c | 1 +
net/nfc/rawsock.c | 2 +-
net/rxrpc/call_accept.c | 1 +
net/wireless/wext-core.c | 5 ++-
net/xfrm/xfrm_input.c | 2 +-
net/xfrm/xfrm_policy.c | 4 +-
sound/pci/hda/patch_via.c | 2 +-
38 files changed, 184 insertions(+), 89 deletions(-)
This is the start of the stable review cycle for the 5.4.95 release.
There are 61 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, 04 Feb 2021 13:29:33 +0000.
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/v5.x/stable-review/patch-5.4.95-rc1…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 5.4.95-rc1
Pengcheng Yang <yangpc(a)wangsu.com>
tcp: fix TLP timer not set when CA_STATE changes from DISORDER to OPEN
Ivan Vecera <ivecera(a)redhat.com>
team: protect features update by RCU to avoid deadlock
Dan Carpenter <dan.carpenter(a)oracle.com>
ASoC: topology: Fix memory corruption in soc_tplg_denum_create_values()
Pan Bian <bianpan2016(a)163.com>
NFC: fix possible resource leak
Pan Bian <bianpan2016(a)163.com>
NFC: fix resource leak when target index is invalid
Takeshi Misawa <jeliantsurux(a)gmail.com>
rxrpc: Fix memory leak in rxrpc_lookup_local
Bartosz Golaszewski <bgolaszewski(a)baylibre.com>
iommu/vt-d: Don't dereference iommu_device if IOMMU_API is not built
David Woodhouse <dwmw(a)amazon.co.uk>
iommu/vt-d: Gracefully handle DMAR units with no supported address widths
Danielle Ratson <danieller(a)nvidia.com>
selftests: forwarding: Specify interface when invoking mausezahn
Daniel Wagner <dwagner(a)suse.de>
nvme-multipath: Early exit if no path is available
Dan Carpenter <dan.carpenter(a)oracle.com>
can: dev: prevent potential information leak in can_fill_info()
Maor Dickman <maord(a)nvidia.com>
net/mlx5e: Reduce tc unsupported key print level
Parav Pandit <parav(a)nvidia.com>
net/mlx5e: E-switch, Fix rate calculation for overflow
Roi Dayan <roid(a)nvidia.com>
net/mlx5: Fix memory leak on flow table creation error flow
Corinna Vinschen <vinschen(a)redhat.com>
igc: fix link speed advertising
Stefan Assmann <sassmann(a)kpanic.de>
i40e: acquire VSI pointer only after VF is initialized
Johannes Berg <johannes.berg(a)intel.com>
mac80211: pause TX while changing interface type
Johannes Berg <johannes.berg(a)intel.com>
iwlwifi: pcie: reschedule in long-running memory reads
Johannes Berg <johannes.berg(a)intel.com>
iwlwifi: pcie: use jiffies for memory read spin time limit
Trond Myklebust <trond.myklebust(a)hammerspace.com>
pNFS/NFSv4: Fix a layout segment leak in pnfs_layout_process()
Ricardo Ribalda <ribalda(a)chromium.org>
ASoC: Intel: Skylake: skl-topology: Fix OOPs ib skl_tplg_complete
Kamal Heib <kamalheib1(a)gmail.com>
RDMA/cxgb4: Fix the reported max_recv_sge value
Randy Dunlap <rdunlap(a)infradead.org>
firmware: imx: select SOC_BUS to fix firmware build
Marco Felsch <m.felsch(a)pengutronix.de>
ARM: dts: imx6qdl-kontron-samx6i: fix i2c_lcd/cam default status
Michael Walle <michael(a)walle.cc>
arm64: dts: ls1028a: fix the offset of the reset register
Visa Hankala <visa(a)hankala.org>
xfrm: Fix wraparound in xfrm_policy_addr_delta()
Po-Hsu Lin <po-hsu.lin(a)canonical.com>
selftests: xfrm: fix test return value override issue in xfrm_policy.sh
Eyal Birger <eyal.birger(a)gmail.com>
xfrm: fix disable_xfrm sysctl when used on xfrm interfaces
Shmulik Ladkani <shmulik(a)metanetworks.com>
xfrm: Fix oops in xfrm_replay_advance_bmp
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nft_dynset: add timeout extension to template
Max Krummenacher <max.oss.09(a)gmail.com>
ARM: imx: build suspend-imx6.S with arm instruction set
Roger Pau Monne <roger.pau(a)citrix.com>
xen-blkfront: allow discard-* nodes to be optional
Rouven Czerwinski <r.czerwinski(a)pengutronix.de>
tee: optee: replace might_sleep with cond_resched
Umesh Nerlige Ramappa <umesh.nerlige.ramappa(a)intel.com>
drm/i915: Check for all subplatform bits
Karol Herbst <kherbst(a)redhat.com>
drm/nouveau/svm: fail NOUVEAU_SVM_INIT ioctl on unsupported devices
Lorenzo Bianconi <lorenzo(a)kernel.org>
mt7601u: fix rx buffer refcounting
Lorenzo Bianconi <lorenzo(a)kernel.org>
mt7601u: fix kernel crash unplugging the device
Bharat Gooty <bharat.gooty(a)broadcom.com>
arm64: dts: broadcom: Fix USB DMA address translation for Stingray
Andrea Righi <andrea.righi(a)canonical.com>
leds: trigger: fix potential deadlock with libata
David Woodhouse <dwmw(a)amazon.co.uk>
xen: Fix XenStore initialisation for XS_LOCAL
Marc Zyngier <maz(a)kernel.org>
KVM: Forbid the use of tagged userspace addresses for memslots
Jay Zhou <jianjay.zhou(a)huawei.com>
KVM: x86: get smi pending status correctly
Maxim Levitsky <mlevitsk(a)redhat.com>
KVM: nVMX: Sync unsync'd vmcs02 state to vmcs12 on migration
Like Xu <like.xu(a)linux.intel.com>
KVM: x86/pmu: Fix UBSAN shift-out-of-bounds warning in intel_pmu_refresh()
Like Xu <like.xu(a)linux.intel.com>
KVM: x86/pmu: Fix HW_REF_CPU_CYCLES event pseudo-encoding in intel_arch_events[]
Josef Bacik <josef(a)toxicpanda.com>
btrfs: fix possible free space tree corruption with online conversion
Claudiu Beznea <claudiu.beznea(a)microchip.com>
drivers: soc: atmel: add null entry at the end of at91_soc_allowed_list[]
Sudeep Holla <sudeep.holla(a)arm.com>
drivers: soc: atmel: Avoid calling at91_soc_init on non AT91 SoCs
Laurent Badel <laurentbadel(a)eaton.com>
PM: hibernate: flush swap writer after marking
Tony Krowiak <akrowiak(a)linux.ibm.com>
s390/vfio-ap: No need to disable IRQ after queue reset
Giacinto Cifelli <gciofono(a)gmail.com>
net: usb: qmi_wwan: added support for Thales Cinterion PLSx3 modem family
Johannes Berg <johannes.berg(a)intel.com>
wext: fix NULL-ptr-dereference with cfg80211's lack of commit()
Koen Vandeputte <koen.vandeputte(a)citymesh.com>
ARM: dts: imx6qdl-gw52xx: fix duplicate regulator naming
Sean Young <sean(a)mess.org>
media: rc: ensure that uevent can be read directly after rc device register
Takashi Iwai <tiwai(a)suse.de>
ALSA: hda/via: Apply the workaround generically for Clevo machines
Jian-Hong Pan <jhp(a)endlessos.org>
ALSA: hda/realtek: Enable headset of ASUS B1400CEPE with ALC256
Baoquan He <bhe(a)redhat.com>
kernel: kexec: remove the lock operation of system_transition_mutex
Kai-Heng Feng <kai.heng.feng(a)canonical.com>
ACPI: sysfs: Prefer "compatible" modalias
Josef Bacik <josef(a)toxicpanda.com>
nbd: freeze the queue while we're adding connections
Hangbin Liu <liuhangbin(a)gmail.com>
IPv6: reply ICMP error if the first fragment don't include all headers
Hangbin Liu <liuhangbin(a)gmail.com>
ICMPv6: Add ICMPv6 Parameter Problem, code 3 definition
-------------
Diffstat:
Documentation/virt/kvm/api.txt | 3 +
Makefile | 4 +-
arch/arm/boot/dts/imx6qdl-gw52xx.dtsi | 2 +-
arch/arm/boot/dts/imx6qdl-kontron-samx6i.dtsi | 4 +-
arch/arm/mach-imx/suspend-imx6.S | 1 +
.../boot/dts/broadcom/stingray/stingray-usb.dtsi | 7 +-
arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 2 +-
arch/x86/kvm/vmx/nested.c | 13 +--
arch/x86/kvm/vmx/pmu_intel.c | 6 +-
arch/x86/kvm/x86.c | 5 ++
drivers/acpi/device_sysfs.c | 20 ++---
drivers/block/nbd.c | 8 ++
drivers/block/xen-blkfront.c | 20 ++---
drivers/firmware/imx/Kconfig | 1 +
drivers/gpu/drm/i915/i915_drv.h | 2 +-
drivers/gpu/drm/nouveau/nouveau_svm.c | 4 +
drivers/infiniband/hw/cxgb4/qp.c | 2 +-
drivers/iommu/dmar.c | 45 +++++++---
drivers/leds/led-triggers.c | 10 ++-
drivers/media/rc/rc-main.c | 4 +-
drivers/net/can/dev.c | 2 +-
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 11 +--
drivers/net/ethernet/intel/igc/igc_ethtool.c | 24 +++--
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 15 ++--
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 1 +
drivers/net/team/team.c | 6 +-
drivers/net/usb/qmi_wwan.c | 1 +
drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 14 +--
drivers/net/wireless/mediatek/mt7601u/dma.c | 5 +-
drivers/nvme/host/multipath.c | 2 +-
drivers/s390/crypto/vfio_ap_drv.c | 6 +-
drivers/s390/crypto/vfio_ap_ops.c | 100 +++++++++++++--------
drivers/s390/crypto/vfio_ap_private.h | 12 +--
drivers/soc/atmel/soc.c | 13 +++
drivers/tee/optee/call.c | 4 +-
drivers/xen/xenbus/xenbus_probe.c | 31 +++++++
fs/btrfs/block-group.c | 10 ++-
fs/btrfs/ctree.h | 3 +
fs/btrfs/free-space-tree.c | 10 ++-
fs/nfs/pnfs.c | 1 +
include/linux/intel-iommu.h | 2 +
include/net/tcp.h | 2 +-
include/uapi/linux/icmpv6.h | 1 +
kernel/kexec_core.c | 2 -
kernel/power/swap.c | 2 +-
net/ipv4/tcp_input.c | 10 ++-
net/ipv4/tcp_recovery.c | 5 +-
net/ipv6/icmp.c | 8 +-
net/ipv6/reassembly.c | 33 ++++++-
net/mac80211/ieee80211_i.h | 1 +
net/mac80211/iface.c | 6 ++
net/netfilter/nft_dynset.c | 4 +-
net/nfc/netlink.c | 1 +
net/nfc/rawsock.c | 2 +-
net/rxrpc/call_accept.c | 1 +
net/wireless/wext-core.c | 5 +-
net/xfrm/xfrm_input.c | 2 +-
net/xfrm/xfrm_policy.c | 30 ++++---
sound/pci/hda/patch_realtek.c | 1 +
sound/pci/hda/patch_via.c | 2 +-
sound/soc/intel/skylake/skl-topology.c | 13 +--
sound/soc/soc-topology.c | 2 +-
.../selftests/net/forwarding/router_mpath_nh.sh | 2 +-
.../selftests/net/forwarding/router_multipath.sh | 2 +-
tools/testing/selftests/net/xfrm_policy.sh | 45 +++++++++-
virt/kvm/kvm_main.c | 1 +
66 files changed, 435 insertions(+), 184 deletions(-)
This is the start of the stable review cycle for the 4.14.219 release.
There are 30 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, 04 Feb 2021 13:29:33 +0000.
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.219-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.219-rc1
Pengcheng Yang <yangpc(a)wangsu.com>
tcp: fix TLP timer not set when CA_STATE changes from DISORDER to OPEN
Ivan Vecera <ivecera(a)redhat.com>
team: protect features update by RCU to avoid deadlock
Pan Bian <bianpan2016(a)163.com>
NFC: fix possible resource leak
Pan Bian <bianpan2016(a)163.com>
NFC: fix resource leak when target index is invalid
Bartosz Golaszewski <bgolaszewski(a)baylibre.com>
iommu/vt-d: Don't dereference iommu_device if IOMMU_API is not built
David Woodhouse <dwmw(a)amazon.co.uk>
iommu/vt-d: Gracefully handle DMAR units with no supported address widths
Andy Lutomirski <luto(a)kernel.org>
x86/entry/64/compat: Fix "x86/entry/64/compat: Preserve r8-r11 in int $0x80"
Andy Lutomirski <luto(a)kernel.org>
x86/entry/64/compat: Preserve r8-r11 in int $0x80
Dan Carpenter <dan.carpenter(a)oracle.com>
can: dev: prevent potential information leak in can_fill_info()
Johannes Berg <johannes.berg(a)intel.com>
mac80211: pause TX while changing interface type
Johannes Berg <johannes.berg(a)intel.com>
iwlwifi: pcie: reschedule in long-running memory reads
Johannes Berg <johannes.berg(a)intel.com>
iwlwifi: pcie: use jiffies for memory read spin time limit
Kamal Heib <kamalheib1(a)gmail.com>
RDMA/cxgb4: Fix the reported max_recv_sge value
Shmulik Ladkani <shmulik(a)metanetworks.com>
xfrm: Fix oops in xfrm_replay_advance_bmp
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nft_dynset: add timeout extension to template
Max Krummenacher <max.oss.09(a)gmail.com>
ARM: imx: build suspend-imx6.S with arm instruction set
Roger Pau Monne <roger.pau(a)citrix.com>
xen-blkfront: allow discard-* nodes to be optional
Lorenzo Bianconi <lorenzo(a)kernel.org>
mt7601u: fix rx buffer refcounting
Lorenzo Bianconi <lorenzo(a)kernel.org>
mt7601u: fix kernel crash unplugging the device
Andrea Righi <andrea.righi(a)canonical.com>
leds: trigger: fix potential deadlock with libata
David Woodhouse <dwmw(a)amazon.co.uk>
xen: Fix XenStore initialisation for XS_LOCAL
Jay Zhou <jianjay.zhou(a)huawei.com>
KVM: x86: get smi pending status correctly
Like Xu <like.xu(a)linux.intel.com>
KVM: x86/pmu: Fix HW_REF_CPU_CYCLES event pseudo-encoding in intel_arch_events[]
Claudiu Beznea <claudiu.beznea(a)microchip.com>
drivers: soc: atmel: add null entry at the end of at91_soc_allowed_list[]
Sudeep Holla <sudeep.holla(a)arm.com>
drivers: soc: atmel: Avoid calling at91_soc_init on non AT91 SoCs
Giacinto Cifelli <gciofono(a)gmail.com>
net: usb: qmi_wwan: added support for Thales Cinterion PLSx3 modem family
Johannes Berg <johannes.berg(a)intel.com>
wext: fix NULL-ptr-dereference with cfg80211's lack of commit()
Koen Vandeputte <koen.vandeputte(a)citymesh.com>
ARM: dts: imx6qdl-gw52xx: fix duplicate regulator naming
Kai-Heng Feng <kai.heng.feng(a)canonical.com>
ACPI: sysfs: Prefer "compatible" modalias
Josef Bacik <josef(a)toxicpanda.com>
nbd: freeze the queue while we're adding connections
-------------
Diffstat:
Makefile | 4 +--
arch/arm/boot/dts/imx6qdl-gw52xx.dtsi | 2 +-
arch/arm/mach-imx/suspend-imx6.S | 1 +
arch/x86/entry/entry_64_compat.S | 8 ++---
arch/x86/kvm/pmu_intel.c | 2 +-
arch/x86/kvm/x86.c | 5 +++
drivers/acpi/device_sysfs.c | 20 ++++-------
drivers/block/nbd.c | 8 +++++
drivers/block/xen-blkfront.c | 20 ++++-------
drivers/infiniband/hw/cxgb4/qp.c | 2 +-
drivers/iommu/dmar.c | 45 +++++++++++++++++--------
drivers/leds/led-triggers.c | 10 +++---
drivers/net/can/dev.c | 2 +-
drivers/net/team/team.c | 6 ++--
drivers/net/usb/qmi_wwan.c | 1 +
drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 14 ++++----
drivers/net/wireless/mediatek/mt7601u/dma.c | 5 ++-
drivers/soc/atmel/soc.c | 13 +++++++
drivers/xen/xenbus/xenbus_probe.c | 31 +++++++++++++++++
include/linux/intel-iommu.h | 2 ++
include/net/tcp.h | 2 +-
net/ipv4/tcp_input.c | 10 +++---
net/ipv4/tcp_recovery.c | 5 +--
net/mac80211/ieee80211_i.h | 1 +
net/mac80211/iface.c | 6 ++++
net/netfilter/nft_dynset.c | 4 ++-
net/nfc/netlink.c | 1 +
net/nfc/rawsock.c | 2 +-
net/wireless/wext-core.c | 5 +--
net/xfrm/xfrm_input.c | 2 +-
tools/testing/selftests/x86/test_syscall_vdso.c | 35 +++++++++++--------
31 files changed, 181 insertions(+), 93 deletions(-)
This is the start of the stable review cycle for the 4.9.255 release.
There are 32 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, 04 Feb 2021 13:29:33 +0000.
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.255-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.255-rc1
Pan Bian <bianpan2016(a)163.com>
NFC: fix possible resource leak
Pan Bian <bianpan2016(a)163.com>
NFC: fix resource leak when target index is invalid
Bartosz Golaszewski <bgolaszewski(a)baylibre.com>
iommu/vt-d: Don't dereference iommu_device if IOMMU_API is not built
David Woodhouse <dwmw(a)amazon.co.uk>
iommu/vt-d: Gracefully handle DMAR units with no supported address widths
Dan Carpenter <dan.carpenter(a)oracle.com>
can: dev: prevent potential information leak in can_fill_info()
Johannes Berg <johannes.berg(a)intel.com>
mac80211: pause TX while changing interface type
Johannes Berg <johannes.berg(a)intel.com>
iwlwifi: pcie: reschedule in long-running memory reads
Johannes Berg <johannes.berg(a)intel.com>
iwlwifi: pcie: use jiffies for memory read spin time limit
Kamal Heib <kamalheib1(a)gmail.com>
RDMA/cxgb4: Fix the reported max_recv_sge value
Shmulik Ladkani <shmulik(a)metanetworks.com>
xfrm: Fix oops in xfrm_replay_advance_bmp
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nft_dynset: add timeout extension to template
Max Krummenacher <max.oss.09(a)gmail.com>
ARM: imx: build suspend-imx6.S with arm instruction set
Lorenzo Bianconi <lorenzo(a)kernel.org>
mt7601u: fix rx buffer refcounting
Lorenzo Bianconi <lorenzo(a)kernel.org>
mt7601u: fix kernel crash unplugging the device
Andrea Righi <andrea.righi(a)canonical.com>
leds: trigger: fix potential deadlock with libata
Jay Zhou <jianjay.zhou(a)huawei.com>
KVM: x86: get smi pending status correctly
Like Xu <like.xu(a)linux.intel.com>
KVM: x86/pmu: Fix HW_REF_CPU_CYCLES event pseudo-encoding in intel_arch_events[]
Thomas Gleixner <tglx(a)linutronix.de>
futex: Prevent exit livelock
Thomas Gleixner <tglx(a)linutronix.de>
futex: Provide distinct return value when owner is exiting
Thomas Gleixner <tglx(a)linutronix.de>
futex: Add mutex around futex exit
Thomas Gleixner <tglx(a)linutronix.de>
futex: Provide state handling for exec() as well
Thomas Gleixner <tglx(a)linutronix.de>
futex: Sanitize exit state handling
Thomas Gleixner <tglx(a)linutronix.de>
futex: Mark the begin of futex exit explicitly
Thomas Gleixner <tglx(a)linutronix.de>
futex: Set task::futex_state to DEAD right after handling futex exit
Thomas Gleixner <tglx(a)linutronix.de>
futex: Split futex_mm_release() for exit/exec
Thomas Gleixner <tglx(a)linutronix.de>
exit/exec: Seperate mm_release()
Thomas Gleixner <tglx(a)linutronix.de>
futex: Replace PF_EXITPIDONE with a state
Thomas Gleixner <tglx(a)linutronix.de>
futex: Move futex exit handling into futex code
Arnd Bergmann <arnd(a)arndb.de>
y2038: futex: Move compat implementation into futex.c
Giacinto Cifelli <gciofono(a)gmail.com>
net: usb: qmi_wwan: added support for Thales Cinterion PLSx3 modem family
Johannes Berg <johannes.berg(a)intel.com>
wext: fix NULL-ptr-dereference with cfg80211's lack of commit()
Kai-Heng Feng <kai.heng.feng(a)canonical.com>
ACPI: sysfs: Prefer "compatible" modalias
-------------
Diffstat:
Makefile | 4 +-
arch/arm/mach-imx/suspend-imx6.S | 1 +
arch/x86/kvm/pmu_intel.c | 2 +-
arch/x86/kvm/x86.c | 5 +
drivers/acpi/device_sysfs.c | 20 +-
drivers/infiniband/hw/cxgb4/qp.c | 2 +-
drivers/iommu/dmar.c | 41 ++-
drivers/leds/led-triggers.c | 10 +-
drivers/net/can/dev.c | 2 +-
drivers/net/usb/qmi_wwan.c | 1 +
drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 14 +-
drivers/net/wireless/mediatek/mt7601u/dma.c | 5 +-
fs/exec.c | 2 +-
include/linux/compat.h | 2 -
include/linux/futex.h | 44 ++-
include/linux/intel-iommu.h | 2 +
include/linux/sched.h | 9 +-
kernel/Makefile | 3 -
kernel/exit.c | 29 +-
kernel/fork.c | 40 +--
kernel/futex.c | 446 ++++++++++++++++++++++--
kernel/futex_compat.c | 201 -----------
net/mac80211/ieee80211_i.h | 1 +
net/mac80211/iface.c | 6 +
net/netfilter/nft_dynset.c | 4 +-
net/nfc/netlink.c | 1 +
net/nfc/rawsock.c | 2 +-
net/wireless/wext-core.c | 5 +-
net/xfrm/xfrm_input.c | 2 +-
29 files changed, 545 insertions(+), 361 deletions(-)
This is the start of the stable review cycle for the 4.4.255 release.
There are 28 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, 04 Feb 2021 13:29:33 +0000.
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.4.255-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.4.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.4.255-rc1
Pan Bian <bianpan2016(a)163.com>
NFC: fix possible resource leak
Pan Bian <bianpan2016(a)163.com>
NFC: fix resource leak when target index is invalid
Bartosz Golaszewski <bgolaszewski(a)baylibre.com>
iommu/vt-d: Don't dereference iommu_device if IOMMU_API is not built
David Woodhouse <dwmw(a)amazon.co.uk>
iommu/vt-d: Gracefully handle DMAR units with no supported address widths
Dan Carpenter <dan.carpenter(a)oracle.com>
can: dev: prevent potential information leak in can_fill_info()
Johannes Berg <johannes.berg(a)intel.com>
mac80211: pause TX while changing interface type
Kamal Heib <kamalheib1(a)gmail.com>
RDMA/cxgb4: Fix the reported max_recv_sge value
Shmulik Ladkani <shmulik(a)metanetworks.com>
xfrm: Fix oops in xfrm_replay_advance_bmp
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nft_dynset: add timeout extension to template
Max Krummenacher <max.oss.09(a)gmail.com>
ARM: imx: build suspend-imx6.S with arm instruction set
Thomas Gleixner <tglx(a)linutronix.de>
futex: Prevent exit livelock
Thomas Gleixner <tglx(a)linutronix.de>
futex: Provide distinct return value when owner is exiting
Thomas Gleixner <tglx(a)linutronix.de>
futex: Add mutex around futex exit
Thomas Gleixner <tglx(a)linutronix.de>
futex: Provide state handling for exec() as well
Thomas Gleixner <tglx(a)linutronix.de>
futex: Sanitize exit state handling
Thomas Gleixner <tglx(a)linutronix.de>
futex: Mark the begin of futex exit explicitly
Thomas Gleixner <tglx(a)linutronix.de>
futex: Set task::futex_state to DEAD right after handling futex exit
Thomas Gleixner <tglx(a)linutronix.de>
futex: Split futex_mm_release() for exit/exec
Thomas Gleixner <tglx(a)linutronix.de>
exit/exec: Seperate mm_release()
Thomas Gleixner <tglx(a)linutronix.de>
futex: Replace PF_EXITPIDONE with a state
Thomas Gleixner <tglx(a)linutronix.de>
futex: Move futex exit handling into futex code
Arnd Bergmann <arnd(a)arndb.de>
y2038: futex: Move compat implementation into futex.c
Lorenzo Bianconi <lorenzo(a)kernel.org>
mt7601u: fix rx buffer refcounting
Lorenzo Bianconi <lorenzo(a)kernel.org>
mt7601u: fix kernel crash unplugging the device
Like Xu <like.xu(a)linux.intel.com>
KVM: x86/pmu: Fix HW_REF_CPU_CYCLES event pseudo-encoding in intel_arch_events[]
Giacinto Cifelli <gciofono(a)gmail.com>
net: usb: qmi_wwan: added support for Thales Cinterion PLSx3 modem family
Johannes Berg <johannes.berg(a)intel.com>
wext: fix NULL-ptr-dereference with cfg80211's lack of commit()
Kai-Heng Feng <kai.heng.feng(a)canonical.com>
ACPI: sysfs: Prefer "compatible" modalias
-------------
Diffstat:
Makefile | 4 +-
arch/arm/mach-imx/suspend-imx6.S | 1 +
arch/x86/kvm/pmu_intel.c | 2 +-
drivers/acpi/device_sysfs.c | 20 +-
drivers/infiniband/hw/cxgb4/qp.c | 2 +-
drivers/iommu/dmar.c | 43 ++-
drivers/net/can/dev.c | 2 +-
drivers/net/usb/qmi_wwan.c | 1 +
drivers/net/wireless/mediatek/mt7601u/dma.c | 5 +-
fs/exec.c | 2 +-
include/linux/compat.h | 2 -
include/linux/futex.h | 44 ++-
include/linux/intel-iommu.h | 2 +
include/linux/sched.h | 9 +-
kernel/Makefile | 3 -
kernel/exit.c | 25 +-
kernel/fork.c | 40 +--
kernel/futex.c | 446 ++++++++++++++++++++++++++--
kernel/futex_compat.c | 201 -------------
net/mac80211/ieee80211_i.h | 1 +
net/mac80211/iface.c | 6 +
net/netfilter/nft_dynset.c | 4 +-
net/nfc/netlink.c | 1 +
net/nfc/rawsock.c | 2 +-
net/wireless/wext-core.c | 5 +-
net/xfrm/xfrm_input.c | 2 +-
26 files changed, 526 insertions(+), 349 deletions(-)
Architectures that describe the CPU topology in devicetree and that do
not have an identity mapping between physical and logical CPU ids need
to override the default implementation of arch_match_cpu_phys_id().
Failing to do so breaks CPU devicetree-node lookups using
of_get_cpu_node() and of_cpu_device_node_get() which several drivers
rely on. It also causes the CPU struct devices exported through sysfs to
point to the wrong devicetree nodes.
On x86, CPUs are described in devicetree using their APIC ids and those
do not generally coincide with the logical ids, even if CPU0 typically
uses APIC id 0. Add the missing implementation of
arch_match_cpu_phys_id() so that CPU-node lookups work also with SMP.
Apart from fixing the broken sysfs devicetree-node links this likely do
not affect users of mainline kernels as the above mentioned drivers are
currently not used on x86 as far as I know.
Fixes: 4e07db9c8db8 ("x86/devicetree: Use CPU description from Device Tree")
Cc: stable <stable(a)vger.kernel.org> # 4.17
Signed-off-by: Johan Hovold <johan(a)kernel.org>
---
Thomas,
Hope this looks better to you.
My use case for this is still out-of-tree, but since CPU-node lookup is
generic functionality and with observable impact also for mainline users
(sysfs) I added a stable tag.
Johan
Changes in v2
- rewrite commit message
- add Fixes tag
- add stable tag for the benefit of out-of-tree users
arch/x86/kernel/apic/apic.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index b3eef1d5c903..19c0119892dd 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -2311,6 +2311,11 @@ static int cpuid_to_apicid[] = {
[0 ... NR_CPUS - 1] = -1,
};
+bool arch_match_cpu_phys_id(int cpu, u64 phys_id)
+{
+ return phys_id == cpuid_to_apicid[cpu];
+}
+
#ifdef CONFIG_SMP
/**
* apic_id_is_primary_thread - Check whether APIC ID belongs to a primary thread
--
2.26.2
Hi,
you have in Linux 5.10.13-rc1:
"x86/entry: Emit a symbol for register restoring thunk"
While that discussion Boris and Peter recommended to remove unused code via:
"x86/entry: Remove put_ret_addr_in_rdi THUNK macro argument"
( upstream commit 0bab9cb2d980d7c075cffb9216155f7835237f98 )
OK, this has no CC:stable but I have both as a series in my local Git
and both were git-pulled from [1].
What do you think?
Regards,
- Sedat -
[1] https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/log/?h=x86_entr…
[2] https://git.kernel.org/linus/0bab9cb2d980d7c075cffb9216155f7835237f98