On Mon, Nov 01, 2021 at 02:43:31PM +0000, mike chant wrote:
> Hi,
> The table of LTS releases on this page shows an EOL date of October 2023
> for 5.15. Judging by the other EOL dates, shouldn't this be 2027?
LTS releases are generally supported for 2 years UNLESS someone steps up and
offers to help support it for longer.
With further questions, please email stable(a)vger.kernel.org.
Regards,
-K
This is the start of the stable review cycle for the 5.4.157 release.
There are 51 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 Wed, 03 Nov 2021 08:24:20 +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.157-rc…
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.157-rc1
Song Liu <songliubraving(a)fb.com>
perf script: Check session->header.env.arch before using it
Halil Pasic <pasic(a)linux.ibm.com>
KVM: s390: preserve deliverable_mask in __airqs_kick_single_vcpu
Halil Pasic <pasic(a)linux.ibm.com>
KVM: s390: clear kicked_mask before sleeping again
Janusz Dziedzic <janusz.dziedzic(a)gmail.com>
cfg80211: correct bridge/4addr mode check
Julian Wiedmann <jwi(a)linux.ibm.com>
net: use netif_is_bridge_port() to check for IFF_BRIDGE_PORT
Xin Long <lucien.xin(a)gmail.com>
sctp: add vtag check in sctp_sf_ootb
Xin Long <lucien.xin(a)gmail.com>
sctp: add vtag check in sctp_sf_do_8_5_1_E_sa
Xin Long <lucien.xin(a)gmail.com>
sctp: add vtag check in sctp_sf_violation
Xin Long <lucien.xin(a)gmail.com>
sctp: fix the processing for COOKIE_ECHO chunk
Xin Long <lucien.xin(a)gmail.com>
sctp: fix the processing for INIT_ACK chunk
Xin Long <lucien.xin(a)gmail.com>
sctp: use init_tag from inithdr for ABORT chunk
Andrew Lunn <andrew(a)lunn.ch>
phy: phy_start_aneg: Add an unlocked version
Andrew Lunn <andrew(a)lunn.ch>
phy: phy_ethtool_ksettings_get: Lock the phy for consistency
Daniel Jordan <daniel.m.jordan(a)oracle.com>
net/tls: Fix flipped sign in async_wait.err assignment
Trevor Woerner <twoerner(a)gmail.com>
net: nxp: lpc_eth.c: avoid hang when bringing interface down
Yuiko Oshino <yuiko.oshino(a)microchip.com>
net: ethernet: microchip: lan743x: Fix dma allocation failure by using dma_set_mask_and_coherent
Yuiko Oshino <yuiko.oshino(a)microchip.com>
net: ethernet: microchip: lan743x: Fix driver crash when lan743x_pm_resume fails
Guenter Roeck <linux(a)roeck-us.net>
nios2: Make NIOS2_DTB_SOURCE_BOOL depend on !COMPILE_TEST
Mark Zhang <markzhang(a)nvidia.com>
RDMA/sa_query: Use strscpy_pad instead of memcpy to copy a string
Michael Chan <michael.chan(a)broadcom.com>
net: Prevent infinite while loop in skb_tx_hash()
Pavel Skripkin <paskripkin(a)gmail.com>
net: batman-adv: fix error handling
Yang Yingliang <yangyingliang(a)huawei.com>
regmap: Fix possible double-free in regcache_rbtree_exit()
Clément Bœsch <u(a)pkh.me>
arm64: dts: allwinner: h5: NanoPI Neo 2: Fix ethernet node
Patrisious Haddad <phaddad(a)nvidia.com>
RDMA/mlx5: Set user priority for DCT
Varun Prakash <varun(a)chelsio.com>
nvme-tcp: fix data digest pointer calculation
Varun Prakash <varun(a)chelsio.com>
nvmet-tcp: fix data digest pointer calculation
Mike Marciniszyn <mike.marciniszyn(a)cornelisnetworks.com>
IB/hfi1: Fix abba locking issue with sc_disable()
Mike Marciniszyn <mike.marciniszyn(a)cornelisnetworks.com>
IB/qib: Protect from buffer overflow in struct qib_user_sdma_pkt fields
Liu Jian <liujian56(a)huawei.com>
tcp_bpf: Fix one concurrency problem in the tcp_bpf_send_verdict function
Christian König <christian.koenig(a)amd.com>
drm/ttm: fix memleak in ttm_transfered_destroy
Johan Hovold <johan(a)kernel.org>
net: lan78xx: fix division by zero in send path
Johannes Berg <johannes.berg(a)intel.com>
cfg80211: scan: fix RCU in cfg80211_add_nontrans_list()
Haibo Chen <haibo.chen(a)nxp.com>
mmc: sdhci-esdhc-imx: clear the buffer_read_ready to reset standard tuning circuit
Shawn Guo <shawn.guo(a)linaro.org>
mmc: sdhci: Map more voltage level to SDHCI_POWER_330
Jaehoon Chung <jh80.chung(a)samsung.com>
mmc: dw_mmc: exynos: fix the finding clock sample value
Wenbin Mei <wenbin.mei(a)mediatek.com>
mmc: cqhci: clear HALT state after CQE enable
Johan Hovold <johan(a)kernel.org>
mmc: vub300: fix control-message timeouts
Daniel Jordan <daniel.m.jordan(a)oracle.com>
net/tls: Fix flipped sign in tls_err_abort() calls
Pavel Skripkin <paskripkin(a)gmail.com>
Revert "net: mdiobus: Fix memory leak in __mdiobus_register"
Krzysztof Kozlowski <krzysztof.kozlowski(a)canonical.com>
nfc: port100: fix using -ERRNO as command type mask
Zheyu Ma <zheyuma97(a)gmail.com>
ata: sata_mv: Fix the error handling of mv_chip_id()
Rafał Miłecki <rafal(a)milecki.pl>
Revert "pinctrl: bcm: ns: support updated DT binding as syscon subnode"
Wang Hai <wanghai38(a)huawei.com>
usbnet: fix error return code in usbnet_probe()
Oliver Neukum <oneukum(a)suse.com>
usbnet: sanity check for maxpacket
Eric Dumazet <edumazet(a)google.com>
ipv4: use siphash instead of Jenkins in fnhe_hashfun()
Eric Dumazet <edumazet(a)google.com>
ipv6: use siphash in rt6_exception_hash()
Naveen N. Rao <naveen.n.rao(a)linux.vnet.ibm.com>
powerpc/bpf: Fix BPF_MOD when imm == 1
Arnd Bergmann <arnd(a)arndb.de>
ARM: 9141/1: only warn about XIP address when not compile testing
Arnd Bergmann <arnd(a)arndb.de>
ARM: 9139/1: kprobes: fix arch_init_kprobes() prototype
Arnd Bergmann <arnd(a)arndb.de>
ARM: 9134/1: remove duplicate memcpy() definition
Nick Desaulniers <ndesaulniers(a)google.com>
ARM: 9133/1: mm: proc-macros: ensure *_tlb_fns are 4B aligned
-------------
Diffstat:
Makefile | 4 +-
arch/arm/boot/compressed/decompress.c | 3 +
arch/arm/kernel/vmlinux-xip.lds.S | 2 +-
arch/arm/mm/proc-macros.S | 1 +
arch/arm/probes/kprobes/core.c | 2 +-
.../boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts | 2 +-
arch/nios2/platform/Kconfig.platform | 1 +
arch/powerpc/net/bpf_jit_comp64.c | 10 +++-
arch/s390/kvm/interrupt.c | 5 +-
arch/s390/kvm/kvm-s390.c | 1 +
drivers/ata/sata_mv.c | 4 +-
drivers/base/regmap/regcache-rbtree.c | 7 +--
drivers/gpu/drm/ttm/ttm_bo_util.c | 1 +
drivers/infiniband/core/sa_query.c | 5 +-
drivers/infiniband/hw/hfi1/pio.c | 9 ++-
drivers/infiniband/hw/mlx5/qp.c | 2 +
drivers/infiniband/hw/qib/qib_user_sdma.c | 33 +++++++----
drivers/mmc/host/cqhci.c | 3 +
drivers/mmc/host/dw_mmc-exynos.c | 14 +++++
drivers/mmc/host/sdhci-esdhc-imx.c | 16 ++++++
drivers/mmc/host/sdhci.c | 6 ++
drivers/mmc/host/vub300.c | 18 +++---
drivers/net/bonding/bond_main.c | 2 +-
drivers/net/ethernet/micrel/ksz884x.c | 2 +-
drivers/net/ethernet/microchip/lan743x_main.c | 22 +++++++
drivers/net/ethernet/nxp/lpc_eth.c | 5 +-
drivers/net/phy/mdio_bus.c | 1 -
drivers/net/phy/phy.c | 32 +++++++++--
drivers/net/usb/lan78xx.c | 6 ++
drivers/net/usb/usbnet.c | 5 ++
drivers/nfc/port100.c | 4 +-
drivers/nvme/host/tcp.c | 2 +-
drivers/nvme/target/tcp.c | 2 +-
drivers/pinctrl/bcm/pinctrl-ns.c | 29 ++++------
include/net/tls.h | 9 +--
net/batman-adv/bridge_loop_avoidance.c | 8 ++-
net/batman-adv/main.c | 56 ++++++++++++------
net/batman-adv/network-coding.c | 4 +-
net/batman-adv/translation-table.c | 4 +-
net/core/dev.c | 6 ++
net/core/rtnetlink.c | 12 ++--
net/ipv4/route.c | 12 ++--
net/ipv4/tcp_bpf.c | 12 ++++
net/ipv6/route.c | 20 +++++--
net/sctp/sm_statefuns.c | 67 +++++++++++++---------
net/tls/tls_sw.c | 19 ++++--
net/wireless/nl80211.c | 2 +-
net/wireless/scan.c | 7 ++-
net/wireless/util.c | 14 ++---
tools/perf/builtin-script.c | 12 ++--
50 files changed, 359 insertions(+), 166 deletions(-)
This is the start of the stable review cycle for the 4.19.215 release.
There are 35 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 Wed, 03 Nov 2021 08:24:20 +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.215-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.215-rc1
Xin Long <lucien.xin(a)gmail.com>
sctp: add vtag check in sctp_sf_ootb
Xin Long <lucien.xin(a)gmail.com>
sctp: add vtag check in sctp_sf_do_8_5_1_E_sa
Xin Long <lucien.xin(a)gmail.com>
sctp: add vtag check in sctp_sf_violation
Xin Long <lucien.xin(a)gmail.com>
sctp: fix the processing for COOKIE_ECHO chunk
Xin Long <lucien.xin(a)gmail.com>
sctp: use init_tag from inithdr for ABORT chunk
Trevor Woerner <twoerner(a)gmail.com>
net: nxp: lpc_eth.c: avoid hang when bringing interface down
Yuiko Oshino <yuiko.oshino(a)microchip.com>
net: ethernet: microchip: lan743x: Fix dma allocation failure by using dma_set_mask_and_coherent
Yuiko Oshino <yuiko.oshino(a)microchip.com>
net: ethernet: microchip: lan743x: Fix driver crash when lan743x_pm_resume fails
Guenter Roeck <linux(a)roeck-us.net>
nios2: Make NIOS2_DTB_SOURCE_BOOL depend on !COMPILE_TEST
Michael Chan <michael.chan(a)broadcom.com>
net: Prevent infinite while loop in skb_tx_hash()
Pavel Skripkin <paskripkin(a)gmail.com>
net: batman-adv: fix error handling
Yang Yingliang <yangyingliang(a)huawei.com>
regmap: Fix possible double-free in regcache_rbtree_exit()
Clément Bœsch <u(a)pkh.me>
arm64: dts: allwinner: h5: NanoPI Neo 2: Fix ethernet node
Patrisious Haddad <phaddad(a)nvidia.com>
RDMA/mlx5: Set user priority for DCT
Johan Hovold <johan(a)kernel.org>
net: lan78xx: fix division by zero in send path
Haibo Chen <haibo.chen(a)nxp.com>
mmc: sdhci-esdhc-imx: clear the buffer_read_ready to reset standard tuning circuit
Shawn Guo <shawn.guo(a)linaro.org>
mmc: sdhci: Map more voltage level to SDHCI_POWER_330
Jaehoon Chung <jh80.chung(a)samsung.com>
mmc: dw_mmc: exynos: fix the finding clock sample value
Wenbin Mei <wenbin.mei(a)mediatek.com>
mmc: cqhci: clear HALT state after CQE enable
Johan Hovold <johan(a)kernel.org>
mmc: vub300: fix control-message timeouts
Eric Dumazet <edumazet(a)google.com>
ipv6: make exception cache less predictible
Eric Dumazet <edumazet(a)google.com>
ipv6: use siphash in rt6_exception_hash()
Eric Dumazet <edumazet(a)google.com>
ipv4: use siphash instead of Jenkins in fnhe_hashfun()
Pavel Skripkin <paskripkin(a)gmail.com>
Revert "net: mdiobus: Fix memory leak in __mdiobus_register"
Krzysztof Kozlowski <krzysztof.kozlowski(a)canonical.com>
nfc: port100: fix using -ERRNO as command type mask
Zheyu Ma <zheyuma97(a)gmail.com>
ata: sata_mv: Fix the error handling of mv_chip_id()
Wang Hai <wanghai38(a)huawei.com>
usbnet: fix error return code in usbnet_probe()
Oliver Neukum <oneukum(a)suse.com>
usbnet: sanity check for maxpacket
Nathan Chancellor <natechancellor(a)gmail.com>
ARM: 8819/1: Remove '-p' from LDFLAGS
Robin Murphy <robin.murphy(a)arm.com>
arm64: Avoid premature usercopy failure
Naveen N. Rao <naveen.n.rao(a)linux.vnet.ibm.com>
powerpc/bpf: Fix BPF_MOD when imm == 1
Arnd Bergmann <arnd(a)arndb.de>
ARM: 9141/1: only warn about XIP address when not compile testing
Arnd Bergmann <arnd(a)arndb.de>
ARM: 9139/1: kprobes: fix arch_init_kprobes() prototype
Arnd Bergmann <arnd(a)arndb.de>
ARM: 9134/1: remove duplicate memcpy() definition
Nick Desaulniers <ndesaulniers(a)google.com>
ARM: 9133/1: mm: proc-macros: ensure *_tlb_fns are 4B aligned
-------------
Diffstat:
Makefile | 4 +-
arch/arm/Makefile | 2 +-
arch/arm/boot/bootp/Makefile | 2 +-
arch/arm/boot/compressed/Makefile | 2 -
arch/arm/boot/compressed/decompress.c | 3 ++
arch/arm/kernel/vmlinux-xip.lds.S | 2 +-
arch/arm/mm/proc-macros.S | 1 +
arch/arm/probes/kprobes/core.c | 2 +-
.../boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts | 2 +-
arch/arm64/lib/copy_from_user.S | 13 +++--
arch/arm64/lib/copy_in_user.S | 20 +++++---
arch/arm64/lib/copy_to_user.S | 14 ++++--
arch/nios2/platform/Kconfig.platform | 1 +
arch/powerpc/net/bpf_jit_comp64.c | 10 +++-
drivers/ata/sata_mv.c | 4 +-
drivers/base/regmap/regcache-rbtree.c | 7 ++-
drivers/infiniband/hw/mlx5/qp.c | 2 +
drivers/mmc/host/cqhci.c | 3 ++
drivers/mmc/host/dw_mmc-exynos.c | 14 ++++++
drivers/mmc/host/sdhci-esdhc-imx.c | 16 +++++++
drivers/mmc/host/sdhci.c | 6 +++
drivers/mmc/host/vub300.c | 18 +++----
drivers/net/ethernet/microchip/lan743x_main.c | 22 +++++++++
drivers/net/ethernet/nxp/lpc_eth.c | 5 +-
drivers/net/phy/mdio_bus.c | 1 -
drivers/net/usb/lan78xx.c | 6 +++
drivers/net/usb/usbnet.c | 5 ++
drivers/nfc/port100.c | 4 +-
net/batman-adv/bridge_loop_avoidance.c | 8 +++-
net/batman-adv/main.c | 56 +++++++++++++++-------
net/batman-adv/network-coding.c | 4 +-
net/batman-adv/translation-table.c | 4 +-
net/core/dev.c | 6 +++
net/ipv4/route.c | 12 ++---
net/ipv6/route.c | 25 +++++++---
net/sctp/sm_statefuns.c | 30 ++++++++----
36 files changed, 249 insertions(+), 87 deletions(-)
This is the start of the stable review cycle for the 4.14.254 release.
There are 25 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 Wed, 03 Nov 2021 08:24:20 +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.254-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.254-rc1
Xin Long <lucien.xin(a)gmail.com>
sctp: add vtag check in sctp_sf_ootb
Xin Long <lucien.xin(a)gmail.com>
sctp: add vtag check in sctp_sf_do_8_5_1_E_sa
Xin Long <lucien.xin(a)gmail.com>
sctp: add vtag check in sctp_sf_violation
Xin Long <lucien.xin(a)gmail.com>
sctp: fix the processing for COOKIE_ECHO chunk
Xin Long <lucien.xin(a)gmail.com>
sctp: use init_tag from inithdr for ABORT chunk
Trevor Woerner <twoerner(a)gmail.com>
net: nxp: lpc_eth.c: avoid hang when bringing interface down
Guenter Roeck <linux(a)roeck-us.net>
nios2: Make NIOS2_DTB_SOURCE_BOOL depend on !COMPILE_TEST
Pavel Skripkin <paskripkin(a)gmail.com>
net: batman-adv: fix error handling
Yang Yingliang <yangyingliang(a)huawei.com>
regmap: Fix possible double-free in regcache_rbtree_exit()
Johan Hovold <johan(a)kernel.org>
net: lan78xx: fix division by zero in send path
Haibo Chen <haibo.chen(a)nxp.com>
mmc: sdhci-esdhc-imx: clear the buffer_read_ready to reset standard tuning circuit
Shawn Guo <shawn.guo(a)linaro.org>
mmc: sdhci: Map more voltage level to SDHCI_POWER_330
Jaehoon Chung <jh80.chung(a)samsung.com>
mmc: dw_mmc: exynos: fix the finding clock sample value
Johan Hovold <johan(a)kernel.org>
mmc: vub300: fix control-message timeouts
Eric Dumazet <edumazet(a)google.com>
ipv4: use siphash instead of Jenkins in fnhe_hashfun()
Pavel Skripkin <paskripkin(a)gmail.com>
Revert "net: mdiobus: Fix memory leak in __mdiobus_register"
Krzysztof Kozlowski <krzysztof.kozlowski(a)canonical.com>
nfc: port100: fix using -ERRNO as command type mask
Zheyu Ma <zheyuma97(a)gmail.com>
ata: sata_mv: Fix the error handling of mv_chip_id()
Wang Hai <wanghai38(a)huawei.com>
usbnet: fix error return code in usbnet_probe()
Oliver Neukum <oneukum(a)suse.com>
usbnet: sanity check for maxpacket
Nathan Chancellor <natechancellor(a)gmail.com>
ARM: 8819/1: Remove '-p' from LDFLAGS
Naveen N. Rao <naveen.n.rao(a)linux.vnet.ibm.com>
powerpc/bpf: Fix BPF_MOD when imm == 1
Arnd Bergmann <arnd(a)arndb.de>
ARM: 9139/1: kprobes: fix arch_init_kprobes() prototype
Arnd Bergmann <arnd(a)arndb.de>
ARM: 9134/1: remove duplicate memcpy() definition
Nick Desaulniers <ndesaulniers(a)google.com>
ARM: 9133/1: mm: proc-macros: ensure *_tlb_fns are 4B aligned
-------------
Diffstat:
Makefile | 4 +--
arch/arm/Makefile | 2 +-
arch/arm/boot/bootp/Makefile | 2 +-
arch/arm/boot/compressed/Makefile | 2 --
arch/arm/boot/compressed/decompress.c | 3 ++
arch/arm/mm/proc-macros.S | 1 +
arch/arm/probes/kprobes/core.c | 2 +-
arch/nios2/platform/Kconfig.platform | 1 +
arch/powerpc/net/bpf_jit_comp64.c | 10 ++++--
drivers/ata/sata_mv.c | 4 +--
drivers/base/regmap/regcache-rbtree.c | 7 ++---
drivers/mmc/host/dw_mmc-exynos.c | 14 +++++++++
drivers/mmc/host/sdhci-esdhc-imx.c | 16 ++++++++++
drivers/mmc/host/sdhci.c | 6 ++++
drivers/mmc/host/vub300.c | 18 +++++------
drivers/net/ethernet/nxp/lpc_eth.c | 5 ++-
drivers/net/phy/mdio_bus.c | 1 -
drivers/net/usb/lan78xx.c | 6 ++++
drivers/net/usb/usbnet.c | 5 +++
drivers/nfc/port100.c | 4 +--
net/batman-adv/bridge_loop_avoidance.c | 8 +++--
net/batman-adv/main.c | 56 ++++++++++++++++++++++++----------
net/batman-adv/network-coding.c | 4 ++-
net/batman-adv/translation-table.c | 4 ++-
net/ipv4/route.c | 12 ++++----
net/sctp/sm_statefuns.c | 30 ++++++++++++------
26 files changed, 161 insertions(+), 66 deletions(-)
Turns out some xHC controllers require all 64 bits in the CRCR register
to be written to execute a command abort.
The lower 32 bits containing the command abort bit is written first.
In case the command ring stops before we write the upper 32 bits then
hardware may use these upper bits to set the commnd ring dequeue pointer.
Solve this by making sure the upper 32 bits contain a valid command
ring dequeue pointer.
The original patch that only wrote the first 32 to stop the ring went
to stable, so this fix should go there as well.
Fixes: ff0e50d3564f ("xhci: Fix command ring pointer corruption while aborting a command")
Cc: stable(a)vger.kernel.org
Signed-off-by: Mathias Nyman <mathias.nyman(a)linux.intel.com>
---
drivers/usb/host/xhci-ring.c | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 311597bba80e..eaa49aef2935 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -366,7 +366,9 @@ static void xhci_handle_stopped_cmd_ring(struct xhci_hcd *xhci,
/* Must be called with xhci->lock held, releases and aquires lock back */
static int xhci_abort_cmd_ring(struct xhci_hcd *xhci, unsigned long flags)
{
- u32 temp_32;
+ struct xhci_segment *new_seg = xhci->cmd_ring->deq_seg;
+ union xhci_trb *new_deq = xhci->cmd_ring->dequeue;
+ u64 crcr;
int ret;
xhci_dbg(xhci, "Abort command ring\n");
@@ -375,13 +377,18 @@ static int xhci_abort_cmd_ring(struct xhci_hcd *xhci, unsigned long flags)
/*
* The control bits like command stop, abort are located in lower
- * dword of the command ring control register. Limit the write
- * to the lower dword to avoid corrupting the command ring pointer
- * in case if the command ring is stopped by the time upper dword
- * is written.
+ * dword of the command ring control register.
+ * Some controllers require all 64 bits to be written to abort the ring.
+ * Make sure the upper dword is valid, pointing to the next command,
+ * avoiding corrupting the command ring pointer in case the command ring
+ * is stopped by the time the upper dword is written.
*/
- temp_32 = readl(&xhci->op_regs->cmd_ring);
- writel(temp_32 | CMD_RING_ABORT, &xhci->op_regs->cmd_ring);
+ next_trb(xhci, NULL, &new_seg, &new_deq);
+ if (trb_is_link(new_deq))
+ next_trb(xhci, NULL, &new_seg, &new_deq);
+
+ crcr = xhci_trb_virt_to_dma(new_seg, new_deq);
+ xhci_write_64(xhci, crcr | CMD_RING_ABORT, &xhci->op_regs->cmd_ring);
/* Section 4.6.1.2 of xHCI 1.0 spec says software should also time the
* completion of the Command Abort operation. If CRR is not negated in 5
--
2.25.1
From: Ville Syrjälä <ville.syrjala(a)linux.intel.com>
Looks like our VBIOS/GOP generally fail to turn the DP dual mode adater
TMDS output buffers back on after a reboot. This leads to a black screen
after reboot if we turned the TMDS output buffers off prior to reboot.
And if i915 decides to do a fastboot the black screen will persist even
after i915 takes over.
Apparently this has been a problem ever since commit b2ccb822d376 ("drm/i915:
Enable/disable TMDS output buffers in DP++ adaptor as needed") if one
rebooted while the display was turned off. And things became worse with
commit fe0f1e3bfdfe ("drm/i915: Shut down displays gracefully on reboot")
since now we always turn the display off before a reboot.
This was reported on a RKL, but I confirmed the same behaviour on my
SNB as well. So looks pretty universal.
Let's fix this by explicitly turning the TMDS output buffers back on
in the encoder->shutdown() hook. Note that this gets called after irqs
have been disabled, so the i2c communication with the DP dual mode
adapter has to be performed via polling (which the gmbus code is
perfectly happy to do for us).
We also need a bit of care in handling DDI encoders which may or may
not be set up for HDMI output. Specifically ddc_pin will not be
populated for a DP only DDI encoder, in which case we don't want to
call intel_gmbus_get_adapter(). We can handle that by simply doing
the dual mode adapter type check before calling
intel_gmbus_get_adapter().
Cc: stable(a)vger.kernel.org
Fixes: b2ccb822d376 ("drm/i915: Enable/disable TMDS output buffers in DP++ adaptor as needed")
Fixes: fe0f1e3bfdfe ("drm/i915: Shut down displays gracefully on reboot")
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/4371
Signed-off-by: Ville Syrjälä <ville.syrjala(a)linux.intel.com>
---
drivers/gpu/drm/i915/display/g4x_hdmi.c | 1 +
drivers/gpu/drm/i915/display/intel_ddi.c | 1 +
drivers/gpu/drm/i915/display/intel_hdmi.c | 16 ++++++++++++++--
drivers/gpu/drm/i915/display/intel_hdmi.h | 1 +
4 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/g4x_hdmi.c b/drivers/gpu/drm/i915/display/g4x_hdmi.c
index 88c427f3c346..f5b4dd5b4275 100644
--- a/drivers/gpu/drm/i915/display/g4x_hdmi.c
+++ b/drivers/gpu/drm/i915/display/g4x_hdmi.c
@@ -584,6 +584,7 @@ void g4x_hdmi_init(struct drm_i915_private *dev_priv,
else
intel_encoder->enable = g4x_enable_hdmi;
}
+ intel_encoder->shutdown = intel_hdmi_encoder_shutdown;
intel_encoder->type = INTEL_OUTPUT_HDMI;
intel_encoder->power_domain = intel_port_to_power_domain(port);
diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
index 9fb99b09fff8..5ef2882727e1 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -4312,6 +4312,7 @@ static void intel_ddi_encoder_shutdown(struct intel_encoder *encoder)
enum phy phy = intel_port_to_phy(i915, encoder->port);
intel_dp_encoder_shutdown(encoder);
+ intel_hdmi_encoder_shutdown(encoder);
if (!intel_phy_is_tc(i915, phy))
return;
diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
index 7e6af959bf83..3b5b9e7b05b7 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
@@ -1246,12 +1246,13 @@ static void hsw_set_infoframes(struct intel_encoder *encoder,
void intel_dp_dual_mode_set_tmds_output(struct intel_hdmi *hdmi, bool enable)
{
struct drm_i915_private *dev_priv = intel_hdmi_to_i915(hdmi);
- struct i2c_adapter *adapter =
- intel_gmbus_get_adapter(dev_priv, hdmi->ddc_bus);
+ struct i2c_adapter *adapter;
if (hdmi->dp_dual_mode.type < DRM_DP_DUAL_MODE_TYPE2_DVI)
return;
+ adapter = intel_gmbus_get_adapter(dev_priv, hdmi->ddc_bus);
+
drm_dbg_kms(&dev_priv->drm, "%s DP dual mode adaptor TMDS output\n",
enable ? "Enabling" : "Disabling");
@@ -2285,6 +2286,17 @@ int intel_hdmi_compute_config(struct intel_encoder *encoder,
return 0;
}
+void intel_hdmi_encoder_shutdown(struct intel_encoder *encoder)
+{
+ struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder);
+
+ /*
+ * Give a hand to buggy BIOSen which forget to turn
+ * the TMDS output buffers back on after a reboot.
+ */
+ intel_dp_dual_mode_set_tmds_output(intel_hdmi, true);
+}
+
static void
intel_hdmi_unset_edid(struct drm_connector *connector)
{
diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.h b/drivers/gpu/drm/i915/display/intel_hdmi.h
index b43a180d007e..2bf440eb400a 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.h
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.h
@@ -28,6 +28,7 @@ void intel_hdmi_init_connector(struct intel_digital_port *dig_port,
int intel_hdmi_compute_config(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config,
struct drm_connector_state *conn_state);
+void intel_hdmi_encoder_shutdown(struct intel_encoder *encoder);
bool intel_hdmi_handle_sink_scrambling(struct intel_encoder *encoder,
struct drm_connector *connector,
bool high_tmds_clock_ratio,
--
2.32.0
When running as PVH or HVM guest with actual memory < max memory the
hypervisor is using "populate on demand" in order to allow the guest
to balloon down from its maximum memory size. For this to work
correctly the guest must not touch more memory pages than its target
memory size as otherwise the PoD cache will be exhausted and the guest
is crashed as a result of that.
In extreme cases ballooning down might not be finished today before
the init process is started, which can consume lots of memory.
In order to avoid random boot crashes in such cases, add a late init
call to wait for ballooning down having finished for PVH/HVM guests.
Warn on console if initial ballooning fails, panic() after stalling
for more than 3 minutes per default. Add a module parameter for
changing this timeout.
Cc: <stable(a)vger.kernel.org>
Reported-by: Marek Marczykowski-Górecki <marmarek(a)invisiblethingslab.com>
Signed-off-by: Juergen Gross <jgross(a)suse.com>
---
V2:
- add warning and panic() when stalling (Marek Marczykowski-Górecki)
- don't wait if credit > 0
V3:
- issue warning only after ballooning failed (Marek Marczykowski-Górecki)
- make panic() timeout configurable via parameter
---
.../stable/sysfs-devices-system-xen_memory | 10 +++
drivers/xen/balloon.c | 63 +++++++++++++++----
drivers/xen/xen-balloon.c | 2 +
include/xen/balloon.h | 1 +
4 files changed, 63 insertions(+), 13 deletions(-)
diff --git a/Documentation/ABI/stable/sysfs-devices-system-xen_memory b/Documentation/ABI/stable/sysfs-devices-system-xen_memory
index 6d83f95a8a8e..2da062e2c94a 100644
--- a/Documentation/ABI/stable/sysfs-devices-system-xen_memory
+++ b/Documentation/ABI/stable/sysfs-devices-system-xen_memory
@@ -84,3 +84,13 @@ Description:
Control scrubbing pages before returning them to Xen for others domains
use. Can be set with xen_scrub_pages cmdline
parameter. Default value controlled with CONFIG_XEN_SCRUB_PAGES_DEFAULT.
+
+What: /sys/devices/system/xen_memory/xen_memory0/boot_timeout
+Date: November 2021
+KernelVersion: 5.16
+Contact: xen-devel(a)lists.xenproject.org
+Description:
+ The time (in seconds) to wait before giving up to boot in case
+ initial ballooning fails to free enough memory. Applies only
+ when running as HVM or PVH guest and started with less memory
+ configured than allowed at max.
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
index 3a50f097ed3e..98fae43d4cec 100644
--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -125,12 +125,12 @@ static struct ctl_table xen_root[] = {
* BP_ECANCELED: error, balloon operation canceled.
*/
-enum bp_state {
+static enum bp_state {
BP_DONE,
BP_WAIT,
BP_EAGAIN,
BP_ECANCELED
-};
+} balloon_state = BP_DONE;
/* Main waiting point for xen-balloon thread. */
static DECLARE_WAIT_QUEUE_HEAD(balloon_thread_wq);
@@ -494,9 +494,9 @@ static enum bp_state decrease_reservation(unsigned long nr_pages, gfp_t gfp)
* Stop waiting if either state is BP_DONE and ballooning action is
* needed, or if the credit has changed while state is not BP_DONE.
*/
-static bool balloon_thread_cond(enum bp_state state, long credit)
+static bool balloon_thread_cond(long credit)
{
- if (state == BP_DONE)
+ if (balloon_state == BP_DONE)
credit = 0;
return current_credit() != credit || kthread_should_stop();
@@ -510,13 +510,12 @@ static bool balloon_thread_cond(enum bp_state state, long credit)
*/
static int balloon_thread(void *unused)
{
- enum bp_state state = BP_DONE;
long credit;
unsigned long timeout;
set_freezable();
for (;;) {
- switch (state) {
+ switch (balloon_state) {
case BP_DONE:
case BP_ECANCELED:
timeout = 3600 * HZ;
@@ -532,7 +531,7 @@ static int balloon_thread(void *unused)
credit = current_credit();
wait_event_freezable_timeout(balloon_thread_wq,
- balloon_thread_cond(state, credit), timeout);
+ balloon_thread_cond(credit), timeout);
if (kthread_should_stop())
return 0;
@@ -543,22 +542,23 @@ static int balloon_thread(void *unused)
if (credit > 0) {
if (balloon_is_inflated())
- state = increase_reservation(credit);
+ balloon_state = increase_reservation(credit);
else
- state = reserve_additional_memory();
+ balloon_state = reserve_additional_memory();
}
if (credit < 0) {
long n_pages;
n_pages = min(-credit, si_mem_available());
- state = decrease_reservation(n_pages, GFP_BALLOON);
- if (state == BP_DONE && n_pages != -credit &&
+ balloon_state = decrease_reservation(n_pages,
+ GFP_BALLOON);
+ if (balloon_state == BP_DONE && n_pages != -credit &&
n_pages < totalreserve_pages)
- state = BP_EAGAIN;
+ balloon_state = BP_EAGAIN;
}
- state = update_schedule(state);
+ balloon_state = update_schedule(balloon_state);
mutex_unlock(&balloon_mutex);
@@ -731,6 +731,7 @@ static int __init balloon_init(void)
balloon_stats.max_schedule_delay = 32;
balloon_stats.retry_count = 1;
balloon_stats.max_retry_count = 4;
+ balloon_stats.boot_timeout = 180;
#ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG
set_online_page_callback(&xen_online_page);
@@ -765,3 +766,39 @@ static int __init balloon_init(void)
return 0;
}
subsys_initcall(balloon_init);
+
+static int __init balloon_wait_finish(void)
+{
+ long credit, last_credit = 0;
+ unsigned long last_changed;
+
+ if (!xen_domain())
+ return -ENODEV;
+
+ /* PV guests don't need to wait. */
+ if (xen_pv_domain() || !current_credit())
+ return 0;
+
+ pr_info("Waiting for initial ballooning down having finished.\n");
+
+ while ((credit = current_credit()) < 0) {
+ if (credit != last_credit) {
+ last_changed = jiffies;
+ last_credit = credit;
+ }
+ if (balloon_state == BP_ECANCELED) {
+ pr_warn_once("Initial ballooning failed, %ld pages need to be freed.\n",
+ -credit);
+ if (jiffies - last_changed >=
+ HZ * balloon_stats.boot_timeout)
+ panic("Initial ballooning failed!\n");
+ }
+
+ schedule_timeout_interruptible(HZ / 10);
+ }
+
+ pr_info("Initial ballooning down finished.\n");
+
+ return 0;
+}
+late_initcall_sync(balloon_wait_finish);
diff --git a/drivers/xen/xen-balloon.c b/drivers/xen/xen-balloon.c
index 8cd583db20b1..6e5db50ede0f 100644
--- a/drivers/xen/xen-balloon.c
+++ b/drivers/xen/xen-balloon.c
@@ -150,6 +150,7 @@ static DEVICE_ULONG_ATTR(schedule_delay, 0444, balloon_stats.schedule_delay);
static DEVICE_ULONG_ATTR(max_schedule_delay, 0644, balloon_stats.max_schedule_delay);
static DEVICE_ULONG_ATTR(retry_count, 0444, balloon_stats.retry_count);
static DEVICE_ULONG_ATTR(max_retry_count, 0644, balloon_stats.max_retry_count);
+static DEVICE_ULONG_ATTR(boot_timeout, 0644, balloon_stats.boot_timeout);
static DEVICE_BOOL_ATTR(scrub_pages, 0644, xen_scrub_pages);
static ssize_t target_kb_show(struct device *dev, struct device_attribute *attr,
@@ -211,6 +212,7 @@ static struct attribute *balloon_attrs[] = {
&dev_attr_max_schedule_delay.attr.attr,
&dev_attr_retry_count.attr.attr,
&dev_attr_max_retry_count.attr.attr,
+ &dev_attr_boot_timeout.attr.attr,
&dev_attr_scrub_pages.attr.attr,
NULL
};
diff --git a/include/xen/balloon.h b/include/xen/balloon.h
index 6dbdb0b3fd03..95a4187f263b 100644
--- a/include/xen/balloon.h
+++ b/include/xen/balloon.h
@@ -20,6 +20,7 @@ struct balloon_stats {
unsigned long max_schedule_delay;
unsigned long retry_count;
unsigned long max_retry_count;
+ unsigned long boot_timeout;
};
extern struct balloon_stats balloon_stats;
--
2.26.2