I'm announcing the release of the 4.14.273 kernel.
All users of the 4.14 kernel series must upgrade.
The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2
arch/arm/boot/dts/rk3288.dtsi | 2
arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 6 +
arch/mips/kernel/smp.c | 6 -
drivers/atm/eni.c | 2
drivers/atm/firestream.c | 2
drivers/firmware/efi/apple-properties.c | 2
drivers/firmware/efi/efi.c | 2
drivers/input/tablet/aiptek.c | 10 --
drivers/net/can/rcar/rcar_canfd.c | 6 -
drivers/net/ethernet/sfc/mcdi.c | 2
drivers/usb/gadget/function/rndis.c | 1
drivers/usb/gadget/udc/core.c | 3
fs/sysfs/file.c | 3
include/linux/if_arp.h | 1
lib/Kconfig | 1
net/ipv4/tcp.c | 10 +-
net/packet/af_packet.c | 11 ++
net/sctp/sm_statefuns.c | 108 +++++++++++++++-----------
net/wireless/nl80211.c | 3
net/xfrm/xfrm_state.c | 8 +
tools/perf/util/symbol.c | 2
tools/testing/selftests/vm/userfaultfd.c | 1
23 files changed, 118 insertions(+), 76 deletions(-)
Alan Stern (1):
usb: gadget: Fix use-after-free bug by not setting udc->dev.driver
Alexander Lobakin (1):
MIPS: smp: fill in sibling and core maps earlier
Chengming Zhou (1):
kselftest/vm: fix tests build with old libc
Corentin Labbe (1):
ARM: dts: rockchip: fix a typo on rk3288 crypto-controller
Dan Carpenter (1):
usb: gadget: rndis: prevent integer overflow in rndis_set_response()
Eric Dumazet (2):
tcp: make tcp_read_sock() more robust
net/packet: fix slab-out-of-bounds access in packet_recvmsg()
Greg Kroah-Hartman (1):
Linux 4.14.273
Jakob Unterwurzacher (1):
arm64: dts: rockchip: fix rk3399-puma eMMC HS400 signal integrity
Jia-Ju Bai (1):
atm: firestream: check the return value of ioremap() in fs_init()
Jiasheng Jiang (1):
atm: eni: Add check for dma_map_single
Julian Braha (1):
ARM: 9178/1: fix unmet dependency on BITREVERSE for HAVE_ARCH_BITREVERSE
Lad Prabhakar (1):
can: rcar_canfd: rcar_canfd_channel_probe(): register the CAN device when fully ready
Lucas Wei (1):
fs: sysfs_emit: Remove PAGE_SIZE alignment check
Michael Petlan (1):
perf symbols: Fix symbol size calculation condition
Nicolas Dichtel (1):
net: handle ARPHRD_PIMREG in dev_is_mac_header_xmit()
Niels Dossche (1):
sfc: extend the locking on mcdi->seqno
Pavel Skripkin (1):
Input: aiptek - properly check endpoint type
Randy Dunlap (1):
efi: fix return value of __setup handlers
Sreeramya Soratkal (1):
nl80211: Update bss channel on channel switch for P2P_CLIENT
Xin Long (2):
sctp: fix the processing for INIT chunk
sctp: fix the processing for INIT_ACK chunk
Yan Yan (1):
xfrm: Fix xfrm migrate issues when address family changes
I'm announcing the release of the 4.9.308 kernel.
All users of the 4.9 kernel series must upgrade.
The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 +-
arch/arm/boot/dts/rk3288.dtsi | 2 +-
arch/mips/kernel/smp.c | 6 +++---
drivers/atm/eni.c | 2 ++
drivers/atm/firestream.c | 2 ++
drivers/input/tablet/aiptek.c | 10 ++++------
drivers/net/can/rcar/rcar_canfd.c | 6 +++---
drivers/net/ethernet/sfc/mcdi.c | 2 +-
drivers/usb/gadget/function/rndis.c | 1 +
drivers/usb/gadget/udc/core.c | 3 ---
fs/sysfs/file.c | 3 +--
lib/Kconfig | 1 -
net/ipv4/tcp.c | 10 ++++++----
net/packet/af_packet.c | 11 ++++++++++-
net/wireless/nl80211.c | 3 ++-
net/xfrm/xfrm_state.c | 8 +++++---
tools/testing/selftests/vm/userfaultfd.c | 1 +
17 files changed, 43 insertions(+), 30 deletions(-)
Alan Stern (1):
usb: gadget: Fix use-after-free bug by not setting udc->dev.driver
Alexander Lobakin (1):
MIPS: smp: fill in sibling and core maps earlier
Chengming Zhou (1):
kselftest/vm: fix tests build with old libc
Corentin Labbe (1):
ARM: dts: rockchip: fix a typo on rk3288 crypto-controller
Dan Carpenter (1):
usb: gadget: rndis: prevent integer overflow in rndis_set_response()
Eric Dumazet (2):
tcp: make tcp_read_sock() more robust
net/packet: fix slab-out-of-bounds access in packet_recvmsg()
Greg Kroah-Hartman (1):
Linux 4.9.308
Jia-Ju Bai (1):
atm: firestream: check the return value of ioremap() in fs_init()
Jiasheng Jiang (1):
atm: eni: Add check for dma_map_single
Julian Braha (1):
ARM: 9178/1: fix unmet dependency on BITREVERSE for HAVE_ARCH_BITREVERSE
Lad Prabhakar (1):
can: rcar_canfd: rcar_canfd_channel_probe(): register the CAN device when fully ready
Lucas Wei (1):
fs: sysfs_emit: Remove PAGE_SIZE alignment check
Niels Dossche (1):
sfc: extend the locking on mcdi->seqno
Pavel Skripkin (1):
Input: aiptek - properly check endpoint type
Sreeramya Soratkal (1):
nl80211: Update bss channel on channel switch for P2P_CLIENT
Yan Yan (1):
xfrm: Fix xfrm migrate issues when address family changes
Hello My Dear Friend,
I am Dr. Nance Terry Lee, the United Nations Representative Washington
-DC - USA.
I hereby inform you that your UN pending compensation funds the sum of
$4.2million has been approved to be released to you through Diplomatic
Courier Service.
In the light of the above, you are advised to send your full receiving
information as below:
1. Your full name
2. Full receiving address
3. Your mobile number
4. Nearest airport
Upon the receipt of the above information, I will proceed with the
delivery process of your compensation funds to your door step through
our special agent, if you have any questions, don't hesitate to ask
me.
Kindly revert back to this office immediately.
Thanks.
Dr. Nance Terry Lee.
United Nations Representative
Washington-DC USA.
Tel: +1-703-9877 5463
Fax: +1-703-9268 5422
This is the start of the stable review cycle for the 5.10.108 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 Wed, 23 Mar 2022 13:32:09 +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.10.108-r…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.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.10.108-rc1
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Revert "selftests/bpf: Add test for bpf_timer overwriting crash"
Steffen Klassert <steffen.klassert(a)secunet.com>
esp: Fix possible buffer overflow in ESP transformation
Fabio Estevam <festevam(a)denx.de>
smsc95xx: Ignore -ENODEV errors when device is unplugged
Markus Reichl <m.reichl(a)fivetechno.de>
net: usb: Correct reset handling of smsc95xx
Martyn Welch <martyn.welch(a)collabora.com>
net: usb: Correct PHY handling of smsc95xx
Michael Petlan <mpetlan(a)redhat.com>
perf symbols: Fix symbol size calculation condition
Pavel Skripkin <paskripkin(a)gmail.com>
Input: aiptek - properly check endpoint type
Matt Lupfer <mlupfer(a)ddn.com>
scsi: mpt3sas: Page fault in reply q processing
Alan Stern <stern(a)rowland.harvard.edu>
usb: usbtmc: Fix bug in pipe direction for control transfers
Alan Stern <stern(a)rowland.harvard.edu>
usb: gadget: Fix use-after-free bug by not setting udc->dev.driver
Dan Carpenter <dan.carpenter(a)oracle.com>
usb: gadget: rndis: prevent integer overflow in rndis_set_response()
Arnd Bergmann <arnd(a)arndb.de>
arm64: fix clang warning about TRAMP_VALIAS
Vladimir Oltean <vladimir.oltean(a)nxp.com>
net: mscc: ocelot: fix backwards compatibility with single-chain tc-flower offload
Doug Berger <opendmb(a)gmail.com>
net: bcmgenet: skip invalid partial checksums
Manish Chopra <manishc(a)marvell.com>
bnx2x: fix built-in kernel driver load failure
Juerg Haefliger <juerg.haefliger(a)canonical.com>
net: phy: mscc: Add MODULE_FIRMWARE macros
Miaoqian Lin <linmq006(a)gmail.com>
net: dsa: Add missing of_node_put() in dsa_port_parse_of
Nicolas Dichtel <nicolas.dichtel(a)6wind.com>
net: handle ARPHRD_PIMREG in dev_is_mac_header_xmit()
Marek Vasut <marex(a)denx.de>
drm/panel: simple: Fix Innolux G070Y2-L01 BPP settings
Christoph Niedermaier <cniedermaier(a)dh-electronics.com>
drm/imx: parallel-display: Remove bus flags check in imx_pd_bridge_atomic_check()
Jiasheng Jiang <jiasheng(a)iscas.ac.cn>
hv_netvsc: Add check for kvmalloc_array
Jiasheng Jiang <jiasheng(a)iscas.ac.cn>
atm: eni: Add check for dma_map_single
Eric Dumazet <edumazet(a)google.com>
net/packet: fix slab-out-of-bounds access in packet_recvmsg()
Kurt Cancemi <kurt(a)x64architecture.com>
net: phy: marvell: Fix invalid comparison in the resume and suspend functions
Sabrina Dubroca <sd(a)queasysnail.net>
esp6: fix check on ipv6_skip_exthdr's return value
Jiyong Park <jiyong(a)google.com>
vsock: each transport cycles only on its own sockets
Randy Dunlap <rdunlap(a)infradead.org>
efi: fix return value of __setup handlers
Guo Ziliang <guo.ziliang(a)zte.com.cn>
mm: swap: get rid of livelock in swapin readahead
Joseph Qi <joseph.qi(a)linux.alibaba.com>
ocfs2: fix crash when initialize filecheck kobj fails
Brian Masney <bmasney(a)redhat.com>
crypto: qcom-rng - ensure buffer for generate is completely filled
-------------
Diffstat:
Makefile | 4 +-
arch/arm64/include/asm/vectors.h | 4 +-
drivers/atm/eni.c | 2 +
drivers/crypto/qcom-rng.c | 17 +++--
drivers/firmware/efi/apple-properties.c | 2 +-
drivers/firmware/efi/efi.c | 2 +-
drivers/gpu/drm/imx/parallel-display.c | 8 --
drivers/gpu/drm/panel/panel-simple.c | 2 +-
drivers/input/tablet/aiptek.c | 10 +--
drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 2 -
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 28 ++++---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 15 +---
drivers/net/ethernet/broadcom/genet/bcmgenet.c | 6 +-
drivers/net/ethernet/mscc/ocelot_flower.c | 16 +++-
drivers/net/hyperv/netvsc_drv.c | 3 +
drivers/net/phy/marvell.c | 8 +-
drivers/net/phy/mscc/mscc_main.c | 3 +
drivers/net/usb/smsc95xx.c | 86 ++++++++++++----------
drivers/scsi/mpt3sas/mpt3sas_base.c | 5 +-
drivers/usb/class/usbtmc.c | 13 +++-
drivers/usb/gadget/function/rndis.c | 1 +
drivers/usb/gadget/udc/core.c | 3 -
drivers/vhost/vsock.c | 3 +-
fs/ocfs2/super.c | 22 +++---
include/linux/if_arp.h | 1 +
include/net/af_vsock.h | 3 +-
include/net/esp.h | 2 +
include/net/sock.h | 1 +
mm/swap_state.c | 2 +-
net/dsa/dsa2.c | 1 +
net/ipv4/esp4.c | 5 ++
net/ipv6/esp6.c | 8 +-
net/packet/af_packet.c | 11 ++-
net/vmw_vsock/af_vsock.c | 9 ++-
net/vmw_vsock/virtio_transport.c | 7 +-
net/vmw_vsock/vmci_transport.c | 5 +-
tools/perf/util/symbol.c | 2 +-
.../testing/selftests/bpf/prog_tests/timer_crash.c | 32 --------
tools/testing/selftests/bpf/progs/timer_crash.c | 54 --------------
39 files changed, 192 insertions(+), 216 deletions(-)
Confirmamos a recepção do seu contacto ao semanário Linhas de Elvas.
Aqui estão os dados que introduziu:
Nome: ❤️ Susanna want to meet you! Click here: http://inx.lv/h5mA?1mljz ❤️
Apelido: 8m05rto4
Telefone: 813845311393
Email: stable(a)vger.kernel.org
Mensagem: p9okl6ck
--
Este email foi enviado automaticamente por um formulário de contacto em Linhas de Elvas
https://linhasdeelvas.pt/contactos/
This is the start of the stable review cycle for the 4.19.236 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 Wed, 23 Mar 2022 13:32:09 +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.236-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.236-rc1
Michael Petlan <mpetlan(a)redhat.com>
perf symbols: Fix symbol size calculation condition
Pavel Skripkin <paskripkin(a)gmail.com>
Input: aiptek - properly check endpoint type
Alan Stern <stern(a)rowland.harvard.edu>
usb: gadget: Fix use-after-free bug by not setting udc->dev.driver
Dan Carpenter <dan.carpenter(a)oracle.com>
usb: gadget: rndis: prevent integer overflow in rndis_set_response()
Miaoqian Lin <linmq006(a)gmail.com>
net: dsa: Add missing of_node_put() in dsa_port_parse_of
Nicolas Dichtel <nicolas.dichtel(a)6wind.com>
net: handle ARPHRD_PIMREG in dev_is_mac_header_xmit()
Marek Vasut <marex(a)denx.de>
drm/panel: simple: Fix Innolux G070Y2-L01 BPP settings
Jiasheng Jiang <jiasheng(a)iscas.ac.cn>
hv_netvsc: Add check for kvmalloc_array
Jiasheng Jiang <jiasheng(a)iscas.ac.cn>
atm: eni: Add check for dma_map_single
Eric Dumazet <edumazet(a)google.com>
net/packet: fix slab-out-of-bounds access in packet_recvmsg()
Randy Dunlap <rdunlap(a)infradead.org>
efi: fix return value of __setup handlers
Joseph Qi <joseph.qi(a)linux.alibaba.com>
ocfs2: fix crash when initialize filecheck kobj fails
Brian Masney <bmasney(a)redhat.com>
crypto: qcom-rng - ensure buffer for generate is completely filled
James Morse <james.morse(a)arm.com>
arm64: Use the clearbhb instruction in mitigations
Joey Gouly <joey.gouly(a)arm.com>
arm64: add ID_AA64ISAR2_EL1 sys register
James Morse <james.morse(a)arm.com>
KVM: arm64: Allow SMCCC_ARCH_WORKAROUND_3 to be discovered and migrated
James Morse <james.morse(a)arm.com>
arm64: Mitigate spectre style branch history side channels
James Morse <james.morse(a)arm.com>
KVM: arm64: Add templates for BHB mitigation sequences
James Morse <james.morse(a)arm.com>
arm64: proton-pack: Report Spectre-BHB vulnerabilities as part of Spectre-v2
James Morse <james.morse(a)arm.com>
arm64: Add percpu vectors for EL1
James Morse <james.morse(a)arm.com>
arm64: entry: Add macro for reading symbol addresses from the trampoline
James Morse <james.morse(a)arm.com>
arm64: entry: Add vectors that have the bhb mitigation sequences
James Morse <james.morse(a)arm.com>
arm64: entry: Add non-kpti __bp_harden_el1_vectors for mitigations
James Morse <james.morse(a)arm.com>
arm64: entry: Allow the trampoline text to occupy multiple pages
James Morse <james.morse(a)arm.com>
arm64: entry: Make the kpti trampoline's kpti sequence optional
James Morse <james.morse(a)arm.com>
arm64: entry: Move trampoline macros out of ifdef'd section
James Morse <james.morse(a)arm.com>
arm64: entry: Don't assume tramp_vectors is the start of the vectors
James Morse <james.morse(a)arm.com>
arm64: entry: Allow tramp_alias to access symbols after the 4K boundary
James Morse <james.morse(a)arm.com>
arm64: entry: Move the trampoline data page before the text page
James Morse <james.morse(a)arm.com>
arm64: entry: Free up another register on kpti's tramp_exit path
James Morse <james.morse(a)arm.com>
arm64: entry: Make the trampoline cleanup optional
James Morse <james.morse(a)arm.com>
arm64: entry.S: Add ventry overflow sanity checks
Anshuman Khandual <anshuman.khandual(a)arm.com>
arm64: Add Cortex-X2 CPU part definition
Suzuki K Poulose <suzuki.poulose(a)arm.com>
arm64: Add Neoverse-N2, Cortex-A710 CPU part definition
Rob Herring <robh(a)kernel.org>
arm64: Add part number for Arm Cortex-A77
Lucas Wei <lucaswei(a)google.com>
fs: sysfs_emit: Remove PAGE_SIZE alignment check
liqiong <liqiong(a)nfschina.com>
mm: fix dereference a null pointer in migrate[_huge]_page_move_mapping()
Zhang Qiao <zhangqiao22(a)huawei.com>
cpuset: Fix unsafe lock order between cpuset lock and cpuslock
Valentin Schneider <valentin.schneider(a)arm.com>
ia64: ensure proper NUMA distance and possible map initialization
Dietmar Eggemann <dietmar.eggemann(a)arm.com>
sched/topology: Fix sched_domain_topology_level alloc in sched_init_numa()
Valentin Schneider <valentin.schneider(a)arm.com>
sched/topology: Make sched_init_numa() use a set for the deduplicating sort
Chengming Zhou <zhouchengming(a)bytedance.com>
kselftest/vm: fix tests build with old libc
Niels Dossche <dossche.niels(a)gmail.com>
sfc: extend the locking on mcdi->seqno
Eric Dumazet <edumazet(a)google.com>
tcp: make tcp_read_sock() more robust
Sreeramya Soratkal <quic_ssramya(a)quicinc.com>
nl80211: Update bss channel on channel switch for P2P_CLIENT
Jia-Ju Bai <baijiaju1990(a)gmail.com>
atm: firestream: check the return value of ioremap() in fs_init()
Lad Prabhakar <prabhakar.mahadev-lad.rj(a)bp.renesas.com>
can: rcar_canfd: rcar_canfd_channel_probe(): register the CAN device when fully ready
Julian Braha <julianbraha(a)gmail.com>
ARM: 9178/1: fix unmet dependency on BITREVERSE for HAVE_ARCH_BITREVERSE
Alexander Lobakin <alobakin(a)pm.me>
MIPS: smp: fill in sibling and core maps earlier
Corentin Labbe <clabbe(a)baylibre.com>
ARM: dts: rockchip: fix a typo on rk3288 crypto-controller
Sascha Hauer <s.hauer(a)pengutronix.de>
arm64: dts: rockchip: reorder rk3399 hdmi clocks
Jakob Unterwurzacher <jakob.unterwurzacher(a)theobroma-systems.com>
arm64: dts: rockchip: fix rk3399-puma eMMC HS400 signal integrity
Yan Yan <evitayan(a)google.com>
xfrm: Fix xfrm migrate issues when address family changes
Yan Yan <evitayan(a)google.com>
xfrm: Check if_id in xfrm_migrate
Xin Long <lucien.xin(a)gmail.com>
sctp: fix the processing for INIT_ACK chunk
Xin Long <lucien.xin(a)gmail.com>
sctp: fix the processing for INIT chunk
Kai Lueke <kailueke(a)linux.microsoft.com>
Revert "xfrm: state and policy should fail if XFRMA_IF_ID 0"
-------------
Diffstat:
Makefile | 4 +-
arch/arm/boot/dts/rk3288.dtsi | 2 +-
arch/arm/include/asm/kvm_host.h | 7 +
arch/arm64/Kconfig | 9 +
arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 6 +
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 6 +-
arch/arm64/include/asm/assembler.h | 34 +++
arch/arm64/include/asm/cpu.h | 1 +
arch/arm64/include/asm/cpucaps.h | 3 +-
arch/arm64/include/asm/cpufeature.h | 39 +++
arch/arm64/include/asm/cputype.h | 16 ++
arch/arm64/include/asm/fixmap.h | 6 +-
arch/arm64/include/asm/kvm_host.h | 5 +
arch/arm64/include/asm/kvm_mmu.h | 6 +-
arch/arm64/include/asm/mmu.h | 8 +-
arch/arm64/include/asm/sections.h | 5 +
arch/arm64/include/asm/sysreg.h | 5 +
arch/arm64/include/asm/vectors.h | 74 +++++
arch/arm64/kernel/cpu_errata.c | 381 +++++++++++++++++++++++++-
arch/arm64/kernel/cpufeature.c | 21 ++
arch/arm64/kernel/cpuinfo.c | 1 +
arch/arm64/kernel/entry.S | 213 ++++++++++----
arch/arm64/kernel/vmlinux.lds.S | 2 +-
arch/arm64/kvm/hyp/hyp-entry.S | 64 +++++
arch/arm64/kvm/hyp/switch.c | 8 +-
arch/arm64/kvm/sys_regs.c | 2 +-
arch/arm64/mm/mmu.c | 12 +-
arch/ia64/kernel/acpi.c | 7 +-
arch/mips/kernel/smp.c | 6 +-
drivers/atm/eni.c | 2 +
drivers/atm/firestream.c | 2 +
drivers/crypto/qcom-rng.c | 17 +-
drivers/firmware/efi/apple-properties.c | 2 +-
drivers/firmware/efi/efi.c | 2 +-
drivers/gpu/drm/panel/panel-simple.c | 2 +-
drivers/input/tablet/aiptek.c | 10 +-
drivers/net/can/rcar/rcar_canfd.c | 6 +-
drivers/net/ethernet/sfc/mcdi.c | 2 +-
drivers/net/hyperv/netvsc_drv.c | 3 +
drivers/usb/gadget/function/rndis.c | 1 +
drivers/usb/gadget/udc/core.c | 3 -
fs/ocfs2/super.c | 22 +-
fs/sysfs/file.c | 3 +-
include/linux/arm-smccc.h | 7 +
include/linux/if_arp.h | 1 +
include/linux/topology.h | 1 +
include/net/xfrm.h | 5 +-
kernel/cgroup/cpuset.c | 8 +-
kernel/sched/topology.c | 99 ++++---
lib/Kconfig | 1 -
mm/migrate.c | 8 +
net/dsa/dsa2.c | 1 +
net/ipv4/tcp.c | 10 +-
net/key/af_key.c | 2 +-
net/packet/af_packet.c | 11 +-
net/sctp/sm_statefuns.c | 108 +++++---
net/wireless/nl80211.c | 3 +-
net/xfrm/xfrm_policy.c | 14 +-
net/xfrm/xfrm_state.c | 15 +-
net/xfrm/xfrm_user.c | 27 +-
tools/perf/util/symbol.c | 2 +-
tools/testing/selftests/vm/userfaultfd.c | 1 +
virt/kvm/arm/psci.c | 12 +
63 files changed, 1112 insertions(+), 254 deletions(-)
From: Oscar Salvador <osalvador(a)suse.de>
Subject: mm: only re-generate demotion targets when a numa node changes its N_CPU state
Abhishek reported that after patch [1], hotplug operations are taking
~double the expected time. [2]
The reason behind is that the CPU callbacks that migrate_on_reclaim_init()
sets always call set_migration_target_nodes() whenever a CPU is brought
up/down.
But we only care about numa nodes going from having cpus to become
cpuless, and vice versa, as that influences the demotion_target order.
We do already have two CPU callbacks (vmstat_cpu_online() and
vmstat_cpu_dead()) that check exactly that, so get rid of the CPU
callbacks in migrate_on_reclaim_init() and only call
set_migration_target_nodes() from vmstat_cpu_{dead,online}() whenever a
numa node change its N_CPU state.
[1] https://lore.kernel.org/linux-mm/20210721063926.3024591-2-ying.huang@intel.…
[2] https://lore.kernel.org/linux-mm/eb438ddd-2919-73d4-bd9f-b7eecdd9577a@linux…
[osalvador(a)suse.de: add feedback from Huang Ying]
Link: https://lkml.kernel.org/r/20220314150945.12694-1-osalvador@suse.de
Link: https://lkml.kernel.org/r/20220310120749.23077-1-osalvador@suse.de
Fixes: 884a6e5d1f93b ("mm/migrate: update node demotion order on hotplug events")
Signed-off-by: Oscar Salvador <osalvador(a)suse.de>
Reviewed-by: Baolin Wang <baolin.wang(a)linux.alibaba.com>
Tested-by: Baolin Wang <baolin.wang(a)linux.alibaba.com>
Reported-by: Abhishek Goel <huntbag(a)linux.vnet.ibm.com>
Cc: Dave Hansen <dave.hansen(a)linux.intel.com>
Cc: "Huang, Ying" <ying.huang(a)intel.com>
Cc: Abhishek Goel <huntbag(a)linux.vnet.ibm.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
include/linux/migrate.h | 8 ++++++
mm/migrate.c | 47 ++++++++------------------------------
mm/vmstat.c | 13 +++++++++-
3 files changed, 30 insertions(+), 38 deletions(-)
--- a/include/linux/migrate.h~mm-only-re-generate-demotion-targets-when-a-numa-node-changes-its-n_cpu-state
+++ a/include/linux/migrate.h
@@ -48,7 +48,15 @@ int folio_migrate_mapping(struct address
struct folio *newfolio, struct folio *folio, int extra_count);
extern bool numa_demotion_enabled;
+extern void migrate_on_reclaim_init(void);
+#ifdef CONFIG_HOTPLUG_CPU
+extern void set_migration_target_nodes(void);
#else
+static inline void set_migration_target_nodes(void) {}
+#endif
+#else
+
+static inline void set_migration_target_nodes(void) {}
static inline void putback_movable_pages(struct list_head *l) {}
static inline int migrate_pages(struct list_head *l, new_page_t new,
--- a/mm/migrate.c~mm-only-re-generate-demotion-targets-when-a-numa-node-changes-its-n_cpu-state
+++ a/mm/migrate.c
@@ -3209,7 +3209,7 @@ again:
/*
* For callers that do not hold get_online_mems() already.
*/
-static void set_migration_target_nodes(void)
+void set_migration_target_nodes(void)
{
get_online_mems();
__set_migration_target_nodes();
@@ -3273,51 +3273,24 @@ static int __meminit migrate_on_reclaim_
return notifier_from_errno(0);
}
-/*
- * React to hotplug events that might affect the migration targets
- * like events that online or offline NUMA nodes.
- *
- * The ordering is also currently dependent on which nodes have
- * CPUs. That means we need CPU on/offline notification too.
- */
-static int migration_online_cpu(unsigned int cpu)
-{
- set_migration_target_nodes();
- return 0;
-}
-
-static int migration_offline_cpu(unsigned int cpu)
-{
- set_migration_target_nodes();
- return 0;
-}
-
-static int __init migrate_on_reclaim_init(void)
+void __init migrate_on_reclaim_init(void)
{
- int ret;
-
node_demotion = kmalloc_array(nr_node_ids,
sizeof(struct demotion_nodes),
GFP_KERNEL);
WARN_ON(!node_demotion);
- ret = cpuhp_setup_state_nocalls(CPUHP_MM_DEMOTION_DEAD, "mm/demotion:offline",
- NULL, migration_offline_cpu);
+ hotplug_memory_notifier(migrate_on_reclaim_callback, 100);
/*
- * In the unlikely case that this fails, the automatic
- * migration targets may become suboptimal for nodes
- * where N_CPU changes. With such a small impact in a
- * rare case, do not bother trying to do anything special.
+ * At this point, all numa nodes with memory/CPus have their state
+ * properly set, so we can build the demotion order now.
+ * Let us hold the cpu_hotplug lock just, as we could possibily have
+ * CPU hotplug events during boot.
*/
- WARN_ON(ret < 0);
- ret = cpuhp_setup_state(CPUHP_AP_MM_DEMOTION_ONLINE, "mm/demotion:online",
- migration_online_cpu, NULL);
- WARN_ON(ret < 0);
-
- hotplug_memory_notifier(migrate_on_reclaim_callback, 100);
- return 0;
+ cpus_read_lock();
+ set_migration_target_nodes();
+ cpus_read_unlock();
}
-late_initcall(migrate_on_reclaim_init);
#endif /* CONFIG_HOTPLUG_CPU */
bool numa_demotion_enabled = false;
--- a/mm/vmstat.c~mm-only-re-generate-demotion-targets-when-a-numa-node-changes-its-n_cpu-state
+++ a/mm/vmstat.c
@@ -28,6 +28,7 @@
#include <linux/mm_inline.h>
#include <linux/page_ext.h>
#include <linux/page_owner.h>
+#include <linux/migrate.h>
#include "internal.h"
@@ -2049,7 +2050,12 @@ static void __init init_cpu_node_state(v
static int vmstat_cpu_online(unsigned int cpu)
{
refresh_zone_stat_thresholds();
- node_set_state(cpu_to_node(cpu), N_CPU);
+
+ if (!node_state(cpu_to_node(cpu), N_CPU)) {
+ node_set_state(cpu_to_node(cpu), N_CPU);
+ set_migration_target_nodes();
+ }
+
return 0;
}
@@ -2072,6 +2078,8 @@ static int vmstat_cpu_dead(unsigned int
return 0;
node_clear_state(node, N_CPU);
+ set_migration_target_nodes();
+
return 0;
}
@@ -2103,6 +2111,9 @@ void __init init_mm_internals(void)
start_shepherd_timer();
#endif
+#if defined(CONFIG_MIGRATION) && defined(CONFIG_HOTPLUG_CPU)
+ migrate_on_reclaim_init();
+#endif
#ifdef CONFIG_PROC_FS
proc_create_seq("buddyinfo", 0444, NULL, &fragmentation_op);
proc_create_seq("pagetypeinfo", 0400, NULL, &pagetypeinfo_op);
_
From: Charan Teja Kalla <quic_charante(a)quicinc.com>
Subject: mm: madvise: return correct bytes advised with process_madvise
Patch series "mm: madvise: return correct bytes processed with
process_madvise", v2. With the process_madvise(), always choose to return
non zero processed bytes over an error. This can help the user to know on
which VMA, passed in the 'struct iovec' vector list, is failed to advise
thus can take the decission of retrying/skipping on that VMA.
This patch (of 2):
The process_madvise() system call returns error even after processing some
VMA's passed in the 'struct iovec' vector list which leaves the user
confused to know where to restart the advise next. It is also against
this syscall man page[1] documentation where it mentions that "return
value may be less than the total number of requested bytes, if an error
occurred after some iovec elements were already processed.".
Consider a user passed 10 VMA's in the 'struct iovec' vector list of which
9 are processed but one. Then it just returns the error caused on that
failed VMA despite the first 9 VMA's processed, leaving the user confused
about on which VMA it is failed. Returning the number of bytes processed
here can help the user to know which VMA it is failed on and thus can
retry/skip the advise on that VMA.
[1]https://man7.org/linux/man-pages/man2/process_madvise.2.html.
Link: https://lkml.kernel.org/r/cover.1647008754.git.quic_charante@quicinc.com
Link: https://lkml.kernel.org/r/125b61a0edcee5c2db8658aed9d06a43a19ccafc.16470087…
Fixes: ecb8ac8b1f14("mm/madvise: introduce process_madvise() syscall: an external memory hinting API")
Signed-off-by: Charan Teja Kalla <quic_charante(a)quicinc.com>
Cc: Suren Baghdasaryan <surenb(a)google.com>
Cc: Vlastimil Babka <vbabka(a)suse.cz>
Cc: David Rientjes <rientjes(a)google.com>
Cc: Stephen Rothwell <sfr(a)canb.auug.org.au>
Cc: Minchan Kim <minchan(a)kernel.org>
Cc: Nadav Amit <nadav.amit(a)gmail.com>
Cc: Michal Hocko <mhocko(a)suse.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/madvise.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/mm/madvise.c~mm-madvise-return-correct-bytes-advised-with-process_madvise
+++ a/mm/madvise.c
@@ -1435,8 +1435,7 @@ SYSCALL_DEFINE5(process_madvise, int, pi
iov_iter_advance(&iter, iovec.iov_len);
}
- if (ret == 0)
- ret = total_len - iov_iter_count(&iter);
+ ret = (total_len - iov_iter_count(&iter)) ? : ret;
release_mm:
mmput(mm);
_
From: Hugh Dickins <hughd(a)google.com>
Subject: mempolicy: mbind_range() set_policy() after vma_merge()
v2.6.34 commit 9d8cebd4bcd7 ("mm: fix mbind vma merge problem") introduced
vma_merge() to mbind_range(); but unlike madvise, mlock and mprotect, it
put a "continue" to next vma where its precedents go to update flags on
current vma before advancing: that left vma with the wrong setting in the
infamous vma_merge() case 8.
v3.10 commit 1444f92c8498 ("mm: merging memory blocks resets mempolicy")
tried to fix that in vma_adjust(), without fully understanding the issue.
v3.11 commit 3964acd0dbec ("mm: mempolicy: fix mbind_range() &&
vma_adjust() interaction") reverted that, and went about the fix in the
right way, but chose to optimize out an unnecessary mpol_dup() with a
prior mpol_equal() test. But on tmpfs, that also pessimized out the vital
call to its ->set_policy(), leaving the new mbind unenforced.
The user visible effect was that the pages got allocated on the local
node (happened to be 0), after the mbind() caller had specifically
asked for them to be allocated on node 1. There was not any page
migration involved in the case reported: the pages simply got allocated
on the wrong node.
Just delete that optimization now (though it could be made conditional on
vma not having a set_policy). Also remove the "next" variable: it turned
out to be blameless, but also pointless.
Link: https://lkml.kernel.org/r/319e4db9-64ae-4bca-92f0-ade85d342ff@google.com
Fixes: 3964acd0dbec ("mm: mempolicy: fix mbind_range() && vma_adjust() interaction")
Signed-off-by: Hugh Dickins <hughd(a)google.com>
Acked-by: Oleg Nesterov <oleg(a)redhat.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett(a)oracle.com>
Cc: Vlastimil Babka <vbabka(a)suse.cz>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/mempolicy.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
--- a/mm/mempolicy.c~mempolicy-mbind_range-set_policy-after-vma_merge
+++ a/mm/mempolicy.c
@@ -786,7 +786,6 @@ static int vma_replace_policy(struct vm_
static int mbind_range(struct mm_struct *mm, unsigned long start,
unsigned long end, struct mempolicy *new_pol)
{
- struct vm_area_struct *next;
struct vm_area_struct *prev;
struct vm_area_struct *vma;
int err = 0;
@@ -801,8 +800,7 @@ static int mbind_range(struct mm_struct
if (start > vma->vm_start)
prev = vma;
- for (; vma && vma->vm_start < end; prev = vma, vma = next) {
- next = vma->vm_next;
+ for (; vma && vma->vm_start < end; prev = vma, vma = vma->vm_next) {
vmstart = max(start, vma->vm_start);
vmend = min(end, vma->vm_end);
@@ -817,10 +815,6 @@ static int mbind_range(struct mm_struct
anon_vma_name(vma));
if (prev) {
vma = prev;
- next = vma->vm_next;
- if (mpol_equal(vma_policy(vma), new_pol))
- continue;
- /* vma_merge() joined vma && vma->next, case 8 */
goto replace;
}
if (vma->vm_start != vmstart) {
_
From: Rik van Riel <riel(a)surriel.com>
Subject: mm: invalidate hwpoison page cache page in fault path
Sometimes the page offlining code can leave behind a hwpoisoned clean page
cache page. This can lead to programs being killed over and over and over
again as they fault in the hwpoisoned page, get killed, and then get
re-spawned by whatever wanted to run them.
This is particularly embarrassing when the page was offlined due to having
too many corrected memory errors. Now we are killing tasks due to them
trying to access memory that probably isn't even corrupted.
This problem can be avoided by invalidating the page from the page fault
handler, which already has a branch for dealing with these kinds of pages.
With this patch we simply pretend the page fault was successful if the
page was invalidated, return to userspace, incur another page fault, read
in the file from disk (to a new memory page), and then everything works
again.
Link: https://lkml.kernel.org/r/20220212213740.423efcea@imladris.surriel.com
Signed-off-by: Rik van Riel <riel(a)surriel.com>
Reviewed-by: Miaohe Lin <linmiaohe(a)huawei.com>
Acked-by: Naoya Horiguchi <naoya.horiguchi(a)nec.com>
Reviewed-by: Oscar Salvador <osalvador(a)suse.de>
Cc: John Hubbard <jhubbard(a)nvidia.com>
Cc: Mel Gorman <mgorman(a)suse.de>
Cc: Johannes Weiner <hannes(a)cmpxchg.org>
Cc: Matthew Wilcox <willy(a)infradead.org>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/memory.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
--- a/mm/memory.c~mm-clean-up-hwpoison-page-cache-page-in-fault-path
+++ a/mm/memory.c
@@ -3877,11 +3877,16 @@ static vm_fault_t __do_fault(struct vm_f
return ret;
if (unlikely(PageHWPoison(vmf->page))) {
- if (ret & VM_FAULT_LOCKED)
+ vm_fault_t poisonret = VM_FAULT_HWPOISON;
+ if (ret & VM_FAULT_LOCKED) {
+ /* Retry if a clean page was removed from the cache. */
+ if (invalidate_inode_page(vmf->page))
+ poisonret = 0;
unlock_page(vmf->page);
+ }
put_page(vmf->page);
vmf->page = NULL;
- return VM_FAULT_HWPOISON;
+ return poisonret;
}
if (unlikely(!(ret & VM_FAULT_LOCKED)))
_
From: Alistair Popple <apopple(a)nvidia.com>
Subject: mm/pages_alloc.c: don't create ZONE_MOVABLE beyond the end of a node
ZONE_MOVABLE uses the remaining memory in each node. Its starting pfn is
also aligned to MAX_ORDER_NR_PAGES. It is possible for the remaining
memory in a node to be less than MAX_ORDER_NR_PAGES, meaning there is not
enough room for ZONE_MOVABLE on that node.
Unfortunately this condition is not checked for. This leads to
zone_movable_pfn[] getting set to a pfn greater than the last pfn in a
node.
calculate_node_totalpages() then sets zone->present_pages to be greater
than zone->spanned_pages which is invalid, as spanned_pages represents the
maximum number of pages in a zone assuming no holes.
Subsequently it is possible free_area_init_core() will observe a zone of
size zero with present pages. In this case it will skip setting up the
zone, including the initialisation of free_lists[].
However populated_zone() checks zone->present_pages to see if a zone has
memory available. This is used by iterators such as walk_zones_in_node().
pagetypeinfo_showfree() uses this to walk the free_list of each zone in
each node, which are assumed to be initialised due to the zone not being
empty. As free_area_init_core() never initialised the free_lists[] this
results in the following kernel crash when trying to read
/proc/pagetypeinfo:
[ 67.534914] BUG: kernel NULL pointer dereference, address: 0000000000000000
[ 67.535429] #PF: supervisor read access in kernel mode
[ 67.535789] #PF: error_code(0x0000) - not-present page
[ 67.536128] PGD 0 P4D 0
[ 67.536305] Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC NOPTI
[ 67.536696] CPU: 0 PID: 456 Comm: cat Not tainted 5.16.0 #461
[ 67.537096] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014
[ 67.537638] RIP: 0010:pagetypeinfo_show+0x163/0x460
[ 67.537992] Code: 9e 82 e8 80 57 0e 00 49 8b 06 b9 01 00 00 00 4c 39 f0 75 16 e9 65 02 00 00 48 83 c1 01 48 81 f9 a0 86 01 00 0f 84 48 02 00 00 <48> 8b 00 4c 39 f0 75 e7 48 c7 c2 80 a2 e2 82 48 c7 c6 79 ef e3 82
[ 67.538259] RSP: 0018:ffffc90001c4bd10 EFLAGS: 00010003
[ 67.538259] RAX: 0000000000000000 RBX: ffff88801105f638 RCX: 0000000000000001
[ 67.538259] RDX: 0000000000000001 RSI: 000000000000068b RDI: ffff8880163dc68b
[ 67.538259] RBP: ffffc90001c4bd90 R08: 0000000000000001 R09: ffff8880163dc67e
[ 67.538259] R10: 656c6261766f6d6e R11: 6c6261766f6d6e55 R12: ffff88807ffb4a00
[ 67.538259] R13: ffff88807ffb49f8 R14: ffff88807ffb4580 R15: ffff88807ffb3000
[ 67.538259] FS: 00007f9c83eff5c0(0000) GS:ffff88807dc00000(0000) knlGS:0000000000000000
[ 67.538259] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 67.538259] CR2: 0000000000000000 CR3: 0000000013c8e000 CR4: 0000000000350ef0
[ 67.538259] Call Trace:
[ 67.538259] <TASK>
[ 67.538259] seq_read_iter+0x128/0x460
[ 67.538259] ? aa_file_perm+0x1af/0x5f0
[ 67.538259] proc_reg_read_iter+0x51/0x80
[ 67.538259] ? lock_is_held_type+0xea/0x140
[ 67.538259] new_sync_read+0x113/0x1a0
[ 67.538259] vfs_read+0x136/0x1d0
[ 67.538259] ksys_read+0x70/0xf0
[ 67.538259] __x64_sys_read+0x1a/0x20
[ 67.538259] do_syscall_64+0x3b/0xc0
[ 67.538259] entry_SYSCALL_64_after_hwframe+0x44/0xae
[ 67.538259] RIP: 0033:0x7f9c83e23cce
[ 67.538259] Code: c0 e9 b6 fe ff ff 50 48 8d 3d 6e 13 0a 00 e8 c9 e3 01 00 66 0f 1f 84 00 00 00 00 00 64 8b 04 25 18 00 00 00 85 c0 75 14 0f 05 <48> 3d 00 f0 ff ff 77 5a c3 66 0f 1f 84 00 00 00 00 00 48 83 ec 28
[ 67.538259] RSP: 002b:00007fff116e1a08 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
[ 67.538259] RAX: ffffffffffffffda RBX: 0000000000020000 RCX: 00007f9c83e23cce
[ 67.538259] RDX: 0000000000020000 RSI: 00007f9c83a2c000 RDI: 0000000000000003
[ 67.538259] RBP: 00007f9c83a2c000 R08: 00007f9c83a2b010 R09: 0000000000000000
[ 67.538259] R10: 00007f9c83f2d7d0 R11: 0000000000000246 R12: 0000000000000000
[ 67.538259] R13: 0000000000000003 R14: 0000000000020000 R15: 0000000000020000
[ 67.538259] </TASK>
Fix this by checking that the aligned zone_movable_pfn[] does not exceed
the end of the node, and if it does skip creating a movable zone on this
node.
Link: https://lkml.kernel.org/r/20220215025831.2113067-1-apopple@nvidia.com
Fixes: 2a1e274acf0b ("Create the ZONE_MOVABLE zone")
Signed-off-by: Alistair Popple <apopple(a)nvidia.com>
Acked-by: David Hildenbrand <david(a)redhat.com>
Acked-by: Mel Gorman <mgorman(a)techsingularity.net>
Cc: John Hubbard <jhubbard(a)nvidia.com>
Cc: Zi Yan <ziy(a)nvidia.com>
Cc: Anshuman Khandual <anshuman.khandual(a)arm.com>
Cc: Oscar Salvador <osalvador(a)suse.de>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/page_alloc.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
--- a/mm/page_alloc.c~mm-pages_allocc-dont-create-zone_movable-beyond-the-end-of-a-node
+++ a/mm/page_alloc.c
@@ -7951,10 +7951,17 @@ restart:
out2:
/* Align start of ZONE_MOVABLE on all nids to MAX_ORDER_NR_PAGES */
- for (nid = 0; nid < MAX_NUMNODES; nid++)
+ for (nid = 0; nid < MAX_NUMNODES; nid++) {
+ unsigned long start_pfn, end_pfn;
+
zone_movable_pfn[nid] =
roundup(zone_movable_pfn[nid], MAX_ORDER_NR_PAGES);
+ get_pfn_range_for_nid(nid, &start_pfn, &end_pfn);
+ if (zone_movable_pfn[nid] >= end_pfn)
+ zone_movable_pfn[nid] = 0;
+ }
+
out:
/* restore the node_state */
node_states[N_MEMORY] = saved_node_state;
_
From: Peter Xu <peterx(a)redhat.com>
Subject: mm: don't skip swap entry even if zap_details specified
Patch series "mm: Rework zap ptes on swap entries", v5.
Patch 1 should fix a long standing bug for zap_pte_range() on zap_details
usage. The risk is we could have some swap entries skipped while we should
have zapped them.
Migration entries are not the major concern because file backed memory always
zap in the pattern that "first time without page lock, then re-zap with page
lock" hence the 2nd zap will always make sure all migration entries are already
recovered.
However there can be issues with real swap entries got skipped errornoously.
There's a reproducer provided in commit message of patch 1 for that.
Patch 2-4 are cleanups that are based on patch 1. After the whole patchset
applied, we should have a very clean view of zap_pte_range().
Only patch 1 needs to be backported to stable if necessary.
This patch (of 4):
The "details" pointer shouldn't be the token to decide whether we should
skip swap entries.
For example, when the callers specified details->zap_mapping==NULL, it
means the user wants to zap all the pages (including COWed pages), then we
need to look into swap entries because there can be private COWed pages
that was swapped out.
Skipping some swap entries when details is non-NULL may lead to wrongly
leaving some of the swap entries while we should have zapped them.
A reproducer of the problem:
===8<===
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <stdio.h>
#include <assert.h>
#include <unistd.h>
#include <sys/mman.h>
#include <sys/types.h>
int page_size;
int shmem_fd;
char *buffer;
void main(void)
{
int ret;
char val;
page_size = getpagesize();
shmem_fd = memfd_create("test", 0);
assert(shmem_fd >= 0);
ret = ftruncate(shmem_fd, page_size * 2);
assert(ret == 0);
buffer = mmap(NULL, page_size * 2, PROT_READ | PROT_WRITE,
MAP_PRIVATE, shmem_fd, 0);
assert(buffer != MAP_FAILED);
/* Write private page, swap it out */
buffer[page_size] = 1;
madvise(buffer, page_size * 2, MADV_PAGEOUT);
/* This should drop private buffer[page_size] already */
ret = ftruncate(shmem_fd, page_size);
assert(ret == 0);
/* Recover the size */
ret = ftruncate(shmem_fd, page_size * 2);
assert(ret == 0);
/* Re-read the data, it should be all zero */
val = buffer[page_size];
if (val == 0)
printf("Good\n");
else
printf("BUG\n");
}
===8<===
We don't need to touch up the pmd path, because pmd never had a issue with
swap entries. For example, shmem pmd migration will always be split into
pte level, and same to swapping on anonymous.
Add another helper should_zap_cows() so that we can also check whether we
should zap private mappings when there's no page pointer specified.
This patch drops that trick, so we handle swap ptes coherently. Meanwhile
we should do the same check upon migration entry, hwpoison entry and
genuine swap entries too.
To be explicit, we should still remember to keep the private entries if
even_cows==false, and always zap them when even_cows==true.
The issue seems to exist starting from the initial commit of git.
[peterx(a)redhat.com: comment tweaks]
Link: https://lkml.kernel.org/r/20220217060746.71256-2-peterx@redhat.com
Link: https://lkml.kernel.org/r/20220217060746.71256-1-peterx@redhat.com
Link: https://lkml.kernel.org/r/20220216094810.60572-1-peterx@redhat.com
Link: https://lkml.kernel.org/r/20220216094810.60572-2-peterx@redhat.com
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Peter Xu <peterx(a)redhat.com>
Reviewed-by: John Hubbard <jhubbard(a)nvidia.com>
Cc: David Hildenbrand <david(a)redhat.com>
Cc: Hugh Dickins <hughd(a)google.com>
Cc: Alistair Popple <apopple(a)nvidia.com>
Cc: Andrea Arcangeli <aarcange(a)redhat.com>
Cc: "Kirill A . Shutemov" <kirill(a)shutemov.name>
Cc: Matthew Wilcox <willy(a)infradead.org>
Cc: Vlastimil Babka <vbabka(a)suse.cz>
Cc: Yang Shi <shy828301(a)gmail.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/memory.c | 40 +++++++++++++++++++++++++++++++---------
1 file changed, 31 insertions(+), 9 deletions(-)
--- a/mm/memory.c~mm-dont-skip-swap-entry-even-if-zap_details-specified
+++ a/mm/memory.c
@@ -1313,6 +1313,17 @@ struct zap_details {
struct folio *single_folio; /* Locked folio to be unmapped */
};
+/* Whether we should zap all COWed (private) pages too */
+static inline bool should_zap_cows(struct zap_details *details)
+{
+ /* By default, zap all pages */
+ if (!details)
+ return true;
+
+ /* Or, we zap COWed pages only if the caller wants to */
+ return !details->zap_mapping;
+}
+
/*
* We set details->zap_mapping when we want to unmap shared but keep private
* pages. Return true if skip zapping this page, false otherwise.
@@ -1320,11 +1331,15 @@ struct zap_details {
static inline bool
zap_skip_check_mapping(struct zap_details *details, struct page *page)
{
- if (!details || !page)
+ /* If we can make a decision without *page.. */
+ if (should_zap_cows(details))
+ return false;
+
+ /* E.g. the caller passes NULL for the case of a zero page */
+ if (!page)
return false;
- return details->zap_mapping &&
- (details->zap_mapping != page_rmapping(page));
+ return details->zap_mapping != page_rmapping(page);
}
static unsigned long zap_pte_range(struct mmu_gather *tlb,
@@ -1405,17 +1420,24 @@ again:
continue;
}
- /* If details->check_mapping, we leave swap entries. */
- if (unlikely(details))
- continue;
-
- if (!non_swap_entry(entry))
+ if (!non_swap_entry(entry)) {
+ /* Genuine swap entry, hence a private anon page */
+ if (!should_zap_cows(details))
+ continue;
rss[MM_SWAPENTS]--;
- else if (is_migration_entry(entry)) {
+ } else if (is_migration_entry(entry)) {
struct page *page;
page = pfn_swap_entry_to_page(entry);
+ if (zap_skip_check_mapping(details, page))
+ continue;
rss[mm_counter(page)]--;
+ } else if (is_hwpoison_entry(entry)) {
+ if (!should_zap_cows(details))
+ continue;
+ } else {
+ /* We should have covered all the swap entry types */
+ WARN_ON_ONCE(1);
}
if (unlikely(!free_swap_and_cache(entry)))
print_bad_pte(vma, addr, ptent, NULL);
_
From: Minchan Kim <minchan(a)kernel.org>
Subject: mm: fs: fix lru_cache_disabled race in bh_lru
Check lru_cache_disabled under bh_lru_lock. Otherwise, it could introduce
race below and it fails to migrate pages containing buffer_head.
CPU 0 CPU 1
bh_lru_install
lru_cache_disable
lru_cache_disabled = false
atomic_inc(&lru_disable_count);
invalidate_bh_lrus_cpu of CPU 0
bh_lru_lock
__invalidate_bh_lrus
bh_lru_unlock
bh_lru_lock
install the bh
bh_lru_unlock
WHen this race happens a CMA allocation fails, which is critical for
the workload which depends on CMA.
Link: https://lkml.kernel.org/r/20220308180709.2017638-1-minchan@kernel.org
Fixes: 8cc621d2f45d ("mm: fs: invalidate BH LRU during page migration")
Signed-off-by: Minchan Kim <minchan(a)kernel.org>
Cc: Chris Goldsworthy <cgoldswo(a)codeaurora.org>
Cc: Marcelo Tosatti <mtosatti(a)redhat.com>
Cc: John Dias <joaodias(a)google.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
fs/buffer.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
--- a/fs/buffer.c~mm-fs-fix-lru_cache_disabled-race-in-bh_lru
+++ a/fs/buffer.c
@@ -1235,16 +1235,18 @@ static void bh_lru_install(struct buffer
int i;
check_irqs_on();
+ bh_lru_lock();
+
/*
* the refcount of buffer_head in bh_lru prevents dropping the
* attached page(i.e., try_to_free_buffers) so it could cause
* failing page migration.
* Skip putting upcoming bh into bh_lru until migration is done.
*/
- if (lru_cache_disabled())
+ if (lru_cache_disabled()) {
+ bh_lru_unlock();
return;
-
- bh_lru_lock();
+ }
b = this_cpu_ptr(&bh_lrus);
for (i = 0; i < BH_LRU_SIZE; i++) {
_
Before the commit f9ce0be71d1f ("mm: Cleanup faultaround and finish_fault()
codepaths") there was a call to update_mmu_cache in alloc_set_pte that
used to invalidate TLB entry caching invalid PTE that caused a page
fault. That commit removed that call so now invalid TLB entry survives
causing repetitive page faults on the CPU that took the initial fault
until that TLB entry is occasionally evicted. This issue is spotted by
the xtensa TLB sanity checker.
Fix this issue by defining update_mmu_tlb function that flushes TLB entry
for the faulting address.
Cc: stable(a)vger.kernel.org # 5.12+
Signed-off-by: Max Filippov <jcmvbkbc(a)gmail.com>
---
arch/xtensa/include/asm/pgtable.h | 4 ++++
arch/xtensa/mm/tlb.c | 6 ++++++
2 files changed, 10 insertions(+)
diff --git a/arch/xtensa/include/asm/pgtable.h b/arch/xtensa/include/asm/pgtable.h
index bd5aeb795567..a63eca126657 100644
--- a/arch/xtensa/include/asm/pgtable.h
+++ b/arch/xtensa/include/asm/pgtable.h
@@ -411,6 +411,10 @@ extern void update_mmu_cache(struct vm_area_struct * vma,
typedef pte_t *pte_addr_t;
+void update_mmu_tlb(struct vm_area_struct *vma,
+ unsigned long address, pte_t *ptep);
+#define __HAVE_ARCH_UPDATE_MMU_TLB
+
#endif /* !defined (__ASSEMBLY__) */
#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
diff --git a/arch/xtensa/mm/tlb.c b/arch/xtensa/mm/tlb.c
index f436cf2efd8b..27a477dae232 100644
--- a/arch/xtensa/mm/tlb.c
+++ b/arch/xtensa/mm/tlb.c
@@ -162,6 +162,12 @@ void local_flush_tlb_kernel_range(unsigned long start, unsigned long end)
}
}
+void update_mmu_tlb(struct vm_area_struct *vma,
+ unsigned long address, pte_t *ptep)
+{
+ local_flush_tlb_page(vma, address);
+}
+
#ifdef CONFIG_DEBUG_TLB_SANITY
static unsigned get_pte_for_vaddr(unsigned vaddr)
--
2.30.2
This is the start of the stable review cycle for the 4.9.308 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 Wed, 23 Mar 2022 13:32:09 +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.308-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.308-rc1
Pavel Skripkin <paskripkin(a)gmail.com>
Input: aiptek - properly check endpoint type
Alan Stern <stern(a)rowland.harvard.edu>
usb: gadget: Fix use-after-free bug by not setting udc->dev.driver
Dan Carpenter <dan.carpenter(a)oracle.com>
usb: gadget: rndis: prevent integer overflow in rndis_set_response()
Jiasheng Jiang <jiasheng(a)iscas.ac.cn>
atm: eni: Add check for dma_map_single
Eric Dumazet <edumazet(a)google.com>
net/packet: fix slab-out-of-bounds access in packet_recvmsg()
Lucas Wei <lucaswei(a)google.com>
fs: sysfs_emit: Remove PAGE_SIZE alignment check
Chengming Zhou <zhouchengming(a)bytedance.com>
kselftest/vm: fix tests build with old libc
Niels Dossche <dossche.niels(a)gmail.com>
sfc: extend the locking on mcdi->seqno
Eric Dumazet <edumazet(a)google.com>
tcp: make tcp_read_sock() more robust
Sreeramya Soratkal <quic_ssramya(a)quicinc.com>
nl80211: Update bss channel on channel switch for P2P_CLIENT
Jia-Ju Bai <baijiaju1990(a)gmail.com>
atm: firestream: check the return value of ioremap() in fs_init()
Lad Prabhakar <prabhakar.mahadev-lad.rj(a)bp.renesas.com>
can: rcar_canfd: rcar_canfd_channel_probe(): register the CAN device when fully ready
Julian Braha <julianbraha(a)gmail.com>
ARM: 9178/1: fix unmet dependency on BITREVERSE for HAVE_ARCH_BITREVERSE
Alexander Lobakin <alobakin(a)pm.me>
MIPS: smp: fill in sibling and core maps earlier
Corentin Labbe <clabbe(a)baylibre.com>
ARM: dts: rockchip: fix a typo on rk3288 crypto-controller
Yan Yan <evitayan(a)google.com>
xfrm: Fix xfrm migrate issues when address family changes
-------------
Diffstat:
Makefile | 4 ++--
arch/arm/boot/dts/rk3288.dtsi | 2 +-
arch/mips/kernel/smp.c | 6 +++---
drivers/atm/eni.c | 2 ++
drivers/atm/firestream.c | 2 ++
drivers/input/tablet/aiptek.c | 10 ++++------
drivers/net/can/rcar/rcar_canfd.c | 6 +++---
drivers/net/ethernet/sfc/mcdi.c | 2 +-
drivers/usb/gadget/function/rndis.c | 1 +
drivers/usb/gadget/udc/core.c | 3 ---
fs/sysfs/file.c | 3 +--
lib/Kconfig | 1 -
net/ipv4/tcp.c | 10 ++++++----
net/packet/af_packet.c | 11 ++++++++++-
net/wireless/nl80211.c | 3 ++-
net/xfrm/xfrm_state.c | 8 +++++---
tools/testing/selftests/vm/userfaultfd.c | 1 +
17 files changed, 44 insertions(+), 31 deletions(-)
This is the start of the stable review cycle for the 4.14.273 release.
There are 22 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, 23 Mar 2022 13:32:09 +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.273-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.273-rc1
Michael Petlan <mpetlan(a)redhat.com>
perf symbols: Fix symbol size calculation condition
Pavel Skripkin <paskripkin(a)gmail.com>
Input: aiptek - properly check endpoint type
Alan Stern <stern(a)rowland.harvard.edu>
usb: gadget: Fix use-after-free bug by not setting udc->dev.driver
Dan Carpenter <dan.carpenter(a)oracle.com>
usb: gadget: rndis: prevent integer overflow in rndis_set_response()
Nicolas Dichtel <nicolas.dichtel(a)6wind.com>
net: handle ARPHRD_PIMREG in dev_is_mac_header_xmit()
Jiasheng Jiang <jiasheng(a)iscas.ac.cn>
atm: eni: Add check for dma_map_single
Eric Dumazet <edumazet(a)google.com>
net/packet: fix slab-out-of-bounds access in packet_recvmsg()
Randy Dunlap <rdunlap(a)infradead.org>
efi: fix return value of __setup handlers
Lucas Wei <lucaswei(a)google.com>
fs: sysfs_emit: Remove PAGE_SIZE alignment check
Chengming Zhou <zhouchengming(a)bytedance.com>
kselftest/vm: fix tests build with old libc
Niels Dossche <dossche.niels(a)gmail.com>
sfc: extend the locking on mcdi->seqno
Eric Dumazet <edumazet(a)google.com>
tcp: make tcp_read_sock() more robust
Sreeramya Soratkal <quic_ssramya(a)quicinc.com>
nl80211: Update bss channel on channel switch for P2P_CLIENT
Jia-Ju Bai <baijiaju1990(a)gmail.com>
atm: firestream: check the return value of ioremap() in fs_init()
Lad Prabhakar <prabhakar.mahadev-lad.rj(a)bp.renesas.com>
can: rcar_canfd: rcar_canfd_channel_probe(): register the CAN device when fully ready
Julian Braha <julianbraha(a)gmail.com>
ARM: 9178/1: fix unmet dependency on BITREVERSE for HAVE_ARCH_BITREVERSE
Alexander Lobakin <alobakin(a)pm.me>
MIPS: smp: fill in sibling and core maps earlier
Corentin Labbe <clabbe(a)baylibre.com>
ARM: dts: rockchip: fix a typo on rk3288 crypto-controller
Jakob Unterwurzacher <jakob.unterwurzacher(a)theobroma-systems.com>
arm64: dts: rockchip: fix rk3399-puma eMMC HS400 signal integrity
Yan Yan <evitayan(a)google.com>
xfrm: Fix xfrm migrate issues when address family changes
Xin Long <lucien.xin(a)gmail.com>
sctp: fix the processing for INIT_ACK chunk
Xin Long <lucien.xin(a)gmail.com>
sctp: fix the processing for INIT chunk
-------------
Diffstat:
Makefile | 4 +-
arch/arm/boot/dts/rk3288.dtsi | 2 +-
arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 6 ++
arch/mips/kernel/smp.c | 6 +-
drivers/atm/eni.c | 2 +
drivers/atm/firestream.c | 2 +
drivers/firmware/efi/apple-properties.c | 2 +-
drivers/firmware/efi/efi.c | 2 +-
drivers/input/tablet/aiptek.c | 10 +--
drivers/net/can/rcar/rcar_canfd.c | 6 +-
drivers/net/ethernet/sfc/mcdi.c | 2 +-
drivers/usb/gadget/function/rndis.c | 1 +
drivers/usb/gadget/udc/core.c | 3 -
fs/sysfs/file.c | 3 +-
include/linux/if_arp.h | 1 +
lib/Kconfig | 1 -
net/ipv4/tcp.c | 10 ++-
net/packet/af_packet.c | 11 ++-
net/sctp/sm_statefuns.c | 108 ++++++++++++++++----------
net/wireless/nl80211.c | 3 +-
net/xfrm/xfrm_state.c | 8 +-
tools/perf/util/symbol.c | 2 +-
tools/testing/selftests/vm/userfaultfd.c | 1 +
23 files changed, 119 insertions(+), 77 deletions(-)
This is the start of the stable review cycle for the 5.15.31 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 Wed, 23 Mar 2022 13:32:09 +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.15.31-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.15.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.15.31-rc1
Filipe Manana <fdmanana(a)suse.com>
btrfs: skip reserved bytes warning on unmount after log cleanup failure
Michael Petlan <mpetlan(a)redhat.com>
perf symbols: Fix symbol size calculation condition
Pavel Skripkin <paskripkin(a)gmail.com>
Input: aiptek - properly check endpoint type
Matt Lupfer <mlupfer(a)ddn.com>
scsi: mpt3sas: Page fault in reply q processing
Alan Stern <stern(a)rowland.harvard.edu>
usb: usbtmc: Fix bug in pipe direction for control transfers
Alan Stern <stern(a)rowland.harvard.edu>
usb: gadget: Fix use-after-free bug by not setting udc->dev.driver
Dan Carpenter <dan.carpenter(a)oracle.com>
usb: gadget: rndis: prevent integer overflow in rndis_set_response()
Arnd Bergmann <arnd(a)arndb.de>
arm64: fix clang warning about TRAMP_VALIAS
Ivan Vecera <ivecera(a)redhat.com>
iavf: Fix hang during reboot/shutdown
Vladimir Oltean <vladimir.oltean(a)nxp.com>
net: mscc: ocelot: fix backwards compatibility with single-chain tc-flower offload
Doug Berger <opendmb(a)gmail.com>
net: bcmgenet: skip invalid partial checksums
Manish Chopra <manishc(a)marvell.com>
bnx2x: fix built-in kernel driver load failure
Juerg Haefliger <juerg.haefliger(a)canonical.com>
net: phy: mscc: Add MODULE_FIRMWARE macros
Miaoqian Lin <linmq006(a)gmail.com>
net: dsa: Add missing of_node_put() in dsa_port_parse_of
Thomas Zimmermann <tzimmermann(a)suse.de>
drm: Don't make DRM_PANEL_BRIDGE dependent on DRM_KMS_HELPERS
Nicolas Dichtel <nicolas.dichtel(a)6wind.com>
net: handle ARPHRD_PIMREG in dev_is_mac_header_xmit()
Marek Vasut <marex(a)denx.de>
drm/panel: simple: Fix Innolux G070Y2-L01 BPP settings
Christoph Niedermaier <cniedermaier(a)dh-electronics.com>
drm/imx: parallel-display: Remove bus flags check in imx_pd_bridge_atomic_check()
Jiasheng Jiang <jiasheng(a)iscas.ac.cn>
hv_netvsc: Add check for kvmalloc_array
Przemyslaw Patynowski <przemyslawx.patynowski(a)intel.com>
iavf: Fix double free in iavf_reset_task
Jiasheng Jiang <jiasheng(a)iscas.ac.cn>
atm: eni: Add check for dma_map_single
Eric Dumazet <edumazet(a)google.com>
net/packet: fix slab-out-of-bounds access in packet_recvmsg()
Kurt Cancemi <kurt(a)x64architecture.com>
net: phy: marvell: Fix invalid comparison in the resume and suspend functions
Sabrina Dubroca <sd(a)queasysnail.net>
esp6: fix check on ipv6_skip_exthdr's return value
Jiyong Park <jiyong(a)google.com>
vsock: each transport cycles only on its own sockets
Niels Dossche <dossche.niels(a)gmail.com>
alx: acquire mutex for alx_reinit in alx_change_mtu
Randy Dunlap <rdunlap(a)infradead.org>
efi: fix return value of __setup handlers
Jocelyn Falempe <jfalempe(a)redhat.com>
drm/mgag200: Fix PLL setup for g200wb and g200ew
Ming Lei <ming.lei(a)redhat.com>
block: release rq qos structures for queue without disk
Guo Ziliang <guo.ziliang(a)zte.com.cn>
mm: swap: get rid of livelock in swapin readahead
Joseph Qi <joseph.qi(a)linux.alibaba.com>
ocfs2: fix crash when initialize filecheck kobj fails
Brian Masney <bmasney(a)redhat.com>
crypto: qcom-rng - ensure buffer for generate is completely filled
-------------
Diffstat:
Makefile | 4 ++--
arch/arm64/include/asm/vectors.h | 4 ++--
block/blk-core.c | 4 ++++
drivers/atm/eni.c | 2 ++
drivers/crypto/qcom-rng.c | 17 ++++++++------
drivers/firmware/efi/apple-properties.c | 2 +-
drivers/firmware/efi/efi.c | 2 +-
drivers/gpu/drm/bridge/Kconfig | 2 +-
drivers/gpu/drm/imx/parallel-display.c | 8 -------
drivers/gpu/drm/mgag200/mgag200_pll.c | 6 ++---
drivers/gpu/drm/panel/Kconfig | 1 +
drivers/gpu/drm/panel/panel-simple.c | 2 +-
drivers/input/tablet/aiptek.c | 10 ++++-----
drivers/net/ethernet/atheros/alx/main.c | 5 ++++-
drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 2 --
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 28 ++++++++++++++----------
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 15 ++-----------
drivers/net/ethernet/broadcom/genet/bcmgenet.c | 6 +++--
drivers/net/ethernet/intel/iavf/iavf_main.c | 15 ++++++++++++-
drivers/net/ethernet/mscc/ocelot_flower.c | 16 +++++++++++++-
drivers/net/hyperv/netvsc_drv.c | 3 +++
drivers/net/phy/marvell.c | 8 +++----
drivers/net/phy/mscc/mscc_main.c | 3 +++
drivers/scsi/mpt3sas/mpt3sas_base.c | 5 +++--
drivers/usb/class/usbtmc.c | 13 ++++++++---
drivers/usb/gadget/function/rndis.c | 1 +
drivers/usb/gadget/udc/core.c | 3 ---
drivers/vhost/vsock.c | 3 ++-
fs/btrfs/block-group.c | 26 ++++++++++++++++++++--
fs/btrfs/ctree.h | 7 ++++++
fs/btrfs/tree-log.c | 23 +++++++++++++++++++
fs/ocfs2/super.c | 22 +++++++++----------
include/linux/if_arp.h | 1 +
include/net/af_vsock.h | 3 ++-
mm/swap_state.c | 2 +-
net/dsa/dsa2.c | 1 +
net/ipv6/esp6.c | 3 +--
net/packet/af_packet.c | 11 +++++++++-
net/vmw_vsock/af_vsock.c | 9 ++++++--
net/vmw_vsock/virtio_transport.c | 7 ++++--
net/vmw_vsock/vmci_transport.c | 5 ++++-
tools/perf/util/symbol.c | 2 +-
42 files changed, 212 insertions(+), 100 deletions(-)
Dear Stable Team,
This is a backport of ddbd89deb7d3 ("swiotlb: fix info leak with
DMA_FROM_DEVICE") and aa6f8dcbab47 ("swiotlb: rework "fix info leak with
DMA_FROM_DEVICE"") to 5.10.y.
I had to handle some merge conflicts, and at this point we have
swiotlb_tbl_sync_single() as opposed to swiotlb_sync_single_for_device()
so I had to handle that as well.
Halil Pasic (2):
swiotlb: fix info leak with DMA_FROM_DEVICE
swiotlb: rework "fix info leak with DMA_FROM_DEVICE"
kernel/dma/swiotlb.c | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
base-commit: 9d7b0ced5647e0df1b200ee29119cb58ff958339
--
2.32.0
This is the start of the stable review cycle for the 5.16.17 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 Wed, 23 Mar 2022 13:32:09 +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.16.17-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.16.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.16.17-rc1
Filipe Manana <fdmanana(a)suse.com>
btrfs: skip reserved bytes warning on unmount after log cleanup failure
Kalle Valo <quic_kvalo(a)quicinc.com>
Revert "ath10k: drop beacon and probe response which leak from other channel"
Vladimir Oltean <vladimir.oltean(a)nxp.com>
Revert "arm64: dts: freescale: Fix 'interrupt-map' parent address cells"
Michael Petlan <mpetlan(a)redhat.com>
perf symbols: Fix symbol size calculation condition
Arnd Bergmann <arnd(a)arndb.de>
arm64: errata: avoid duplicate field initializer
Pavel Skripkin <paskripkin(a)gmail.com>
Input: aiptek - properly check endpoint type
Matt Lupfer <mlupfer(a)ddn.com>
scsi: mpt3sas: Page fault in reply q processing
Alan Stern <stern(a)rowland.harvard.edu>
usb: usbtmc: Fix bug in pipe direction for control transfers
Alan Stern <stern(a)rowland.harvard.edu>
usb: gadget: Fix use-after-free bug by not setting udc->dev.driver
Dan Carpenter <dan.carpenter(a)oracle.com>
usb: gadget: rndis: prevent integer overflow in rndis_set_response()
Arnd Bergmann <arnd(a)arndb.de>
arm64: fix clang warning about TRAMP_VALIAS
Ivan Vecera <ivecera(a)redhat.com>
iavf: Fix hang during reboot/shutdown
Vladimir Oltean <vladimir.oltean(a)nxp.com>
net: mscc: ocelot: fix backwards compatibility with single-chain tc-flower offload
Doug Berger <opendmb(a)gmail.com>
net: bcmgenet: skip invalid partial checksums
Manish Chopra <manishc(a)marvell.com>
bnx2x: fix built-in kernel driver load failure
Juerg Haefliger <juerg.haefliger(a)canonical.com>
net: phy: mscc: Add MODULE_FIRMWARE macros
Miaoqian Lin <linmq006(a)gmail.com>
net: dsa: Add missing of_node_put() in dsa_port_parse_of
Thomas Zimmermann <tzimmermann(a)suse.de>
drm: Don't make DRM_PANEL_BRIDGE dependent on DRM_KMS_HELPERS
Nicolas Dichtel <nicolas.dichtel(a)6wind.com>
net: handle ARPHRD_PIMREG in dev_is_mac_header_xmit()
Marek Vasut <marex(a)denx.de>
drm/panel: simple: Fix Innolux G070Y2-L01 BPP settings
Christoph Niedermaier <cniedermaier(a)dh-electronics.com>
drm/imx: parallel-display: Remove bus flags check in imx_pd_bridge_atomic_check()
Jiasheng Jiang <jiasheng(a)iscas.ac.cn>
hv_netvsc: Add check for kvmalloc_array
Przemyslaw Patynowski <przemyslawx.patynowski(a)intel.com>
iavf: Fix double free in iavf_reset_task
Maciej Fijalkowski <maciej.fijalkowski(a)intel.com>
ice: fix NULL pointer dereference in ice_update_vsi_tx_ring_stats()
Jiasheng Jiang <jiasheng(a)iscas.ac.cn>
atm: eni: Add check for dma_map_single
Hannes Reinecke <hare(a)suse.de>
nvmet: revert "nvmet: make discovery NQN configurable"
Eric Dumazet <edumazet(a)google.com>
net/packet: fix slab-out-of-bounds access in packet_recvmsg()
Kurt Cancemi <kurt(a)x64architecture.com>
net: phy: marvell: Fix invalid comparison in the resume and suspend functions
Sabrina Dubroca <sd(a)queasysnail.net>
esp6: fix check on ipv6_skip_exthdr's return value
Jiyong Park <jiyong(a)google.com>
vsock: each transport cycles only on its own sockets
Niels Dossche <dossche.niels(a)gmail.com>
alx: acquire mutex for alx_reinit in alx_change_mtu
Randy Dunlap <rdunlap(a)infradead.org>
efi: fix return value of __setup handlers
Jocelyn Falempe <jfalempe(a)redhat.com>
drm/mgag200: Fix PLL setup for g200wb and g200ew
Ming Lei <ming.lei(a)redhat.com>
block: release rq qos structures for queue without disk
Guo Ziliang <guo.ziliang(a)zte.com.cn>
mm: swap: get rid of livelock in swapin readahead
Joseph Qi <joseph.qi(a)linux.alibaba.com>
ocfs2: fix crash when initialize filecheck kobj fails
Brian Masney <bmasney(a)redhat.com>
crypto: qcom-rng - ensure buffer for generate is completely filled
-------------
Diffstat:
Makefile | 4 +--
arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 24 +++++++--------
arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 24 +++++++--------
arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi | 24 +++++++--------
arch/arm64/include/asm/vectors.h | 4 +--
arch/arm64/kernel/cpu_errata.c | 1 -
block/blk-core.c | 4 +++
drivers/atm/eni.c | 2 ++
drivers/crypto/qcom-rng.c | 17 ++++++-----
drivers/firmware/efi/apple-properties.c | 2 +-
drivers/firmware/efi/efi.c | 2 +-
drivers/gpu/drm/bridge/Kconfig | 2 +-
drivers/gpu/drm/imx/parallel-display.c | 8 -----
drivers/gpu/drm/mgag200/mgag200_pll.c | 6 ++--
drivers/gpu/drm/panel/Kconfig | 1 +
drivers/gpu/drm/panel/panel-simple.c | 2 +-
drivers/input/tablet/aiptek.c | 10 +++---
drivers/net/ethernet/atheros/alx/main.c | 5 ++-
drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 2 --
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 28 ++++++++++-------
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 15 ++-------
drivers/net/ethernet/broadcom/genet/bcmgenet.c | 6 ++--
drivers/net/ethernet/intel/iavf/iavf_main.c | 15 ++++++++-
drivers/net/ethernet/intel/ice/ice_main.c | 5 +--
drivers/net/ethernet/mscc/ocelot_flower.c | 16 +++++++++-
drivers/net/hyperv/netvsc_drv.c | 3 ++
drivers/net/phy/marvell.c | 8 ++---
drivers/net/phy/mscc/mscc_main.c | 3 ++
drivers/net/wireless/ath/ath10k/wmi.c | 27 +---------------
drivers/nvme/target/configfs.c | 39 ------------------------
drivers/nvme/target/core.c | 3 +-
drivers/scsi/mpt3sas/mpt3sas_base.c | 5 +--
drivers/usb/class/usbtmc.c | 13 ++++++--
drivers/usb/gadget/function/rndis.c | 1 +
drivers/usb/gadget/udc/core.c | 3 --
drivers/vhost/vsock.c | 3 +-
fs/btrfs/block-group.c | 26 ++++++++++++++--
fs/btrfs/ctree.h | 7 +++++
fs/btrfs/tree-log.c | 23 ++++++++++++++
fs/ocfs2/super.c | 22 ++++++-------
include/linux/if_arp.h | 1 +
include/net/af_vsock.h | 3 +-
mm/swap_state.c | 2 +-
net/dsa/dsa2.c | 1 +
net/ipv6/esp6.c | 3 +-
net/packet/af_packet.c | 11 ++++++-
net/vmw_vsock/af_vsock.c | 9 ++++--
net/vmw_vsock/virtio_transport.c | 7 +++--
net/vmw_vsock/vmci_transport.c | 5 ++-
tools/perf/util/symbol.c | 2 +-
50 files changed, 253 insertions(+), 206 deletions(-)
The process_madvise() system call is expected to skip holes in vma
passed through 'struct iovec' vector list. But do_madvise, which
process_madvise() calls for each vma, returns ENOMEM in case of unmapped
holes, despite the VMA is processed.
Thus process_madvise() should treat ENOMEM as expected and consider the
VMA passed to as processed and continue processing other vma's in the
vector list. Returning -ENOMEM to user, despite the VMA is processed,
will be unable to figure out where to start the next madvise.
Fixes: ecb8ac8b1f14("mm/madvise: introduce process_madvise() syscall: an external memory hinting API")
Cc: <stable(a)vger.kernel.org> # 5.10+
Signed-off-by: Charan Teja Kalla <quic_charante(a)quicinc.com>
---
Changes in V2:
-- Fixed handling of ENOMEM by process_madvise().
-- Patch doesn't exist in V1.
mm/madvise.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/mm/madvise.c b/mm/madvise.c
index e97e6a9..14fb76d 100644
--- a/mm/madvise.c
+++ b/mm/madvise.c
@@ -1426,9 +1426,16 @@ SYSCALL_DEFINE5(process_madvise, int, pidfd, const struct iovec __user *, vec,
while (iov_iter_count(&iter)) {
iovec = iov_iter_iovec(&iter);
+ /*
+ * do_madvise returns ENOMEM if unmapped holes are present
+ * in the passed VMA. process_madvise() is expected to skip
+ * unmapped holes passed to it in the 'struct iovec' list
+ * and not fail because of them. Thus treat -ENOMEM return
+ * from do_madvise as valid and continue processing.
+ */
ret = do_madvise(mm, (unsigned long)iovec.iov_base,
iovec.iov_len, behavior);
- if (ret < 0)
+ if (ret < 0 && ret != -ENOMEM)
break;
iov_iter_advance(&iter, iovec.iov_len);
}
--
2.7.4
Since commit dfeae1073583("mtd: cfi_cmdset_0002: Change write buffer to
check correct value") buffered writes fail on S29GL064N. This is
because, on S29GL064N, reads return 0xFF at the end of DQ polling for
write completion, where as, chip_good() check expects actual data
written to the last location to be returned post DQ polling completion.
Fix is to revert to using chip_good() for S29GL064N which only checks
for DQ lines to settle down to determine write completion.
Fixes: dfeae1073583("mtd: cfi_cmdset_0002: Change write buffer to check correct value")
Signed-off-by: Tokunori Ikegami <ikegami.t(a)gmail.com>
Cc: stable(a)vger.kernel.org
Link: https://lore.kernel.org/r/b687c259-6413-26c9-d4c9-b3afa69ea124@pengutronix.…
Tokunori Ikegami (3):
mtd: cfi_cmdset_0002: Move and rename
chip_check/chip_ready/chip_good_for_write
mtd: cfi_cmdset_0002: Use chip_ready() for write on S29GL064N
mtd: cfi_cmdset_0002: Add S29GL064N ID definition
drivers/mtd/chips/cfi_cmdset_0002.c | 112 ++++++++++++++--------------
include/linux/mtd/cfi.h | 1 +
2 files changed, 55 insertions(+), 58 deletions(-)
--
2.32.0
From: Haimin Zhang <tcs_kernel(a)tencent.com>
[ Upstream commit 9a564bccb78a76740ea9d75a259942df8143d02c ]
Add __GFP_ZERO flag for compose_sadb_supported in function pfkey_register
to initialize the buffer of supp_skb to fix a kernel-info-leak issue.
1) Function pfkey_register calls compose_sadb_supported to request
a sk_buff. 2) compose_sadb_supported calls alloc_sbk to allocate
a sk_buff, but it doesn't zero it. 3) If auth_len is greater 0, then
compose_sadb_supported treats the memory as a struct sadb_supported and
begins to initialize. But it just initializes the field sadb_supported_len
and field sadb_supported_exttype without field sadb_supported_reserved.
Reported-by: TCS Robot <tcs_robot(a)tencent.com>
Signed-off-by: Haimin Zhang <tcs_kernel(a)tencent.com>
Signed-off-by: Steffen Klassert <steffen.klassert(a)secunet.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
net/key/af_key.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/key/af_key.c b/net/key/af_key.c
index adc93329e6aa..3f7e27c1aa83 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -1726,7 +1726,7 @@ static int pfkey_register(struct sock *sk, struct sk_buff *skb, const struct sad
xfrm_probe_algs();
- supp_skb = compose_sadb_supported(hdr, GFP_KERNEL);
+ supp_skb = compose_sadb_supported(hdr, GFP_KERNEL | __GFP_ZERO);
if (!supp_skb) {
if (hdr->sadb_msg_satype != SADB_SATYPE_UNSPEC)
pfk->registered &= ~(1<<hdr->sadb_msg_satype);
--
2.34.1
From: Haimin Zhang <tcs_kernel(a)tencent.com>
[ Upstream commit 9a564bccb78a76740ea9d75a259942df8143d02c ]
Add __GFP_ZERO flag for compose_sadb_supported in function pfkey_register
to initialize the buffer of supp_skb to fix a kernel-info-leak issue.
1) Function pfkey_register calls compose_sadb_supported to request
a sk_buff. 2) compose_sadb_supported calls alloc_sbk to allocate
a sk_buff, but it doesn't zero it. 3) If auth_len is greater 0, then
compose_sadb_supported treats the memory as a struct sadb_supported and
begins to initialize. But it just initializes the field sadb_supported_len
and field sadb_supported_exttype without field sadb_supported_reserved.
Reported-by: TCS Robot <tcs_robot(a)tencent.com>
Signed-off-by: Haimin Zhang <tcs_kernel(a)tencent.com>
Signed-off-by: Steffen Klassert <steffen.klassert(a)secunet.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
net/key/af_key.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/key/af_key.c b/net/key/af_key.c
index a10336cd7f97..9b3756aa7ca2 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -1709,7 +1709,7 @@ static int pfkey_register(struct sock *sk, struct sk_buff *skb, const struct sad
xfrm_probe_algs();
- supp_skb = compose_sadb_supported(hdr, GFP_KERNEL);
+ supp_skb = compose_sadb_supported(hdr, GFP_KERNEL | __GFP_ZERO);
if (!supp_skb) {
if (hdr->sadb_msg_satype != SADB_SATYPE_UNSPEC)
pfk->registered &= ~(1<<hdr->sadb_msg_satype);
--
2.34.1
From: Haimin Zhang <tcs_kernel(a)tencent.com>
[ Upstream commit 9a564bccb78a76740ea9d75a259942df8143d02c ]
Add __GFP_ZERO flag for compose_sadb_supported in function pfkey_register
to initialize the buffer of supp_skb to fix a kernel-info-leak issue.
1) Function pfkey_register calls compose_sadb_supported to request
a sk_buff. 2) compose_sadb_supported calls alloc_sbk to allocate
a sk_buff, but it doesn't zero it. 3) If auth_len is greater 0, then
compose_sadb_supported treats the memory as a struct sadb_supported and
begins to initialize. But it just initializes the field sadb_supported_len
and field sadb_supported_exttype without field sadb_supported_reserved.
Reported-by: TCS Robot <tcs_robot(a)tencent.com>
Signed-off-by: Haimin Zhang <tcs_kernel(a)tencent.com>
Signed-off-by: Steffen Klassert <steffen.klassert(a)secunet.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
net/key/af_key.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/key/af_key.c b/net/key/af_key.c
index c7d5a6015389..8ce513e08fd7 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -1709,7 +1709,7 @@ static int pfkey_register(struct sock *sk, struct sk_buff *skb, const struct sad
xfrm_probe_algs();
- supp_skb = compose_sadb_supported(hdr, GFP_KERNEL);
+ supp_skb = compose_sadb_supported(hdr, GFP_KERNEL | __GFP_ZERO);
if (!supp_skb) {
if (hdr->sadb_msg_satype != SADB_SATYPE_UNSPEC)
pfk->registered &= ~(1<<hdr->sadb_msg_satype);
--
2.34.1
From: Haimin Zhang <tcs_kernel(a)tencent.com>
[ Upstream commit 9a564bccb78a76740ea9d75a259942df8143d02c ]
Add __GFP_ZERO flag for compose_sadb_supported in function pfkey_register
to initialize the buffer of supp_skb to fix a kernel-info-leak issue.
1) Function pfkey_register calls compose_sadb_supported to request
a sk_buff. 2) compose_sadb_supported calls alloc_sbk to allocate
a sk_buff, but it doesn't zero it. 3) If auth_len is greater 0, then
compose_sadb_supported treats the memory as a struct sadb_supported and
begins to initialize. But it just initializes the field sadb_supported_len
and field sadb_supported_exttype without field sadb_supported_reserved.
Reported-by: TCS Robot <tcs_robot(a)tencent.com>
Signed-off-by: Haimin Zhang <tcs_kernel(a)tencent.com>
Signed-off-by: Steffen Klassert <steffen.klassert(a)secunet.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
net/key/af_key.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 406e13478b01..2ac9560020f9 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -1703,7 +1703,7 @@ static int pfkey_register(struct sock *sk, struct sk_buff *skb, const struct sad
xfrm_probe_algs();
- supp_skb = compose_sadb_supported(hdr, GFP_KERNEL);
+ supp_skb = compose_sadb_supported(hdr, GFP_KERNEL | __GFP_ZERO);
if (!supp_skb) {
if (hdr->sadb_msg_satype != SADB_SATYPE_UNSPEC)
pfk->registered &= ~(1<<hdr->sadb_msg_satype);
--
2.34.1
From: Linus Walleij <linus.walleij(a)linaro.org>
[ Upstream commit e941dc13fd3717122207d74539ab95da07ef797f ]
I observed the following problem with the BT404 touch pad
running the Phosh UI:
When e.g. typing on the virtual keyboard pressing "g" would
produce "ggg".
After some analysis it turns out the firmware reports that three
fingers hit that coordinate at the same time, finger 0, 2 and
4 (of the five available 0,1,2,3,4).
DOWN
Zinitix-TS 3-0020: finger 0 down (246, 395)
Zinitix-TS 3-0020: finger 1 up (0, 0)
Zinitix-TS 3-0020: finger 2 down (246, 395)
Zinitix-TS 3-0020: finger 3 up (0, 0)
Zinitix-TS 3-0020: finger 4 down (246, 395)
UP
Zinitix-TS 3-0020: finger 0 up (246, 395)
Zinitix-TS 3-0020: finger 2 up (246, 395)
Zinitix-TS 3-0020: finger 4 up (246, 395)
This is one touch and release: i.e. this is all reported on
touch (down) and release.
There is a field in the struct touch_event called finger_cnt
which is actually a bitmask of the fingers active in the
event.
Rename this field finger_mask as this matches the use contents
better, then use for_each_set_bit() to iterate over just the
fingers that are actally active.
Factor out a finger reporting function zinitix_report_fingers()
to handle all fingers.
Also be more careful in reporting finger down/up: we were
reporting every event with input_mt_report_slot_state(..., true);
but this should only be reported on finger down or move,
not on finger up, so also add code to check p->sub_status
to see what is happening and report correctly.
After this my Zinitix BT404 touchscreen report fingers
flawlessly.
The vendor drive I have notably does not use the "finger_cnt"
and contains obviously incorrect code like this:
if (touch_dev->touch_info.finger_cnt > MAX_SUPPORTED_FINGER_NUM)
touch_dev->touch_info.finger_cnt = MAX_SUPPORTED_FINGER_NUM;
As MAX_SUPPORTED_FINGER_NUM is an ordinal and the field is
a bitmask this seems quite confused.
Signed-off-by: Linus Walleij <linus.walleij(a)linaro.org>
Link: https://lore.kernel.org/r/20220228233017.2270599-1-linus.walleij@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov(a)gmail.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/input/touchscreen/zinitix.c | 44 +++++++++++++++++++++++------
1 file changed, 35 insertions(+), 9 deletions(-)
diff --git a/drivers/input/touchscreen/zinitix.c b/drivers/input/touchscreen/zinitix.c
index 6df6f07f1ac6..17b10b81c713 100644
--- a/drivers/input/touchscreen/zinitix.c
+++ b/drivers/input/touchscreen/zinitix.c
@@ -135,7 +135,7 @@ struct point_coord {
struct touch_event {
__le16 status;
- u8 finger_cnt;
+ u8 finger_mask;
u8 time_stamp;
struct point_coord point_coord[MAX_SUPPORTED_FINGER_NUM];
};
@@ -311,11 +311,32 @@ static int zinitix_send_power_on_sequence(struct bt541_ts_data *bt541)
static void zinitix_report_finger(struct bt541_ts_data *bt541, int slot,
const struct point_coord *p)
{
+ u16 x, y;
+
+ if (unlikely(!(p->sub_status &
+ (SUB_BIT_UP | SUB_BIT_DOWN | SUB_BIT_MOVE)))) {
+ dev_dbg(&bt541->client->dev, "unknown finger event %#02x\n",
+ p->sub_status);
+ return;
+ }
+
+ x = le16_to_cpu(p->x);
+ y = le16_to_cpu(p->y);
+
input_mt_slot(bt541->input_dev, slot);
- input_mt_report_slot_state(bt541->input_dev, MT_TOOL_FINGER, true);
- touchscreen_report_pos(bt541->input_dev, &bt541->prop,
- le16_to_cpu(p->x), le16_to_cpu(p->y), true);
- input_report_abs(bt541->input_dev, ABS_MT_TOUCH_MAJOR, p->width);
+ if (input_mt_report_slot_state(bt541->input_dev, MT_TOOL_FINGER,
+ !(p->sub_status & SUB_BIT_UP))) {
+ touchscreen_report_pos(bt541->input_dev,
+ &bt541->prop, x, y, true);
+ input_report_abs(bt541->input_dev,
+ ABS_MT_TOUCH_MAJOR, p->width);
+ dev_dbg(&bt541->client->dev, "finger %d %s (%u, %u)\n",
+ slot, p->sub_status & SUB_BIT_DOWN ? "down" : "move",
+ x, y);
+ } else {
+ dev_dbg(&bt541->client->dev, "finger %d up (%u, %u)\n",
+ slot, x, y);
+ }
}
static irqreturn_t zinitix_ts_irq_handler(int irq, void *bt541_handler)
@@ -323,6 +344,7 @@ static irqreturn_t zinitix_ts_irq_handler(int irq, void *bt541_handler)
struct bt541_ts_data *bt541 = bt541_handler;
struct i2c_client *client = bt541->client;
struct touch_event touch_event;
+ unsigned long finger_mask;
int error;
int i;
@@ -335,10 +357,14 @@ static irqreturn_t zinitix_ts_irq_handler(int irq, void *bt541_handler)
goto out;
}
- for (i = 0; i < MAX_SUPPORTED_FINGER_NUM; i++)
- if (touch_event.point_coord[i].sub_status & SUB_BIT_EXIST)
- zinitix_report_finger(bt541, i,
- &touch_event.point_coord[i]);
+ finger_mask = touch_event.finger_mask;
+ for_each_set_bit(i, &finger_mask, MAX_SUPPORTED_FINGER_NUM) {
+ const struct point_coord *p = &touch_event.point_coord[i];
+
+ /* Only process contacts that are actually reported */
+ if (p->sub_status & SUB_BIT_EXIST)
+ zinitix_report_finger(bt541, i, p);
+ }
input_mt_sync_frame(bt541->input_dev);
input_sync(bt541->input_dev);
--
2.34.1
From: Linus Walleij <linus.walleij(a)linaro.org>
[ Upstream commit e941dc13fd3717122207d74539ab95da07ef797f ]
I observed the following problem with the BT404 touch pad
running the Phosh UI:
When e.g. typing on the virtual keyboard pressing "g" would
produce "ggg".
After some analysis it turns out the firmware reports that three
fingers hit that coordinate at the same time, finger 0, 2 and
4 (of the five available 0,1,2,3,4).
DOWN
Zinitix-TS 3-0020: finger 0 down (246, 395)
Zinitix-TS 3-0020: finger 1 up (0, 0)
Zinitix-TS 3-0020: finger 2 down (246, 395)
Zinitix-TS 3-0020: finger 3 up (0, 0)
Zinitix-TS 3-0020: finger 4 down (246, 395)
UP
Zinitix-TS 3-0020: finger 0 up (246, 395)
Zinitix-TS 3-0020: finger 2 up (246, 395)
Zinitix-TS 3-0020: finger 4 up (246, 395)
This is one touch and release: i.e. this is all reported on
touch (down) and release.
There is a field in the struct touch_event called finger_cnt
which is actually a bitmask of the fingers active in the
event.
Rename this field finger_mask as this matches the use contents
better, then use for_each_set_bit() to iterate over just the
fingers that are actally active.
Factor out a finger reporting function zinitix_report_fingers()
to handle all fingers.
Also be more careful in reporting finger down/up: we were
reporting every event with input_mt_report_slot_state(..., true);
but this should only be reported on finger down or move,
not on finger up, so also add code to check p->sub_status
to see what is happening and report correctly.
After this my Zinitix BT404 touchscreen report fingers
flawlessly.
The vendor drive I have notably does not use the "finger_cnt"
and contains obviously incorrect code like this:
if (touch_dev->touch_info.finger_cnt > MAX_SUPPORTED_FINGER_NUM)
touch_dev->touch_info.finger_cnt = MAX_SUPPORTED_FINGER_NUM;
As MAX_SUPPORTED_FINGER_NUM is an ordinal and the field is
a bitmask this seems quite confused.
Signed-off-by: Linus Walleij <linus.walleij(a)linaro.org>
Link: https://lore.kernel.org/r/20220228233017.2270599-1-linus.walleij@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov(a)gmail.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/input/touchscreen/zinitix.c | 44 +++++++++++++++++++++++------
1 file changed, 35 insertions(+), 9 deletions(-)
diff --git a/drivers/input/touchscreen/zinitix.c b/drivers/input/touchscreen/zinitix.c
index 1e70b8d2a8d7..400957f4c8c9 100644
--- a/drivers/input/touchscreen/zinitix.c
+++ b/drivers/input/touchscreen/zinitix.c
@@ -135,7 +135,7 @@ struct point_coord {
struct touch_event {
__le16 status;
- u8 finger_cnt;
+ u8 finger_mask;
u8 time_stamp;
struct point_coord point_coord[MAX_SUPPORTED_FINGER_NUM];
};
@@ -311,11 +311,32 @@ static int zinitix_send_power_on_sequence(struct bt541_ts_data *bt541)
static void zinitix_report_finger(struct bt541_ts_data *bt541, int slot,
const struct point_coord *p)
{
+ u16 x, y;
+
+ if (unlikely(!(p->sub_status &
+ (SUB_BIT_UP | SUB_BIT_DOWN | SUB_BIT_MOVE)))) {
+ dev_dbg(&bt541->client->dev, "unknown finger event %#02x\n",
+ p->sub_status);
+ return;
+ }
+
+ x = le16_to_cpu(p->x);
+ y = le16_to_cpu(p->y);
+
input_mt_slot(bt541->input_dev, slot);
- input_mt_report_slot_state(bt541->input_dev, MT_TOOL_FINGER, true);
- touchscreen_report_pos(bt541->input_dev, &bt541->prop,
- le16_to_cpu(p->x), le16_to_cpu(p->y), true);
- input_report_abs(bt541->input_dev, ABS_MT_TOUCH_MAJOR, p->width);
+ if (input_mt_report_slot_state(bt541->input_dev, MT_TOOL_FINGER,
+ !(p->sub_status & SUB_BIT_UP))) {
+ touchscreen_report_pos(bt541->input_dev,
+ &bt541->prop, x, y, true);
+ input_report_abs(bt541->input_dev,
+ ABS_MT_TOUCH_MAJOR, p->width);
+ dev_dbg(&bt541->client->dev, "finger %d %s (%u, %u)\n",
+ slot, p->sub_status & SUB_BIT_DOWN ? "down" : "move",
+ x, y);
+ } else {
+ dev_dbg(&bt541->client->dev, "finger %d up (%u, %u)\n",
+ slot, x, y);
+ }
}
static irqreturn_t zinitix_ts_irq_handler(int irq, void *bt541_handler)
@@ -323,6 +344,7 @@ static irqreturn_t zinitix_ts_irq_handler(int irq, void *bt541_handler)
struct bt541_ts_data *bt541 = bt541_handler;
struct i2c_client *client = bt541->client;
struct touch_event touch_event;
+ unsigned long finger_mask;
int error;
int i;
@@ -335,10 +357,14 @@ static irqreturn_t zinitix_ts_irq_handler(int irq, void *bt541_handler)
goto out;
}
- for (i = 0; i < MAX_SUPPORTED_FINGER_NUM; i++)
- if (touch_event.point_coord[i].sub_status & SUB_BIT_EXIST)
- zinitix_report_finger(bt541, i,
- &touch_event.point_coord[i]);
+ finger_mask = touch_event.finger_mask;
+ for_each_set_bit(i, &finger_mask, MAX_SUPPORTED_FINGER_NUM) {
+ const struct point_coord *p = &touch_event.point_coord[i];
+
+ /* Only process contacts that are actually reported */
+ if (p->sub_status & SUB_BIT_EXIST)
+ zinitix_report_finger(bt541, i, p);
+ }
input_mt_sync_frame(bt541->input_dev);
input_sync(bt541->input_dev);
--
2.34.1
From: Linus Walleij <linus.walleij(a)linaro.org>
[ Upstream commit e941dc13fd3717122207d74539ab95da07ef797f ]
I observed the following problem with the BT404 touch pad
running the Phosh UI:
When e.g. typing on the virtual keyboard pressing "g" would
produce "ggg".
After some analysis it turns out the firmware reports that three
fingers hit that coordinate at the same time, finger 0, 2 and
4 (of the five available 0,1,2,3,4).
DOWN
Zinitix-TS 3-0020: finger 0 down (246, 395)
Zinitix-TS 3-0020: finger 1 up (0, 0)
Zinitix-TS 3-0020: finger 2 down (246, 395)
Zinitix-TS 3-0020: finger 3 up (0, 0)
Zinitix-TS 3-0020: finger 4 down (246, 395)
UP
Zinitix-TS 3-0020: finger 0 up (246, 395)
Zinitix-TS 3-0020: finger 2 up (246, 395)
Zinitix-TS 3-0020: finger 4 up (246, 395)
This is one touch and release: i.e. this is all reported on
touch (down) and release.
There is a field in the struct touch_event called finger_cnt
which is actually a bitmask of the fingers active in the
event.
Rename this field finger_mask as this matches the use contents
better, then use for_each_set_bit() to iterate over just the
fingers that are actally active.
Factor out a finger reporting function zinitix_report_fingers()
to handle all fingers.
Also be more careful in reporting finger down/up: we were
reporting every event with input_mt_report_slot_state(..., true);
but this should only be reported on finger down or move,
not on finger up, so also add code to check p->sub_status
to see what is happening and report correctly.
After this my Zinitix BT404 touchscreen report fingers
flawlessly.
The vendor drive I have notably does not use the "finger_cnt"
and contains obviously incorrect code like this:
if (touch_dev->touch_info.finger_cnt > MAX_SUPPORTED_FINGER_NUM)
touch_dev->touch_info.finger_cnt = MAX_SUPPORTED_FINGER_NUM;
As MAX_SUPPORTED_FINGER_NUM is an ordinal and the field is
a bitmask this seems quite confused.
Signed-off-by: Linus Walleij <linus.walleij(a)linaro.org>
Link: https://lore.kernel.org/r/20220228233017.2270599-1-linus.walleij@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov(a)gmail.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/input/touchscreen/zinitix.c | 44 +++++++++++++++++++++++------
1 file changed, 35 insertions(+), 9 deletions(-)
diff --git a/drivers/input/touchscreen/zinitix.c b/drivers/input/touchscreen/zinitix.c
index 1e70b8d2a8d7..400957f4c8c9 100644
--- a/drivers/input/touchscreen/zinitix.c
+++ b/drivers/input/touchscreen/zinitix.c
@@ -135,7 +135,7 @@ struct point_coord {
struct touch_event {
__le16 status;
- u8 finger_cnt;
+ u8 finger_mask;
u8 time_stamp;
struct point_coord point_coord[MAX_SUPPORTED_FINGER_NUM];
};
@@ -311,11 +311,32 @@ static int zinitix_send_power_on_sequence(struct bt541_ts_data *bt541)
static void zinitix_report_finger(struct bt541_ts_data *bt541, int slot,
const struct point_coord *p)
{
+ u16 x, y;
+
+ if (unlikely(!(p->sub_status &
+ (SUB_BIT_UP | SUB_BIT_DOWN | SUB_BIT_MOVE)))) {
+ dev_dbg(&bt541->client->dev, "unknown finger event %#02x\n",
+ p->sub_status);
+ return;
+ }
+
+ x = le16_to_cpu(p->x);
+ y = le16_to_cpu(p->y);
+
input_mt_slot(bt541->input_dev, slot);
- input_mt_report_slot_state(bt541->input_dev, MT_TOOL_FINGER, true);
- touchscreen_report_pos(bt541->input_dev, &bt541->prop,
- le16_to_cpu(p->x), le16_to_cpu(p->y), true);
- input_report_abs(bt541->input_dev, ABS_MT_TOUCH_MAJOR, p->width);
+ if (input_mt_report_slot_state(bt541->input_dev, MT_TOOL_FINGER,
+ !(p->sub_status & SUB_BIT_UP))) {
+ touchscreen_report_pos(bt541->input_dev,
+ &bt541->prop, x, y, true);
+ input_report_abs(bt541->input_dev,
+ ABS_MT_TOUCH_MAJOR, p->width);
+ dev_dbg(&bt541->client->dev, "finger %d %s (%u, %u)\n",
+ slot, p->sub_status & SUB_BIT_DOWN ? "down" : "move",
+ x, y);
+ } else {
+ dev_dbg(&bt541->client->dev, "finger %d up (%u, %u)\n",
+ slot, x, y);
+ }
}
static irqreturn_t zinitix_ts_irq_handler(int irq, void *bt541_handler)
@@ -323,6 +344,7 @@ static irqreturn_t zinitix_ts_irq_handler(int irq, void *bt541_handler)
struct bt541_ts_data *bt541 = bt541_handler;
struct i2c_client *client = bt541->client;
struct touch_event touch_event;
+ unsigned long finger_mask;
int error;
int i;
@@ -335,10 +357,14 @@ static irqreturn_t zinitix_ts_irq_handler(int irq, void *bt541_handler)
goto out;
}
- for (i = 0; i < MAX_SUPPORTED_FINGER_NUM; i++)
- if (touch_event.point_coord[i].sub_status & SUB_BIT_EXIST)
- zinitix_report_finger(bt541, i,
- &touch_event.point_coord[i]);
+ finger_mask = touch_event.finger_mask;
+ for_each_set_bit(i, &finger_mask, MAX_SUPPORTED_FINGER_NUM) {
+ const struct point_coord *p = &touch_event.point_coord[i];
+
+ /* Only process contacts that are actually reported */
+ if (p->sub_status & SUB_BIT_EXIST)
+ zinitix_report_finger(bt541, i, p);
+ }
input_mt_sync_frame(bt541->input_dev);
input_sync(bt541->input_dev);
--
2.34.1
The patch titled
Subject: ocfs2: fix crash when initialize filecheck kobj fails
has been removed from the -mm tree. Its filename was
ocfs2-fix-crash-when-initialize-filecheck-kobj-fails.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Subject: ocfs2: fix crash when initialize filecheck kobj fails
Once s_root is set, genric_shutdown_super() will be called if fill_super()
fails. That means, we will call ocfs2_dismount_volume() twice in such
case, which can lead to kernel crash. Fix this issue by initializing
filecheck kobj before setting s_root.
Link: https://lkml.kernel.org/r/20220310081930.86305-1-joseph.qi@linux.alibaba.com
Fixes: 5f483c4abb50 ("ocfs2: add kobject for online file check")
Signed-off-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Cc: Mark Fasheh <mark(a)fasheh.com>
Cc: Joel Becker <jlbec(a)evilplan.org>
Cc: Junxiao Bi <junxiao.bi(a)oracle.com>
Cc: Changwei Ge <gechangwei(a)live.cn>
Cc: Gang He <ghe(a)suse.com>
Cc: Jun Piao <piaojun(a)huawei.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
fs/ocfs2/super.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
--- a/fs/ocfs2/super.c~ocfs2-fix-crash-when-initialize-filecheck-kobj-fails
+++ a/fs/ocfs2/super.c
@@ -1105,17 +1105,6 @@ static int ocfs2_fill_super(struct super
goto read_super_error;
}
- root = d_make_root(inode);
- if (!root) {
- status = -ENOMEM;
- mlog_errno(status);
- goto read_super_error;
- }
-
- sb->s_root = root;
-
- ocfs2_complete_mount_recovery(osb);
-
osb->osb_dev_kset = kset_create_and_add(sb->s_id, NULL,
&ocfs2_kset->kobj);
if (!osb->osb_dev_kset) {
@@ -1133,6 +1122,17 @@ static int ocfs2_fill_super(struct super
goto read_super_error;
}
+ root = d_make_root(inode);
+ if (!root) {
+ status = -ENOMEM;
+ mlog_errno(status);
+ goto read_super_error;
+ }
+
+ sb->s_root = root;
+
+ ocfs2_complete_mount_recovery(osb);
+
if (ocfs2_mount_local(osb))
snprintf(nodestr, sizeof(nodestr), "local");
else
_
Patches currently in -mm which might be from joseph.qi(a)linux.alibaba.com are
ocfs2-cleanup-some-return-variables.patch
The patch titled
Subject: mm: swap: get rid of deadloop in swapin readahead
has been removed from the -mm tree. Its filename was
mm-swap-get-rid-of-deadloop-in-swapin-readahead.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Guo Ziliang <guo.ziliang(a)zte.com.cn>
Subject: mm: swap: get rid of deadloop in swapin readahead
In our testing, a deadloop task was found. Through sysrq printing, same
stack was found every time, as follows:
__swap_duplicate+0x58/0x1a0
swapcache_prepare+0x24/0x30
__read_swap_cache_async+0xac/0x220
read_swap_cache_async+0x58/0xa0
swapin_readahead+0x24c/0x628
do_swap_page+0x374/0x8a0
__handle_mm_fault+0x598/0xd60
handle_mm_fault+0x114/0x200
do_page_fault+0x148/0x4d0
do_translation_fault+0xb0/0xd4
do_mem_abort+0x50/0xb0
The reason for the deadloop is that swapcache_prepare() always returns
EEXIST, indicating that SWAP_HAS_CACHE has not been cleared, so that it
cannot jump out of the loop. We suspect that the task that clears the
SWAP_HAS_CACHE flag never gets a chance to run. We try to lower the
priority of the task stuck in a deadloop so that the task that clears the
SWAP_HAS_CACHE flag will run. The results show that the system returns to
normal after the priority is lowered.
In our testing, multiple real-time tasks are bound to the same core, and
the task in the deadloop is the highest priority task of the core, so the
deadloop task cannot be preempted.
Although cond_resched() is used by __read_swap_cache_async, it is an empty
function in the preemptive system and cannot achieve the purpose of
releasing the CPU. A high-priority task cannot release the CPU unless
preempted by a higher-priority task. But when this task is already the
highest priority task on this core, other tasks will not be able to be
scheduled. So we think we should replace cond_resched() with
schedule_timeout_uninterruptible(1), schedule_timeout_interruptible will
call set_current_state first to set the task state, so the task will be
removed from the running queue, so as to achieve the purpose of giving up
the CPU and prevent it from running in kernel mode for too long.
(akpm: ugly hack becomes uglier. But it fixes the issue in a
backportable-to-stable fashion while we hopefully work on something
better)
Link: https://lkml.kernel.org/r/20220221111749.1928222-1-cgel.zte@gmail.com
Signed-off-by: Guo Ziliang <guo.ziliang(a)zte.com.cn>
Reported-by: Zeal Robot <zealci(a)zte.com.cn>
Reviewed-by: Ran Xiaokai <ran.xiaokai(a)zte.com.cn>
Reviewed-by: Jiang Xuexin <jiang.xuexin(a)zte.com.cn>
Reviewed-by: Yang Yang <yang.yang29(a)zte.com.cn>
Acked-by: Hugh Dickins <hughd(a)google.com>
Cc: Naoya Horiguchi <naoya.horiguchi(a)nec.com>
Cc: Michal Hocko <mhocko(a)kernel.org>
Cc: Minchan Kim <minchan(a)kernel.org>
Cc: Johannes Weiner <hannes(a)cmpxchg.org>
Cc: Roger Quadros <rogerq(a)kernel.org>
Cc: Ziliang Guo <guo.ziliang(a)zte.com.cn>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/swap_state.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/swap_state.c~mm-swap-get-rid-of-deadloop-in-swapin-readahead
+++ a/mm/swap_state.c
@@ -478,7 +478,7 @@ struct page *__read_swap_cache_async(swp
* __read_swap_cache_async(), which has set SWAP_HAS_CACHE
* in swap_map, but not yet added its page to swap cache.
*/
- cond_resched();
+ schedule_timeout_uninterruptible(1);
}
/*
_
Patches currently in -mm which might be from guo.ziliang(a)zte.com.cn are
Both i.MX6 and i.MX8 reference manuals list 0xBF8 as SNVS_HPVIDR1
(chapters 57.9 and 6.4.5 respectively).
Without this, trying to read the revision number results in 0 on
all revisions, causing the i.MX6 quirk to apply on all platforms,
which in turn causes the driver to synthesise power button release
events instead of passing the real one as they happen even on
platforms like i.MX8 where that's not wanted.
Fixes: 1a26c920717a ("Input: snvs_pwrkey - send key events for i.MX6 S, DL and Q")
Cc: <stable(a)vger.kernel.org>
Tested-by: Martin Kepplinger <martin.kepplinger(a)puri.sm>
Signed-off-by: Sebastian Krzyszkowiak <sebastian.krzyszkowiak(a)puri.sm>
---
v2: augmented commit message; added cc: stable and tested-by
---
drivers/input/keyboard/snvs_pwrkey.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/keyboard/snvs_pwrkey.c b/drivers/input/keyboard/snvs_pwrkey.c
index 65286762b02a..ad8660be0127 100644
--- a/drivers/input/keyboard/snvs_pwrkey.c
+++ b/drivers/input/keyboard/snvs_pwrkey.c
@@ -20,7 +20,7 @@
#include <linux/mfd/syscon.h>
#include <linux/regmap.h>
-#define SNVS_HPVIDR1_REG 0xF8
+#define SNVS_HPVIDR1_REG 0xBF8
#define SNVS_LPSR_REG 0x4C /* LP Status Register */
#define SNVS_LPCR_REG 0x38 /* LP Control Register */
#define SNVS_HPSR_REG 0x14
--
2.35.1
Ampere Altra defines CPU clusters in the ACPI PPTT. They share a Snoop
Control Unit, but have no shared CPU-side last level cache.
cpu_coregroup_mask() will return a cpumask with weight 1, while
cpu_clustergroup_mask() will return a cpumask with weight 2.
As a result, build_sched_domain() will BUG() once per CPU with:
BUG: arch topology borken
the CLS domain not a subset of the MC domain
The MC level cpumask is then extended to that of the CLS child, and is
later removed entirely as redundant. This sched domain topology is an
improvement over previous topologies, or those built without
SCHED_CLUSTER, particularly for certain latency sensitive workloads.
With the current scheduler model and heuristics, this is a desirable
default topology for Ampere Altra and Altra Max system.
Rather than create a custom sched domains topology structure and
introduce new logic in arch/arm64 to detect these systems, update the
core_mask so coregroup is never a subset of clustergroup, extending it
to cluster_siblings if necessary.
This has the added benefit over a custom topology of working for both
symmetric and asymmetric topologies. It does not address systems where
the cluster topology is above a populated mc topology, but these are not
considered today and can be addressed separately if and when they
appear.
The final sched domain topology for a 2 socket Ampere Altra system is
unchanged with or without CONFIG_SCHED_CLUSTER, and the BUG is avoided:
For CPU0:
CONFIG_SCHED_CLUSTER=y
CLS [0-1]
DIE [0-79]
NUMA [0-159]
CONFIG_SCHED_CLUSTER is not set
DIE [0-79]
NUMA [0-159]
Cc: Sudeep Holla <sudeep.holla(a)arm.com>
Cc: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael(a)kernel.org>
Cc: Catalin Marinas <catalin.marinas(a)arm.com>
Cc: Will Deacon <will(a)kernel.org>
Cc: Peter Zijlstra <peterz(a)infradead.org>
Cc: Vincent Guittot <vincent.guittot(a)linaro.org>
Cc: Barry Song <song.bao.hua(a)hisilicon.com>
Cc: Valentin Schneider <valentin.schneider(a)arm.com>
Cc: D. Scott Phillips <scott(a)os.amperecomputing.com>
Cc: Ilkka Koskinen <ilkka(a)os.amperecomputing.com>
Cc: <stable(a)vger.kernel.org> # 5.16.x
Suggested-by: Barry Song <song.bao.hua(a)hisilicon.com>
Signed-off-by: Darren Hart <darren(a)os.amperecomputing.com>
---
v1: Drop MC level if coregroup weight == 1
v2: New sd topo in arch/arm64/kernel/smp.c
v3: No new topo, extend core_mask to cluster_siblings
drivers/base/arch_topology.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
index 976154140f0b..a96f45db928b 100644
--- a/drivers/base/arch_topology.c
+++ b/drivers/base/arch_topology.c
@@ -628,6 +628,14 @@ const struct cpumask *cpu_coregroup_mask(int cpu)
core_mask = &cpu_topology[cpu].llc_sibling;
}
+ /*
+ * For systems with no shared cpu-side LLC but with clusters defined,
+ * extend core_mask to cluster_siblings. The sched domain builder will
+ * then remove MC as redundant with CLS if SCHED_CLUSTER is enabled.
+ */
+ if (cpumask_subset(core_mask, &cpu_topology[cpu].cluster_sibling))
+ core_mask = &cpu_topology[cpu].cluster_sibling;
+
return core_mask;
}
--
2.31.1
The process_madvise() system call returns error even after processing
some VMA's passed in the 'struct iovec' vector list which leaves the
user confused to know where to restart the advise next. It is also
against this syscall man page[1] documentation where it mentions that
"return value may be less than the total number of requested bytes, if
an error occurred after some iovec elements were already processed.".
Consider a user passed 10 VMA's in the 'struct iovec' vector list of
which 9 are processed but one. Then it just returns the error caused on
that failed VMA despite the first 9 VMA's processed, leaving the user
confused about on which VMA it is failed. Returning the number of bytes
processed here can help the user to know which VMA it is failed on and
thus can retry/skip the advise on that VMA.
[1]https://man7.org/linux/man-pages/man2/process_madvise.2.html.
Fixes: ecb8ac8b1f14("mm/madvise: introduce process_madvise() syscall: an external memory hinting API")
Cc: <stable(a)vger.kernel.org> # 5.10+
Signed-off-by: Charan Teja Kalla <quic_charante(a)quicinc.com>
---
Changes in V2:
-- Separated the ENOMEM handling and return bytes processed, as per Minchan comments.
-- This contains correcting return bytes processed with process_madvise().
Changes in V1:
-- Fixed the ENOMEM handling and return bytes processed by process_madvise.
-- https://patchwork.kernel.org/project/linux-mm/patch/1646803679-11433-1-git-…
mm/madvise.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/mm/madvise.c b/mm/madvise.c
index 38d0f51..e97e6a9 100644
--- a/mm/madvise.c
+++ b/mm/madvise.c
@@ -1433,8 +1433,7 @@ SYSCALL_DEFINE5(process_madvise, int, pidfd, const struct iovec __user *, vec,
iov_iter_advance(&iter, iovec.iov_len);
}
- if (ret == 0)
- ret = total_len - iov_iter_count(&iter);
+ ret = (total_len - iov_iter_count(&iter)) ? : ret;
release_mm:
mmput(mm);
--
2.7.4
This is the start of the stable review cycle for the 5.4.185 release.
There are 43 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, 16 Mar 2022 11:27:22 +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.185-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.185-rc1
Krish Sadhukhan <krish.sadhukhan(a)oracle.com>
KVM: SVM: Don't flush cache if hardware enforces cache coherency across encryption domains
Krish Sadhukhan <krish.sadhukhan(a)oracle.com>
x86/mm/pat: Don't flush cache if hardware enforces cache coherency across encryption domnains
Krish Sadhukhan <krish.sadhukhan(a)oracle.com>
x86/cpu: Add hardware-enforced cache coherency as a CPUID feature
Borislav Petkov <bp(a)suse.de>
x86/cpufeatures: Mark two free bits in word 3
Josh Triplett <josh(a)joshtriplett.org>
ext4: add check to prevent attempting to resize an fs with sparse_super2
Russell King (Oracle) <rmk+kernel(a)armlinux.org.uk>
ARM: fix Thumb2 regression with Spectre BHB
Michael S. Tsirkin <mst(a)redhat.com>
virtio: acknowledge all features before access
Michael S. Tsirkin <mst(a)redhat.com>
virtio: unexport virtio_finalize_features
Pali Rohár <pali(a)kernel.org>
arm64: dts: marvell: armada-37xx: Remap IO space to bus address 0x0
Emil Renner Berthing <kernel(a)esmil.dk>
riscv: Fix auipc+jalr relocation range checks
Rong Chen <rong.chen(a)amlogic.com>
mmc: meson: Fix usage of meson_mmc_post_req()
Robert Hancock <robert.hancock(a)calian.com>
net: macb: Fix lost RX packet wakeup race in NAPI receive
Dan Carpenter <dan.carpenter(a)oracle.com>
staging: gdm724x: fix use after free in gdm_lte_rx()
Miklos Szeredi <mszeredi(a)redhat.com>
fuse: fix pipe buffer lifetime for direct_io
Randy Dunlap <rdunlap(a)infradead.org>
ARM: Spectre-BHB: provide empty stub for non-config
Mike Kravetz <mike.kravetz(a)oracle.com>
selftests/memfd: clean up mapping in mfd_fail_write
Aneesh Kumar K.V <aneesh.kumar(a)linux.ibm.com>
selftest/vm: fix map_fixed_noreplace test failure
Sven Schnelle <svens(a)linux.ibm.com>
tracing: Ensure trace buffer is at least 4096 bytes large
Niels Dossche <dossche.niels(a)gmail.com>
ipv6: prevent a possible race condition with lifetimes
Marek Marczykowski-Górecki <marmarek(a)invisiblethingslab.com>
Revert "xen-netback: Check for hotplug-status existence before watching"
Marek Marczykowski-Górecki <marmarek(a)invisiblethingslab.com>
Revert "xen-netback: remove 'hotplug-status' once it has served its purpose"
suresh kumar <suresh2514(a)gmail.com>
net-sysfs: add check for netdevice being present to speed_show
Kumar Kartikeya Dwivedi <memxor(a)gmail.com>
selftests/bpf: Add test for bpf_timer overwriting crash
Jeremy Linton <jeremy.linton(a)arm.com>
net: bcmgenet: Don't claim WOL when its not available
Eric Dumazet <edumazet(a)google.com>
sctp: fix kernel-infoleak for SCTP sockets
Clément Léger <clement.leger(a)bootlin.com>
net: phy: DP83822: clear MISR2 register to disable interrupts
Miaoqian Lin <linmq006(a)gmail.com>
gianfar: ethtool: Fix refcount leak in gfar_get_ts_info
Mark Featherston <mark(a)embeddedTS.com>
gpio: ts4900: Do not set DAT and OE together
Guillaume Nault <gnault(a)redhat.com>
selftests: pmtu.sh: Kill tcpdump processes launched by subshell.
Pavel Skripkin <paskripkin(a)gmail.com>
NFC: port100: fix use-after-free in port100_send_complete
Moshe Shemesh <moshe(a)nvidia.com>
net/mlx5: Fix a race on command flush flow
Mohammad Kabat <mohammadkab(a)nvidia.com>
net/mlx5: Fix size field in bufferx_reg struct
Duoming Zhou <duoming(a)zju.edu.cn>
ax25: Fix NULL pointer dereference in ax25_kill_by_device
Jiasheng Jiang <jiasheng(a)iscas.ac.cn>
net: ethernet: lpc_eth: Handle error for clk_enable
Jiasheng Jiang <jiasheng(a)iscas.ac.cn>
net: ethernet: ti: cpts: Handle error for clk_enable
Miaoqian Lin <linmq006(a)gmail.com>
ethernet: Fix error handling in xemaclite_of_probe
Joel Stanley <joel(a)jms.id.au>
ARM: dts: aspeed: Fix AST2600 quad spi group
Jernej Skrabec <jernej.skrabec(a)gmail.com>
drm/sun4i: mixer: Fix P010 and P210 format numbers
Tom Rix <trix(a)redhat.com>
qed: return status of qed_iov_get_link
Jia-Ju Bai <baijiaju1990(a)gmail.com>
net: qlogic: check the return value of dma_alloc_coherent() in qed_vf_hw_prepare()
Xie Yongji <xieyongji(a)bytedance.com>
virtio-blk: Don't use MAX_DISCARD_SEGMENTS if max_discard_seg is zero
Pali Rohár <pali(a)kernel.org>
arm64: dts: armada-3720-turris-mox: Add missing ethernet0 alias
Taniya Das <tdas(a)codeaurora.org>
clk: qcom: gdsc: Add support to update GDSC transition delay
-------------
Diffstat:
Makefile | 4 +-
arch/arm/boot/dts/aspeed-g6-pinctrl.dtsi | 2 +-
arch/arm/include/asm/spectre.h | 6 +++
arch/arm/kernel/entry-armv.S | 4 +-
.../boot/dts/marvell/armada-3720-turris-mox.dts | 8 +++-
arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 2 +-
arch/riscv/kernel/module.c | 21 +++++++--
arch/x86/include/asm/cpufeatures.h | 2 +
arch/x86/kernel/cpu/scattered.c | 1 +
arch/x86/kvm/svm.c | 3 +-
arch/x86/mm/pageattr.c | 2 +-
drivers/block/virtio_blk.c | 10 +++-
drivers/clk/qcom/gdsc.c | 26 +++++++++--
drivers/clk/qcom/gdsc.h | 8 +++-
drivers/gpio/gpio-ts4900.c | 24 ++++++++--
drivers/gpu/drm/sun4i/sun8i_mixer.h | 8 ++--
drivers/mmc/host/meson-gx-mmc.c | 15 +++---
drivers/net/ethernet/broadcom/genet/bcmgenet_wol.c | 7 +++
drivers/net/ethernet/cadence/macb_main.c | 25 +++++++++-
drivers/net/ethernet/freescale/gianfar_ethtool.c | 1 +
drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 15 +++---
drivers/net/ethernet/nxp/lpc_eth.c | 5 +-
drivers/net/ethernet/qlogic/qed/qed_sriov.c | 18 +++++---
drivers/net/ethernet/qlogic/qed/qed_vf.c | 7 +++
drivers/net/ethernet/ti/cpts.c | 4 +-
drivers/net/ethernet/xilinx/xilinx_emaclite.c | 4 +-
drivers/net/phy/dp83822.c | 2 +-
drivers/net/xen-netback/xenbus.c | 13 ++----
drivers/nfc/port100.c | 2 +
drivers/staging/gdm724x/gdm_lte.c | 5 +-
drivers/virtio/virtio.c | 39 ++++++++--------
fs/ext4/resize.c | 5 ++
fs/fuse/dev.c | 12 ++++-
fs/fuse/file.c | 1 +
fs/fuse/fuse_i.h | 1 +
include/linux/mlx5/mlx5_ifc.h | 4 +-
include/linux/virtio.h | 1 -
include/linux/virtio_config.h | 3 +-
kernel/trace/trace.c | 10 ++--
net/ax25/af_ax25.c | 7 +++
net/core/net-sysfs.c | 2 +-
net/ipv6/addrconf.c | 2 +
net/sctp/diag.c | 9 ++--
.../testing/selftests/bpf/prog_tests/timer_crash.c | 32 +++++++++++++
tools/testing/selftests/bpf/progs/timer_crash.c | 54 ++++++++++++++++++++++
tools/testing/selftests/memfd/memfd_test.c | 1 +
tools/testing/selftests/net/pmtu.sh | 7 ++-
tools/testing/selftests/vm/map_fixed_noreplace.c | 49 +++++++++++++++-----
48 files changed, 378 insertions(+), 115 deletions(-)
On Fri, Mar 18, 2022 at 02:42:49PM +0000, Geliang Tang wrote:
> Hi Greg,
>
> I got this bpf selftests build break today on the stable branch 5.10.106:
>
> =========================================================================
> CLNG-LLC [test_maps] test_tracepoint.o
> progs/timer_crash.c:8:19: error: field has incomplete type 'struct bpf_timer'
> struct bpf_timer timer;
> ^
> progs/timer_crash.c:8:9: note: forward declaration of 'struct bpf_timer'
> struct bpf_timer timer;
> ^
> progs/timer_crash.c:35:6: warning: implicit declaration of function 'bpf_get_current_task_btf' is invalid in C99 [-Wimplicit-function-declaration]
> if (bpf_get_current_task_btf()->tgid != pid)
> ^
> progs/timer_crash.c:35:34: error: member reference type 'int' is not a pointer
> if (bpf_get_current_task_btf()->tgid != pid)
> ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
> progs/timer_crash.c:49:3: warning: implicit declaration of function 'bpf_timer_cancel' is invalid in C99 [-Wimplicit-function-declaration]
> bpf_timer_cancel(&e->timer);
> ^
> 2 warnings and 2 errors generated.
> CLNG-LLC [test_maps] test_trace_ext_tracing.o
> llc: error: llc: <stdin>:1:1: error: expected top-level entity
> BPF obj compilation failed
> ^
> make: *** [Makefile:402: tools/testing/selftests/bpf/timer_crash.o] Error 1
> make: *** Waiting for unfinished jobs....
> CLNG-LLC [test_maps] test_trace_ext.o
> =========================================================================
>
> It is introduced by this commit, "selftests/bpf: Add test for bpf_timer
> overwriting crash". Since the commit "bpf: Introduce bpf timers." has not
> been merged into the stable branch yet.
>
> I am writing to you to report this bug.
>
Now reverted, thanks!
greg k-h
The patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From ebe48d368e97d007bfeb76fcb065d6cfc4c96645 Mon Sep 17 00:00:00 2001
From: Steffen Klassert <steffen.klassert(a)secunet.com>
Date: Mon, 7 Mar 2022 13:11:39 +0100
Subject: [PATCH] esp: Fix possible buffer overflow in ESP transformation
The maximum message size that can be send is bigger than
the maximum site that skb_page_frag_refill can allocate.
So it is possible to write beyond the allocated buffer.
Fix this by doing a fallback to COW in that case.
v2:
Avoid get get_order() costs as suggested by Linus Torvalds.
Fixes: cac2661c53f3 ("esp4: Avoid skb_cow_data whenever possible")
Fixes: 03e2a30f6a27 ("esp6: Avoid skb_cow_data whenever possible")
Reported-by: valis <sec(a)valis.email>
Signed-off-by: Steffen Klassert <steffen.klassert(a)secunet.com>
diff --git a/include/net/esp.h b/include/net/esp.h
index 9c5637d41d95..90cd02ff77ef 100644
--- a/include/net/esp.h
+++ b/include/net/esp.h
@@ -4,6 +4,8 @@
#include <linux/skbuff.h>
+#define ESP_SKB_FRAG_MAXSIZE (PAGE_SIZE << SKB_FRAG_PAGE_ORDER)
+
struct ip_esp_hdr;
static inline struct ip_esp_hdr *ip_esp_hdr(const struct sk_buff *skb)
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c
index e1b1d080e908..70e6c87fbe3d 100644
--- a/net/ipv4/esp4.c
+++ b/net/ipv4/esp4.c
@@ -446,6 +446,7 @@ int esp_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *
struct page *page;
struct sk_buff *trailer;
int tailen = esp->tailen;
+ unsigned int allocsz;
/* this is non-NULL only with TCP/UDP Encapsulation */
if (x->encap) {
@@ -455,6 +456,10 @@ int esp_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *
return err;
}
+ allocsz = ALIGN(skb->data_len + tailen, L1_CACHE_BYTES);
+ if (allocsz > ESP_SKB_FRAG_MAXSIZE)
+ goto cow;
+
if (!skb_cloned(skb)) {
if (tailen <= skb_tailroom(skb)) {
nfrags = 1;
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c
index 7591160edce1..b0ffbcd5432d 100644
--- a/net/ipv6/esp6.c
+++ b/net/ipv6/esp6.c
@@ -482,6 +482,7 @@ int esp6_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info
struct page *page;
struct sk_buff *trailer;
int tailen = esp->tailen;
+ unsigned int allocsz;
if (x->encap) {
int err = esp6_output_encap(x, skb, esp);
@@ -490,6 +491,10 @@ int esp6_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info
return err;
}
+ allocsz = ALIGN(skb->data_len + tailen, L1_CACHE_BYTES);
+ if (allocsz > ESP_SKB_FRAG_MAXSIZE)
+ goto cow;
+
if (!skb_cloned(skb)) {
if (tailen <= skb_tailroom(skb)) {
nfrags = 1;
Hi,
I would like to request the following patches to be included
into the stable 5.10 tree:
a049a30fc27c ("net: usb: Correct PHY handling of smsc95xx")
0bf3885324a8 ("net: usb: Correct reset handling of smsc95xx")
c70c453abcbf ("smsc95xx: Ignore -ENODEV errors when device is unplugged")
They are already present in 5.15 and 5.16 and they fix real issues
on 5.10 too. I have been running 5.10 with these 3 patches applied locally
and no reboot/disconnect errors are seen anymore. Alexander Stein also
sees an smsc95xx suspend/resume issue fixed in 5.10 with the series applied.
Thanks,
Fabio Estevam
From: Filipe Manana <fdmanana(a)suse.com>
Commit 40cdc509877bacb438213b83c7541c5e24a1d9ec upstream
After the recent changes made by commit c2e39305299f01 ("btrfs: clear
extent buffer uptodate when we fail to write it") and its followup fix,
commit 651740a5024117 ("btrfs: check WRITE_ERR when trying to read an
extent buffer"), we can now end up not cleaning up space reservations of
log tree extent buffers after a transaction abort happens, as well as not
cleaning up still dirty extent buffers.
This happens because if writeback for a log tree extent buffer failed,
then we have cleared the bit EXTENT_BUFFER_UPTODATE from the extent buffer
and we have also set the bit EXTENT_BUFFER_WRITE_ERR on it. Later on,
when trying to free the log tree with free_log_tree(), which iterates
over the tree, we can end up getting an -EIO error when trying to read
a node or a leaf, since read_extent_buffer_pages() returns -EIO if an
extent buffer does not have EXTENT_BUFFER_UPTODATE set and has the
EXTENT_BUFFER_WRITE_ERR bit set. Getting that -EIO means that we return
immediately as we can not iterate over the entire tree.
In that case we never update the reserved space for an extent buffer in
the respective block group and space_info object.
When this happens we get the following traces when unmounting the fs:
[174957.284509] BTRFS: error (device dm-0) in cleanup_transaction:1913: errno=-5 IO failure
[174957.286497] BTRFS: error (device dm-0) in free_log_tree:3420: errno=-5 IO failure
[174957.399379] ------------[ cut here ]------------
[174957.402497] WARNING: CPU: 2 PID: 3206883 at fs/btrfs/block-group.c:127 btrfs_put_block_group+0x77/0xb0 [btrfs]
[174957.407523] Modules linked in: btrfs overlay dm_zero (...)
[174957.424917] CPU: 2 PID: 3206883 Comm: umount Tainted: G W 5.16.0-rc5-btrfs-next-109 #1
[174957.426689] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014
[174957.428716] RIP: 0010:btrfs_put_block_group+0x77/0xb0 [btrfs]
[174957.429717] Code: 21 48 8b bd (...)
[174957.432867] RSP: 0018:ffffb70d41cffdd0 EFLAGS: 00010206
[174957.433632] RAX: 0000000000000001 RBX: ffff8b09c3848000 RCX: ffff8b0758edd1c8
[174957.434689] RDX: 0000000000000001 RSI: ffffffffc0b467e7 RDI: ffff8b0758edd000
[174957.436068] RBP: ffff8b0758edd000 R08: 0000000000000000 R09: 0000000000000000
[174957.437114] R10: 0000000000000246 R11: 0000000000000000 R12: ffff8b09c3848148
[174957.438140] R13: ffff8b09c3848198 R14: ffff8b0758edd188 R15: dead000000000100
[174957.439317] FS: 00007f328fb82800(0000) GS:ffff8b0a2d200000(0000) knlGS:0000000000000000
[174957.440402] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[174957.441164] CR2: 00007fff13563e98 CR3: 0000000404f4e005 CR4: 0000000000370ee0
[174957.442117] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[174957.443076] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[174957.443948] Call Trace:
[174957.444264] <TASK>
[174957.444538] btrfs_free_block_groups+0x255/0x3c0 [btrfs]
[174957.445238] close_ctree+0x301/0x357 [btrfs]
[174957.445803] ? call_rcu+0x16c/0x290
[174957.446250] generic_shutdown_super+0x74/0x120
[174957.446832] kill_anon_super+0x14/0x30
[174957.447305] btrfs_kill_super+0x12/0x20 [btrfs]
[174957.447890] deactivate_locked_super+0x31/0xa0
[174957.448440] cleanup_mnt+0x147/0x1c0
[174957.448888] task_work_run+0x5c/0xa0
[174957.449336] exit_to_user_mode_prepare+0x1e5/0x1f0
[174957.449934] syscall_exit_to_user_mode+0x16/0x40
[174957.450512] do_syscall_64+0x48/0xc0
[174957.450980] entry_SYSCALL_64_after_hwframe+0x44/0xae
[174957.451605] RIP: 0033:0x7f328fdc4a97
[174957.452059] Code: 03 0c 00 f7 (...)
[174957.454320] RSP: 002b:00007fff13564ec8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
[174957.455262] RAX: 0000000000000000 RBX: 00007f328feea264 RCX: 00007f328fdc4a97
[174957.456131] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000560b8ae51dd0
[174957.457118] RBP: 0000560b8ae51ba0 R08: 0000000000000000 R09: 00007fff13563c40
[174957.458005] R10: 00007f328fe49fc0 R11: 0000000000000246 R12: 0000000000000000
[174957.459113] R13: 0000560b8ae51dd0 R14: 0000560b8ae51cb0 R15: 0000000000000000
[174957.460193] </TASK>
[174957.460534] irq event stamp: 0
[174957.461003] hardirqs last enabled at (0): [<0000000000000000>] 0x0
[174957.461947] hardirqs last disabled at (0): [<ffffffffb0e94214>] copy_process+0x934/0x2040
[174957.463147] softirqs last enabled at (0): [<ffffffffb0e94214>] copy_process+0x934/0x2040
[174957.465116] softirqs last disabled at (0): [<0000000000000000>] 0x0
[174957.466323] ---[ end trace bc7ee0c490bce3af ]---
[174957.467282] ------------[ cut here ]------------
[174957.468184] WARNING: CPU: 2 PID: 3206883 at fs/btrfs/block-group.c:3976 btrfs_free_block_groups+0x330/0x3c0 [btrfs]
[174957.470066] Modules linked in: btrfs overlay dm_zero (...)
[174957.483137] CPU: 2 PID: 3206883 Comm: umount Tainted: G W 5.16.0-rc5-btrfs-next-109 #1
[174957.484691] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014
[174957.486853] RIP: 0010:btrfs_free_block_groups+0x330/0x3c0 [btrfs]
[174957.488050] Code: 00 00 00 ad de (...)
[174957.491479] RSP: 0018:ffffb70d41cffde0 EFLAGS: 00010206
[174957.492520] RAX: ffff8b08d79310b0 RBX: ffff8b09c3848000 RCX: 0000000000000000
[174957.493868] RDX: 0000000000000001 RSI: fffff443055ee600 RDI: ffffffffb1131846
[174957.495183] RBP: ffff8b08d79310b0 R08: 0000000000000000 R09: 0000000000000000
[174957.496580] R10: 0000000000000001 R11: 0000000000000000 R12: ffff8b08d7931000
[174957.498027] R13: ffff8b09c38492b0 R14: dead000000000122 R15: dead000000000100
[174957.499438] FS: 00007f328fb82800(0000) GS:ffff8b0a2d200000(0000) knlGS:0000000000000000
[174957.500990] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[174957.502117] CR2: 00007fff13563e98 CR3: 0000000404f4e005 CR4: 0000000000370ee0
[174957.503513] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[174957.504864] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[174957.506167] Call Trace:
[174957.506654] <TASK>
[174957.507047] close_ctree+0x301/0x357 [btrfs]
[174957.507867] ? call_rcu+0x16c/0x290
[174957.508567] generic_shutdown_super+0x74/0x120
[174957.509447] kill_anon_super+0x14/0x30
[174957.510194] btrfs_kill_super+0x12/0x20 [btrfs]
[174957.511123] deactivate_locked_super+0x31/0xa0
[174957.511976] cleanup_mnt+0x147/0x1c0
[174957.512610] task_work_run+0x5c/0xa0
[174957.513309] exit_to_user_mode_prepare+0x1e5/0x1f0
[174957.514231] syscall_exit_to_user_mode+0x16/0x40
[174957.515069] do_syscall_64+0x48/0xc0
[174957.515718] entry_SYSCALL_64_after_hwframe+0x44/0xae
[174957.516688] RIP: 0033:0x7f328fdc4a97
[174957.517413] Code: 03 0c 00 f7 d8 (...)
[174957.521052] RSP: 002b:00007fff13564ec8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
[174957.522514] RAX: 0000000000000000 RBX: 00007f328feea264 RCX: 00007f328fdc4a97
[174957.523950] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000560b8ae51dd0
[174957.525375] RBP: 0000560b8ae51ba0 R08: 0000000000000000 R09: 00007fff13563c40
[174957.526763] R10: 00007f328fe49fc0 R11: 0000000000000246 R12: 0000000000000000
[174957.528058] R13: 0000560b8ae51dd0 R14: 0000560b8ae51cb0 R15: 0000000000000000
[174957.529404] </TASK>
[174957.529843] irq event stamp: 0
[174957.530256] hardirqs last enabled at (0): [<0000000000000000>] 0x0
[174957.531061] hardirqs last disabled at (0): [<ffffffffb0e94214>] copy_process+0x934/0x2040
[174957.532075] softirqs last enabled at (0): [<ffffffffb0e94214>] copy_process+0x934/0x2040
[174957.533083] softirqs last disabled at (0): [<0000000000000000>] 0x0
[174957.533865] ---[ end trace bc7ee0c490bce3b0 ]---
[174957.534452] BTRFS info (device dm-0): space_info 4 has 1070841856 free, is not full
[174957.535404] BTRFS info (device dm-0): space_info total=1073741824, used=2785280, pinned=0, reserved=49152, may_use=0, readonly=65536 zone_unusable=0
[174957.537029] BTRFS info (device dm-0): global_block_rsv: size 0 reserved 0
[174957.537859] BTRFS info (device dm-0): trans_block_rsv: size 0 reserved 0
[174957.538697] BTRFS info (device dm-0): chunk_block_rsv: size 0 reserved 0
[174957.539552] BTRFS info (device dm-0): delayed_block_rsv: size 0 reserved 0
[174957.540403] BTRFS info (device dm-0): delayed_refs_rsv: size 0 reserved 0
This also means that in case we have log tree extent buffers that are
still dirty, we can end up not cleaning them up in case we find an
extent buffer with EXTENT_BUFFER_WRITE_ERR set on it, as in that case
we have no way for iterating over the rest of the tree.
This issue is very often triggered with test cases generic/475 and
generic/648 from fstests.
The issue could almost be fixed by iterating over the io tree attached to
each log root which keeps tracks of the range of allocated extent buffers,
log_root->dirty_log_pages, however that does not work and has some
inconveniences:
1) After we sync the log, we clear the range of the extent buffers from
the io tree, so we can't find them after writeback. We could keep the
ranges in the io tree, with a separate bit to signal they represent
extent buffers already written, but that means we need to hold into
more memory until the transaction commits.
How much more memory is used depends a lot on whether we are able to
allocate contiguous extent buffers on disk (and how often) for a log
tree - if we are able to, then a single extent state record can
represent multiple extent buffers, otherwise we need multiple extent
state record structures to track each extent buffer.
In fact, my earlier approach did that:
https://lore.kernel.org/linux-btrfs/3aae7c6728257c7ce2279d6660ee2797e5e34bb…
However that can cause a very significant negative impact on
performance, not only due to the extra memory usage but also because
we get a larger and deeper dirty_log_pages io tree.
We got a report that, on beefy machines at least, we can get such
performance drop with fsmark for example:
https://lore.kernel.org/linux-btrfs/20220117082426.GE32491@xsang-OptiPlex-9…
2) We would be doing it only to deal with an unexpected and exceptional
case, which is basically failure to read an extent buffer from disk
due to IO failures. On a healthy system we don't expect transaction
aborts to happen after all;
3) Instead of relying on iterating the log tree or tracking the ranges
of extent buffers in the dirty_log_pages io tree, using the radix
tree that tracks extent buffers (fs_info->buffer_radix) to find all
log tree extent buffers is not reliable either, because after writeback
of an extent buffer it can be evicted from memory by the release page
callback of the btree inode (btree_releasepage()).
Since there's no way to be able to properly cleanup a log tree without
being able to read its extent buffers from disk and without using more
memory to track the logical ranges of the allocated extent buffers do
the following:
1) When we fail to cleanup a log tree, setup a flag that indicates that
failure;
2) Trigger writeback of all log tree extent buffers that are still dirty,
and wait for the writeback to complete. This is just to cleanup their
state, page states, page leaks, etc;
3) When unmounting the fs, ignore if the number of bytes reserved in a
block group and in a space_info is not 0 if, and only if, we failed to
cleanup a log tree. Also ignore only for metadata block groups and the
metadata space_info object.
This is far from a perfect solution, but it serves to silence test
failures such as those from generic/475 and generic/648. However having
a non-zero value for the reserved bytes counters on unmount after a
transaction abort, is not such a terrible thing and it's completely
harmless, it does not affect the filesystem integrity in any way.
Signed-off-by: Filipe Manana <fdmanana(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
Signed-off-by: Anand Jain <anand.jain(a)oracle.com>
---
Unrelated conflict fix in
fs/btrfs/ctree.h
fs/btrfs/block-group.c | 26 ++++++++++++++++++++++++--
fs/btrfs/ctree.h | 7 +++++++
fs/btrfs/tree-log.c | 23 +++++++++++++++++++++++
3 files changed, 54 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c
index 5edd07e0232d..e1c5c2114edf 100644
--- a/fs/btrfs/block-group.c
+++ b/fs/btrfs/block-group.c
@@ -123,7 +123,16 @@ void btrfs_put_block_group(struct btrfs_block_group *cache)
{
if (refcount_dec_and_test(&cache->refs)) {
WARN_ON(cache->pinned > 0);
- WARN_ON(cache->reserved > 0);
+ /*
+ * If there was a failure to cleanup a log tree, very likely due
+ * to an IO failure on a writeback attempt of one or more of its
+ * extent buffers, we could not do proper (and cheap) unaccounting
+ * of their reserved space, so don't warn on reserved > 0 in that
+ * case.
+ */
+ if (!(cache->flags & BTRFS_BLOCK_GROUP_METADATA) ||
+ !BTRFS_FS_LOG_CLEANUP_ERROR(cache->fs_info))
+ WARN_ON(cache->reserved > 0);
/*
* A block_group shouldn't be on the discard_list anymore.
@@ -3888,9 +3897,22 @@ int btrfs_free_block_groups(struct btrfs_fs_info *info)
* important and indicates a real bug if this happens.
*/
if (WARN_ON(space_info->bytes_pinned > 0 ||
- space_info->bytes_reserved > 0 ||
space_info->bytes_may_use > 0))
btrfs_dump_space_info(info, space_info, 0, 0);
+
+ /*
+ * If there was a failure to cleanup a log tree, very likely due
+ * to an IO failure on a writeback attempt of one or more of its
+ * extent buffers, we could not do proper (and cheap) unaccounting
+ * of their reserved space, so don't warn on bytes_reserved > 0 in
+ * that case.
+ */
+ if (!(space_info->flags & BTRFS_BLOCK_GROUP_METADATA) ||
+ !BTRFS_FS_LOG_CLEANUP_ERROR(info)) {
+ if (WARN_ON(space_info->bytes_reserved > 0))
+ btrfs_dump_space_info(info, space_info, 0, 0);
+ }
+
WARN_ON(space_info->reclaim_size > 0);
list_del(&space_info->list);
btrfs_sysfs_remove_space_info(space_info);
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index e89f814cc8f5..21c44846b002 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -142,6 +142,9 @@ enum {
BTRFS_FS_STATE_DEV_REPLACING,
/* The btrfs_fs_info created for self-tests */
BTRFS_FS_STATE_DUMMY_FS_INFO,
+
+ /* Indicates there was an error cleaning up a log tree. */
+ BTRFS_FS_STATE_LOG_CLEANUP_ERROR,
};
#define BTRFS_BACKREF_REV_MAX 256
@@ -3578,6 +3581,10 @@ do { \
(errno), fmt, ##args); \
} while (0)
+#define BTRFS_FS_LOG_CLEANUP_ERROR(fs_info) \
+ (unlikely(test_bit(BTRFS_FS_STATE_LOG_CLEANUP_ERROR, \
+ &(fs_info)->fs_state)))
+
__printf(5, 6)
__cold
void __btrfs_panic(struct btrfs_fs_info *fs_info, const char *function,
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 8ef65073ce8c..e90d80a8a9e3 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -3423,6 +3423,29 @@ static void free_log_tree(struct btrfs_trans_handle *trans,
if (log->node) {
ret = walk_log_tree(trans, log, &wc);
if (ret) {
+ /*
+ * We weren't able to traverse the entire log tree, the
+ * typical scenario is getting an -EIO when reading an
+ * extent buffer of the tree, due to a previous writeback
+ * failure of it.
+ */
+ set_bit(BTRFS_FS_STATE_LOG_CLEANUP_ERROR,
+ &log->fs_info->fs_state);
+
+ /*
+ * Some extent buffers of the log tree may still be dirty
+ * and not yet written back to storage, because we may
+ * have updates to a log tree without syncing a log tree,
+ * such as during rename and link operations. So flush
+ * them out and wait for their writeback to complete, so
+ * that we properly cleanup their state and pages.
+ */
+ btrfs_write_marked_extents(log->fs_info,
+ &log->dirty_log_pages,
+ EXTENT_DIRTY | EXTENT_NEW);
+ btrfs_wait_tree_log_extents(log,
+ EXTENT_DIRTY | EXTENT_NEW);
+
if (trans)
btrfs_abort_transaction(trans, ret);
else
--
2.33.1
Hi,
I just noticed that the stable repository has the linux-5.17.y tag and
no branch with the linux-5.17.y name. That tag looks like a copy of
Linus' v5.17.
I guess this is a mistake. On my side git refused to push the
linux-5.17.y branch because it already had a tag with the same name.
Could you please remove it?
Sebastian
cześć
Nazywam się Susanne Klatten i jestem Z Niemiec, mogę kontrolować Twoje
problemy finansowe bez uciekania się do Banków w zakresie Pieniądze
Kredytowe. Oferujemy pożyczki osobiste i pożyczki biznesowe, jestem
zatwierdzonym i certyfikowanym pożyczkodawcą z wieloletnim
doświadczeniem w udzielaniu pożyczek i udzielamy pożyczek z
zabezpieczeniem i bez zabezpieczenia w zakresie od 2.000,00 € ($) do
maksymalnie 500 000 000,00 € ze stałym oprocentowaniem 3% w stosunku
rocznym. Czy potrzebujesz pożyczki? Napisz do nas na:
susannelegitfirm155(a)gmail.com
Możesz również zobaczyć mój link i dowiedzieć się więcej o mnie.
https://en.wikipedia.org/wiki/Susanne_Klattenhttps://www.forbes.com/profile/susanne-klatten
E-mail: susannelegitfirm155(a)gmail.com
Podpis,
Przewodniczący Wykonawczy
Susanne Klatten
Hi,
we received a bug report about the regression of the touchpad on Dell
7750 laptop, the right touchpad button is disabled on recent kernels:
https://bugzilla.suse.com/show_bug.cgi?id=1197243
Note that it's a physical button, not a virtual clickpad button.
The regression seems introduced by the upstream commit
37ef4c19b4c659926ce65a7ac709ceaefb211c40 ("Input: clear
BTN_RIGHT/MIDDLE on buttonpads") that was backported to stable 5.16.x
kernel.
The device is managed by hid-multitouch driver, and the further
investigation revealed that it's rather an incorrectly recognized
buttonpad property; namely, ID_DG_BUTTONTYPE reports it being 0 =
clickable touchpad although it's not. I built a test kernel to ignore
this check and it was confirmed to make the right button working again
by the reporter.
Is this check really correct in general? Or do we need some
device-specific quirk?
thanks,
Takashi
I'm announcing the release of the 5.10.107 kernel.
All users of the 5.10 kernel series must upgrade.
The updated 5.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.10.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2
arch/arm/boot/dts/rk322x.dtsi | 4 -
arch/arm/boot/dts/rk3288.dtsi | 2
arch/arm64/boot/dts/intel/socfpga_agilex.dtsi | 4 -
arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 6 +
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 6 -
arch/arm64/kvm/hyp/smccc_wa.S | 4 -
arch/mips/kernel/smp.c | 6 -
drivers/atm/firestream.c | 2
drivers/gpu/drm/drm_connector.c | 3
drivers/net/can/rcar/rcar_canfd.c | 6 -
drivers/net/ethernet/sfc/mcdi.c | 2
drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 3
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 1
fs/io_uring.c | 18 ++++-
include/net/xfrm.h | 5 -
lib/Kconfig | 1
net/ipv4/tcp.c | 10 +-
net/key/af_key.c | 2
net/mac80211/agg-tx.c | 10 ++
net/sctp/sm_statefuns.c | 71 +++++++++++++--------
net/wireless/nl80211.c | 3
net/xfrm/xfrm_policy.c | 14 ++--
net/xfrm/xfrm_state.c | 15 +++-
net/xfrm/xfrm_user.c | 27 ++-----
tools/testing/selftests/vm/userfaultfd.c | 1
26 files changed, 139 insertions(+), 89 deletions(-)
Alexander Lobakin (1):
MIPS: smp: fill in sibling and core maps earlier
Chengming Zhou (1):
kselftest/vm: fix tests build with old libc
Corentin Labbe (1):
ARM: dts: rockchip: fix a typo on rk3288 crypto-controller
Dinh Nguyen (1):
arm64: dts: agilex: use the compatible "intel,socfpga-agilex-hsotg"
Eric Dumazet (1):
tcp: make tcp_read_sock() more robust
Golan Ben Ami (1):
iwlwifi: don't advertise TWT support
Greg Kroah-Hartman (1):
Linux 5.10.107
Jakob Unterwurzacher (1):
arm64: dts: rockchip: fix rk3399-puma eMMC HS400 signal integrity
James Morse (1):
arm64: kvm: Fix copy-and-paste error in bhb templates for v5.10 stable
Jia-Ju Bai (1):
atm: firestream: check the return value of ioremap() in fs_init()
Johannes Berg (1):
mac80211: refuse aggregations sessions before authorized
Julian Braha (1):
ARM: 9178/1: fix unmet dependency on BITREVERSE for HAVE_ARCH_BITREVERSE
Kai Lueke (1):
Revert "xfrm: state and policy should fail if XFRMA_IF_ID 0"
Lad Prabhakar (1):
can: rcar_canfd: rcar_canfd_channel_probe(): register the CAN device when fully ready
Manasi Navare (1):
drm/vrr: Set VRR capable prop only if it is attached to connector
Niels Dossche (1):
sfc: extend the locking on mcdi->seqno
Pavel Begunkov (1):
io_uring: return back safer resurrect
Sascha Hauer (2):
arm64: dts: rockchip: reorder rk3399 hdmi clocks
ARM: dts: rockchip: reorder rk322x hmdi clocks
Sreeramya Soratkal (1):
nl80211: Update bss channel on channel switch for P2P_CLIENT
Xin Long (1):
sctp: fix the processing for INIT chunk
Yan Yan (2):
xfrm: Check if_id in xfrm_migrate
xfrm: Fix xfrm migrate issues when address family changes
I'm announcing the release of the 5.4.186 kernel.
All users of the 5.4 kernel series must upgrade.
The updated 5.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2
arch/arm/boot/dts/rk322x.dtsi | 4
arch/arm/boot/dts/rk3288.dtsi | 2
arch/arm/include/asm/kvm_host.h | 7
arch/arm/include/uapi/asm/kvm.h | 6
arch/arm64/Kconfig | 9
arch/arm64/boot/dts/intel/socfpga_agilex.dtsi | 4
arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 6
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 6
arch/arm64/include/asm/assembler.h | 33 +
arch/arm64/include/asm/cpu.h | 1
arch/arm64/include/asm/cpucaps.h | 3
arch/arm64/include/asm/cpufeature.h | 40 ++
arch/arm64/include/asm/cputype.h | 16
arch/arm64/include/asm/fixmap.h | 6
arch/arm64/include/asm/kvm_host.h | 5
arch/arm64/include/asm/kvm_mmu.h | 6
arch/arm64/include/asm/mmu.h | 8
arch/arm64/include/asm/sections.h | 5
arch/arm64/include/asm/sysreg.h | 17
arch/arm64/include/asm/vectors.h | 73 +++
arch/arm64/include/uapi/asm/kvm.h | 5
arch/arm64/kernel/cpu_errata.c | 385 ++++++++++++++++++++-
arch/arm64/kernel/cpufeature.c | 21 +
arch/arm64/kernel/cpuinfo.c | 1
arch/arm64/kernel/entry.S | 213 ++++++++---
arch/arm64/kernel/vmlinux.lds.S | 2
arch/arm64/kvm/hyp/hyp-entry.S | 64 +++
arch/arm64/kvm/hyp/switch.c | 8
arch/arm64/kvm/sys_regs.c | 2
arch/arm64/mm/mmu.c | 12
arch/mips/kernel/smp.c | 6
drivers/atm/firestream.c | 2
drivers/gpu/drm/drm_connector.c | 3
drivers/net/can/rcar/rcar_canfd.c | 6
drivers/net/ethernet/sfc/mcdi.c | 2
drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 3
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 1
include/linux/arm-smccc.h | 5
include/net/xfrm.h | 5
lib/Kconfig | 1
net/ipv4/tcp.c | 10
net/key/af_key.c | 2
net/mac80211/agg-tx.c | 10
net/sctp/sm_statefuns.c | 71 ++-
net/wireless/nl80211.c | 3
net/xfrm/xfrm_policy.c | 14
net/xfrm/xfrm_state.c | 15
net/xfrm/xfrm_user.c | 27 -
tools/testing/selftests/vm/userfaultfd.c | 1
virt/kvm/arm/psci.c | 34 +
51 files changed, 1035 insertions(+), 158 deletions(-)
Alexander Lobakin (1):
MIPS: smp: fill in sibling and core maps earlier
Anshuman Khandual (1):
arm64: Add Cortex-X2 CPU part definition
Chengming Zhou (1):
kselftest/vm: fix tests build with old libc
Corentin Labbe (1):
ARM: dts: rockchip: fix a typo on rk3288 crypto-controller
Dinh Nguyen (1):
arm64: dts: agilex: use the compatible "intel,socfpga-agilex-hsotg"
Eric Dumazet (1):
tcp: make tcp_read_sock() more robust
Golan Ben Ami (1):
iwlwifi: don't advertise TWT support
Greg Kroah-Hartman (1):
Linux 5.4.186
Jakob Unterwurzacher (1):
arm64: dts: rockchip: fix rk3399-puma eMMC HS400 signal integrity
James Morse (19):
arm64: entry.S: Add ventry overflow sanity checks
arm64: entry: Make the trampoline cleanup optional
arm64: entry: Free up another register on kpti's tramp_exit path
arm64: entry: Move the trampoline data page before the text page
arm64: entry: Allow tramp_alias to access symbols after the 4K boundary
arm64: entry: Don't assume tramp_vectors is the start of the vectors
arm64: entry: Move trampoline macros out of ifdef'd section
arm64: entry: Make the kpti trampoline's kpti sequence optional
arm64: entry: Allow the trampoline text to occupy multiple pages
arm64: entry: Add non-kpti __bp_harden_el1_vectors for mitigations
arm64: entry: Add vectors that have the bhb mitigation sequences
arm64: entry: Add macro for reading symbol addresses from the trampoline
arm64: Add percpu vectors for EL1
arm64: proton-pack: Report Spectre-BHB vulnerabilities as part of Spectre-v2
KVM: arm64: Add templates for BHB mitigation sequences
arm64: Mitigate spectre style branch history side channels
KVM: arm64: Allow SMCCC_ARCH_WORKAROUND_3 to be discovered and migrated
arm64: Use the clearbhb instruction in mitigations
fixup for "arm64 entry: Add macro for reading symbol address from the trampoline"
Jia-Ju Bai (1):
atm: firestream: check the return value of ioremap() in fs_init()
Joey Gouly (1):
arm64: add ID_AA64ISAR2_EL1 sys register
Johannes Berg (1):
mac80211: refuse aggregations sessions before authorized
Julian Braha (1):
ARM: 9178/1: fix unmet dependency on BITREVERSE for HAVE_ARCH_BITREVERSE
Kai Lueke (1):
Revert "xfrm: state and policy should fail if XFRMA_IF_ID 0"
Lad Prabhakar (1):
can: rcar_canfd: rcar_canfd_channel_probe(): register the CAN device when fully ready
Manasi Navare (1):
drm/vrr: Set VRR capable prop only if it is attached to connector
Niels Dossche (1):
sfc: extend the locking on mcdi->seqno
Rob Herring (1):
arm64: Add part number for Arm Cortex-A77
Sascha Hauer (2):
arm64: dts: rockchip: reorder rk3399 hdmi clocks
ARM: dts: rockchip: reorder rk322x hmdi clocks
Sreeramya Soratkal (1):
nl80211: Update bss channel on channel switch for P2P_CLIENT
Suzuki K Poulose (1):
arm64: Add Neoverse-N2, Cortex-A710 CPU part definition
Xin Long (1):
sctp: fix the processing for INIT chunk
Yan Yan (2):
xfrm: Check if_id in xfrm_migrate
xfrm: Fix xfrm migrate issues when address family changes
Hello!
There is the v4.19 backport with the k=8 typo and SDEI name thing both
fixed.
Again, its the KVM templates patch that doesn't exist upstream, this is
necessary because the infrastructure for older kernels is very
different, and the dependencies for what was a rewrite are huge.
Its v4.14 and erlier that need to bring some timer errata workaround in
with it. I'm still trying to test that.
Thanks,
James
Anshuman Khandual (1):
arm64: Add Cortex-X2 CPU part definition
James Morse (18):
arm64: entry.S: Add ventry overflow sanity checks
arm64: entry: Make the trampoline cleanup optional
arm64: entry: Free up another register on kpti's tramp_exit path
arm64: entry: Move the trampoline data page before the text page
arm64: entry: Allow tramp_alias to access symbols after the 4K
boundary
arm64: entry: Don't assume tramp_vectors is the start of the vectors
arm64: entry: Move trampoline macros out of ifdef'd section
arm64: entry: Make the kpti trampoline's kpti sequence optional
arm64: entry: Allow the trampoline text to occupy multiple pages
arm64: entry: Add non-kpti __bp_harden_el1_vectors for mitigations
arm64: entry: Add vectors that have the bhb mitigation sequences
arm64: entry: Add macro for reading symbol addresses from the
trampoline
arm64: Add percpu vectors for EL1
arm64: proton-pack: Report Spectre-BHB vulnerabilities as part of
Spectre-v2
KVM: arm64: Add templates for BHB mitigation sequences
arm64: Mitigate spectre style branch history side channels
KVM: arm64: Allow SMCCC_ARCH_WORKAROUND_3 to be discovered and
migrated
arm64: Use the clearbhb instruction in mitigations
Joey Gouly (1):
arm64: add ID_AA64ISAR2_EL1 sys register
Rob Herring (1):
arm64: Add part number for Arm Cortex-A77
Suzuki K Poulose (1):
arm64: Add Neoverse-N2, Cortex-A710 CPU part definition
arch/arm/include/asm/kvm_host.h | 7 +
arch/arm64/Kconfig | 9 +
arch/arm64/include/asm/assembler.h | 34 +++
arch/arm64/include/asm/cpu.h | 1 +
arch/arm64/include/asm/cpucaps.h | 3 +-
arch/arm64/include/asm/cpufeature.h | 39 +++
arch/arm64/include/asm/cputype.h | 16 ++
arch/arm64/include/asm/fixmap.h | 6 +-
arch/arm64/include/asm/kvm_host.h | 5 +
arch/arm64/include/asm/kvm_mmu.h | 6 +-
arch/arm64/include/asm/mmu.h | 8 +-
arch/arm64/include/asm/sections.h | 5 +
arch/arm64/include/asm/sysreg.h | 5 +
arch/arm64/include/asm/vectors.h | 74 ++++++
arch/arm64/kernel/cpu_errata.c | 381 +++++++++++++++++++++++++++-
arch/arm64/kernel/cpufeature.c | 21 ++
arch/arm64/kernel/cpuinfo.c | 1 +
arch/arm64/kernel/entry.S | 215 ++++++++++++----
arch/arm64/kernel/vmlinux.lds.S | 2 +-
arch/arm64/kvm/hyp/hyp-entry.S | 64 +++++
arch/arm64/kvm/hyp/switch.c | 8 +-
arch/arm64/kvm/sys_regs.c | 2 +-
arch/arm64/mm/mmu.c | 12 +-
include/linux/arm-smccc.h | 7 +
virt/kvm/arm/psci.c | 12 +
25 files changed, 871 insertions(+), 72 deletions(-)
create mode 100644 arch/arm64/include/asm/vectors.h
--
2.30.2
From: Lucas Wei <lucaswei(a)google.com>
For kernel releases older than 4.20, using the SLUB alloctor will cause
this alignment check to fail as that allocator did NOT align kmalloc
allocations on a PAGE_SIZE boundry.
Remove the check for these older kernels as it is a false-positive and
causes problems on many devices.
Signed-off-by: Lucas Wei <lucaswei(a)google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -567,8 +567,7 @@
va_list args;
int len;
- if (WARN(!buf || offset_in_page(buf),
- "invalid sysfs_emit: buf:%p\n", buf))
+ if (WARN(!buf, "invalid sysfs_emit: buf:%p\n", buf))
return 0;
va_start(args, fmt);
This is the start of the stable review cycle for the 5.4.186 release.
There are 43 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 Sat, 19 Mar 2022 12:45:16 +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.186-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.186-rc1
Chengming Zhou <zhouchengming(a)bytedance.com>
kselftest/vm: fix tests build with old libc
Christophe JAILLET <christophe.jaillet(a)wanadoo.fr>
bnx2: Fix an error message
Niels Dossche <dossche.niels(a)gmail.com>
sfc: extend the locking on mcdi->seqno
Eric Dumazet <edumazet(a)google.com>
tcp: make tcp_read_sock() more robust
Sreeramya Soratkal <quic_ssramya(a)quicinc.com>
nl80211: Update bss channel on channel switch for P2P_CLIENT
Manasi Navare <manasi.d.navare(a)intel.com>
drm/vrr: Set VRR capable prop only if it is attached to connector
Golan Ben Ami <golan.ben.ami(a)intel.com>
iwlwifi: don't advertise TWT support
Jia-Ju Bai <baijiaju1990(a)gmail.com>
atm: firestream: check the return value of ioremap() in fs_init()
Lad Prabhakar <prabhakar.mahadev-lad.rj(a)bp.renesas.com>
can: rcar_canfd: rcar_canfd_channel_probe(): register the CAN device when fully ready
Julian Braha <julianbraha(a)gmail.com>
ARM: 9178/1: fix unmet dependency on BITREVERSE for HAVE_ARCH_BITREVERSE
Alexander Lobakin <alobakin(a)pm.me>
MIPS: smp: fill in sibling and core maps earlier
Johannes Berg <johannes.berg(a)intel.com>
mac80211: refuse aggregations sessions before authorized
Corentin Labbe <clabbe(a)baylibre.com>
ARM: dts: rockchip: fix a typo on rk3288 crypto-controller
Sascha Hauer <s.hauer(a)pengutronix.de>
ARM: dts: rockchip: reorder rk322x hmdi clocks
Dinh Nguyen <dinguyen(a)kernel.org>
arm64: dts: agilex: use the compatible "intel,socfpga-agilex-hsotg"
Sascha Hauer <s.hauer(a)pengutronix.de>
arm64: dts: rockchip: reorder rk3399 hdmi clocks
Jakob Unterwurzacher <jakob.unterwurzacher(a)theobroma-systems.com>
arm64: dts: rockchip: fix rk3399-puma eMMC HS400 signal integrity
Yan Yan <evitayan(a)google.com>
xfrm: Fix xfrm migrate issues when address family changes
Yan Yan <evitayan(a)google.com>
xfrm: Check if_id in xfrm_migrate
James Morse <james.morse(a)arm.com>
arm64: Use the clearbhb instruction in mitigations
James Morse <james.morse(a)arm.com>
KVM: arm64: Allow SMCCC_ARCH_WORKAROUND_3 to be discovered and migrated
James Morse <james.morse(a)arm.com>
arm64: Mitigate spectre style branch history side channels
James Morse <james.morse(a)arm.com>
KVM: arm64: Add templates for BHB mitigation sequences
James Morse <james.morse(a)arm.com>
arm64: proton-pack: Report Spectre-BHB vulnerabilities as part of Spectre-v2
James Morse <james.morse(a)arm.com>
arm64: Add percpu vectors for EL1
James Morse <james.morse(a)arm.com>
arm64: entry: Add macro for reading symbol addresses from the trampoline
James Morse <james.morse(a)arm.com>
arm64: entry: Add vectors that have the bhb mitigation sequences
James Morse <james.morse(a)arm.com>
arm64: entry: Add non-kpti __bp_harden_el1_vectors for mitigations
James Morse <james.morse(a)arm.com>
arm64: entry: Allow the trampoline text to occupy multiple pages
James Morse <james.morse(a)arm.com>
arm64: entry: Make the kpti trampoline's kpti sequence optional
James Morse <james.morse(a)arm.com>
arm64: entry: Move trampoline macros out of ifdef'd section
James Morse <james.morse(a)arm.com>
arm64: entry: Don't assume tramp_vectors is the start of the vectors
James Morse <james.morse(a)arm.com>
arm64: entry: Allow tramp_alias to access symbols after the 4K boundary
James Morse <james.morse(a)arm.com>
arm64: entry: Move the trampoline data page before the text page
James Morse <james.morse(a)arm.com>
arm64: entry: Free up another register on kpti's tramp_exit path
James Morse <james.morse(a)arm.com>
arm64: entry: Make the trampoline cleanup optional
James Morse <james.morse(a)arm.com>
arm64: entry.S: Add ventry overflow sanity checks
Anshuman Khandual <anshuman.khandual(a)arm.com>
arm64: Add Cortex-X2 CPU part definition
Joey Gouly <joey.gouly(a)arm.com>
arm64: add ID_AA64ISAR2_EL1 sys register
Suzuki K Poulose <suzuki.poulose(a)arm.com>
arm64: Add Neoverse-N2, Cortex-A710 CPU part definition
Rob Herring <robh(a)kernel.org>
arm64: Add part number for Arm Cortex-A77
Xin Long <lucien.xin(a)gmail.com>
sctp: fix the processing for INIT chunk
Kai Lueke <kailueke(a)linux.microsoft.com>
Revert "xfrm: state and policy should fail if XFRMA_IF_ID 0"
-------------
Diffstat:
Makefile | 4 +-
arch/arm/boot/dts/rk322x.dtsi | 4 +-
arch/arm/boot/dts/rk3288.dtsi | 2 +-
arch/arm/include/asm/kvm_host.h | 7 +
arch/arm/include/uapi/asm/kvm.h | 6 +
arch/arm64/Kconfig | 9 +
arch/arm64/boot/dts/intel/socfpga_agilex.dtsi | 4 +-
arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 6 +
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 6 +-
arch/arm64/include/asm/assembler.h | 33 ++
arch/arm64/include/asm/cpu.h | 1 +
arch/arm64/include/asm/cpucaps.h | 3 +-
arch/arm64/include/asm/cpufeature.h | 40 +++
arch/arm64/include/asm/cputype.h | 16 +
arch/arm64/include/asm/fixmap.h | 6 +-
arch/arm64/include/asm/kvm_host.h | 5 +
arch/arm64/include/asm/kvm_mmu.h | 6 +-
arch/arm64/include/asm/mmu.h | 8 +-
arch/arm64/include/asm/sections.h | 5 +
arch/arm64/include/asm/sysreg.h | 17 +
arch/arm64/include/asm/vectors.h | 73 ++++
arch/arm64/include/uapi/asm/kvm.h | 5 +
arch/arm64/kernel/cpu_errata.c | 385 ++++++++++++++++++++-
arch/arm64/kernel/cpufeature.c | 21 ++
arch/arm64/kernel/cpuinfo.c | 1 +
arch/arm64/kernel/entry.S | 213 +++++++++---
arch/arm64/kernel/vmlinux.lds.S | 2 +-
arch/arm64/kvm/hyp/hyp-entry.S | 64 ++++
arch/arm64/kvm/hyp/switch.c | 8 +-
arch/arm64/kvm/sys_regs.c | 2 +-
arch/arm64/mm/mmu.c | 12 +-
arch/mips/kernel/smp.c | 6 +-
drivers/atm/firestream.c | 2 +
drivers/gpu/drm/drm_connector.c | 3 +
drivers/net/can/rcar/rcar_canfd.c | 6 +-
drivers/net/ethernet/broadcom/bnx2.c | 2 +-
drivers/net/ethernet/sfc/mcdi.c | 2 +-
drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 3 +-
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 1 -
include/linux/arm-smccc.h | 5 +
include/net/xfrm.h | 5 +-
lib/Kconfig | 1 -
net/ipv4/tcp.c | 10 +-
net/key/af_key.c | 2 +-
net/mac80211/agg-tx.c | 10 +-
net/sctp/sm_statefuns.c | 71 ++--
net/wireless/nl80211.c | 3 +-
net/xfrm/xfrm_policy.c | 14 +-
net/xfrm/xfrm_state.c | 15 +-
net/xfrm/xfrm_user.c | 27 +-
tools/testing/selftests/vm/userfaultfd.c | 1 +
virt/kvm/arm/psci.c | 34 +-
52 files changed, 1037 insertions(+), 160 deletions(-)
This is a note to let you know that I've just added the patch titled
serial: sc16is7xx: Clear RS485 bits in the shutdown
to my tty git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
in the tty-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
From 927728a34f11b5a27f4610bdb7068317d6fdc72a Mon Sep 17 00:00:00 2001
From: Hui Wang <hui.wang(a)canonical.com>
Date: Tue, 8 Mar 2022 19:00:42 +0800
Subject: serial: sc16is7xx: Clear RS485 bits in the shutdown
We tested RS485 function on an EVB which has SC16IS752, after
finishing the test, we started the RS232 function test, but found the
RTS is still working in the RS485 mode.
That is because both startup and shutdown call port_update() to set
the EFCR_REG, this will not clear the RS485 bits once the bits are set
in the reconf_rs485(). To fix it, clear the RS485 bits in shutdown.
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang(a)canonical.com>
Link: https://lore.kernel.org/r/20220308110042.108451-1-hui.wang@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/tty/serial/sc16is7xx.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
index 683dd3be010d..91434876fcde 100644
--- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c
@@ -1238,10 +1238,12 @@ static void sc16is7xx_shutdown(struct uart_port *port)
/* Disable all interrupts */
sc16is7xx_port_write(port, SC16IS7XX_IER_REG, 0);
- /* Disable TX/RX */
+ /* Disable TX/RX, clear auto RS485 and RTS invert */
sc16is7xx_port_update(port, SC16IS7XX_EFCR_REG,
SC16IS7XX_EFCR_RXDISABLE_BIT |
- SC16IS7XX_EFCR_TXDISABLE_BIT,
+ SC16IS7XX_EFCR_TXDISABLE_BIT |
+ SC16IS7XX_EFCR_AUTO_RS485_BIT |
+ SC16IS7XX_EFCR_RTS_INVERT_BIT,
SC16IS7XX_EFCR_RXDISABLE_BIT |
SC16IS7XX_EFCR_TXDISABLE_BIT);
--
2.35.1
This is a note to let you know that I've just added the patch titled
mei: avoid iterator usage outside of list_for_each_entry
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
From c10187b1c5ebb8681ca467ab7b0ded5ea415d258 Mon Sep 17 00:00:00 2001
From: Alexander Usyskin <alexander.usyskin(a)intel.com>
Date: Tue, 8 Mar 2022 11:59:26 +0200
Subject: mei: avoid iterator usage outside of list_for_each_entry
Usage of the iterator outside of the list_for_each_entry
is considered harmful. https://lkml.org/lkml/2022/2/17/1032
Do not reference the loop variable outside of the loop,
by rearranging the orders of execution.
Instead of performing search loop and checking outside the loop
if the end of the list was hit and no matching element was found,
the execution is performed inside the loop upon a successful match
followed by a goto statement to the next step,
therefore no condition has to be performed after the loop has ended.
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Alexander Usyskin <alexander.usyskin(a)intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler(a)intel.com>
Link: https://lore.kernel.org/r/20220308095926.300412-1-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/misc/mei/interrupt.c | 35 +++++++++++++++--------------------
1 file changed, 15 insertions(+), 20 deletions(-)
diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei/interrupt.c
index a67f4f2d33a9..0706322154cb 100644
--- a/drivers/misc/mei/interrupt.c
+++ b/drivers/misc/mei/interrupt.c
@@ -424,31 +424,26 @@ int mei_irq_read_handler(struct mei_device *dev,
list_for_each_entry(cl, &dev->file_list, link) {
if (mei_cl_hbm_equal(cl, mei_hdr)) {
cl_dbg(dev, cl, "got a message\n");
- break;
+ ret = mei_cl_irq_read_msg(cl, mei_hdr, meta_hdr, cmpl_list);
+ goto reset_slots;
}
}
/* if no recipient cl was found we assume corrupted header */
- if (&cl->link == &dev->file_list) {
- /* A message for not connected fixed address clients
- * should be silently discarded
- * On power down client may be force cleaned,
- * silently discard such messages
- */
- if (hdr_is_fixed(mei_hdr) ||
- dev->dev_state == MEI_DEV_POWER_DOWN) {
- mei_irq_discard_msg(dev, mei_hdr, mei_hdr->length);
- ret = 0;
- goto reset_slots;
- }
- dev_err(dev->dev, "no destination client found 0x%08X\n",
- dev->rd_msg_hdr[0]);
- ret = -EBADMSG;
- goto end;
+ /* A message for not connected fixed address clients
+ * should be silently discarded
+ * On power down client may be force cleaned,
+ * silently discard such messages
+ */
+ if (hdr_is_fixed(mei_hdr) ||
+ dev->dev_state == MEI_DEV_POWER_DOWN) {
+ mei_irq_discard_msg(dev, mei_hdr, mei_hdr->length);
+ ret = 0;
+ goto reset_slots;
}
-
- ret = mei_cl_irq_read_msg(cl, mei_hdr, meta_hdr, cmpl_list);
-
+ dev_err(dev->dev, "no destination client found 0x%08X\n", dev->rd_msg_hdr[0]);
+ ret = -EBADMSG;
+ goto end;
reset_slots:
/* reset the number of slots and header */
--
2.35.1
This is a note to let you know that I've just added the patch titled
mei: me: add Alder Lake N device id.
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
From 7bbbd0845818cffa9fa8ccfe52fa1cad58e7e4f2 Mon Sep 17 00:00:00 2001
From: Alexander Usyskin <alexander.usyskin(a)intel.com>
Date: Tue, 1 Mar 2022 09:11:15 +0200
Subject: mei: me: add Alder Lake N device id.
Add Alder Lake N device ID.
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Alexander Usyskin <alexander.usyskin(a)intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler(a)intel.com>
Link: https://lore.kernel.org/r/20220301071115.96145-1-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/misc/mei/hw-me-regs.h | 1 +
drivers/misc/mei/pci-me.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/misc/mei/hw-me-regs.h b/drivers/misc/mei/hw-me-regs.h
index 888c27bc3f1a..64ce3f830262 100644
--- a/drivers/misc/mei/hw-me-regs.h
+++ b/drivers/misc/mei/hw-me-regs.h
@@ -107,6 +107,7 @@
#define MEI_DEV_ID_ADP_S 0x7AE8 /* Alder Lake Point S */
#define MEI_DEV_ID_ADP_LP 0x7A60 /* Alder Lake Point LP */
#define MEI_DEV_ID_ADP_P 0x51E0 /* Alder Lake Point P */
+#define MEI_DEV_ID_ADP_N 0x54E0 /* Alder Lake Point N */
/*
* MEI HW Section
diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c
index a05cdb25d0c4..33e58821e478 100644
--- a/drivers/misc/mei/pci-me.c
+++ b/drivers/misc/mei/pci-me.c
@@ -114,6 +114,7 @@ static const struct pci_device_id mei_me_pci_tbl[] = {
{MEI_PCI_DEVICE(MEI_DEV_ID_ADP_S, MEI_ME_PCH15_CFG)},
{MEI_PCI_DEVICE(MEI_DEV_ID_ADP_LP, MEI_ME_PCH15_CFG)},
{MEI_PCI_DEVICE(MEI_DEV_ID_ADP_P, MEI_ME_PCH15_CFG)},
+ {MEI_PCI_DEVICE(MEI_DEV_ID_ADP_N, MEI_ME_PCH15_CFG)},
/* required last entry */
{0, }
--
2.35.1
This is the start of the stable review cycle for the 5.16.16 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 Sat, 19 Mar 2022 12:45:16 +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.16.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-5.16.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.16.16-rc1
Ivan Vecera <ivecera(a)redhat.com>
ice: Fix race condition during interface enslave
Chengming Zhou <zhouchengming(a)bytedance.com>
kselftest/vm: fix tests build with old libc
Christophe JAILLET <christophe.jaillet(a)wanadoo.fr>
bnx2: Fix an error message
Niels Dossche <dossche.niels(a)gmail.com>
sfc: extend the locking on mcdi->seqno
Eric Dumazet <edumazet(a)google.com>
tcp: make tcp_read_sock() more robust
Sreeramya Soratkal <quic_ssramya(a)quicinc.com>
nl80211: Update bss channel on channel switch for P2P_CLIENT
Manasi Navare <manasi.d.navare(a)intel.com>
drm/vrr: Set VRR capable prop only if it is attached to connector
Golan Ben Ami <golan.ben.ami(a)intel.com>
iwlwifi: don't advertise TWT support
Hans de Goede <hdegoede(a)redhat.com>
Input: goodix - workaround Cherry Trail devices with a bogus ACPI Interrupt() resource
Hans de Goede <hdegoede(a)redhat.com>
Input: goodix - use the new soc_intel_is_byt() helper
Florian Westphal <fw(a)strlen.de>
netfilter: egress: silence egress hook lockdep splats
Jia-Ju Bai <baijiaju1990(a)gmail.com>
atm: firestream: check the return value of ioremap() in fs_init()
Lad Prabhakar <prabhakar.mahadev-lad.rj(a)bp.renesas.com>
can: rcar_canfd: rcar_canfd_channel_probe(): register the CAN device when fully ready
Luiz Augusto von Dentz <luiz.von.dentz(a)intel.com>
Bluetooth: hci_core: Fix leaking sent_cmd skb
Julian Braha <julianbraha(a)gmail.com>
ARM: 9178/1: fix unmet dependency on BITREVERSE for HAVE_ARCH_BITREVERSE
Alexander Lobakin <alobakin(a)pm.me>
MIPS: smp: fill in sibling and core maps earlier
Johannes Berg <johannes.berg(a)intel.com>
mac80211: refuse aggregations sessions before authorized
Corentin Labbe <clabbe(a)baylibre.com>
ARM: dts: rockchip: fix a typo on rk3288 crypto-controller
Sascha Hauer <s.hauer(a)pengutronix.de>
ARM: dts: rockchip: reorder rk322x hmdi clocks
Dinh Nguyen <dinguyen(a)kernel.org>
arm64: dts: agilex: use the compatible "intel,socfpga-agilex-hsotg"
Sascha Hauer <s.hauer(a)pengutronix.de>
arm64: dts: rockchip: reorder rk3399 hdmi clocks
Krzysztof Kozlowski <krzysztof.kozlowski(a)canonical.com>
arm64: dts: rockchip: align pl330 node name with dtschema
Jakob Unterwurzacher <jakob.unterwurzacher(a)theobroma-systems.com>
arm64: dts: rockchip: fix rk3399-puma eMMC HS400 signal integrity
Yan Yan <evitayan(a)google.com>
xfrm: Fix xfrm migrate issues when address family changes
Yan Yan <evitayan(a)google.com>
xfrm: Check if_id in xfrm_migrate
Quentin Schulz <quentin.schulz(a)theobroma-systems.com>
arm64: dts: rockchip: fix rk3399-puma-haikou USB OTG mode
Frank Wunderlich <frank-w(a)public-files.de>
arm64: dts: rockchip: fix dma-controller node names on rk356x
Kai Lueke <kailueke(a)linux.microsoft.com>
Revert "xfrm: state and policy should fail if XFRMA_IF_ID 0"
-------------
Diffstat:
Makefile | 4 +--
arch/arm/boot/dts/rk322x.dtsi | 4 +--
arch/arm/boot/dts/rk3288.dtsi | 2 +-
arch/arm64/boot/dts/intel/socfpga_agilex.dtsi | 4 +--
arch/arm64/boot/dts/rockchip/px30.dtsi | 2 +-
arch/arm64/boot/dts/rockchip/rk3328.dtsi | 2 +-
.../arm64/boot/dts/rockchip/rk3399-puma-haikou.dts | 1 +
arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 20 +++++++++++++
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 6 ++--
arch/arm64/boot/dts/rockchip/rk356x.dtsi | 4 +--
arch/mips/kernel/smp.c | 6 ++--
drivers/atm/firestream.c | 2 ++
drivers/gpu/drm/drm_connector.c | 3 ++
drivers/input/touchscreen/goodix.c | 34 +++++++++++-----------
drivers/net/can/rcar/rcar_canfd.c | 6 ++--
drivers/net/ethernet/broadcom/bnx2.c | 2 +-
drivers/net/ethernet/intel/ice/ice.h | 11 ++++++-
drivers/net/ethernet/intel/ice/ice_main.c | 12 +++++++-
drivers/net/ethernet/sfc/mcdi.c | 2 +-
drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 3 +-
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 1 -
include/linux/netfilter_netdev.h | 4 +++
include/net/xfrm.h | 5 ++--
lib/Kconfig | 1 -
net/bluetooth/hci_core.c | 1 +
net/ipv4/tcp.c | 10 ++++---
net/key/af_key.c | 2 +-
net/mac80211/agg-tx.c | 10 ++++++-
net/wireless/nl80211.c | 3 +-
net/xfrm/xfrm_policy.c | 14 +++++----
net/xfrm/xfrm_state.c | 15 +++++++---
net/xfrm/xfrm_user.c | 27 +++++------------
tools/testing/selftests/vm/userfaultfd.c | 1 +
33 files changed, 141 insertions(+), 83 deletions(-)
From: Zack Rusin <zackr(a)vmware.com>
With very limited vram on svga3 it's difficult to handle all the surface
migrations. Without gbobjects, i.e. the ability to store surfaces in
guest mobs, there's no reason to support intermediate svga2 features,
especially because we can fall back to fb traces and svga3 will never
support those in-between features.
On svga3 we wither want to use fb traces or screen targets
(i.e. gbobjects), nothing in between. This fixes presentation on a lot
of fusion/esxi tech previews where the exposed svga3 caps haven't been
finalized yet.
Signed-off-by: Zack Rusin <zackr(a)vmware.com>
Fixes: 2cd80dbd3551 ("drm/vmwgfx: Add basic support for SVGA3")
Cc: <stable(a)vger.kernel.org> # v5.14+
Reviewed-by: Martin Krastev <krastevm(a)vmware.com>
---
drivers/gpu/drm/vmwgfx/vmwgfx_cmd.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_cmd.c b/drivers/gpu/drm/vmwgfx/vmwgfx_cmd.c
index bf1b394753da..162dfeb1cc5a 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_cmd.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_cmd.c
@@ -675,11 +675,14 @@ int vmw_cmd_emit_dummy_query(struct vmw_private *dev_priv,
*/
bool vmw_cmd_supported(struct vmw_private *vmw)
{
- if ((vmw->capabilities & (SVGA_CAP_COMMAND_BUFFERS |
- SVGA_CAP_CMD_BUFFERS_2)) != 0)
- return true;
+ bool has_cmdbufs =
+ (vmw->capabilities & (SVGA_CAP_COMMAND_BUFFERS |
+ SVGA_CAP_CMD_BUFFERS_2)) != 0;
+ if (vmw_is_svga_v3(vmw))
+ return (has_cmdbufs &&
+ (vmw->capabilities & SVGA_CAP_GBOBJECTS) != 0);
/*
* We have FIFO cmd's
*/
- return vmw->fifo_mem != NULL;
+ return has_cmdbufs || vmw->fifo_mem != NULL;
}
--
2.32.0
This is the start of the stable review cycle for the 5.10.107 release.
There are 23 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 Sat, 19 Mar 2022 12:45:16 +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.10.107-r…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.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.10.107-rc1
James Morse <james.morse(a)arm.com>
arm64: kvm: Fix copy-and-paste error in bhb templates for v5.10 stable
Pavel Begunkov <asml.silence(a)gmail.com>
io_uring: return back safer resurrect
Chengming Zhou <zhouchengming(a)bytedance.com>
kselftest/vm: fix tests build with old libc
Christophe JAILLET <christophe.jaillet(a)wanadoo.fr>
bnx2: Fix an error message
Niels Dossche <dossche.niels(a)gmail.com>
sfc: extend the locking on mcdi->seqno
Eric Dumazet <edumazet(a)google.com>
tcp: make tcp_read_sock() more robust
Sreeramya Soratkal <quic_ssramya(a)quicinc.com>
nl80211: Update bss channel on channel switch for P2P_CLIENT
Manasi Navare <manasi.d.navare(a)intel.com>
drm/vrr: Set VRR capable prop only if it is attached to connector
Golan Ben Ami <golan.ben.ami(a)intel.com>
iwlwifi: don't advertise TWT support
Jia-Ju Bai <baijiaju1990(a)gmail.com>
atm: firestream: check the return value of ioremap() in fs_init()
Lad Prabhakar <prabhakar.mahadev-lad.rj(a)bp.renesas.com>
can: rcar_canfd: rcar_canfd_channel_probe(): register the CAN device when fully ready
Julian Braha <julianbraha(a)gmail.com>
ARM: 9178/1: fix unmet dependency on BITREVERSE for HAVE_ARCH_BITREVERSE
Alexander Lobakin <alobakin(a)pm.me>
MIPS: smp: fill in sibling and core maps earlier
Johannes Berg <johannes.berg(a)intel.com>
mac80211: refuse aggregations sessions before authorized
Corentin Labbe <clabbe(a)baylibre.com>
ARM: dts: rockchip: fix a typo on rk3288 crypto-controller
Sascha Hauer <s.hauer(a)pengutronix.de>
ARM: dts: rockchip: reorder rk322x hmdi clocks
Dinh Nguyen <dinguyen(a)kernel.org>
arm64: dts: agilex: use the compatible "intel,socfpga-agilex-hsotg"
Sascha Hauer <s.hauer(a)pengutronix.de>
arm64: dts: rockchip: reorder rk3399 hdmi clocks
Jakob Unterwurzacher <jakob.unterwurzacher(a)theobroma-systems.com>
arm64: dts: rockchip: fix rk3399-puma eMMC HS400 signal integrity
Yan Yan <evitayan(a)google.com>
xfrm: Fix xfrm migrate issues when address family changes
Yan Yan <evitayan(a)google.com>
xfrm: Check if_id in xfrm_migrate
Xin Long <lucien.xin(a)gmail.com>
sctp: fix the processing for INIT chunk
Kai Lueke <kailueke(a)linux.microsoft.com>
Revert "xfrm: state and policy should fail if XFRMA_IF_ID 0"
-------------
Diffstat:
Makefile | 4 +-
arch/arm/boot/dts/rk322x.dtsi | 4 +-
arch/arm/boot/dts/rk3288.dtsi | 2 +-
arch/arm64/boot/dts/intel/socfpga_agilex.dtsi | 4 +-
arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 6 ++
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 6 +-
arch/arm64/kvm/hyp/smccc_wa.S | 4 +-
arch/mips/kernel/smp.c | 6 +-
drivers/atm/firestream.c | 2 +
drivers/gpu/drm/drm_connector.c | 3 +
drivers/net/can/rcar/rcar_canfd.c | 6 +-
drivers/net/ethernet/broadcom/bnx2.c | 2 +-
drivers/net/ethernet/sfc/mcdi.c | 2 +-
drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 3 +-
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 1 -
fs/io_uring.c | 18 ++++--
include/net/xfrm.h | 5 +-
lib/Kconfig | 1 -
net/ipv4/tcp.c | 10 +--
net/key/af_key.c | 2 +-
net/mac80211/agg-tx.c | 10 ++-
net/sctp/sm_statefuns.c | 71 ++++++++++++++--------
net/wireless/nl80211.c | 3 +-
net/xfrm/xfrm_policy.c | 14 +++--
net/xfrm/xfrm_state.c | 15 +++--
net/xfrm/xfrm_user.c | 27 +++-----
tools/testing/selftests/vm/userfaultfd.c | 1 +
27 files changed, 141 insertions(+), 91 deletions(-)
This is the start of the stable review cycle for the 5.15.30 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 Sat, 19 Mar 2022 12:45:16 +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.15.30-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.15.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.15.30-rc1
Ivan Vecera <ivecera(a)redhat.com>
ice: Fix race condition during interface enslave
Peter Zijlstra <peterz(a)infradead.org>
x86/module: Fix the paravirt vs alternative order
Chengming Zhou <zhouchengming(a)bytedance.com>
kselftest/vm: fix tests build with old libc
Christophe JAILLET <christophe.jaillet(a)wanadoo.fr>
bnx2: Fix an error message
Niels Dossche <dossche.niels(a)gmail.com>
sfc: extend the locking on mcdi->seqno
Eric Dumazet <edumazet(a)google.com>
tcp: make tcp_read_sock() more robust
Sreeramya Soratkal <quic_ssramya(a)quicinc.com>
nl80211: Update bss channel on channel switch for P2P_CLIENT
Manasi Navare <manasi.d.navare(a)intel.com>
drm/vrr: Set VRR capable prop only if it is attached to connector
Golan Ben Ami <golan.ben.ami(a)intel.com>
iwlwifi: don't advertise TWT support
Jia-Ju Bai <baijiaju1990(a)gmail.com>
atm: firestream: check the return value of ioremap() in fs_init()
Lad Prabhakar <prabhakar.mahadev-lad.rj(a)bp.renesas.com>
can: rcar_canfd: rcar_canfd_channel_probe(): register the CAN device when fully ready
Luiz Augusto von Dentz <luiz.von.dentz(a)intel.com>
Bluetooth: hci_core: Fix leaking sent_cmd skb
Julian Braha <julianbraha(a)gmail.com>
ARM: 9178/1: fix unmet dependency on BITREVERSE for HAVE_ARCH_BITREVERSE
Alexander Lobakin <alobakin(a)pm.me>
MIPS: smp: fill in sibling and core maps earlier
Johannes Berg <johannes.berg(a)intel.com>
mac80211: refuse aggregations sessions before authorized
Corentin Labbe <clabbe(a)baylibre.com>
ARM: dts: rockchip: fix a typo on rk3288 crypto-controller
Sascha Hauer <s.hauer(a)pengutronix.de>
ARM: dts: rockchip: reorder rk322x hmdi clocks
Dinh Nguyen <dinguyen(a)kernel.org>
arm64: dts: agilex: use the compatible "intel,socfpga-agilex-hsotg"
Sascha Hauer <s.hauer(a)pengutronix.de>
arm64: dts: rockchip: reorder rk3399 hdmi clocks
Krzysztof Kozlowski <krzysztof.kozlowski(a)canonical.com>
arm64: dts: rockchip: align pl330 node name with dtschema
Jakob Unterwurzacher <jakob.unterwurzacher(a)theobroma-systems.com>
arm64: dts: rockchip: fix rk3399-puma eMMC HS400 signal integrity
Yan Yan <evitayan(a)google.com>
xfrm: Fix xfrm migrate issues when address family changes
Yan Yan <evitayan(a)google.com>
xfrm: Check if_id in xfrm_migrate
Quentin Schulz <quentin.schulz(a)theobroma-systems.com>
arm64: dts: rockchip: fix rk3399-puma-haikou USB OTG mode
Kai Lueke <kailueke(a)linux.microsoft.com>
Revert "xfrm: state and policy should fail if XFRMA_IF_ID 0"
-------------
Diffstat:
Makefile | 4 ++--
arch/arm/boot/dts/rk322x.dtsi | 4 ++--
arch/arm/boot/dts/rk3288.dtsi | 2 +-
arch/arm64/boot/dts/intel/socfpga_agilex.dtsi | 4 ++--
arch/arm64/boot/dts/rockchip/px30.dtsi | 2 +-
arch/arm64/boot/dts/rockchip/rk3328.dtsi | 2 +-
.../arm64/boot/dts/rockchip/rk3399-puma-haikou.dts | 1 +
arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 20 ++++++++++++++++
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 6 ++---
arch/mips/kernel/smp.c | 6 ++---
arch/x86/kernel/module.c | 13 +++++++----
drivers/atm/firestream.c | 2 ++
drivers/gpu/drm/drm_connector.c | 3 +++
drivers/net/can/rcar/rcar_canfd.c | 6 ++---
drivers/net/ethernet/broadcom/bnx2.c | 2 +-
drivers/net/ethernet/intel/ice/ice.h | 11 ++++++++-
drivers/net/ethernet/intel/ice/ice_main.c | 12 +++++++++-
drivers/net/ethernet/sfc/mcdi.c | 2 +-
drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 3 +--
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 1 -
include/net/xfrm.h | 5 ++--
lib/Kconfig | 1 -
net/bluetooth/hci_core.c | 1 +
net/ipv4/tcp.c | 10 ++++----
net/key/af_key.c | 2 +-
net/mac80211/agg-tx.c | 10 +++++++-
net/wireless/nl80211.c | 3 ++-
net/xfrm/xfrm_policy.c | 14 ++++++-----
net/xfrm/xfrm_state.c | 15 ++++++++----
net/xfrm/xfrm_user.c | 27 +++++++---------------
tools/testing/selftests/vm/userfaultfd.c | 1 +
31 files changed, 126 insertions(+), 69 deletions(-)
Hi, this is your Linux kernel regression tracker.
I noticed a regression report in bugzilla.kernel.org that afaics nobody
acted upon since it was reported more than ten days ago (it afaifcs only
later became clear this is a regression), that's why I decided to
forward it to the lists and a few relevant people to the CC. To quote
from https://bugzilla.kernel.org/show_bug.cgi?id=215660:
> Stephane Poignant 2022-03-04 17:24:49 UTC
>
> Created attachment 300529 [details]
> lspci and ethtool outputs on reproducing systems
>
> Context:
> - dense enterprise deployment, 10 lightweight aps (Aruba) on one office floor, up to 125 concurrent users total, up to 25 user per AP
> - the wireless network supports 802.11n, 802.11ac and 802.11ax in 5 GHz band
> - authentication is wpa2-psk
> - client devices consists in a variety of endpoints (laptops, cell phones, tablets, smart devices), running various versions of Mac OSX, Linux, Windows, Android or IOS.
> - certain clients supports only 20Mhz, HT protection kicks in and turns off on APs as those clients are moving around. Consequently ht_operation_mode fluctuates between 4 and 6 even when staying on the same AP.
> - the issue affects various laptops with Intel AX200 or AX201 chipsets, running Debian or Ubuntu with a recent kernel >= 5.10
> - see attached file devices.txt for detailed information on the different laptops we have reproduced the issue on
>
>
> Steps to reproduce:
> - appears sometimes, but not always, after the iwlwifi STA roams from one AP to another
> - seen more often when ht_operation_mode changes between 4 and 6 (but not sufficient to trigger the issue)
> - STA deassociates from current AP and associates to the new one successfully
> - connectivity works on the new AP for a short period of time, usually between 30s and 1 minute
> - then suddenly, the Rx path breaks. No more received frame visible on the STA wireless interface. AP reports that frames are retransmitted and not acknowledged by STA.
> - the Tx path keeps working. Frames sent by STA to AP are received and visible on the network
> - in this state each inbound frame appears to trigger iwl_pcie_rx_handle_rb with cmd BAR_FRAME_RELEASE (seqnum is always the same):
>
> Mar 4 12:44:32 debian kernel: [15884.715812] iwlwifi 0000:00:14.3: iwl_pcie_rx_handle Q 0: HW = 338, SW = 337
> Mar 4 12:44:32 debian kernel: [15884.715819] iwlwifi 0000:00:14.3: iwl_pcie_get_rxb Got virtual RB ID 1348
> Mar 4 12:44:32 debian kernel: [15884.715831] iwlwifi 0000:00:14.3: iwl_pcie_rx_handle_rb Q 0: cmd at offset 0: BAR_FRAME_RELEASE (00.c2, seq 0xbfff)
> Mar 4 12:44:32 debian kernel: [15884.715838] iwlwifi 0000:00:14.3: iwl_mvm_release_frames_from_notif Frame release notification for BAID 14, NSSN 169
> Mar 4 12:44:32 debian kernel: [15884.715843] iwlwifi 0000:00:14.3: iwl_pcie_rx_handle_rb Q 0: RB end marker at offset 64
> Mar 4 12:44:32 debian kernel: [15884.715852] iwlwifi 0000:00:14.3: iwl_pcie_restock_bd Assigned virtual RB ID 1348 to queue 0 index 334
>
> - those events do not appear during normal operation (or very rarely)
>
>
> Temporary resolution:
> - in most cases, the STA remains in this state until Wifi is restarted or until it roams to another AP
> - while in that state, it may happens (rarely) that a few frame are received with very high latency, then the next ones are lost, for instance:
>
> [1646398334.114200] From 10.200.2.67 icmp_seq=148 Destination Host Unreachable
> [1646398334.114242] From 10.200.2.67 icmp_seq=149 Destination Host Unreachable
> [1646398334.114251] From 10.200.2.67 icmp_seq=150 Destination Host Unreachable
> [1646398336.365181] 64 bytes from 10.200.2.1: icmp_seq=151 ttl=64 time=2251 ms
> [1646398336.365237] 64 bytes from 10.200.2.1: icmp_seq=152 ttl=64 time=1227 ms
> [1646398336.365250] 64 bytes from 10.200.2.1: icmp_seq=153 ttl=64 time=203 ms
> [1646398375.042236] From 10.200.2.67 icmp_seq=188 Destination Host Unreachable
> [1646398375.042291] From 10.200.2.67 icmp_seq=189 Destination Host Unreachable
> [1646398375.042303] From 10.200.2.67 icmp_seq=190 Destination Host Unreachable
>
>
> Workaround:
> - disable_11ax=1 prevents the problem from happening
> [...]
> Stephane Poignant 2022-03-10 14:48:39 UTC
>
> Did some further testing with vanilla kernel.
> 5.10.66 and older DO NOT reproduce the issue.
> 5.10.67 and newer DO reproduce.
>
> I see the following changes according to changelog:
> iwlwifi: mvm: Fix scan channel flags settings
> iwlwifi: fw: correctly limit to monitor dump
> iwlwifi: mvm: fix access to BSS elements
> iwlwifi: mvm: avoid static queue number aliasing
> iwlwifi: mvm: fix a memory leak in iwl_mvm_mac_ctxt_beacon_changed
> iwlwifi: pcie: free RBs during configure
>
> Suspecting the one related with queues but no strong opinion atm.
>
> [reply] [−] Comment 6 Stephane Poignant 2022-03-11 10:18:29 UTC
>
> Ok so after some further testing, turned out that after commenting the following lines in file drivers/net/wireless/intel/iwlwifi/pcie/trans.c:
>
> /* free all first - we might be reconfigured for a different size */
> iwl_pcie_free_rbs_pool(trans);
>
> Which were introduced by the following commit:
> iwlwifi: pcie: free RBs during configure
> https://lore.kernel.org/all/iwlwifi.20210802170640.42d7c93279c4.I07f74e65aa…
>
> Then i'm no longer able to reproduce. Tested in vanilla 5.10.67, vanilla 5.10.88 and 5.10.92 with Debian patches.
>
Could somebody take a look into this? Or was this discussed somewhere
else already? Or even fixed?
Anyway, to get this tracked:
#regzbot introduced: 608c8359c567b4a04dedbe
#regzbot from: Stephane Poignant <stephane.poignant(a)proton.ch>
#regzbot title: wireless: iwlwifi: regression in 5.10.67 due to
"iwlwifi: pcie: free RBs during configure"
#regzbot link: https://bugzilla.kernel.org/show_bug.cgi?id=215660
Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
P.S.: As the Linux kernel's regression tracker I'm getting a lot of
reports on my table. I can only look briefly into most of them and lack
knowledge about most of the areas they concern. I thus unfortunately
will sometimes get things wrong or miss something important. I hope
that's not the case here; if you think it is, don't hesitate to tell me
in a public reply, it's in everyone's interest to set the public record
straight.
--
Additional information about regzbot:
If you want to know more about regzbot, check out its web-interface, the
getting start guide, and the references documentation:
https://linux-regtracking.leemhuis.info/regzbot/https://gitlab.com/knurd42/regzbot/-/blob/main/docs/getting_started.mdhttps://gitlab.com/knurd42/regzbot/-/blob/main/docs/reference.md
The last two documents will explain how you can interact with regzbot
yourself if your want to.
Hint for reporters: when reporting a regression it's in your interest to
CC the regression list and tell regzbot about the issue, as that ensures
the regression makes it onto the radar of the Linux kernel's regression
tracker -- that's in your interest, as it ensures your report won't fall
through the cracks unnoticed.
Hint for developers: you normally don't need to care about regzbot once
it's involved. Fix the issue as you normally would, just remember to
include 'Link:' tag in the patch descriptions pointing to all reports
about the issue. This has been expected from developers even before
regzbot showed up for reasons explained in
'Documentation/process/submitting-patches.rst' and
'Documentation/process/5.Posting.rst'.
From: Alex Leibovich <alexl(a)marvell.com>
Automatic Clock Gating is a feature used for the power
consumption optimisation. It turned out that
during early init phase it may prevent the stable voltage
switch to 1.8V - due to that on some platfroms an endless
printout in dmesg can be observed:
"mmc1: 1.8V regulator output did not became stable"
Fix the problem by disabling the ACG at very beginning
of the sdhci_init and let that be enabled later.
Fixes: 3a3748dba881 ("mmc: sdhci-xenon: Add Marvell Xenon SDHC core functionality")
Signed-off-by: Alex Leibovich <alexl(a)marvell.com>
Signed-off-by: Marcin Wojtas <mw(a)semihalf.com>
Cc: stable(a)vger.kernel.org
---
drivers/mmc/host/sdhci-xenon.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/sdhci-xenon.c b/drivers/mmc/host/sdhci-xenon.c
index c67611fdaa8a..4b05f6fdefb4 100644
--- a/drivers/mmc/host/sdhci-xenon.c
+++ b/drivers/mmc/host/sdhci-xenon.c
@@ -168,7 +168,12 @@ static void xenon_reset_exit(struct sdhci_host *host,
/* Disable tuning request and auto-retuning again */
xenon_retune_setup(host);
- xenon_set_acg(host, true);
+ /*
+ * The ACG should be turned off at the early init time, in order
+ * to solve a possile issues with the 1.8V regulator stabilization.
+ * The feature is enabled in later stage.
+ */
+ xenon_set_acg(host, false);
xenon_set_sdclk_off_idle(host, sdhc_id, false);
--
2.29.0
This is a note to let you know that I've just added the patch titled
mei: avoid iterator usage outside of list_for_each_entry
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the char-misc-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
From c10187b1c5ebb8681ca467ab7b0ded5ea415d258 Mon Sep 17 00:00:00 2001
From: Alexander Usyskin <alexander.usyskin(a)intel.com>
Date: Tue, 8 Mar 2022 11:59:26 +0200
Subject: mei: avoid iterator usage outside of list_for_each_entry
Usage of the iterator outside of the list_for_each_entry
is considered harmful. https://lkml.org/lkml/2022/2/17/1032
Do not reference the loop variable outside of the loop,
by rearranging the orders of execution.
Instead of performing search loop and checking outside the loop
if the end of the list was hit and no matching element was found,
the execution is performed inside the loop upon a successful match
followed by a goto statement to the next step,
therefore no condition has to be performed after the loop has ended.
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Alexander Usyskin <alexander.usyskin(a)intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler(a)intel.com>
Link: https://lore.kernel.org/r/20220308095926.300412-1-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/misc/mei/interrupt.c | 35 +++++++++++++++--------------------
1 file changed, 15 insertions(+), 20 deletions(-)
diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei/interrupt.c
index a67f4f2d33a9..0706322154cb 100644
--- a/drivers/misc/mei/interrupt.c
+++ b/drivers/misc/mei/interrupt.c
@@ -424,31 +424,26 @@ int mei_irq_read_handler(struct mei_device *dev,
list_for_each_entry(cl, &dev->file_list, link) {
if (mei_cl_hbm_equal(cl, mei_hdr)) {
cl_dbg(dev, cl, "got a message\n");
- break;
+ ret = mei_cl_irq_read_msg(cl, mei_hdr, meta_hdr, cmpl_list);
+ goto reset_slots;
}
}
/* if no recipient cl was found we assume corrupted header */
- if (&cl->link == &dev->file_list) {
- /* A message for not connected fixed address clients
- * should be silently discarded
- * On power down client may be force cleaned,
- * silently discard such messages
- */
- if (hdr_is_fixed(mei_hdr) ||
- dev->dev_state == MEI_DEV_POWER_DOWN) {
- mei_irq_discard_msg(dev, mei_hdr, mei_hdr->length);
- ret = 0;
- goto reset_slots;
- }
- dev_err(dev->dev, "no destination client found 0x%08X\n",
- dev->rd_msg_hdr[0]);
- ret = -EBADMSG;
- goto end;
+ /* A message for not connected fixed address clients
+ * should be silently discarded
+ * On power down client may be force cleaned,
+ * silently discard such messages
+ */
+ if (hdr_is_fixed(mei_hdr) ||
+ dev->dev_state == MEI_DEV_POWER_DOWN) {
+ mei_irq_discard_msg(dev, mei_hdr, mei_hdr->length);
+ ret = 0;
+ goto reset_slots;
}
-
- ret = mei_cl_irq_read_msg(cl, mei_hdr, meta_hdr, cmpl_list);
-
+ dev_err(dev->dev, "no destination client found 0x%08X\n", dev->rd_msg_hdr[0]);
+ ret = -EBADMSG;
+ goto end;
reset_slots:
/* reset the number of slots and header */
--
2.35.1
This is a note to let you know that I've just added the patch titled
mei: me: add Alder Lake N device id.
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the char-misc-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
From 7bbbd0845818cffa9fa8ccfe52fa1cad58e7e4f2 Mon Sep 17 00:00:00 2001
From: Alexander Usyskin <alexander.usyskin(a)intel.com>
Date: Tue, 1 Mar 2022 09:11:15 +0200
Subject: mei: me: add Alder Lake N device id.
Add Alder Lake N device ID.
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Alexander Usyskin <alexander.usyskin(a)intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler(a)intel.com>
Link: https://lore.kernel.org/r/20220301071115.96145-1-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/misc/mei/hw-me-regs.h | 1 +
drivers/misc/mei/pci-me.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/misc/mei/hw-me-regs.h b/drivers/misc/mei/hw-me-regs.h
index 888c27bc3f1a..64ce3f830262 100644
--- a/drivers/misc/mei/hw-me-regs.h
+++ b/drivers/misc/mei/hw-me-regs.h
@@ -107,6 +107,7 @@
#define MEI_DEV_ID_ADP_S 0x7AE8 /* Alder Lake Point S */
#define MEI_DEV_ID_ADP_LP 0x7A60 /* Alder Lake Point LP */
#define MEI_DEV_ID_ADP_P 0x51E0 /* Alder Lake Point P */
+#define MEI_DEV_ID_ADP_N 0x54E0 /* Alder Lake Point N */
/*
* MEI HW Section
diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c
index a05cdb25d0c4..33e58821e478 100644
--- a/drivers/misc/mei/pci-me.c
+++ b/drivers/misc/mei/pci-me.c
@@ -114,6 +114,7 @@ static const struct pci_device_id mei_me_pci_tbl[] = {
{MEI_PCI_DEVICE(MEI_DEV_ID_ADP_S, MEI_ME_PCH15_CFG)},
{MEI_PCI_DEVICE(MEI_DEV_ID_ADP_LP, MEI_ME_PCH15_CFG)},
{MEI_PCI_DEVICE(MEI_DEV_ID_ADP_P, MEI_ME_PCH15_CFG)},
+ {MEI_PCI_DEVICE(MEI_DEV_ID_ADP_N, MEI_ME_PCH15_CFG)},
/* required last entry */
{0, }
--
2.35.1
This is a note to let you know that I've just added the patch titled
serial: sc16is7xx: Clear RS485 bits in the shutdown
to my tty git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
in the tty-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the tty-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
From 927728a34f11b5a27f4610bdb7068317d6fdc72a Mon Sep 17 00:00:00 2001
From: Hui Wang <hui.wang(a)canonical.com>
Date: Tue, 8 Mar 2022 19:00:42 +0800
Subject: serial: sc16is7xx: Clear RS485 bits in the shutdown
We tested RS485 function on an EVB which has SC16IS752, after
finishing the test, we started the RS232 function test, but found the
RTS is still working in the RS485 mode.
That is because both startup and shutdown call port_update() to set
the EFCR_REG, this will not clear the RS485 bits once the bits are set
in the reconf_rs485(). To fix it, clear the RS485 bits in shutdown.
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang(a)canonical.com>
Link: https://lore.kernel.org/r/20220308110042.108451-1-hui.wang@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/tty/serial/sc16is7xx.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
index 683dd3be010d..91434876fcde 100644
--- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c
@@ -1238,10 +1238,12 @@ static void sc16is7xx_shutdown(struct uart_port *port)
/* Disable all interrupts */
sc16is7xx_port_write(port, SC16IS7XX_IER_REG, 0);
- /* Disable TX/RX */
+ /* Disable TX/RX, clear auto RS485 and RTS invert */
sc16is7xx_port_update(port, SC16IS7XX_EFCR_REG,
SC16IS7XX_EFCR_RXDISABLE_BIT |
- SC16IS7XX_EFCR_TXDISABLE_BIT,
+ SC16IS7XX_EFCR_TXDISABLE_BIT |
+ SC16IS7XX_EFCR_AUTO_RS485_BIT |
+ SC16IS7XX_EFCR_RTS_INVERT_BIT,
SC16IS7XX_EFCR_RXDISABLE_BIT |
SC16IS7XX_EFCR_TXDISABLE_BIT);
--
2.35.1
Hi Greg,
Here is the state of the current v5.4 backport. Now that the 32bit
code has been merged, it doesn't conflict when KVM's shared 32bit/64bit
code needs to use these constants.
I've fixed the two issues that were reported against the v5.10 backport.
I had a go at bringing all the pre-requisites in to add proton-pack.c
to v5.4. Its currently 39 patches:
https://git.gitlab.arm.com/linux-arm/linux-jm.git /bhb/alternative_backport/UNTESTED/v5.4.183
(or for web browsers:
https://gitlab.arm.com/linux-arm/linux-jm/-/commits/bhb/alternative_backpor…
)
I've not managed to bring b881cdce77b4 "KVM: arm64: Allocate hyp vectors
statically" in, as that depends on the hypervisor's per-cpu support. Its
this patch that means those 'smccc_wa' templates are needed.
I estimate it would be 60 patches in total if we go this way, I don't
think its a good idea:
All this still has to work around 541ad0150ca4 ("arm: Remove 32bit KVM
host support") and 9ed24f4b712b ("KVM: arm64: Move virt/kvm/arm to
arch/arm64") being missing.
I think this approach creates more problems than it solves as the
files have to be in different places because of 32bit. It also creates
a significantly larger testing problem: I'm not looking forward to
working out how to test KVM guest migration over the variant-4 KVM ABI
changes in 29e8910a566a.
This version of the backport still adds the mitigation management code
to cpu_errata.c, because that is where this stuff lived in v5.4.
If you prefer, I can try adding proton-pack.c as a new empty file.
I think this would only confuse matters as the line-numbers would
never match, and there is an interaction with the spectre-v2 mitigations
that live in cpu_errata.c.
There is one patch not present in mainline 'KVM: arm64: Add templtes for
BHB mitigation sequences'.
Thanks,
James
Anshuman Khandual (1):
arm64: Add Cortex-X2 CPU part definition
James Morse (18):
arm64: entry.S: Add ventry overflow sanity checks
arm64: entry: Make the trampoline cleanup optional
arm64: entry: Free up another register on kpti's tramp_exit path
arm64: entry: Move the trampoline data page before the text page
arm64: entry: Allow tramp_alias to access symbols after the 4K
boundary
arm64: entry: Don't assume tramp_vectors is the start of the vectors
arm64: entry: Move trampoline macros out of ifdef'd section
arm64: entry: Make the kpti trampoline's kpti sequence optional
arm64: entry: Allow the trampoline text to occupy multiple pages
arm64: entry: Add non-kpti __bp_harden_el1_vectors for mitigations
arm64: entry: Add vectors that have the bhb mitigation sequences
arm64: entry: Add macro for reading symbol addresses from the
trampoline
arm64: Add percpu vectors for EL1
arm64: proton-pack: Report Spectre-BHB vulnerabilities as part of
Spectre-v2
KVM: arm64: Add templates for BHB mitigation sequences
arm64: Mitigate spectre style branch history side channels
KVM: arm64: Allow SMCCC_ARCH_WORKAROUND_3 to be discovered and
migrated
arm64: Use the clearbhb instruction in mitigations
Joey Gouly (1):
arm64: add ID_AA64ISAR2_EL1 sys register
Rob Herring (1):
arm64: Add part number for Arm Cortex-A77
Suzuki K Poulose (1):
arm64: Add Neoverse-N2, Cortex-A710 CPU part definition
arch/arm/include/asm/kvm_host.h | 7 +
arch/arm/include/uapi/asm/kvm.h | 6 +
arch/arm64/Kconfig | 9 +
arch/arm64/include/asm/assembler.h | 33 +++
arch/arm64/include/asm/cpu.h | 1 +
arch/arm64/include/asm/cpucaps.h | 3 +-
arch/arm64/include/asm/cpufeature.h | 40 +++
arch/arm64/include/asm/cputype.h | 16 ++
arch/arm64/include/asm/fixmap.h | 6 +-
arch/arm64/include/asm/kvm_host.h | 5 +
arch/arm64/include/asm/kvm_mmu.h | 6 +-
arch/arm64/include/asm/mmu.h | 8 +-
arch/arm64/include/asm/sections.h | 5 +
arch/arm64/include/asm/sysreg.h | 17 ++
arch/arm64/include/asm/vectors.h | 73 ++++++
arch/arm64/include/uapi/asm/kvm.h | 5 +
arch/arm64/kernel/cpu_errata.c | 385 +++++++++++++++++++++++++++-
arch/arm64/kernel/cpufeature.c | 21 ++
arch/arm64/kernel/cpuinfo.c | 1 +
arch/arm64/kernel/entry.S | 213 +++++++++++----
arch/arm64/kernel/vmlinux.lds.S | 2 +-
arch/arm64/kvm/hyp/hyp-entry.S | 64 +++++
arch/arm64/kvm/hyp/switch.c | 8 +-
arch/arm64/kvm/sys_regs.c | 2 +-
arch/arm64/mm/mmu.c | 12 +-
include/linux/arm-smccc.h | 5 +
virt/kvm/arm/psci.c | 34 ++-
27 files changed, 912 insertions(+), 75 deletions(-)
create mode 100644 arch/arm64/include/asm/vectors.h
--
2.30.2
During the uvcg_video_pump() process, if an error occurs and
uvcg_queue_cancel() is called, the buffer queue will be cleared out, but
the current marker (queue->buf_used) of the active buffer (no longer
active) is not reset. On the next iteration of uvcg_video_pump() the
stale buf_used count will be used and the logic of min((unsigned
int)len, buf->bytesused - queue->buf_used) may incorrectly calculate a
nbytes size, causing an invalid memory access.
[80802.185460][ T315] configfs-gadget gadget: uvc: VS request completed
with status -18.
[80802.185519][ T315] configfs-gadget gadget: uvc: VS request completed
with status -18.
...
uvcg_queue_cancel() is called and the queue is cleared out, but the
marker queue->buf_used is not reset.
...
[80802.262328][ T8682] Unable to handle kernel paging request at virtual
address ffffffc03af9f000
...
...
[80802.263138][ T8682] Call trace:
[80802.263146][ T8682] __memcpy+0x12c/0x180
[80802.263155][ T8682] uvcg_video_pump+0xcc/0x1e0
[80802.263165][ T8682] process_one_work+0x2cc/0x568
[80802.263173][ T8682] worker_thread+0x28c/0x518
[80802.263181][ T8682] kthread+0x160/0x170
[80802.263188][ T8682] ret_from_fork+0x10/0x18
[80802.263198][ T8682] Code: a8c12829 a88130cb a8c130
Signed-off-by: Dan Vacura <w36195(a)motorola.com>
---
drivers/usb/gadget/function/uvc_queue.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/gadget/function/uvc_queue.c b/drivers/usb/gadget/function/uvc_queue.c
index d852ac9e47e7..2cda982f3765 100644
--- a/drivers/usb/gadget/function/uvc_queue.c
+++ b/drivers/usb/gadget/function/uvc_queue.c
@@ -264,6 +264,8 @@ void uvcg_queue_cancel(struct uvc_video_queue *queue, int disconnect)
buf->state = UVC_BUF_STATE_ERROR;
vb2_buffer_done(&buf->buf.vb2_buf, VB2_BUF_STATE_ERROR);
}
+ queue->buf_used = 0;
+
/* This must be protected by the irqlock spinlock to avoid race
* conditions between uvc_queue_buffer and the disconnection event that
* could result in an interruptible wait in uvc_dequeue_buffer. Do not
--
2.32.0
This is a note to let you know that I've just added the patch titled
iio: adc: xilinx-ams: Fix single channel switching sequence
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
From 0bf126163c3e7e6d722622073046aed567a5551e Mon Sep 17 00:00:00 2001
From: Robert Hancock <robert.hancock(a)calian.com>
Date: Thu, 27 Jan 2022 11:34:50 -0600
Subject: iio: adc: xilinx-ams: Fix single channel switching sequence
Some of the AMS channels need to be read by switching into single-channel
mode from the normal polling sequence. There was a logic issue in this
switching code that could cause the first read of these channels to read
back as zero.
It appears that the sequencer should be set back to default mode before
changing the channel selection, and the channel should be set before
switching the sequencer back into single-channel mode.
Also, write 1 to the EOC bit in the status register to clear it before
waiting for it to become set, so that we actually wait for a new
conversion to complete, and don't proceed based on a previous conversion
completing.
Fixes: d5c70627a794 ("iio: adc: Add Xilinx AMS driver")
Signed-off-by: Robert Hancock <robert.hancock(a)calian.com>
Acked-by: Michal Simek <michal.simek(a)xilinx.com>
Link: https://lore.kernel.org/r/20220127173450.3684318-5-robert.hancock@calian.com
Cc: <Stable(a)vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
---
drivers/iio/adc/xilinx-ams.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/adc/xilinx-ams.c b/drivers/iio/adc/xilinx-ams.c
index 0c491667c464..a55396c1f8b2 100644
--- a/drivers/iio/adc/xilinx-ams.c
+++ b/drivers/iio/adc/xilinx-ams.c
@@ -531,14 +531,18 @@ static int ams_enable_single_channel(struct ams *ams, unsigned int offset)
return -EINVAL;
}
- /* set single channel, sequencer off mode */
+ /* put sysmon in a soft reset to change the sequence */
ams_ps_update_reg(ams, AMS_REG_CONFIG1, AMS_CONF1_SEQ_MASK,
- AMS_CONF1_SEQ_SINGLE_CHANNEL);
+ AMS_CONF1_SEQ_DEFAULT);
/* write the channel number */
ams_ps_update_reg(ams, AMS_REG_CONFIG0, AMS_CONF0_CHANNEL_NUM_MASK,
channel_num);
+ /* set single channel, sequencer off mode */
+ ams_ps_update_reg(ams, AMS_REG_CONFIG1, AMS_CONF1_SEQ_MASK,
+ AMS_CONF1_SEQ_SINGLE_CHANNEL);
+
return 0;
}
@@ -552,6 +556,8 @@ static int ams_read_vcc_reg(struct ams *ams, unsigned int offset, u32 *data)
if (ret)
return ret;
+ /* clear end-of-conversion flag, wait for next conversion to complete */
+ writel(expect, ams->base + AMS_ISR_1);
ret = readl_poll_timeout(ams->base + AMS_ISR_1, reg, (reg & expect),
AMS_INIT_POLL_TIME_US, AMS_INIT_TIMEOUT_US);
if (ret)
--
2.35.1
This is a note to let you know that I've just added the patch titled
iio: adc: xilinx-ams: Fixed wrong sequencer register settings
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
From d5d786fb531697be74c567b3844c6897ddf1ffdd Mon Sep 17 00:00:00 2001
From: Robert Hancock <robert.hancock(a)calian.com>
Date: Thu, 27 Jan 2022 11:34:49 -0600
Subject: iio: adc: xilinx-ams: Fixed wrong sequencer register settings
Register settings used for the sequencer configuration register
were incorrect, causing some inputs to not be read properly.
Fixes: d5c70627a794 ("iio: adc: Add Xilinx AMS driver")
Signed-off-by: Robert Hancock <robert.hancock(a)calian.com>
Reviewed-by: Michael Tretter <m.tretter(a)pengutronix.de>
Acked-by: Michal Simek <michal.simek(a)xilinx.com>
Link: https://lore.kernel.org/r/20220127173450.3684318-4-robert.hancock@calian.com
Cc: <Stable(a)vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
---
drivers/iio/adc/xilinx-ams.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/adc/xilinx-ams.c b/drivers/iio/adc/xilinx-ams.c
index 6746bc966bfd..0c491667c464 100644
--- a/drivers/iio/adc/xilinx-ams.c
+++ b/drivers/iio/adc/xilinx-ams.c
@@ -92,8 +92,8 @@
#define AMS_CONF1_SEQ_MASK GENMASK(15, 12)
#define AMS_CONF1_SEQ_DEFAULT FIELD_PREP(AMS_CONF1_SEQ_MASK, 0)
-#define AMS_CONF1_SEQ_CONTINUOUS FIELD_PREP(AMS_CONF1_SEQ_MASK, 1)
-#define AMS_CONF1_SEQ_SINGLE_CHANNEL FIELD_PREP(AMS_CONF1_SEQ_MASK, 2)
+#define AMS_CONF1_SEQ_CONTINUOUS FIELD_PREP(AMS_CONF1_SEQ_MASK, 2)
+#define AMS_CONF1_SEQ_SINGLE_CHANNEL FIELD_PREP(AMS_CONF1_SEQ_MASK, 3)
#define AMS_REG_SEQ0_MASK GENMASK(15, 0)
#define AMS_REG_SEQ2_MASK GENMASK(21, 16)
--
2.35.1
This is a note to let you know that I've just added the patch titled
dt-bindings: iio: adc: zynqmp_ams: Add clock entry
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
From 5165102efa41c2aedc77441612f4506a8a8671db Mon Sep 17 00:00:00 2001
From: Robert Hancock <robert.hancock(a)calian.com>
Date: Thu, 27 Jan 2022 11:34:47 -0600
Subject: dt-bindings: iio: adc: zynqmp_ams: Add clock entry
The AMS driver DT binding was missing the clock entry, which is actually
mandatory according to the driver implementation. Add this in.
Fixes: 39dd2d1e251d ("dt-bindings: iio: adc: Add Xilinx AMS binding documentation")
Signed-off-by: Robert Hancock <robert.hancock(a)calian.com>
Reviewed-by: Rob Herring <robh(a)kernel.org>
Acked-by: Michal Simek <michal.simek(a)xilinx.com>
Link: https://lore.kernel.org/r/20220127173450.3684318-2-robert.hancock@calian.com
Cc: <Stable(a)vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
---
.../devicetree/bindings/iio/adc/xlnx,zynqmp-ams.yaml | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Documentation/devicetree/bindings/iio/adc/xlnx,zynqmp-ams.yaml b/Documentation/devicetree/bindings/iio/adc/xlnx,zynqmp-ams.yaml
index 87992db389b2..3698b4b0900f 100644
--- a/Documentation/devicetree/bindings/iio/adc/xlnx,zynqmp-ams.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/xlnx,zynqmp-ams.yaml
@@ -92,6 +92,10 @@ properties:
description: AMS Controller register space
maxItems: 1
+ clocks:
+ items:
+ - description: AMS reference clock
+
ranges:
description:
Maps the child address space for PS and/or PL.
@@ -181,12 +185,15 @@ properties:
required:
- compatible
- reg
+ - clocks
- ranges
additionalProperties: false
examples:
- |
+ #include <dt-bindings/clock/xlnx-zynqmp-clk.h>
+
bus {
#address-cells = <2>;
#size-cells = <2>;
@@ -196,6 +203,7 @@ examples:
interrupt-parent = <&gic>;
interrupts = <0 56 4>;
reg = <0x0 0xffa50000 0x0 0x800>;
+ clocks = <&zynqmp_clk AMS_REF>;
#address-cells = <1>;
#size-cells = <1>;
#io-channel-cells = <1>;
--
2.35.1
This is a note to let you know that I've just added the patch titled
iio: adc: xilinx-ams: Fixed missing PS channels
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
From 1f21a41578062d439cc485bce2d8b664f9a6170e Mon Sep 17 00:00:00 2001
From: Robert Hancock <robert.hancock(a)calian.com>
Date: Thu, 27 Jan 2022 11:34:48 -0600
Subject: iio: adc: xilinx-ams: Fixed missing PS channels
The code forgot to increment num_channels for the PS channel inputs,
resulting in them not being enabled as they should.
Fixes: d5c70627a794 ("iio: adc: Add Xilinx AMS driver")
Signed-off-by: Robert Hancock <robert.hancock(a)calian.com>
Reviewed-by: Michael Tretter <m.tretter(a)pengutronix.de>
Acked-by: Michal Simek <michal.simek(a)xilinx.com>
Link: https://lore.kernel.org/r/20220127173450.3684318-3-robert.hancock@calian.com
Cc: <Stable(a)vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
---
drivers/iio/adc/xilinx-ams.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iio/adc/xilinx-ams.c b/drivers/iio/adc/xilinx-ams.c
index 6ffddf4038b8..6746bc966bfd 100644
--- a/drivers/iio/adc/xilinx-ams.c
+++ b/drivers/iio/adc/xilinx-ams.c
@@ -1225,6 +1225,7 @@ static int ams_init_module(struct iio_dev *indio_dev,
/* add PS channels to iio device channels */
memcpy(channels, ams_ps_channels, sizeof(ams_ps_channels));
+ num_channels = ARRAY_SIZE(ams_ps_channels);
} else if (fwnode_property_match_string(fwnode, "compatible",
"xlnx,zynqmp-ams-pl") == 0) {
ams->pl_base = fwnode_iomap(fwnode, 0);
--
2.35.1
This is a note to let you know that I've just added the patch titled
iio: accel: mma8452: use the correct logic to get mma8452_data
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
From c87b7b12f48db86ac9909894f4dc0107d7df6375 Mon Sep 17 00:00:00 2001
From: Haibo Chen <haibo.chen(a)nxp.com>
Date: Tue, 22 Feb 2022 10:42:21 +0800
Subject: iio: accel: mma8452: use the correct logic to get mma8452_data
The original logic to get mma8452_data is wrong, the *dev point to
the device belong to iio_dev. we can't use this dev to find the
correct i2c_client. The original logic happen to work because it
finally use dev->driver_data to get iio_dev. Here use the API
to_i2c_client() is wrong and make reader confuse. To correct the
logic, it should be like this
struct mma8452_data *data = iio_priv(dev_get_drvdata(dev));
But after commit 8b7651f25962 ("iio: iio_device_alloc(): Remove
unnecessary self drvdata"), the upper logic also can't work.
When try to show the avialable scale in userspace, will meet kernel
dump, kernel handle NULL pointer dereference.
So use dev_to_iio_dev() to correct the logic.
Dual fixes tags as the second reflects when the bug was exposed, whilst
the first reflects when the original bug was introduced.
Fixes: c3cdd6e48e35 ("iio: mma8452: refactor for seperating chip specific data")
Fixes: 8b7651f25962 ("iio: iio_device_alloc(): Remove unnecessary self drvdata")
Signed-off-by: Haibo Chen <haibo.chen(a)nxp.com>
Reviewed-by: Martin Kepplinger <martink(a)posteo.de>
Cc: <Stable(a)vger.kernel.org>
Link: https://lore.kernel.org/r/1645497741-5402-1-git-send-email-haibo.chen@nxp.c…
Signed-off-by: Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
---
drivers/iio/accel/mma8452.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c
index 6ea10700d048..9c02c681c84c 100644
--- a/drivers/iio/accel/mma8452.c
+++ b/drivers/iio/accel/mma8452.c
@@ -381,8 +381,8 @@ static ssize_t mma8452_show_scale_avail(struct device *dev,
struct device_attribute *attr,
char *buf)
{
- struct mma8452_data *data = iio_priv(i2c_get_clientdata(
- to_i2c_client(dev)));
+ struct iio_dev *indio_dev = dev_to_iio_dev(dev);
+ struct mma8452_data *data = iio_priv(indio_dev);
return mma8452_show_int_plus_micros(buf, data->chip_info->mma_scales,
ARRAY_SIZE(data->chip_info->mma_scales));
--
2.35.1
This is a note to let you know that I've just added the patch titled
iio: adc: aspeed: Add divider flag to fix incorrect voltage reading.
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
From 571426631acf46e2999c7ecd1e9d048172969a43 Mon Sep 17 00:00:00 2001
From: Billy Tsai <billy_tsai(a)aspeedtech.com>
Date: Mon, 21 Feb 2022 09:27:05 +0800
Subject: iio: adc: aspeed: Add divider flag to fix incorrect voltage reading.
The formula for the ADC sampling period in ast2400/ast2500 is:
ADC clock period = PCLK * 2 * (ADC0C[31:17] + 1) * (ADC0C[9:0])
When ADC0C[9:0] is set to 0 the sampling voltage will be lower than
expected, because the hardware may not have enough time to
charge/discharge to a stable voltage. This patch use the flag
CLK_DIVIDER_ONE_BASED which will use the raw value read from the
register, with the value of zero considered invalid to conform to the
corrected formula.
Fixes: 573803234e72 ("iio: Aspeed ADC")
Reported-by: Konstantin Klubnichkin <kitsok(a)yandex-team.ru>
Signed-off-by: Billy Tsai <billy_tsai(a)aspeedtech.com>
Reviewed-by: Joel Stanley <joel(a)jms.id.au>
Link: https://lore.kernel.org/r/20220221012705.22008-1-billy_tsai@aspeedtech.com
Cc: <Stable(a)vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
---
drivers/iio/adc/aspeed_adc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/adc/aspeed_adc.c b/drivers/iio/adc/aspeed_adc.c
index e939b84cbb56..0793d2474cdc 100644
--- a/drivers/iio/adc/aspeed_adc.c
+++ b/drivers/iio/adc/aspeed_adc.c
@@ -539,7 +539,9 @@ static int aspeed_adc_probe(struct platform_device *pdev)
data->clk_scaler = devm_clk_hw_register_divider(
&pdev->dev, clk_name, clk_parent_name, scaler_flags,
data->base + ASPEED_REG_CLOCK_CONTROL, 0,
- data->model_data->scaler_bit_width, 0, &data->clk_lock);
+ data->model_data->scaler_bit_width,
+ data->model_data->need_prescaler ? CLK_DIVIDER_ONE_BASED : 0,
+ &data->clk_lock);
if (IS_ERR(data->clk_scaler))
return PTR_ERR(data->clk_scaler);
--
2.35.1
This is a note to let you know that I've just added the patch titled
iio: imu: st_lsm6dsx: use dev_to_iio_dev() to get iio_dev struct
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
From 6270bf1f0197739a9cddaf0a40699a99b7357cb5 Mon Sep 17 00:00:00 2001
From: Haibo Chen <haibo.chen(a)nxp.com>
Date: Thu, 24 Feb 2022 19:29:51 +0800
Subject: iio: imu: st_lsm6dsx: use dev_to_iio_dev() to get iio_dev struct
dev_get_drvdata() on iio_dev->dev no longer returns the iio_dev.
Use dev_to_iio_dev() to get iio_dev struct.
Fixes: 8b7651f25962 ("iio: iio_device_alloc(): Remove unnecessary self drvdata")
Signed-off-by: Haibo Chen <haibo.chen(a)nxp.com>
Link: https://lore.kernel.org/r/1645702191-9400-1-git-send-email-haibo.chen@nxp.c…
Cc: <Stable(a)vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
---
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
index 727b4b6ac696..8b662332c282 100644
--- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
+++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
@@ -1629,7 +1629,7 @@ st_lsm6dsx_sysfs_sampling_frequency_avail(struct device *dev,
struct device_attribute *attr,
char *buf)
{
- struct st_lsm6dsx_sensor *sensor = iio_priv(dev_get_drvdata(dev));
+ struct st_lsm6dsx_sensor *sensor = iio_priv(dev_to_iio_dev(dev));
const struct st_lsm6dsx_odr_table_entry *odr_table;
int i, len = 0;
@@ -1647,7 +1647,7 @@ static ssize_t st_lsm6dsx_sysfs_scale_avail(struct device *dev,
struct device_attribute *attr,
char *buf)
{
- struct st_lsm6dsx_sensor *sensor = iio_priv(dev_get_drvdata(dev));
+ struct st_lsm6dsx_sensor *sensor = iio_priv(dev_to_iio_dev(dev));
const struct st_lsm6dsx_fs_table_entry *fs_table;
struct st_lsm6dsx_hw *hw = sensor->hw;
int i, len = 0;
--
2.35.1
This is a note to let you know that I've just added the patch titled
iio: afe: rescale: use s64 for temporary scale calculations
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
From 51593106b608ae4247cc8da928813347da16d025 Mon Sep 17 00:00:00 2001
From: Liam Beguin <liambeguin(a)gmail.com>
Date: Sat, 8 Jan 2022 15:53:07 -0500
Subject: iio: afe: rescale: use s64 for temporary scale calculations
All four scaling coefficients can take signed values.
Make tmp a signed 64-bit integer and switch to div_s64() to preserve
signs during 64-bit divisions.
Fixes: 8b74816b5a9a ("iio: afe: rescale: new driver")
Signed-off-by: Liam Beguin <liambeguin(a)gmail.com>
Reviewed-by: Peter Rosin <peda(a)axentia.se>
Reviewed-by: Andy Shevchenko <andy.shevchenko(a)gmail.com>
Link: https://lore.kernel.org/r/20220108205319.2046348-5-liambeguin@gmail.com
Cc: <Stable(a)vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
---
drivers/iio/afe/iio-rescale.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/iio/afe/iio-rescale.c b/drivers/iio/afe/iio-rescale.c
index 774eb3044edd..271d73e420c4 100644
--- a/drivers/iio/afe/iio-rescale.c
+++ b/drivers/iio/afe/iio-rescale.c
@@ -39,7 +39,7 @@ static int rescale_read_raw(struct iio_dev *indio_dev,
int *val, int *val2, long mask)
{
struct rescale *rescale = iio_priv(indio_dev);
- unsigned long long tmp;
+ s64 tmp;
int ret;
switch (mask) {
@@ -77,10 +77,10 @@ static int rescale_read_raw(struct iio_dev *indio_dev,
*val2 = rescale->denominator;
return IIO_VAL_FRACTIONAL;
case IIO_VAL_FRACTIONAL_LOG2:
- tmp = *val * 1000000000LL;
- do_div(tmp, rescale->denominator);
+ tmp = (s64)*val * 1000000000LL;
+ tmp = div_s64(tmp, rescale->denominator);
tmp *= rescale->numerator;
- do_div(tmp, 1000000000LL);
+ tmp = div_s64(tmp, 1000000000LL);
*val = tmp;
return ret;
default:
--
2.35.1
This is a note to let you know that I've just added the patch titled
iio: inkern: make a best effort on offset calculation
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
From ca85123354e1a65a22170286387b4791997fe864 Mon Sep 17 00:00:00 2001
From: Liam Beguin <liambeguin(a)gmail.com>
Date: Sat, 8 Jan 2022 15:53:06 -0500
Subject: iio: inkern: make a best effort on offset calculation
iio_convert_raw_to_processed_unlocked() assumes the offset is an
integer. Make a best effort to get a valid offset value for fractional
cases without breaking implicit truncations.
Fixes: 48e44ce0f881 ("iio:inkern: Add function to read the processed value")
Signed-off-by: Liam Beguin <liambeguin(a)gmail.com>
Reviewed-by: Peter Rosin <peda(a)axentia.se>
Reviewed-by: Andy Shevchenko <andy.shevchenko(a)gmail.com>
Link: https://lore.kernel.org/r/20220108205319.2046348-4-liambeguin@gmail.com
Cc: <Stable(a)vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
---
drivers/iio/inkern.c | 32 +++++++++++++++++++++++++++-----
1 file changed, 27 insertions(+), 5 deletions(-)
diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c
index dbe13fad3cbb..df74765d33dc 100644
--- a/drivers/iio/inkern.c
+++ b/drivers/iio/inkern.c
@@ -595,13 +595,35 @@ EXPORT_SYMBOL_GPL(iio_read_channel_average_raw);
static int iio_convert_raw_to_processed_unlocked(struct iio_channel *chan,
int raw, int *processed, unsigned int scale)
{
- int scale_type, scale_val, scale_val2, offset;
+ int scale_type, scale_val, scale_val2;
+ int offset_type, offset_val, offset_val2;
s64 raw64 = raw;
- int ret;
- ret = iio_channel_read(chan, &offset, NULL, IIO_CHAN_INFO_OFFSET);
- if (ret >= 0)
- raw64 += offset;
+ offset_type = iio_channel_read(chan, &offset_val, &offset_val2,
+ IIO_CHAN_INFO_OFFSET);
+ if (offset_type >= 0) {
+ switch (offset_type) {
+ case IIO_VAL_INT:
+ break;
+ case IIO_VAL_INT_PLUS_MICRO:
+ case IIO_VAL_INT_PLUS_NANO:
+ /*
+ * Both IIO_VAL_INT_PLUS_MICRO and IIO_VAL_INT_PLUS_NANO
+ * implicitely truncate the offset to it's integer form.
+ */
+ break;
+ case IIO_VAL_FRACTIONAL:
+ offset_val /= offset_val2;
+ break;
+ case IIO_VAL_FRACTIONAL_LOG2:
+ offset_val >>= offset_val2;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ raw64 += offset_val;
+ }
scale_type = iio_channel_read(chan, &scale_val, &scale_val2,
IIO_CHAN_INFO_SCALE);
--
2.35.1
This is a note to let you know that I've just added the patch titled
iio: inkern: apply consumer scale when no channel scale is available
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
From 14b457fdde38de594a4bc4bd9075019319d978da Mon Sep 17 00:00:00 2001
From: Liam Beguin <liambeguin(a)gmail.com>
Date: Sat, 8 Jan 2022 15:53:05 -0500
Subject: iio: inkern: apply consumer scale when no channel scale is available
When a consumer calls iio_read_channel_processed() and no channel scale
is available, it's assumed that the scale is one and the raw value is
returned as expected.
On the other hand, if the consumer calls iio_convert_raw_to_processed()
the scaling factor requested by the consumer is not applied.
This for example causes the consumer to process mV when expecting uV.
Make sure to always apply the scaling factor requested by the consumer.
Fixes: adc8ec5ff183 ("iio: inkern: pass through raw values if no scaling")
Signed-off-by: Liam Beguin <liambeguin(a)gmail.com>
Reviewed-by: Peter Rosin <peda(a)axentia.se>
Reviewed-by: Andy Shevchenko <andy.shevchenko(a)gmail.com>
Link: https://lore.kernel.org/r/20220108205319.2046348-3-liambeguin@gmail.com
Cc: <Stable(a)vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
---
drivers/iio/inkern.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c
index 021e1397ffc5..dbe13fad3cbb 100644
--- a/drivers/iio/inkern.c
+++ b/drivers/iio/inkern.c
@@ -607,10 +607,10 @@ static int iio_convert_raw_to_processed_unlocked(struct iio_channel *chan,
IIO_CHAN_INFO_SCALE);
if (scale_type < 0) {
/*
- * Just pass raw values as processed if no scaling is
- * available.
+ * If no channel scaling is available apply consumer scale to
+ * raw value and return.
*/
- *processed = raw;
+ *processed = raw * scale;
return 0;
}
--
2.35.1
This is a note to let you know that I've just added the patch titled
iio: inkern: apply consumer scale on IIO_VAL_INT cases
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
From 1bca97ff95c732a516ebb68da72814194980e0a5 Mon Sep 17 00:00:00 2001
From: Liam Beguin <liambeguin(a)gmail.com>
Date: Sat, 8 Jan 2022 15:53:04 -0500
Subject: iio: inkern: apply consumer scale on IIO_VAL_INT cases
When a consumer calls iio_read_channel_processed() and the channel has
an integer scale, the scale channel scale is applied and the processed
value is returned as expected.
On the other hand, if the consumer calls iio_convert_raw_to_processed()
the scaling factor requested by the consumer is not applied.
This for example causes the consumer to process mV when expecting uV.
Make sure to always apply the scaling factor requested by the consumer.
Fixes: 48e44ce0f881 ("iio:inkern: Add function to read the processed value")
Signed-off-by: Liam Beguin <liambeguin(a)gmail.com>
Reviewed-by: Peter Rosin <peda(a)axentia.se>
Reviewed-by: Andy Shevchenko <andy.shevchenko(a)gmail.com>
Link: https://lore.kernel.org/r/20220108205319.2046348-2-liambeguin@gmail.com
Cc: <Stable(a)vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
---
drivers/iio/inkern.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c
index 0222885b334c..021e1397ffc5 100644
--- a/drivers/iio/inkern.c
+++ b/drivers/iio/inkern.c
@@ -616,7 +616,7 @@ static int iio_convert_raw_to_processed_unlocked(struct iio_channel *chan,
switch (scale_type) {
case IIO_VAL_INT:
- *processed = raw64 * scale_val;
+ *processed = raw64 * scale_val * scale;
break;
case IIO_VAL_INT_PLUS_MICRO:
if (scale_val2 < 0)
--
2.35.1
This is a note to let you know that I've just added the patch titled
iio: adc: xilinx-ams: Fix single channel switching sequence
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the char-misc-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
From 0bf126163c3e7e6d722622073046aed567a5551e Mon Sep 17 00:00:00 2001
From: Robert Hancock <robert.hancock(a)calian.com>
Date: Thu, 27 Jan 2022 11:34:50 -0600
Subject: iio: adc: xilinx-ams: Fix single channel switching sequence
Some of the AMS channels need to be read by switching into single-channel
mode from the normal polling sequence. There was a logic issue in this
switching code that could cause the first read of these channels to read
back as zero.
It appears that the sequencer should be set back to default mode before
changing the channel selection, and the channel should be set before
switching the sequencer back into single-channel mode.
Also, write 1 to the EOC bit in the status register to clear it before
waiting for it to become set, so that we actually wait for a new
conversion to complete, and don't proceed based on a previous conversion
completing.
Fixes: d5c70627a794 ("iio: adc: Add Xilinx AMS driver")
Signed-off-by: Robert Hancock <robert.hancock(a)calian.com>
Acked-by: Michal Simek <michal.simek(a)xilinx.com>
Link: https://lore.kernel.org/r/20220127173450.3684318-5-robert.hancock@calian.com
Cc: <Stable(a)vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
---
drivers/iio/adc/xilinx-ams.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/adc/xilinx-ams.c b/drivers/iio/adc/xilinx-ams.c
index 0c491667c464..a55396c1f8b2 100644
--- a/drivers/iio/adc/xilinx-ams.c
+++ b/drivers/iio/adc/xilinx-ams.c
@@ -531,14 +531,18 @@ static int ams_enable_single_channel(struct ams *ams, unsigned int offset)
return -EINVAL;
}
- /* set single channel, sequencer off mode */
+ /* put sysmon in a soft reset to change the sequence */
ams_ps_update_reg(ams, AMS_REG_CONFIG1, AMS_CONF1_SEQ_MASK,
- AMS_CONF1_SEQ_SINGLE_CHANNEL);
+ AMS_CONF1_SEQ_DEFAULT);
/* write the channel number */
ams_ps_update_reg(ams, AMS_REG_CONFIG0, AMS_CONF0_CHANNEL_NUM_MASK,
channel_num);
+ /* set single channel, sequencer off mode */
+ ams_ps_update_reg(ams, AMS_REG_CONFIG1, AMS_CONF1_SEQ_MASK,
+ AMS_CONF1_SEQ_SINGLE_CHANNEL);
+
return 0;
}
@@ -552,6 +556,8 @@ static int ams_read_vcc_reg(struct ams *ams, unsigned int offset, u32 *data)
if (ret)
return ret;
+ /* clear end-of-conversion flag, wait for next conversion to complete */
+ writel(expect, ams->base + AMS_ISR_1);
ret = readl_poll_timeout(ams->base + AMS_ISR_1, reg, (reg & expect),
AMS_INIT_POLL_TIME_US, AMS_INIT_TIMEOUT_US);
if (ret)
--
2.35.1
This is a note to let you know that I've just added the patch titled
iio: adc: xilinx-ams: Fixed missing PS channels
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the char-misc-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
From 1f21a41578062d439cc485bce2d8b664f9a6170e Mon Sep 17 00:00:00 2001
From: Robert Hancock <robert.hancock(a)calian.com>
Date: Thu, 27 Jan 2022 11:34:48 -0600
Subject: iio: adc: xilinx-ams: Fixed missing PS channels
The code forgot to increment num_channels for the PS channel inputs,
resulting in them not being enabled as they should.
Fixes: d5c70627a794 ("iio: adc: Add Xilinx AMS driver")
Signed-off-by: Robert Hancock <robert.hancock(a)calian.com>
Reviewed-by: Michael Tretter <m.tretter(a)pengutronix.de>
Acked-by: Michal Simek <michal.simek(a)xilinx.com>
Link: https://lore.kernel.org/r/20220127173450.3684318-3-robert.hancock@calian.com
Cc: <Stable(a)vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
---
drivers/iio/adc/xilinx-ams.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iio/adc/xilinx-ams.c b/drivers/iio/adc/xilinx-ams.c
index 6ffddf4038b8..6746bc966bfd 100644
--- a/drivers/iio/adc/xilinx-ams.c
+++ b/drivers/iio/adc/xilinx-ams.c
@@ -1225,6 +1225,7 @@ static int ams_init_module(struct iio_dev *indio_dev,
/* add PS channels to iio device channels */
memcpy(channels, ams_ps_channels, sizeof(ams_ps_channels));
+ num_channels = ARRAY_SIZE(ams_ps_channels);
} else if (fwnode_property_match_string(fwnode, "compatible",
"xlnx,zynqmp-ams-pl") == 0) {
ams->pl_base = fwnode_iomap(fwnode, 0);
--
2.35.1
This is a note to let you know that I've just added the patch titled
iio: adc: xilinx-ams: Fixed wrong sequencer register settings
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the char-misc-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
From d5d786fb531697be74c567b3844c6897ddf1ffdd Mon Sep 17 00:00:00 2001
From: Robert Hancock <robert.hancock(a)calian.com>
Date: Thu, 27 Jan 2022 11:34:49 -0600
Subject: iio: adc: xilinx-ams: Fixed wrong sequencer register settings
Register settings used for the sequencer configuration register
were incorrect, causing some inputs to not be read properly.
Fixes: d5c70627a794 ("iio: adc: Add Xilinx AMS driver")
Signed-off-by: Robert Hancock <robert.hancock(a)calian.com>
Reviewed-by: Michael Tretter <m.tretter(a)pengutronix.de>
Acked-by: Michal Simek <michal.simek(a)xilinx.com>
Link: https://lore.kernel.org/r/20220127173450.3684318-4-robert.hancock@calian.com
Cc: <Stable(a)vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
---
drivers/iio/adc/xilinx-ams.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/adc/xilinx-ams.c b/drivers/iio/adc/xilinx-ams.c
index 6746bc966bfd..0c491667c464 100644
--- a/drivers/iio/adc/xilinx-ams.c
+++ b/drivers/iio/adc/xilinx-ams.c
@@ -92,8 +92,8 @@
#define AMS_CONF1_SEQ_MASK GENMASK(15, 12)
#define AMS_CONF1_SEQ_DEFAULT FIELD_PREP(AMS_CONF1_SEQ_MASK, 0)
-#define AMS_CONF1_SEQ_CONTINUOUS FIELD_PREP(AMS_CONF1_SEQ_MASK, 1)
-#define AMS_CONF1_SEQ_SINGLE_CHANNEL FIELD_PREP(AMS_CONF1_SEQ_MASK, 2)
+#define AMS_CONF1_SEQ_CONTINUOUS FIELD_PREP(AMS_CONF1_SEQ_MASK, 2)
+#define AMS_CONF1_SEQ_SINGLE_CHANNEL FIELD_PREP(AMS_CONF1_SEQ_MASK, 3)
#define AMS_REG_SEQ0_MASK GENMASK(15, 0)
#define AMS_REG_SEQ2_MASK GENMASK(21, 16)
--
2.35.1
This is a note to let you know that I've just added the patch titled
dt-bindings: iio: adc: zynqmp_ams: Add clock entry
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the char-misc-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
From 5165102efa41c2aedc77441612f4506a8a8671db Mon Sep 17 00:00:00 2001
From: Robert Hancock <robert.hancock(a)calian.com>
Date: Thu, 27 Jan 2022 11:34:47 -0600
Subject: dt-bindings: iio: adc: zynqmp_ams: Add clock entry
The AMS driver DT binding was missing the clock entry, which is actually
mandatory according to the driver implementation. Add this in.
Fixes: 39dd2d1e251d ("dt-bindings: iio: adc: Add Xilinx AMS binding documentation")
Signed-off-by: Robert Hancock <robert.hancock(a)calian.com>
Reviewed-by: Rob Herring <robh(a)kernel.org>
Acked-by: Michal Simek <michal.simek(a)xilinx.com>
Link: https://lore.kernel.org/r/20220127173450.3684318-2-robert.hancock@calian.com
Cc: <Stable(a)vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
---
.../devicetree/bindings/iio/adc/xlnx,zynqmp-ams.yaml | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Documentation/devicetree/bindings/iio/adc/xlnx,zynqmp-ams.yaml b/Documentation/devicetree/bindings/iio/adc/xlnx,zynqmp-ams.yaml
index 87992db389b2..3698b4b0900f 100644
--- a/Documentation/devicetree/bindings/iio/adc/xlnx,zynqmp-ams.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/xlnx,zynqmp-ams.yaml
@@ -92,6 +92,10 @@ properties:
description: AMS Controller register space
maxItems: 1
+ clocks:
+ items:
+ - description: AMS reference clock
+
ranges:
description:
Maps the child address space for PS and/or PL.
@@ -181,12 +185,15 @@ properties:
required:
- compatible
- reg
+ - clocks
- ranges
additionalProperties: false
examples:
- |
+ #include <dt-bindings/clock/xlnx-zynqmp-clk.h>
+
bus {
#address-cells = <2>;
#size-cells = <2>;
@@ -196,6 +203,7 @@ examples:
interrupt-parent = <&gic>;
interrupts = <0 56 4>;
reg = <0x0 0xffa50000 0x0 0x800>;
+ clocks = <&zynqmp_clk AMS_REF>;
#address-cells = <1>;
#size-cells = <1>;
#io-channel-cells = <1>;
--
2.35.1
This is a note to let you know that I've just added the patch titled
iio: accel: mma8452: use the correct logic to get mma8452_data
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the char-misc-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
From c87b7b12f48db86ac9909894f4dc0107d7df6375 Mon Sep 17 00:00:00 2001
From: Haibo Chen <haibo.chen(a)nxp.com>
Date: Tue, 22 Feb 2022 10:42:21 +0800
Subject: iio: accel: mma8452: use the correct logic to get mma8452_data
The original logic to get mma8452_data is wrong, the *dev point to
the device belong to iio_dev. we can't use this dev to find the
correct i2c_client. The original logic happen to work because it
finally use dev->driver_data to get iio_dev. Here use the API
to_i2c_client() is wrong and make reader confuse. To correct the
logic, it should be like this
struct mma8452_data *data = iio_priv(dev_get_drvdata(dev));
But after commit 8b7651f25962 ("iio: iio_device_alloc(): Remove
unnecessary self drvdata"), the upper logic also can't work.
When try to show the avialable scale in userspace, will meet kernel
dump, kernel handle NULL pointer dereference.
So use dev_to_iio_dev() to correct the logic.
Dual fixes tags as the second reflects when the bug was exposed, whilst
the first reflects when the original bug was introduced.
Fixes: c3cdd6e48e35 ("iio: mma8452: refactor for seperating chip specific data")
Fixes: 8b7651f25962 ("iio: iio_device_alloc(): Remove unnecessary self drvdata")
Signed-off-by: Haibo Chen <haibo.chen(a)nxp.com>
Reviewed-by: Martin Kepplinger <martink(a)posteo.de>
Cc: <Stable(a)vger.kernel.org>
Link: https://lore.kernel.org/r/1645497741-5402-1-git-send-email-haibo.chen@nxp.c…
Signed-off-by: Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
---
drivers/iio/accel/mma8452.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c
index 6ea10700d048..9c02c681c84c 100644
--- a/drivers/iio/accel/mma8452.c
+++ b/drivers/iio/accel/mma8452.c
@@ -381,8 +381,8 @@ static ssize_t mma8452_show_scale_avail(struct device *dev,
struct device_attribute *attr,
char *buf)
{
- struct mma8452_data *data = iio_priv(i2c_get_clientdata(
- to_i2c_client(dev)));
+ struct iio_dev *indio_dev = dev_to_iio_dev(dev);
+ struct mma8452_data *data = iio_priv(indio_dev);
return mma8452_show_int_plus_micros(buf, data->chip_info->mma_scales,
ARRAY_SIZE(data->chip_info->mma_scales));
--
2.35.1
This is a note to let you know that I've just added the patch titled
iio: adc: aspeed: Add divider flag to fix incorrect voltage reading.
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the char-misc-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
From 571426631acf46e2999c7ecd1e9d048172969a43 Mon Sep 17 00:00:00 2001
From: Billy Tsai <billy_tsai(a)aspeedtech.com>
Date: Mon, 21 Feb 2022 09:27:05 +0800
Subject: iio: adc: aspeed: Add divider flag to fix incorrect voltage reading.
The formula for the ADC sampling period in ast2400/ast2500 is:
ADC clock period = PCLK * 2 * (ADC0C[31:17] + 1) * (ADC0C[9:0])
When ADC0C[9:0] is set to 0 the sampling voltage will be lower than
expected, because the hardware may not have enough time to
charge/discharge to a stable voltage. This patch use the flag
CLK_DIVIDER_ONE_BASED which will use the raw value read from the
register, with the value of zero considered invalid to conform to the
corrected formula.
Fixes: 573803234e72 ("iio: Aspeed ADC")
Reported-by: Konstantin Klubnichkin <kitsok(a)yandex-team.ru>
Signed-off-by: Billy Tsai <billy_tsai(a)aspeedtech.com>
Reviewed-by: Joel Stanley <joel(a)jms.id.au>
Link: https://lore.kernel.org/r/20220221012705.22008-1-billy_tsai@aspeedtech.com
Cc: <Stable(a)vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
---
drivers/iio/adc/aspeed_adc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/adc/aspeed_adc.c b/drivers/iio/adc/aspeed_adc.c
index e939b84cbb56..0793d2474cdc 100644
--- a/drivers/iio/adc/aspeed_adc.c
+++ b/drivers/iio/adc/aspeed_adc.c
@@ -539,7 +539,9 @@ static int aspeed_adc_probe(struct platform_device *pdev)
data->clk_scaler = devm_clk_hw_register_divider(
&pdev->dev, clk_name, clk_parent_name, scaler_flags,
data->base + ASPEED_REG_CLOCK_CONTROL, 0,
- data->model_data->scaler_bit_width, 0, &data->clk_lock);
+ data->model_data->scaler_bit_width,
+ data->model_data->need_prescaler ? CLK_DIVIDER_ONE_BASED : 0,
+ &data->clk_lock);
if (IS_ERR(data->clk_scaler))
return PTR_ERR(data->clk_scaler);
--
2.35.1
This is a note to let you know that I've just added the patch titled
iio: imu: st_lsm6dsx: use dev_to_iio_dev() to get iio_dev struct
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the char-misc-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
From 6270bf1f0197739a9cddaf0a40699a99b7357cb5 Mon Sep 17 00:00:00 2001
From: Haibo Chen <haibo.chen(a)nxp.com>
Date: Thu, 24 Feb 2022 19:29:51 +0800
Subject: iio: imu: st_lsm6dsx: use dev_to_iio_dev() to get iio_dev struct
dev_get_drvdata() on iio_dev->dev no longer returns the iio_dev.
Use dev_to_iio_dev() to get iio_dev struct.
Fixes: 8b7651f25962 ("iio: iio_device_alloc(): Remove unnecessary self drvdata")
Signed-off-by: Haibo Chen <haibo.chen(a)nxp.com>
Link: https://lore.kernel.org/r/1645702191-9400-1-git-send-email-haibo.chen@nxp.c…
Cc: <Stable(a)vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
---
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
index 727b4b6ac696..8b662332c282 100644
--- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
+++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
@@ -1629,7 +1629,7 @@ st_lsm6dsx_sysfs_sampling_frequency_avail(struct device *dev,
struct device_attribute *attr,
char *buf)
{
- struct st_lsm6dsx_sensor *sensor = iio_priv(dev_get_drvdata(dev));
+ struct st_lsm6dsx_sensor *sensor = iio_priv(dev_to_iio_dev(dev));
const struct st_lsm6dsx_odr_table_entry *odr_table;
int i, len = 0;
@@ -1647,7 +1647,7 @@ static ssize_t st_lsm6dsx_sysfs_scale_avail(struct device *dev,
struct device_attribute *attr,
char *buf)
{
- struct st_lsm6dsx_sensor *sensor = iio_priv(dev_get_drvdata(dev));
+ struct st_lsm6dsx_sensor *sensor = iio_priv(dev_to_iio_dev(dev));
const struct st_lsm6dsx_fs_table_entry *fs_table;
struct st_lsm6dsx_hw *hw = sensor->hw;
int i, len = 0;
--
2.35.1
This is a note to let you know that I've just added the patch titled
iio: afe: rescale: use s64 for temporary scale calculations
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the char-misc-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
From 51593106b608ae4247cc8da928813347da16d025 Mon Sep 17 00:00:00 2001
From: Liam Beguin <liambeguin(a)gmail.com>
Date: Sat, 8 Jan 2022 15:53:07 -0500
Subject: iio: afe: rescale: use s64 for temporary scale calculations
All four scaling coefficients can take signed values.
Make tmp a signed 64-bit integer and switch to div_s64() to preserve
signs during 64-bit divisions.
Fixes: 8b74816b5a9a ("iio: afe: rescale: new driver")
Signed-off-by: Liam Beguin <liambeguin(a)gmail.com>
Reviewed-by: Peter Rosin <peda(a)axentia.se>
Reviewed-by: Andy Shevchenko <andy.shevchenko(a)gmail.com>
Link: https://lore.kernel.org/r/20220108205319.2046348-5-liambeguin@gmail.com
Cc: <Stable(a)vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
---
drivers/iio/afe/iio-rescale.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/iio/afe/iio-rescale.c b/drivers/iio/afe/iio-rescale.c
index 774eb3044edd..271d73e420c4 100644
--- a/drivers/iio/afe/iio-rescale.c
+++ b/drivers/iio/afe/iio-rescale.c
@@ -39,7 +39,7 @@ static int rescale_read_raw(struct iio_dev *indio_dev,
int *val, int *val2, long mask)
{
struct rescale *rescale = iio_priv(indio_dev);
- unsigned long long tmp;
+ s64 tmp;
int ret;
switch (mask) {
@@ -77,10 +77,10 @@ static int rescale_read_raw(struct iio_dev *indio_dev,
*val2 = rescale->denominator;
return IIO_VAL_FRACTIONAL;
case IIO_VAL_FRACTIONAL_LOG2:
- tmp = *val * 1000000000LL;
- do_div(tmp, rescale->denominator);
+ tmp = (s64)*val * 1000000000LL;
+ tmp = div_s64(tmp, rescale->denominator);
tmp *= rescale->numerator;
- do_div(tmp, 1000000000LL);
+ tmp = div_s64(tmp, 1000000000LL);
*val = tmp;
return ret;
default:
--
2.35.1
This is a note to let you know that I've just added the patch titled
iio: inkern: make a best effort on offset calculation
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the char-misc-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
From ca85123354e1a65a22170286387b4791997fe864 Mon Sep 17 00:00:00 2001
From: Liam Beguin <liambeguin(a)gmail.com>
Date: Sat, 8 Jan 2022 15:53:06 -0500
Subject: iio: inkern: make a best effort on offset calculation
iio_convert_raw_to_processed_unlocked() assumes the offset is an
integer. Make a best effort to get a valid offset value for fractional
cases without breaking implicit truncations.
Fixes: 48e44ce0f881 ("iio:inkern: Add function to read the processed value")
Signed-off-by: Liam Beguin <liambeguin(a)gmail.com>
Reviewed-by: Peter Rosin <peda(a)axentia.se>
Reviewed-by: Andy Shevchenko <andy.shevchenko(a)gmail.com>
Link: https://lore.kernel.org/r/20220108205319.2046348-4-liambeguin@gmail.com
Cc: <Stable(a)vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
---
drivers/iio/inkern.c | 32 +++++++++++++++++++++++++++-----
1 file changed, 27 insertions(+), 5 deletions(-)
diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c
index dbe13fad3cbb..df74765d33dc 100644
--- a/drivers/iio/inkern.c
+++ b/drivers/iio/inkern.c
@@ -595,13 +595,35 @@ EXPORT_SYMBOL_GPL(iio_read_channel_average_raw);
static int iio_convert_raw_to_processed_unlocked(struct iio_channel *chan,
int raw, int *processed, unsigned int scale)
{
- int scale_type, scale_val, scale_val2, offset;
+ int scale_type, scale_val, scale_val2;
+ int offset_type, offset_val, offset_val2;
s64 raw64 = raw;
- int ret;
- ret = iio_channel_read(chan, &offset, NULL, IIO_CHAN_INFO_OFFSET);
- if (ret >= 0)
- raw64 += offset;
+ offset_type = iio_channel_read(chan, &offset_val, &offset_val2,
+ IIO_CHAN_INFO_OFFSET);
+ if (offset_type >= 0) {
+ switch (offset_type) {
+ case IIO_VAL_INT:
+ break;
+ case IIO_VAL_INT_PLUS_MICRO:
+ case IIO_VAL_INT_PLUS_NANO:
+ /*
+ * Both IIO_VAL_INT_PLUS_MICRO and IIO_VAL_INT_PLUS_NANO
+ * implicitely truncate the offset to it's integer form.
+ */
+ break;
+ case IIO_VAL_FRACTIONAL:
+ offset_val /= offset_val2;
+ break;
+ case IIO_VAL_FRACTIONAL_LOG2:
+ offset_val >>= offset_val2;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ raw64 += offset_val;
+ }
scale_type = iio_channel_read(chan, &scale_val, &scale_val2,
IIO_CHAN_INFO_SCALE);
--
2.35.1
This is a note to let you know that I've just added the patch titled
iio: inkern: apply consumer scale when no channel scale is available
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the char-misc-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
From 14b457fdde38de594a4bc4bd9075019319d978da Mon Sep 17 00:00:00 2001
From: Liam Beguin <liambeguin(a)gmail.com>
Date: Sat, 8 Jan 2022 15:53:05 -0500
Subject: iio: inkern: apply consumer scale when no channel scale is available
When a consumer calls iio_read_channel_processed() and no channel scale
is available, it's assumed that the scale is one and the raw value is
returned as expected.
On the other hand, if the consumer calls iio_convert_raw_to_processed()
the scaling factor requested by the consumer is not applied.
This for example causes the consumer to process mV when expecting uV.
Make sure to always apply the scaling factor requested by the consumer.
Fixes: adc8ec5ff183 ("iio: inkern: pass through raw values if no scaling")
Signed-off-by: Liam Beguin <liambeguin(a)gmail.com>
Reviewed-by: Peter Rosin <peda(a)axentia.se>
Reviewed-by: Andy Shevchenko <andy.shevchenko(a)gmail.com>
Link: https://lore.kernel.org/r/20220108205319.2046348-3-liambeguin@gmail.com
Cc: <Stable(a)vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
---
drivers/iio/inkern.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c
index 021e1397ffc5..dbe13fad3cbb 100644
--- a/drivers/iio/inkern.c
+++ b/drivers/iio/inkern.c
@@ -607,10 +607,10 @@ static int iio_convert_raw_to_processed_unlocked(struct iio_channel *chan,
IIO_CHAN_INFO_SCALE);
if (scale_type < 0) {
/*
- * Just pass raw values as processed if no scaling is
- * available.
+ * If no channel scaling is available apply consumer scale to
+ * raw value and return.
*/
- *processed = raw;
+ *processed = raw * scale;
return 0;
}
--
2.35.1
This is a note to let you know that I've just added the patch titled
iio: inkern: apply consumer scale on IIO_VAL_INT cases
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the char-misc-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
From 1bca97ff95c732a516ebb68da72814194980e0a5 Mon Sep 17 00:00:00 2001
From: Liam Beguin <liambeguin(a)gmail.com>
Date: Sat, 8 Jan 2022 15:53:04 -0500
Subject: iio: inkern: apply consumer scale on IIO_VAL_INT cases
When a consumer calls iio_read_channel_processed() and the channel has
an integer scale, the scale channel scale is applied and the processed
value is returned as expected.
On the other hand, if the consumer calls iio_convert_raw_to_processed()
the scaling factor requested by the consumer is not applied.
This for example causes the consumer to process mV when expecting uV.
Make sure to always apply the scaling factor requested by the consumer.
Fixes: 48e44ce0f881 ("iio:inkern: Add function to read the processed value")
Signed-off-by: Liam Beguin <liambeguin(a)gmail.com>
Reviewed-by: Peter Rosin <peda(a)axentia.se>
Reviewed-by: Andy Shevchenko <andy.shevchenko(a)gmail.com>
Link: https://lore.kernel.org/r/20220108205319.2046348-2-liambeguin@gmail.com
Cc: <Stable(a)vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
---
drivers/iio/inkern.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c
index 0222885b334c..021e1397ffc5 100644
--- a/drivers/iio/inkern.c
+++ b/drivers/iio/inkern.c
@@ -616,7 +616,7 @@ static int iio_convert_raw_to_processed_unlocked(struct iio_channel *chan,
switch (scale_type) {
case IIO_VAL_INT:
- *processed = raw64 * scale_val;
+ *processed = raw64 * scale_val * scale;
break;
case IIO_VAL_INT_PLUS_MICRO:
if (scale_val2 < 0)
--
2.35.1
It is possible for poisoned hugetlb pages to reside on the free lists.
The huge page allocation routines which dequeue entries from the free
lists make a point of avoiding poisoned pages. There is no such check
and avoidance in the demote code path.
If a hugetlb page on the is on a free list, poison will only be set in
the head page rather then the page with the actual error. If such a
page is demoted, then the poison flag may follow the wrong page. A page
without error could have poison set, and a page with poison could not
have the flag set.
Check for poison before attempting to demote a hugetlb page. Also,
return -EBUSY to the caller if only poisoned pages are on the free list.
Fixes: 8531fc6f52f5 ("hugetlb: add hugetlb demote page support")
Signed-off-by: Mike Kravetz <mike.kravetz(a)oracle.com>
Cc: <stable(a)vger.kernel.org>
---
mm/hugetlb.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index b34f50156f7e..f8ca7cca3c1a 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -3475,7 +3475,6 @@ static int demote_pool_huge_page(struct hstate *h, nodemask_t *nodes_allowed)
{
int nr_nodes, node;
struct page *page;
- int rc = 0;
lockdep_assert_held(&hugetlb_lock);
@@ -3486,15 +3485,19 @@ static int demote_pool_huge_page(struct hstate *h, nodemask_t *nodes_allowed)
}
for_each_node_mask_to_free(h, nr_nodes, node, nodes_allowed) {
- if (!list_empty(&h->hugepage_freelists[node])) {
- page = list_entry(h->hugepage_freelists[node].next,
- struct page, lru);
- rc = demote_free_huge_page(h, page);
- break;
+ list_for_each_entry(page, &h->hugepage_freelists[node], lru) {
+ if (PageHWPoison(page))
+ continue;
+
+ return demote_free_huge_page(h, page);
}
}
- return rc;
+ /*
+ * Only way to get here is if all pages on free lists are poisoned.
+ * Return -EBUSY so that caller will not retry.
+ */
+ return -EBUSY;
}
#define HSTATE_ATTR_RO(_name) \
--
2.35.1
The patch titled
Subject: ocfs2: fix crash when initialize filecheck kobj fails
has been removed from the -mm tree. Its filename was
ocfs2-fix-crash-when-initialize-filecheck-kobj-fails.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Subject: ocfs2: fix crash when initialize filecheck kobj fails
Once s_root is set, genric_shutdown_super() will be called if fill_super()
fails. That means, we will call ocfs2_dismount_volume() twice in such
case, which can lead to kernel crash. Fix this issue by initializing
filecheck kobj before setting s_root.
Link: https://lkml.kernel.org/r/20220310081930.86305-1-joseph.qi@linux.alibaba.com
Fixes: 5f483c4abb50 ("ocfs2: add kobject for online file check")
Signed-off-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Cc: Mark Fasheh <mark(a)fasheh.com>
Cc: Joel Becker <jlbec(a)evilplan.org>
Cc: Junxiao Bi <junxiao.bi(a)oracle.com>
Cc: Changwei Ge <gechangwei(a)live.cn>
Cc: Gang He <ghe(a)suse.com>
Cc: Jun Piao <piaojun(a)huawei.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
fs/ocfs2/super.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
--- a/fs/ocfs2/super.c~ocfs2-fix-crash-when-initialize-filecheck-kobj-fails
+++ a/fs/ocfs2/super.c
@@ -1105,17 +1105,6 @@ static int ocfs2_fill_super(struct super
goto read_super_error;
}
- root = d_make_root(inode);
- if (!root) {
- status = -ENOMEM;
- mlog_errno(status);
- goto read_super_error;
- }
-
- sb->s_root = root;
-
- ocfs2_complete_mount_recovery(osb);
-
osb->osb_dev_kset = kset_create_and_add(sb->s_id, NULL,
&ocfs2_kset->kobj);
if (!osb->osb_dev_kset) {
@@ -1133,6 +1122,17 @@ static int ocfs2_fill_super(struct super
goto read_super_error;
}
+ root = d_make_root(inode);
+ if (!root) {
+ status = -ENOMEM;
+ mlog_errno(status);
+ goto read_super_error;
+ }
+
+ sb->s_root = root;
+
+ ocfs2_complete_mount_recovery(osb);
+
if (ocfs2_mount_local(osb))
snprintf(nodestr, sizeof(nodestr), "local");
else
_
Patches currently in -mm which might be from joseph.qi(a)linux.alibaba.com are
ocfs2-cleanup-some-return-variables.patch
The patch titled
Subject: mm: swap: get rid of deadloop in swapin readahead
has been removed from the -mm tree. Its filename was
mm-swap-get-rid-of-deadloop-in-swapin-readahead.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Guo Ziliang <guo.ziliang(a)zte.com.cn>
Subject: mm: swap: get rid of deadloop in swapin readahead
In our testing, a deadloop task was found. Through sysrq printing, same
stack was found every time, as follows:
__swap_duplicate+0x58/0x1a0
swapcache_prepare+0x24/0x30
__read_swap_cache_async+0xac/0x220
read_swap_cache_async+0x58/0xa0
swapin_readahead+0x24c/0x628
do_swap_page+0x374/0x8a0
__handle_mm_fault+0x598/0xd60
handle_mm_fault+0x114/0x200
do_page_fault+0x148/0x4d0
do_translation_fault+0xb0/0xd4
do_mem_abort+0x50/0xb0
The reason for the deadloop is that swapcache_prepare() always returns
EEXIST, indicating that SWAP_HAS_CACHE has not been cleared, so that it
cannot jump out of the loop. We suspect that the task that clears the
SWAP_HAS_CACHE flag never gets a chance to run. We try to lower the
priority of the task stuck in a deadloop so that the task that clears the
SWAP_HAS_CACHE flag will run. The results show that the system returns to
normal after the priority is lowered.
In our testing, multiple real-time tasks are bound to the same core, and
the task in the deadloop is the highest priority task of the core, so the
deadloop task cannot be preempted.
Although cond_resched() is used by __read_swap_cache_async, it is an empty
function in the preemptive system and cannot achieve the purpose of
releasing the CPU. A high-priority task cannot release the CPU unless
preempted by a higher-priority task. But when this task is already the
highest priority task on this core, other tasks will not be able to be
scheduled. So we think we should replace cond_resched() with
schedule_timeout_uninterruptible(1), schedule_timeout_interruptible will
call set_current_state first to set the task state, so the task will be
removed from the running queue, so as to achieve the purpose of giving up
the CPU and prevent it from running in kernel mode for too long.
(akpm: ugly hack becomes uglier. But it fixes the issue in a
backportable-to-stable fashion while we hopefully work on something
better)
Link: https://lkml.kernel.org/r/20220221111749.1928222-1-cgel.zte@gmail.com
Signed-off-by: Guo Ziliang <guo.ziliang(a)zte.com.cn>
Reported-by: Zeal Robot <zealci(a)zte.com.cn>
Reviewed-by: Ran Xiaokai <ran.xiaokai(a)zte.com.cn>
Reviewed-by: Jiang Xuexin <jiang.xuexin(a)zte.com.cn>
Reviewed-by: Yang Yang <yang.yang29(a)zte.com.cn>
Acked-by: Hugh Dickins <hughd(a)google.com>
Cc: Naoya Horiguchi <naoya.horiguchi(a)nec.com>
Cc: Michal Hocko <mhocko(a)kernel.org>
Cc: Minchan Kim <minchan(a)kernel.org>
Cc: Johannes Weiner <hannes(a)cmpxchg.org>
Cc: Roger Quadros <rogerq(a)kernel.org>
Cc: Ziliang Guo <guo.ziliang(a)zte.com.cn>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/swap_state.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/swap_state.c~mm-swap-get-rid-of-deadloop-in-swapin-readahead
+++ a/mm/swap_state.c
@@ -478,7 +478,7 @@ struct page *__read_swap_cache_async(swp
* __read_swap_cache_async(), which has set SWAP_HAS_CACHE
* in swap_map, but not yet added its page to swap cache.
*/
- cond_resched();
+ schedule_timeout_uninterruptible(1);
}
/*
_
Patches currently in -mm which might be from guo.ziliang(a)zte.com.cn are
[BUG]
There is a report that autodefrag is defragging single sector, which
is completely waste of IO, and no help for defragging:
btrfs-cleaner-808 defrag_one_locked_range: root=256 ino=651122 start=0 len=4096
[CAUSE]
In defrag_collect_targets(), we check if the current range (A) can be merged
with next one (B).
If mergeable, we will add range A into target for defrag.
However there is a catch for autodefrag, when checking mergebility against
range B, we intentionally pass 0 as @newer_than, hoping to get a
higher chance to merge with the next extent.
But in next iteartion, range B will looked up by defrag_lookup_extent(),
with non-zero @newer_than.
And if range B is not really newer, it will rejected directly, causing
only range A being defragged, while we expect to defrag both range A and
B.
[FIX]
Since the root cause is the difference in check condition of
defrag_check_next_extent() and defrag_collect_targets(), we fix it by:
1. Pass @newer_than to defrag_check_next_extent()
2. Pass @extent_thresh to defrag_check_next_extent()
This makes the check between defrag_collect_targets() and
defrag_check_next_extent() more consistent.
While there is still some minor difference, the remaining checks are
focus on runtime flags like writeback/delalloc, which are mostly
transient and safe to be checked only in defrag_collect_targets().
Link: https://github.com/btrfs/linux/issues/423#issuecomment-1066981856
Cc: stable(a)vger.kernel.org # 5.16+
Signed-off-by: Qu Wenruo <wqu(a)suse.com>
---
Changelog:
v2:
- Add proper CC to stable
- Use Link: tag to replace Issue: tag
As every developer/maintainer has their own btrfs tree, Issue: tag is
really confusing
---
fs/btrfs/ioctl.c | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 3d3d6e2f110a..7d7520a2e281 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -1189,7 +1189,7 @@ static u32 get_extent_max_capacity(const struct extent_map *em)
}
static bool defrag_check_next_extent(struct inode *inode, struct extent_map *em,
- bool locked)
+ u32 extent_thresh, u64 newer_than, bool locked)
{
struct extent_map *next;
bool ret = false;
@@ -1199,11 +1199,13 @@ static bool defrag_check_next_extent(struct inode *inode, struct extent_map *em,
return false;
/*
- * We want to check if the next extent can be merged with the current
- * one, which can be an extent created in a past generation, so we pass
- * a minimum generation of 0 to defrag_lookup_extent().
+ * Here we need to pass @newer_then when checking the next extent, or
+ * we will hit a case we mark current extent for defrag, but the next
+ * one will not be a target.
+ * This will just cause extra IO without really reducing the fragments.
*/
- next = defrag_lookup_extent(inode, em->start + em->len, 0, locked);
+ next = defrag_lookup_extent(inode, em->start + em->len, newer_than,
+ locked);
/* No more em or hole */
if (!next || next->block_start >= EXTENT_MAP_LAST_BYTE)
goto out;
@@ -1215,6 +1217,13 @@ static bool defrag_check_next_extent(struct inode *inode, struct extent_map *em,
*/
if (next->len >= get_extent_max_capacity(em))
goto out;
+ /* Skip older extent */
+ if (next->generation < newer_than)
+ goto out;
+ /* Also check extent size */
+ if (next->len >= extent_thresh)
+ goto out;
+
ret = true;
out:
free_extent_map(next);
@@ -1420,7 +1429,7 @@ static int defrag_collect_targets(struct btrfs_inode *inode,
goto next;
next_mergeable = defrag_check_next_extent(&inode->vfs_inode, em,
- locked);
+ extent_thresh, newer_than, locked);
if (!next_mergeable) {
struct defrag_target_range *last;
--
2.35.1
Hi,
I just found the commit in 5.10 stable kernel.
stable-linux> git tag --sort=taggerdate --contain
8a3fc32b322cc3081dd3569047c9834f496b4ab0 | head -1
v5.10.17
commit 8a3fc32b322cc3081dd3569047c9834f496b4ab0
Author: Rafael J. Wysocki <rafael.j.wysocki(a)intel.com>
Date: Thu Feb 4 18:25:37 2021 +0100
cpufreq: ACPI: Extend frequency tables to cover boost frequencies
commit 3c55e94c0adea4a5389c4b80f6ae9927dd6a4501 upstream.
[ ... ]
Fixes: 41ea667227ba ("x86, sched: Calculate frequency invariance
for AMD systems")
Fixes: 976df7e5730e ("x86, sched: Use midpoint of max_boost and
max_P for frequency invariance on AMD EPYC")
Fixes: db865272d9c4 ("cpufreq: Avoid configuring old governors as
default with intel_pstate")
Except db865272d9c4 was applied in v5.10-rc2, the others (41ea667227ba
and 976df7e5730e)
were first appeared in v5.11-rc1.
linux> git tag --sort=taggerdate --contain 41ea667227ba | head -1
v5.11-rc1
linux> git tag --sort=taggerdate --contain 976df7e5730e | head -1
v5.11-rc1
linux> git tag --sort=taggerdate --contain db865272d9c4 | head -1
v5.10-rc2
So I am wondering if the mentioned commit is suitable for 5.10 stable
kernel, or what am I missing?
Thanks,
Guoqing
This is the start of the stable review cycle for the 4.19.232 release.
There are 34 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, 02 Mar 2022 17:20:16 +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.232-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.232-rc1
daniel.starke(a)siemens.com <daniel.starke(a)siemens.com>
tty: n_gsm: fix encoding of control signal octet bit DV
Hongyu Xie <xiehongyu1(a)kylinos.cn>
xhci: Prevent futile URB re-submissions due to incorrect return value.
Puma Hsu <pumahsu(a)google.com>
xhci: re-initialize the HC during resume if HCE was set
Sebastian Andrzej Siewior <bigeasy(a)linutronix.de>
usb: dwc3: gadget: Let the interrupt handler disable bottom halves.
Hans de Goede <hdegoede(a)redhat.com>
usb: dwc3: pci: Fix Bay Trail phy GPIO mappings
Daniele Palmas <dnlplm(a)gmail.com>
USB: serial: option: add Telit LE910R1 compositions
Slark Xiao <slark_xiao(a)163.com>
USB: serial: option: add support for DW5829e
Steven Rostedt (Google) <rostedt(a)goodmis.org>
tracefs: Set the group ownership in apply_options() not parse_options()
Szymon Heidrich <szymon.heidrich(a)gmail.com>
USB: gadget: validate endpoint index for xilinx udc
Daehwan Jung <dh10.jung(a)samsung.com>
usb: gadget: rndis: add spinlock for rndis response list
Dmytro Bagrii <dimich.dmb(a)gmail.com>
Revert "USB: serial: ch341: add new Product ID for CH341A"
Sergey Shtylyov <s.shtylyov(a)omp.ru>
ata: pata_hpt37x: disable primary channel on HPT371
Christophe JAILLET <christophe.jaillet(a)wanadoo.fr>
iio: adc: men_z188_adc: Fix a resource leak in an error handling path
Steven Rostedt (Google) <rostedt(a)goodmis.org>
tracing: Have traceon and traceoff trigger honor the instance
Linus Torvalds <torvalds(a)linux-foundation.org>
fget: clarify and improve __fget_files() implementation
Miaohe Lin <linmiaohe(a)huawei.com>
memblock: use kfree() to release kmalloced memblock regions
Karol Herbst <kherbst(a)redhat.com>
Revert "drm/nouveau/pmu/gm200-: avoid touching PMU outside of DEVINIT/PREOS/ACR"
Marc Zyngier <maz(a)kernel.org>
gpio: tegra186: Fix chip_data type confusion
daniel.starke(a)siemens.com <daniel.starke(a)siemens.com>
tty: n_gsm: fix proper link termination after failed open
Bart Van Assche <bvanassche(a)acm.org>
RDMA/ib_srp: Fix a deadlock
ChenXiaoSong <chenxiaosong2(a)huawei.com>
configfs: fix a race in configfs_{,un}register_subsystem()
Gal Pressman <gal(a)nvidia.com>
net/mlx5e: Fix wrong return value on ioctl EEPROM query failure
Maxime Ripard <maxime(a)cerno.tech>
drm/edid: Always set RGB444
Paul Blakey <paulb(a)nvidia.com>
openvswitch: Fix setting ipv6 fields causing hw csum failure
Tao Liu <thomas.liu(a)ucloud.cn>
gso: do not skip outer ip header in case of ipip and net_failover
Dan Carpenter <dan.carpenter(a)oracle.com>
tipc: Fix end of loop tests for list_for_each_entry()
Eric Dumazet <edumazet(a)google.com>
net: __pskb_pull_tail() & pskb_carve_frag_list() drop_monitor friends
Xin Long <lucien.xin(a)gmail.com>
ping: remove pr_err from ping_lookup
Oliver Neukum <oneukum(a)suse.com>
USB: zaurus: support another broken Zaurus
Oliver Neukum <oneukum(a)suse.com>
sr9700: sanity check for packet length
Helge Deller <deller(a)gmx.de>
parisc/unaligned: Fix ldw() and stw() unalignment handlers
Helge Deller <deller(a)gmx.de>
parisc/unaligned: Fix fldd and fstd unaligned handlers on 32-bit kernel
Stefano Garzarella <sgarzare(a)redhat.com>
vhost/vsock: don't check owner in vhost_vsock_stop() while releasing
Zhang Qiao <zhangqiao22(a)huawei.com>
cgroup/cpuset: Fix a race between cpuset_attach() and cpu hotplug
-------------
Diffstat:
Makefile | 4 +-
arch/parisc/kernel/unaligned.c | 14 ++---
drivers/ata/pata_hpt37x.c | 14 +++++
drivers/gpio/gpio-tegra186.c | 14 +++--
drivers/gpu/drm/drm_edid.c | 2 +-
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c | 37 +++++------
drivers/iio/adc/men_z188_adc.c | 9 ++-
drivers/infiniband/ulp/srp/ib_srp.c | 6 +-
.../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 2 +-
drivers/net/usb/cdc_ether.c | 12 ++++
drivers/net/usb/sr9700.c | 2 +-
drivers/net/usb/zaurus.c | 12 ++++
drivers/tty/n_gsm.c | 4 +-
drivers/usb/dwc3/dwc3-pci.c | 4 +-
drivers/usb/dwc3/gadget.c | 2 +
drivers/usb/gadget/function/rndis.c | 8 +++
drivers/usb/gadget/function/rndis.h | 1 +
drivers/usb/gadget/udc/udc-xilinx.c | 6 ++
drivers/usb/host/xhci.c | 28 ++++++---
drivers/usb/serial/ch341.c | 1 -
drivers/usb/serial/option.c | 12 ++++
drivers/vhost/vsock.c | 21 ++++---
fs/configfs/dir.c | 14 +++++
fs/file.c | 73 +++++++++++++++++-----
fs/tracefs/inode.c | 5 +-
include/net/checksum.h | 5 ++
kernel/cgroup/cpuset.c | 2 +
kernel/trace/trace_events_trigger.c | 52 +++++++++++++--
mm/memblock.c | 10 ++-
net/core/skbuff.c | 4 +-
net/ipv4/af_inet.c | 5 +-
net/ipv4/ping.c | 1 -
net/ipv6/ip6_offload.c | 2 +
net/openvswitch/actions.c | 46 +++++++++++---
net/tipc/name_table.c | 2 +-
net/tipc/socket.c | 2 +-
36 files changed, 337 insertions(+), 101 deletions(-)