Skip to contentSkip to conversation

Linux 5.7.3

DISCUSSION Greg Kroah-Hartman 6 participants 16 messages Jun 17, 2020 – Jul 16, 2020 Stable branch

lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

I'm announcing the release of the 5.7.3 kernel.

All users of the 5.7 kernel series must upgrade.

The updated 5.7.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.7.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

------------

 Documentation/lzo.txt                                             |    8 
 Makefile                                                          |    2 
 arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts                         |    2 
 arch/arm64/include/asm/acpi.h                                     |    5 
 arch/arm64/include/asm/kvm_emulate.h                              |    6 
 arch/arm64/include/asm/kvm_host.h                                 |    6 
 arch/arm64/kvm/handle_exit.c                                      |   19 --
 arch/arm64/kvm/sys_regs.c                                         |   10 -
 arch/mips/include/asm/kvm_host.h                                  |    6 
 arch/powerpc/mm/ptdump/ptdump.c                                   |   21 +-
 arch/powerpc/sysdev/xive/common.c                                 |    5 
 arch/s390/pci/pci_clp.c                                           |    3 
 arch/x86/events/intel/core.c                                      |    4 
 arch/x86/include/asm/set_memory.h                                 |   19 +-
 arch/x86/include/asm/vdso/gettimeofday.h                          |   18 +
 arch/x86/kernel/cpu/amd.c                                         |    3 
 arch/x86/kernel/cpu/bugs.c                                        |   92 +++++----
 arch/x86/kernel/cpu/mce/core.c                                    |   11 -
 arch/x86/kernel/process.c                                         |   28 +-
 arch/x86/kernel/reboot.c                                          |    8 
 arch/x86/kernel/time.c                                            |    4 
 arch/x86/kernel/vmlinux.lds.S                                     |    4 
 arch/x86/kvm/mmu/mmu.c                                            |   46 ++--
 arch/x86/kvm/svm/nested.c                                         |    6 
 arch/x86/kvm/vmx/nested.c                                         |    4 
 arch/x86/kvm/vmx/vmx.c                                            |   21 +-
 arch/x86/kvm/vmx/vmx.h                                            |    3 
 arch/x86/kvm/x86.c                                                |   15 -
 arch/x86/mm/dump_pagetables.c                                     |   33 ++-
 arch/x86/pci/fixup.c                                              |    4 
 crypto/algapi.c                                                   |    2 
 crypto/drbg.c                                                     |    4 
 drivers/acpi/cppc_acpi.c                                          |    1 
 drivers/acpi/device_pm.c                                          |    2 
 drivers/acpi/evged.c                                              |   22 ++
 drivers/acpi/scan.c                                               |   28 ++
 drivers/acpi/sysfs.c                                              |    4 
 drivers/base/core.c                                               |   34 ++-
 drivers/block/floppy.c                                            |   10 -
 drivers/char/agp/intel-gtt.c                                      |    4 
 drivers/clk/clk.c                                                 |    6 
 drivers/cpufreq/cpufreq.c                                         |   11 -
 drivers/crypto/cavium/nitrox/nitrox_main.c                        |    4 
 drivers/crypto/virtio/virtio_crypto_algs.c                        |   21 +-
 drivers/edac/i10nm_base.c                                         |    2 
 drivers/edac/skx_base.c                                           |   20 --
 drivers/edac/skx_common.c                                         |    6 
 drivers/edac/skx_common.h                                         |    2 
 drivers/firmware/efi/efivars.c                                    |    4 
 drivers/firmware/imx/imx-scu.c                                    |   62 +++++-
 drivers/gpu/drm/i915/gem/i915_gem_userptr.c                       |    8 
 drivers/gpu/drm/vkms/vkms_drv.h                                   |    5 
 drivers/gpu/drm/vkms/vkms_gem.c                                   |   11 -
 drivers/infiniband/core/uverbs_main.c                             |    2 
 drivers/media/common/videobuf2/videobuf2-dma-contig.c             |   20 --
 drivers/mmc/core/sdio.c                                           |   61 ++----
 drivers/mmc/host/mmci_stm32_sdmmc.c                               |    3 
 drivers/mmc/host/sdhci-msm.c                                      |    6 
 drivers/mmc/host/sdhci-of-at91.c                                  |    7 
 drivers/mmc/host/tmio_mmc_core.c                                  |    6 
 drivers/mmc/host/uniphier-sd.c                                    |   12 -
 drivers/net/dsa/qca8k.c                                           |    3 
 drivers/net/ethernet/amazon/ena/ena_netdev.c                      |   10 -
 drivers/net/ethernet/cadence/macb_main.c                          |   14 -
 drivers/net/ethernet/marvell/mvneta.c                             |   13 +
 drivers/net/ethernet/mellanox/mlx5/core/devlink.c                 |    2 
 drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c                |   16 -
 drivers/net/ethernet/mellanox/mlx5/core/en/xsk/setup.c            |    4 
 drivers/net/ethernet/mellanox/mlx5/core/health.c                  |   14 +
 drivers/net/ethernet/mellanox/mlx5/core/main.c                    |    7 
 drivers/net/ethernet/mellanox/mlxsw/core_thermal.c                |   23 ++
 drivers/net/ethernet/pensando/ionic/ionic_lif.c                   |    4 
 drivers/net/ethernet/ti/am65-cpsw-nuss.c                          |    2 
 drivers/net/ethernet/ti/cpsw_ale.c                                |   49 ++++-
 drivers/net/net_failover.c                                        |    3 
 drivers/net/tun.c                                                 |   14 +
 drivers/net/vxlan.c                                               |    4 
 drivers/net/wireless/ath/ath9k/hif_usb.c                          |   58 ++++--
 drivers/net/wireless/ath/ath9k/hif_usb.h                          |    6 
 drivers/net/wireless/ath/ath9k/htc_drv_init.c                     |   10 -
 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c                     |    6 
 drivers/net/wireless/ath/ath9k/htc_hst.c                          |    6 
 drivers/net/wireless/ath/ath9k/wmi.c                              |    6 
 drivers/net/wireless/ath/ath9k/wmi.h                              |    3 
 drivers/pci/pci.c                                                 |    4 
 drivers/platform/x86/sony-laptop.c                                |   60 +++---
 drivers/remoteproc/remoteproc_core.c                              |    2 
 drivers/remoteproc/remoteproc_virtio.c                            |   12 +
 drivers/scsi/lpfc/lpfc_ct.c                                       |    1 
 drivers/scsi/megaraid/megaraid_sas.h                              |    4 
 drivers/scsi/megaraid/megaraid_sas_fusion.c                       |    7 
 drivers/scsi/megaraid/megaraid_sas_fusion.h                       |    6 
 drivers/spi/spi-bcm-qspi.c                                        |   20 --
 drivers/spi/spi-bcm2835.c                                         |    4 
 drivers/spi/spi-bcm2835aux.c                                      |    4 
 drivers/spi/spi-dw.c                                              |   14 +
 drivers/spi/spi-pxa2xx.c                                          |    5 
 drivers/spi/spi.c                                                 |    3 
 drivers/staging/mt7621-pci/pci-mt7621.c                           |   12 +
 drivers/staging/wfx/main.c                                        |    1 
 drivers/tty/serial/amba-pl011.c                                   |    1 
 drivers/tty/serial/imx.c                                          |    3 
 drivers/video/fbdev/vt8500lcdfb.c                                 |    1 
 drivers/video/fbdev/w100fb.c                                      |    2 
 drivers/watchdog/imx_sc_wdt.c                                     |    5 
 drivers/xen/pvcalls-back.c                                        |    3 
 fs/aio.c                                                          |    8 
 fs/cifs/cifsfs.c                                                  |    2 
 fs/cifs/smb2pdu.c                                                 |    4 
 fs/exfat/file.c                                                   |    8 
 fs/exfat/super.c                                                  |   12 -
 fs/fat/inode.c                                                    |    6 
 fs/io_uring.c                                                     |   24 +-
 fs/nilfs2/segment.c                                               |    2 
 fs/notify/fanotify/fanotify.c                                     |    5 
 fs/overlayfs/copy_up.c                                            |    2 
 fs/overlayfs/overlayfs.h                                          |    3 
 fs/proc/inode.c                                                   |    2 
 fs/proc/self.c                                                    |    2 
 fs/proc/thread_self.c                                             |    2 
 include/linux/elfnote.h                                           |    2 
 include/linux/kvm_host.h                                          |    4 
 include/linux/mm.h                                                |    1 
 include/linux/padata.h                                            |    6 
 include/linux/ptdump.h                                            |    1 
 include/linux/set_memory.h                                        |    2 
 include/media/videobuf2-dma-contig.h                              |    2 
 include/net/inet_hashtables.h                                     |    6 
 kernel/events/core.c                                              |   23 +-
 kernel/padata.c                                                   |   14 -
 lib/bitmap.c                                                      |    9 
 lib/lzo/lzo1x_compress.c                                          |   13 +
 mm/gup.c                                                          |   44 ++++
 mm/huge_memory.c                                                  |    7 
 mm/ptdump.c                                                       |   17 +
 mm/slab_common.c                                                  |    3 
 mm/slub.c                                                         |    4 
 mm/util.c                                                         |   18 +
 net/bridge/br_arp_nd_proxy.c                                      |    4 
 net/dccp/proto.c                                                  |    7 
 net/ipv6/ipv6_sockglue.c                                          |   13 -
 net/mptcp/options.c                                               |    2 
 net/mptcp/protocol.c                                              |   45 ++--
 net/mptcp/subflow.c                                               |    1 
 net/netlink/genetlink.c                                           |   94 ++++++----
 net/sched/sch_generic.c                                           |    1 
 net/tipc/msg.c                                                    |    4 
 security/keys/internal.h                                          |   11 -
 security/keys/keyctl.c                                            |   16 -
 security/smack/smack.h                                            |    6 
 security/smack/smack_lsm.c                                        |   25 --
 security/smack/smackfs.c                                          |   10 +
 sound/core/pcm_native.c                                           |   20 +-
 sound/firewire/fireface/ff-protocol-latter.c                      |   12 -
 sound/firewire/fireface/ff-stream.c                               |   10 -
 sound/isa/es1688/es1688.c                                         |    4 
 sound/pci/hda/hda_intel.c                                         |    3 
 sound/pci/hda/patch_realtek.c                                     |    6 
 sound/soc/codecs/max9867.c                                        |    4 
 sound/soc/codecs/tlv320adcx140.c                                  |    6 
 sound/usb/card.c                                                  |   19 +-
 sound/usb/quirks-table.h                                          |   20 ++
 sound/usb/usbaudio.h                                              |    2 
 tools/perf/util/probe-event.c                                     |    3 
 tools/testing/selftests/ftrace/test.d/ftrace/tracing-error-log.tc |    2 
 tools/testing/selftests/net/rxtimestamp.c                         |    1 
 tools/testing/selftests/tc-testing/tc-tests/filters/tests.json    |    6 
 tools/testing/selftests/tc-testing/tdc_batch.py                   |    6 
 virt/kvm/arm/aarch32.c                                            |   28 ++
 virt/kvm/arm/arm.c                                                |   18 +
 virt/kvm/kvm_main.c                                               |   26 +-
 171 files changed, 1269 insertions(+), 681 deletions(-)

Al Viro (1):
exfat: fix memory leak in exfat_parse_param()

Alexander Gordeev (1):
lib: fix bitmap_parse() on 64-bit big endian archs

Amir Goldstein (2):
fanotify: fix ignore mask logic for events on child and on dir
ovl: fix out of bounds access warning in ovl_check_fb_len()

Andy Shevchenko (1):
serial: imx: Initialize lock for non-registered console

Anthony Steinhauser (3):
x86/speculation: Prevent rogue cross-process SSBD shutdown x86/speculation: Avoid force-disabling IBPB based on STIBP and enhanced IBRS. x86/speculation: PR_SPEC_FORCE_DISABLE enforcement for indirect branches.

Ard Biesheuvel (2):
efi/efivars: Add missing kobject_put() in sysfs entry creation error path
ACPI: GED: add support for _Exx / _Lxx handler methods

Arnd Bergmann (1):
smack: avoid unused 'sip' variable warning

Barret Rhoden (1):
perf: Add cond_resched() to task_function_call()

Bjorn Helgaas (1):
PCI/PM: Adjust pcie_wait_for_link_delay() for caller delay

Bob Haarman (1):
x86_64: Fix jiffies ODR violation

Casey Schaufler (1):
Smack: slab-out-of-bounds in vsscanf

Charles Keepax (1):
net: macb: Only disable NAPI on the actual error path

Chris Wilson (1):
agp/intel: Reinforce the barrier after GTT updates

Christophe JAILLET (2):
crypto: cavium/nitrox - Fix 'nitrox_get_first_device()' when ndevlist is fully iterated
video: fbdev: w100fb: Fix a potential double free.

Christophe Leroy (1):
powerpc/ptdump: Properly handle non standard page size

Chuhong Yuan (1):
ALSA: es1688: Add the missed snd_card_free()

Cong Wang (1):
genetlink: fix memory leaks in genl_family_rcv_msg_dumpit()

Corentin Labbe (1):
net: cadence: macb: disable NAPI on error

Cédric Le Goater (1):
powerpc/xive: Clear the page tables for the ESB IO mapping

Dan Murphy (1):
ASoC: tlv320adcx140: Fix mic gain registers

Daniel Jordan (1):
padata: add separate cpuhp node for CPUHP_PADATA_DEAD

Dave Rodgman (1):
lib/lzo: fix ambiguous encoding bug in lzo-rle

Denis Efremov (1):
io_uring: use kvfree() in io_sqe_buffer_register()

Dick Kennedy (1):
scsi: lpfc: Fix negation of else clause in lpfc_prep_node_fc4type

Eiichi Tsukata (1):
KVM: x86: Fix APIC page invalidation race

Eric Biggers (1):
crypto: algapi - Avoid spurious modprobe on LOADED

Eric W. Biederman (1):
proc: Use new_inode not new_inode_pseudo

Eugen Hristev (1):
mmc: sdhci-of-at91: fix CALCR register being rewritten

Ezequiel Garcia (1):
drm/vkms: Hold gem object while still in-use

Fabio Estevam (1):
watchdog: imx_sc_wdt: Fix reboot on crash

Felipe Franciosi (1):
KVM: x86: respect singlestep when emulating instruction

Florian Fainelli (1):
spi: bcm-qspi: Handle clock probe deferral

Franck LENORMAND (1):
firmware: imx: scu: Fix corruption of header

Geliang Tang (1):
mptcp: bugfix for RM_ADDR option parsing

Greg Kroah-Hartman (1):

      Linux 5.7.3

Grygorii Strashko (2):
net: ethernet: ti: ale: fix allmulti for nu type ale
net: ethernet: ti: am65-cpsw-nuss: fix ale parameters init

Hangbin Liu (1):
ipv6: fix IPV6_ADDRFORM operation logic

Hersen Wu (1):
ALSA: hda: add sienna_cichlid audio asic id for sienna_cichlid up

Hill Ma (1):
x86/reboot/quirks: Add MacBook6,1 reboot quirk

Hui Wang (1):
ALSA: hda/realtek - add a pintbl quirk for several Lenovo machines

Ido Schimmel (2):
bridge: Avoid infinite loop when suppressing NS messages with invalid options
vxlan: Avoid infinite loop when suppressing NS messages with invalid options

James Morse (1):
KVM: arm64: Stop writing aarch32's CSSELR into ACTLR

Jason Gunthorpe (1):
RDMA/uverbs: Make the event_queue fds return POLLERR when disassociated

Jens Axboe (2):
io_uring: re-set iov base/len for buffer select retry
io_uring: allow O_NONBLOCK async retry

Jiri Kosina (1):
block/floppy: fix contended case in floppy_queue_rq()

John Stultz (1):
serial: amba-pl011: Make sure we initialize the port.lock spinlock

Juergen Gross (1):
xen/pvcalls-back: test for errors when calling backend_connect()

Justin Chen (1):
spi: bcm-qspi: when tx/rx buffer is NULL set to 0

Jérôme Pouiller (1):
staging: wfx: fix double free

Kai-Heng Feng (1):
ALSA: usb-audio: Add vendor, product and profile name for HP Thunderbolt Dock

Kan Liang (1):
perf/x86/intel: Add more available bits for OFFCORE_RESPONSE of Intel Tremont

Kim Phillips (1):
x86/cpu/amd: Make erratum #1054 a legacy erratum

Linus Torvalds (1):
gup: document and work around "COW can break either way" issue

Longpeng(Mike) (3):
crypto: virtio: Fix dest length calculation in __virtio_crypto_skcipher_do_req()
crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()
crypto: virtio: Fix src/dst scatterlist calculation in __virtio_crypto_skcipher_do_req()

Lorenzo Bianconi (1):
net: mvneta: do not redirect frames during reconfiguration

Ludovic Barre (1):
mmc: mmci_sdmmc: fix DMA API warning overlapping mappings

Ludovic Desroches (1):
ARM: dts: at91: sama5d2_ptc_ek: fix sdmmc0 node description

Lukas Wunner (6):
spi: dw: Fix controller unregister order
spi: Fix controller unregister order
spi: pxa2xx: Fix controller unregister order
spi: pxa2xx: Fix runtime PM ref imbalance on probe error
spi: bcm2835: Fix controller unregister order
spi: bcm2835aux: Fix controller unregister order

Marc Zyngier (3):
KVM: arm64: Make vcpu_cp1x() work on Big Endian hosts
KVM: arm64: Save the host's PtrAuth keys in non-preemptible context
KVM: arm64: Synchronize sysreg state on injecting an AArch32 exception

Masahiro Yamada (1):
mmc: uniphier-sd: call devm_request_irq() after tmio_mmc_host_probe()

Masami Hiramatsu (2):
perf probe: Accept the instance number of kretprobe event selftests/ftrace: Return unsupported if no error_log file

Masashi Honma (1):
ath9k_htc: Silence undersized packet warnings

Mattia Dongili (2):
platform/x86: sony-laptop: SNC calls should handle BUFFER types platform/x86: sony-laptop: Make resuming thermal profile safer

Maxim Levitsky (2):
KVM: x86: don't expose MSR_IA32_UMWAIT_CONTROL unconditionally
KVM: VMX: enable X86_FEATURE_WAITPKG in KVM capabilities

Maxim Mikityanskiy (1):
net/mlx5e: Fix repeated XSK usage on one channel

Michal Vokáč (1):
net: dsa: qca8k: Fix "Unexpected gfp" kernel exception

Michał Mirosław (2):
ALSA: pcm: disallow linking stream to itself
ALSA: pcm: fix snd_pcm_link() lockdep splat

Miklos Szeredi (1):
aio: fix async fsync creds

Namjae Jeon (2):
smb3: add indatalen that can be a non-zero value to calculation of credit charge in smb2 ioctl
exfat: fix incorrect update of stream entry in __exfat_truncate()

Nick Desaulniers (2):
elfnote: mark all .note sections SHF_ALLOC
arm64: acpi: fix UBSAN warning

OGAWA Hirofumi (1):

      fat: don't allow to mount if the FAT length == 0

Oz Shlomo (1):
net/mlx5e: CT: Fix ipv6 nat header rewrite actions

Paolo Abeni (2):
mptcp: don't leak msk in token container
mptcp: fix races between shutdown and recvmsg

Paolo Bonzini (4):
KVM: x86: only do L1TF workaround on affected processors
KVM: x86: allow KVM_STATE_NESTED_MTF_PENDING in kvm_state flags
KVM: nSVM: fix condition for filtering async PF
KVM: nSVM: leave ASID aside in copy_vmcb_control_area

Parav Pandit (1):
net/mlx5: Disable reload while removing the device

Pavel Begunkov (1):

      io_uring: fix flush req->refs underflow

Pavel Dobias (1):
ASoC: max9867: fix volume controls

Peng Fan (1):
firmware: imx-scu: Support one TX and one RX

Petr Tesarik (1):
s390/pci: Log new handle in clp_disable_fh()

Qiujun Huang (5):
ath9k: Fix use-after-free Read in htc_connect_service
ath9k: Fix use-after-free Read in ath9k_wmi_ctrl_rx
ath9k: Fix use-after-free Write in ath9k_htc_rx_msg
ath9x: Fix stack-out-of-bounds Write in ath9k_hif_usb_rx_cb
ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb

Qiushi Wu (2):
ACPI: sysfs: Fix reference count leak in acpi_sysfs_add_hotplug_profile()
ACPI: CPPC: Fix reference count leak in acpi_cppc_processor_probe()

Qiuxu Zhuo (1):
EDAC/skx: Use the mcmtr register to retrieve close_pg/bank_xor_enable

Rafael J. Wysocki (3):
ACPI: PM: Avoid using power resources if there are none for D0
PM: runtime: clk: Fix clk_pm_runtime_get() error path
cpufreq: Fix up cpufreq_boost_set_sw()

Ryusuke Konishi (1):
nilfs2: fix null pointer dereference at nilfs_segctor_do_construct()

Sam Ravnborg (1):
video: vt8500lcdfb: fix fallthrough warning

Sameeh Jubran (2):
net: ena: xdp: XDP_TX: fix memory leak
net: ena: xdp: update napi budget for DROP and ABORTED

Saravana Kannan (1):
driver core: Update device link status correctly for SYNC_STATE_ONLY links

Sasha Levin (1):
spi: dw: Fix native CS being unset

Sean Christopherson (3):
KVM: x86/mmu: Set mmio_value to '0' if reserved #PF can't be generated
KVM: nVMX: Skip IBPB when switching between vmcs01 and vmcs02
KVM: nVMX: Consult only the "basic" exit reason when routing nested exit

Sergio Paracuellos (1):
staging: mt7621-pci: properly power off dual-ported pcie phy

Shannon Nelson (1):
ionic: wait on queue start until after IFF_UP

Shay Drory (2):
net/mlx5: drain health workqueue in case of driver load error net/mlx5: Fix fatal error handling during device load

Shivasharan S (1):
scsi: megaraid_sas: Replace undefined MFI_BIG_ENDIAN macro with __BIG_ENDIAN_BITFIELD macro

Steve French (2):
smb3: fix incorrect number of credits when ioctl MaxOutputResponse > 64K
smb3: fix typo in mount options displayed in /proc/mounts

Steven Price (1):
x86: mm: ptdump: calculate effective permissions correctly

Suman Anna (1):
remoteproc: Fix and restore the parenting hierarchy for vdev

Sumit Saxena (1):
scsi: megaraid_sas: TM command refire leads to controller firmware crash

Takashi Iwai (1):
ALSA: usb-audio: Fix inconsistent card PM state after resume

Takashi Sakamoto (2):
ALSA: fireface: fix configuration error for nominal sampling transfer frequency
ALSA: fireface: start IR context immediately

Tero Kristo (1):
remoteproc: Fall back to using parent memory pool if no dedicated available

Thomas Gleixner (1):
x86/vdso: Unbreak paravirt VDSO clocks

Tomi Valkeinen (1):
media: videobuf2-dma-contig: fix bad kfree in vb2_dma_contig_clear_max_seg_size

Tony Luck (1):
x86/{mce,mm}: Unmap the entire page if the whole page is affected and poisoned

Tuong Lien (1):
tipc: fix NULL pointer dereference in streaming

Ulf Hansson (3):
mmc: tmio: Further fixup runtime PM management at remove
mmc: sdio: Fix potential NULL pointer error in mmc_sdio_init_card()
mmc: sdio: Fix several potential memory leaks in mmc_sdio_init_card()

Vadim Pasternak (1):
mlxsw: core: Use different get_trend() callbacks for different thermal zones

Valentin Longchamp (1):
net: sched: export __netdev_watchdog_up()

Vasily Averin (1):
net_failover: fixed rollback in net_failover_open()

Veerabhadrarao Badiganti (1):
mmc: sdhci-msm: Clear tuning done flag while hs400 tuning

Vlad Buslov (1):
selftests: fix flower parent qdisc

Vlastimil Babka (1):
usercopy: mark dma-kmalloc caches as usercopy caches

Waiman Long (1):
mm: add kvfree_sensitive() for freeing sensitive data objects

Wang Hai (2):
dccp: Fix possible memleak in dccp_init and dccp_fini mm/slub: fix a memory leak in sysfs_slab_add()

Wei Yongjun (1):
crypto: drbg - fix error return code in drbg_alloc_state()

Willem de Bruijn (1):
tun: correct header offsets in napi frags mode

Xiaochun Lee (1):
x86/PCI: Mark Intel C620 MROMs as having non-compliant BARs

Xing Li (2):
KVM: MIPS: Define KVM_ENTRYHI_ASID to cpu_asid_mask(&boot_cpu_data)
KVM: MIPS: Fix VPN2_MASK definition for variable cpu_vmbits

Yuxuan Shui (1):
ovl: initialize error in ovl_copy_xattr

tannerlove (1):
selftests/net: in rxtimestamp getopt_long needs terminating null entry

author maintainer
#1 lore raw
Documentation/lzo.txt +6 -2
index ca983328976b..f65b51523014 100644
@@ -159,11 +159,15 @@ Byte sequences
            distance = 16384 + (H << 14) + D
            state = S (copy S literals after this block)
            End of stream is reached if distance == 16384
+           In version 1 only, to prevent ambiguity with the RLE case when
+           ((distance & 0x803f) == 0x803f) && (261 <= length <= 264), the
+           compressor must not emit block copies where distance and length
+           meet these conditions.
 
         In version 1 only, this instruction is also used to encode a run of
-        zeros if distance = 0xbfff, i.e. H = 1 and the D bits are all 1.
+           zeros if distance = 0xbfff, i.e. H = 1 and the D bits are all 1.
            In this case, it is followed by a fourth byte, X.
-           run length = ((X << 3) | (0 0 0 0 0 L L L)) + 4.
+           run length = ((X << 3) | (0 0 0 0 0 L L L)) + 4
 
       0 0 1 L L L L L  (32..63)
            Copy of small block within 16kB distance (preferably less than 34B)
Makefile +1 -1
index a6dda75d18cd..a2ce556f4347 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 VERSION = 5
 PATCHLEVEL = 7
-SUBLEVEL = 2
+SUBLEVEL = 3
 EXTRAVERSION =
 NAME = Kleptomaniac Octopus
 
arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts +0 -2
index 1c24ac8019ba..772809c54c1f 100644
@@ -125,8 +125,6 @@ sdmmc0: sdio-host@a0000000 {
 			bus-width = <8>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&pinctrl_sdmmc0_default>;
-			non-removable;
-			mmc-ddr-1_8v;
 			status = "okay";
 		};
 
arch/arm64/include/asm/acpi.h +3 -2
index b263e239cb59..a45366c3909b 100644
@@ -12,6 +12,7 @@
 #include <linux/efi.h>
 #include <linux/memblock.h>
 #include <linux/psci.h>
+#include <linux/stddef.h>
 
 #include <asm/cputype.h>
 #include <asm/io.h>
@@ -31,14 +32,14 @@
  * is therefore used to delimit the MADT GICC structure minimum length
  * appropriately.
  */
-#define ACPI_MADT_GICC_MIN_LENGTH   ACPI_OFFSET(  \
+#define ACPI_MADT_GICC_MIN_LENGTH   offsetof(  \
 	struct acpi_madt_generic_interrupt, efficiency_class)
 
 #define BAD_MADT_GICC_ENTRY(entry, end)					\
 	(!(entry) || (entry)->header.length < ACPI_MADT_GICC_MIN_LENGTH || \
 	(unsigned long)(entry) + (entry)->header.length > (end))
 
-#define ACPI_MADT_GICC_SPE  (ACPI_OFFSET(struct acpi_madt_generic_interrupt, \
+#define ACPI_MADT_GICC_SPE  (offsetof(struct acpi_madt_generic_interrupt, \
 	spe_interrupt) + sizeof(u16))
 
 /* Basic configuration for ACPI */
arch/arm64/include/asm/kvm_emulate.h +0 -6
index a30b4eec7cb4..977843e4d5fb 100644
@@ -112,12 +112,6 @@ static inline void vcpu_ptrauth_disable(struct kvm_vcpu *vcpu)
 	vcpu->arch.hcr_el2 &= ~(HCR_API | HCR_APK);
 }
 
-static inline void vcpu_ptrauth_setup_lazy(struct kvm_vcpu *vcpu)
-{
-	if (vcpu_has_ptrauth(vcpu))
-		vcpu_ptrauth_disable(vcpu);
-}
-
 static inline unsigned long vcpu_get_vsesr(struct kvm_vcpu *vcpu)
 {
 	return vcpu->arch.vsesr_el2;
arch/arm64/include/asm/kvm_host.h +4 -2
index 32c8a675e5a4..26fca93cd697 100644
@@ -405,8 +405,10 @@ void vcpu_write_sys_reg(struct kvm_vcpu *vcpu, u64 val, int reg);
  * CP14 and CP15 live in the same array, as they are backed by the
  * same system registers.
  */
-#define vcpu_cp14(v,r)		((v)->arch.ctxt.copro[(r)])
-#define vcpu_cp15(v,r)		((v)->arch.ctxt.copro[(r)])
+#define CPx_BIAS		IS_ENABLED(CONFIG_CPU_BIG_ENDIAN)
+
+#define vcpu_cp14(v,r)		((v)->arch.ctxt.copro[(r) ^ CPx_BIAS])
+#define vcpu_cp15(v,r)		((v)->arch.ctxt.copro[(r) ^ CPx_BIAS])
 
 struct kvm_vm_stat {
 	ulong remote_tlb_flush;
arch/arm64/kvm/handle_exit.c +2 -17
index aacfc55de44c..e0a4bcdb9451 100644
@@ -162,31 +162,16 @@ static int handle_sve(struct kvm_vcpu *vcpu, struct kvm_run *run)
 	return 1;
 }
 
-#define __ptrauth_save_key(regs, key)						\
-({										\
-	regs[key ## KEYLO_EL1] = read_sysreg_s(SYS_ ## key ## KEYLO_EL1);	\
-	regs[key ## KEYHI_EL1] = read_sysreg_s(SYS_ ## key ## KEYHI_EL1);	\
-})
-
 /*
  * Handle the guest trying to use a ptrauth instruction, or trying to access a
  * ptrauth register.
  */
 void kvm_arm_vcpu_ptrauth_trap(struct kvm_vcpu *vcpu)
 {
-	struct kvm_cpu_context *ctxt;
-
-	if (vcpu_has_ptrauth(vcpu)) {
+	if (vcpu_has_ptrauth(vcpu))
 		vcpu_ptrauth_enable(vcpu);
-		ctxt = vcpu->arch.host_cpu_context;
-		__ptrauth_save_key(ctxt->sys_regs, APIA);
-		__ptrauth_save_key(ctxt->sys_regs, APIB);
-		__ptrauth_save_key(ctxt->sys_regs, APDA);
-		__ptrauth_save_key(ctxt->sys_regs, APDB);
-		__ptrauth_save_key(ctxt->sys_regs, APGA);
-	} else {
+	else
 		kvm_inject_undefined(vcpu);
-	}
 }
 
 /*
arch/arm64/kvm/sys_regs.c +8 -2
index 51db934702b6..bfd68cd4fc54 100644
@@ -1305,10 +1305,16 @@ static bool access_clidr(struct kvm_vcpu *vcpu, struct sys_reg_params *p,
 static bool access_csselr(struct kvm_vcpu *vcpu, struct sys_reg_params *p,
 			  const struct sys_reg_desc *r)
 {
+	int reg = r->reg;
+
+	/* See the 32bit mapping in kvm_host.h */
+	if (p->is_aarch32)
+		reg = r->reg / 2;
+
 	if (p->is_write)
-		vcpu_write_sys_reg(vcpu, p->regval, r->reg);
+		vcpu_write_sys_reg(vcpu, p->regval, reg);
 	else
-		p->regval = vcpu_read_sys_reg(vcpu, r->reg);
+		p->regval = vcpu_read_sys_reg(vcpu, reg);
 	return true;
 }
 
arch/mips/include/asm/kvm_host.h +5 -1
index 2c343c346b79..caa2b936125c 100644
@@ -274,8 +274,12 @@ enum emulation_result {
 #define MIPS3_PG_SHIFT		6
 #define MIPS3_PG_FRAME		0x3fffffc0
 
+#if defined(CONFIG_64BIT)
+#define VPN2_MASK		GENMASK(cpu_vmbits - 1, 13)
+#else
 #define VPN2_MASK		0xffffe000
-#define KVM_ENTRYHI_ASID	MIPS_ENTRYHI_ASID
+#endif
+#define KVM_ENTRYHI_ASID	cpu_asid_mask(&boot_cpu_data)
 #define TLB_IS_GLOBAL(x)	((x).tlb_lo[0] & (x).tlb_lo[1] & ENTRYLO_G)
 #define TLB_VPN2(x)		((x).tlb_hi & VPN2_MASK)
 #define TLB_ASID(x)		((x).tlb_hi & KVM_ENTRYHI_ASID)
arch/powerpc/mm/ptdump/ptdump.c +12 -9
index d92bb8ea229c..34248641fe58 100644
@@ -60,6 +60,7 @@ struct pg_state {
 	unsigned long start_address;
 	unsigned long start_pa;
 	unsigned long last_pa;
+	unsigned long page_size;
 	unsigned int level;
 	u64 current_flags;
 	bool check_wx;
@@ -157,9 +158,9 @@ static void dump_addr(struct pg_state *st, unsigned long addr)
 #endif
 
 	pt_dump_seq_printf(st->seq, REG "-" REG " ", st->start_address, addr - 1);
-	if (st->start_pa == st->last_pa && st->start_address + PAGE_SIZE != addr) {
+	if (st->start_pa == st->last_pa && st->start_address + st->page_size != addr) {
 		pt_dump_seq_printf(st->seq, "[" REG "]", st->start_pa);
-		delta = PAGE_SIZE >> 10;
+		delta = st->page_size >> 10;
 	} else {
 		pt_dump_seq_printf(st->seq, " " REG " ", st->start_pa);
 		delta = (addr - st->start_address) >> 10;
@@ -190,7 +191,7 @@ static void note_prot_wx(struct pg_state *st, unsigned long addr)
 }
 
 static void note_page(struct pg_state *st, unsigned long addr,
-	       unsigned int level, u64 val)
+	       unsigned int level, u64 val, unsigned long page_size)
 {
 	u64 flag = val & pg_level[level].mask;
 	u64 pa = val & PTE_RPN_MASK;
@@ -202,6 +203,7 @@ static void note_page(struct pg_state *st, unsigned long addr,
 		st->start_address = addr;
 		st->start_pa = pa;
 		st->last_pa = pa;
+		st->page_size = page_size;
 		pt_dump_seq_printf(st->seq, "---[ %s ]---\n", st->marker->name);
 	/*
 	 * Dump the section of virtual memory when:
@@ -213,7 +215,7 @@ static void note_page(struct pg_state *st, unsigned long addr,
 	 */
 	} else if (flag != st->current_flags || level != st->level ||
 		   addr >= st->marker[1].start_address ||
-		   (pa != st->last_pa + PAGE_SIZE &&
+		   (pa != st->last_pa + st->page_size &&
 		    (pa != st->start_pa || st->start_pa != st->last_pa))) {
 
 		/* Check the PTE flags */
@@ -241,6 +243,7 @@ static void note_page(struct pg_state *st, unsigned long addr,
 		st->start_address = addr;
 		st->start_pa = pa;
 		st->last_pa = pa;
+		st->page_size = page_size;
 		st->current_flags = flag;
 		st->level = level;
 	} else {
@@ -256,7 +259,7 @@ static void walk_pte(struct pg_state *st, pmd_t *pmd, unsigned long start)
 
 	for (i = 0; i < PTRS_PER_PTE; i++, pte++) {
 		addr = start + i * PAGE_SIZE;
-		note_page(st, addr, 4, pte_val(*pte));
+		note_page(st, addr, 4, pte_val(*pte), PAGE_SIZE);
 
 	}
 }
@@ -273,7 +276,7 @@ static void walk_pmd(struct pg_state *st, pud_t *pud, unsigned long start)
 			/* pmd exists */
 			walk_pte(st, pmd, addr);
 		else
-			note_page(st, addr, 3, pmd_val(*pmd));
+			note_page(st, addr, 3, pmd_val(*pmd), PMD_SIZE);
 	}
 }
 
@@ -289,7 +292,7 @@ static void walk_pud(struct pg_state *st, pgd_t *pgd, unsigned long start)
 			/* pud exists */
 			walk_pmd(st, pud, addr);
 		else
-			note_page(st, addr, 2, pud_val(*pud));
+			note_page(st, addr, 2, pud_val(*pud), PUD_SIZE);
 	}
 }
 
@@ -308,7 +311,7 @@ static void walk_pagetables(struct pg_state *st)
 			/* pgd exists */
 			walk_pud(st, pgd, addr);
 		else
-			note_page(st, addr, 1, pgd_val(*pgd));
+			note_page(st, addr, 1, pgd_val(*pgd), PGDIR_SIZE);
 	}
 }
 
@@ -363,7 +366,7 @@ static int ptdump_show(struct seq_file *m, void *v)
 
 	/* Traverse kernel page tables */
 	walk_pagetables(&st);
-	note_page(&st, 0, 0, 0);
+	note_page(&st, 0, 0, 0, 0);
 	return 0;
 }
 
arch/powerpc/sysdev/xive/common.c +5 -0
index b294f70f1a67..261cff60df14 100644
@@ -19,6 +19,7 @@
 #include <linux/slab.h>
 #include <linux/spinlock.h>
 #include <linux/msi.h>
+#include <linux/vmalloc.h>
 
 #include <asm/debugfs.h>
 #include <asm/prom.h>
@@ -1017,12 +1018,16 @@ EXPORT_SYMBOL_GPL(is_xive_irq);
 void xive_cleanup_irq_data(struct xive_irq_data *xd)
 {
 	if (xd->eoi_mmio) {
+		unmap_kernel_range((unsigned long)xd->eoi_mmio,
+				   1u << xd->esb_shift);
 		iounmap(xd->eoi_mmio);
 		if (xd->eoi_mmio == xd->trig_mmio)
 			xd->trig_mmio = NULL;
 		xd->eoi_mmio = NULL;
 	}
 	if (xd->trig_mmio) {
+		unmap_kernel_range((unsigned long)xd->trig_mmio,
+				   1u << xd->esb_shift);
 		iounmap(xd->trig_mmio);
 		xd->trig_mmio = NULL;
 	}
arch/s390/pci/pci_clp.c +1 -2
index ea794ae755ae..179bcecefdee 100644
@@ -309,14 +309,13 @@ int clp_enable_fh(struct zpci_dev *zdev, u8 nr_dma_as)
 
 int clp_disable_fh(struct zpci_dev *zdev)
 {
-	u32 fh = zdev->fh;
 	int rc;
 
 	if (!zdev_enabled(zdev))
 		return 0;
 
 	rc = clp_set_pci_fn(zdev, 0, CLP_SET_DISABLE_PCI_FN);
-	zpci_dbg(3, "dis fid:%x, fh:%x, rc:%d\n", zdev->fid, fh, rc);
+	zpci_dbg(3, "dis fid:%x, fh:%x, rc:%d\n", zdev->fid, zdev->fh, rc);
 	return rc;
 }
 
arch/x86/events/intel/core.c +2 -2
index 332954cccece..ca35c8b5ee10 100644
@@ -1892,8 +1892,8 @@ static __initconst const u64 tnt_hw_cache_extra_regs
 
 static struct extra_reg intel_tnt_extra_regs[] __read_mostly = {
 	/* must define OFFCORE_RSP_X first, see intel_fixup_er() */
-	INTEL_UEVENT_EXTRA_REG(0x01b7, MSR_OFFCORE_RSP_0, 0xffffff9fffull, RSP_0),
-	INTEL_UEVENT_EXTRA_REG(0x02b7, MSR_OFFCORE_RSP_1, 0xffffff9fffull, RSP_1),
+	INTEL_UEVENT_EXTRA_REG(0x01b7, MSR_OFFCORE_RSP_0, 0x800ff0ffffff9fffull, RSP_0),
+	INTEL_UEVENT_EXTRA_REG(0x02b7, MSR_OFFCORE_RSP_1, 0xff0ffffff9fffull, RSP_1),
 	EVENT_EXTRA_END
 };
 
arch/x86/include/asm/set_memory.h +13 -6
index ec2c0a094b5d..5948218f35c5 100644
@@ -86,28 +86,35 @@ int set_direct_map_default_noflush(struct page *page);
 extern int kernel_set_to_readonly;
 
 #ifdef CONFIG_X86_64
-static inline int set_mce_nospec(unsigned long pfn)
+/*
+ * Prevent speculative access to the page by either unmapping
+ * it (if we do not require access to any part of the page) or
+ * marking it uncacheable (if we want to try to retrieve data
+ * from non-poisoned lines in the page).
+ */
+static inline int set_mce_nospec(unsigned long pfn, bool unmap)
 {
 	unsigned long decoy_addr;
 	int rc;
 
 	/*
-	 * Mark the linear address as UC to make sure we don't log more
-	 * errors because of speculative access to the page.
 	 * We would like to just call:
-	 *      set_memory_uc((unsigned long)pfn_to_kaddr(pfn), 1);
+	 *      set_memory_XX((unsigned long)pfn_to_kaddr(pfn), 1);
 	 * but doing that would radically increase the odds of a
 	 * speculative access to the poison page because we'd have
 	 * the virtual address of the kernel 1:1 mapping sitting
 	 * around in registers.
 	 * Instead we get tricky.  We create a non-canonical address
 	 * that looks just like the one we want, but has bit 63 flipped.
-	 * This relies on set_memory_uc() properly sanitizing any __pa()
+	 * This relies on set_memory_XX() properly sanitizing any __pa()
 	 * results with __PHYSICAL_MASK or PTE_PFN_MASK.
 	 */
 	decoy_addr = (pfn << PAGE_SHIFT) + (PAGE_OFFSET ^ BIT(63));
 
-	rc = set_memory_uc(decoy_addr, 1);
+	if (unmap)
+		rc = set_memory_np(decoy_addr, 1);
+	else
+		rc = set_memory_uc(decoy_addr, 1);
 	if (rc)
 		pr_warn("Could not invalidate pfn=0x%lx from 1:1 map\n", pfn);
 	return rc;
arch/x86/include/asm/vdso/gettimeofday.h +18 -0
index 9a6dc9b4ec99..fb81fea99093 100644
@@ -271,6 +271,24 @@ static __always_inline const struct vdso_data *__arch_get_vdso_data(void)
 	return __vdso_data;
 }
 
+static inline bool arch_vdso_clocksource_ok(const struct vdso_data *vd)
+{
+	return true;
+}
+#define vdso_clocksource_ok arch_vdso_clocksource_ok
+
+/*
+ * Clocksource read value validation to handle PV and HyperV clocksources
+ * which can be invalidated asynchronously and indicate invalidation by
+ * returning U64_MAX, which can be effectively tested by checking for a
+ * negative value after casting it to s64.
+ */
+static inline bool arch_vdso_cycles_ok(u64 cycles)
+{
+	return (s64)cycles >= 0;
+}
+#define vdso_cycles_ok arch_vdso_cycles_ok
+
 /*
  * x86 specific delta calculation.
  *
arch/x86/kernel/cpu/amd.c +1 -2
index 547ad7bbf0e0..8a1bdda895a4 100644
@@ -1142,8 +1142,7 @@ static const int amd_erratum_383[] =
 
 /* #1054: Instructions Retired Performance Counter May Be Inaccurate */
 static const int amd_erratum_1054[] =
-	AMD_OSVW_ERRATUM(0, AMD_MODEL_RANGE(0x17, 0, 0, 0x2f, 0xf));
-
+	AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x17, 0, 0, 0x2f, 0xf));
 
 static bool cpu_has_amd_erratum(struct cpuinfo_x86 *cpu, const int *erratum)
 {
arch/x86/kernel/cpu/bugs.c +54 -38

166 lines not on this page · raw message

arch/x86/kernel/cpu/mce/core.c +9 -2
index 54165f3569e8..c1a480a27164 100644
@@ -529,6 +529,13 @@ bool mce_is_memory_error(struct mce *m)
 }
 EXPORT_SYMBOL_GPL(mce_is_memory_error);
 
+static bool whole_page(struct mce *m)
+{
+	if (!mca_cfg.ser || !(m->status & MCI_STATUS_MISCV))
+		return true;
+	return MCI_MISC_ADDR_LSB(m->misc) >= PAGE_SHIFT;
+}
+
 bool mce_is_correctable(struct mce *m)
 {
 	if (m->cpuvendor == X86_VENDOR_AMD && m->status & MCI_STATUS_DEFERRED)
@@ -600,7 +607,7 @@ static int uc_decode_notifier(struct notifier_block *nb, unsigned long val,
 
 	pfn = mce->addr >> PAGE_SHIFT;
 	if (!memory_failure(pfn, 0))
-		set_mce_nospec(pfn);
+		set_mce_nospec(pfn, whole_page(mce));
 
 	return NOTIFY_OK;
 }
@@ -1098,7 +1105,7 @@ static int do_memory_failure(struct mce *m)
 	if (ret)
 		pr_err("Memory error not recovered");
 	else
-		set_mce_nospec(m->addr >> PAGE_SHIFT);
+		set_mce_nospec(m->addr >> PAGE_SHIFT, whole_page(m));
 	return ret;
 }
 
arch/x86/kernel/process.c +10 -18
index 35638f1c5791..8f4533c1a4ec 100644
@@ -545,28 +545,20 @@ static __always_inline void __speculation_ctrl_update(unsigned long tifp,
 
 	lockdep_assert_irqs_disabled();
 
-	/*
-	 * If TIF_SSBD is different, select the proper mitigation
-	 * method. Note that if SSBD mitigation is disabled or permanentely
-	 * enabled this branch can't be taken because nothing can set
-	 * TIF_SSBD.
-	 */
-	if (tif_diff & _TIF_SSBD) {
-		if (static_cpu_has(X86_FEATURE_VIRT_SSBD)) {
+	/* Handle change of TIF_SSBD depending on the mitigation method. */
+	if (static_cpu_has(X86_FEATURE_VIRT_SSBD)) {
+		if (tif_diff & _TIF_SSBD)
 			amd_set_ssb_virt_state(tifn);
-		} else if (static_cpu_has(X86_FEATURE_LS_CFG_SSBD)) {
+	} else if (static_cpu_has(X86_FEATURE_LS_CFG_SSBD)) {
+		if (tif_diff & _TIF_SSBD)
 			amd_set_core_ssb_state(tifn);
-		} else if (static_cpu_has(X86_FEATURE_SPEC_CTRL_SSBD) ||
-			   static_cpu_has(X86_FEATURE_AMD_SSBD)) {
-			msr |= ssbd_tif_to_spec_ctrl(tifn);
-			updmsr  = true;
-		}
+	} else if (static_cpu_has(X86_FEATURE_SPEC_CTRL_SSBD) ||
+		   static_cpu_has(X86_FEATURE_AMD_SSBD)) {
+		updmsr |= !!(tif_diff & _TIF_SSBD);
+		msr |= ssbd_tif_to_spec_ctrl(tifn);
 	}
 
-	/*
-	 * Only evaluate TIF_SPEC_IB if conditional STIBP is enabled,
-	 * otherwise avoid the MSR write.
-	 */
+	/* Only evaluate TIF_SPEC_IB if conditional STIBP is enabled. */
 	if (IS_ENABLED(CONFIG_SMP) &&
 	    static_branch_unlikely(&switch_to_cond_stibp)) {
 		updmsr |= !!(tif_diff & _TIF_SPEC_IB);
arch/x86/kernel/reboot.c +8 -0
index 3ca43be4f9cf..8b8cebfd3298 100644
@@ -197,6 +197,14 @@ static const struct dmi_system_id reboot_dmi_table[] __initconst = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "MacBook5"),
 		},
 	},
+	{	/* Handle problems with rebooting on Apple MacBook6,1 */
+		.callback = set_pci_reboot,
+		.ident = "Apple MacBook6,1",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "MacBook6,1"),
+		},
+	},
 	{	/* Handle problems with rebooting on Apple MacBookPro5 */
 		.callback = set_pci_reboot,
 		.ident = "Apple MacBookPro5",
arch/x86/kernel/time.c +0 -4
index 106e7f87f534..f39572982635 100644
@@ -25,10 +25,6 @@
 #include <asm/hpet.h>
 #include <asm/time.h>
 
-#ifdef CONFIG_X86_64
-__visible volatile unsigned long jiffies __cacheline_aligned_in_smp = INITIAL_JIFFIES;
-#endif
-
 unsigned long profile_pc(struct pt_regs *regs)
 {
 	unsigned long pc = instruction_pointer(regs);
arch/x86/kernel/vmlinux.lds.S +2 -2
index 1bf7e312361f..7c35556c7827 100644
@@ -40,13 +40,13 @@ OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT)
 #ifdef CONFIG_X86_32
 OUTPUT_ARCH(i386)
 ENTRY(phys_startup_32)
-jiffies = jiffies_64;
 #else
 OUTPUT_ARCH(i386:x86-64)
 ENTRY(phys_startup_64)
-jiffies_64 = jiffies;
 #endif
 
+jiffies = jiffies_64;
+
 #if defined(CONFIG_X86_64)
 /*
  * On 64-bit, align RODATA to 2MB so we retain large page mappings for
arch/x86/kvm/mmu/mmu.c +19 -27

66 lines not on this page · raw message

arch/x86/kvm/svm/nested.c +3 -3
index 9a2a62e5afeb..c2a31a2a3cef 100644
@@ -150,7 +150,7 @@ static void copy_vmcb_control_area(struct vmcb *dst_vmcb, struct vmcb *from_vmcb
 	dst->iopm_base_pa         = from->iopm_base_pa;
 	dst->msrpm_base_pa        = from->msrpm_base_pa;
 	dst->tsc_offset           = from->tsc_offset;
-	dst->asid                 = from->asid;
+	/* asid not copied, it is handled manually for svm->vmcb.  */
 	dst->tlb_ctl              = from->tlb_ctl;
 	dst->int_ctl              = from->int_ctl;
 	dst->int_vector           = from->int_vector;
@@ -834,8 +834,8 @@ int nested_svm_exit_special(struct vcpu_svm *svm)
 			return NESTED_EXIT_HOST;
 		break;
 	case SVM_EXIT_EXCP_BASE + PF_VECTOR:
-		/* When we're shadowing, trap PFs, but not async PF */
-		if (!npt_enabled && svm->vcpu.arch.apf.host_apf_reason == 0)
+		/* Trap async PF even if not shadowing */
+		if (!npt_enabled || svm->vcpu.arch.apf.host_apf_reason)
 			return NESTED_EXIT_HOST;
 		break;
 	default:
arch/x86/kvm/vmx/nested.c +2 -2
index e44f33c82332..bd3ea83ca223 100644
@@ -303,7 +303,7 @@ static void vmx_switch_vmcs(struct kvm_vcpu *vcpu, struct loaded_vmcs *vmcs)
 	cpu = get_cpu();
 	prev = vmx->loaded_vmcs;
 	vmx->loaded_vmcs = vmcs;
-	vmx_vcpu_load_vmcs(vcpu, cpu);
+	vmx_vcpu_load_vmcs(vcpu, cpu, prev);
 	vmx_sync_vmcs_host_state(vmx, prev);
 	put_cpu();
 
@@ -5577,7 +5577,7 @@ bool nested_vmx_exit_reflected(struct kvm_vcpu *vcpu, u32 exit_reason)
 				vmcs_read32(VM_EXIT_INTR_ERROR_CODE),
 				KVM_ISA_VMX);
 
-	switch (exit_reason) {
+	switch ((u16)exit_reason) {
 	case EXIT_REASON_EXCEPTION_NMI:
 		if (is_nmi(intr_info))
 			return false;
arch/x86/kvm/vmx/vmx.c +17 -4
index 89c766fad889..d7aa0dfab8bb 100644
@@ -1306,10 +1306,12 @@ static void vmx_vcpu_pi_load(struct kvm_vcpu *vcpu, int cpu)
 		pi_set_on(pi_desc);
 }
 
-void vmx_vcpu_load_vmcs(struct kvm_vcpu *vcpu, int cpu)
+void vmx_vcpu_load_vmcs(struct kvm_vcpu *vcpu, int cpu,
+			struct loaded_vmcs *buddy)
 {
 	struct vcpu_vmx *vmx = to_vmx(vcpu);
 	bool already_loaded = vmx->loaded_vmcs->cpu == cpu;
+	struct vmcs *prev;
 
 	if (!already_loaded) {
 		loaded_vmcs_clear(vmx->loaded_vmcs);
@@ -1328,10 +1330,18 @@ void vmx_vcpu_load_vmcs(struct kvm_vcpu *vcpu, int cpu)
 		local_irq_enable();
 	}
 
-	if (per_cpu(current_vmcs, cpu) != vmx->loaded_vmcs->vmcs) {
+	prev = per_cpu(current_vmcs, cpu);
+	if (prev != vmx->loaded_vmcs->vmcs) {
 		per_cpu(current_vmcs, cpu) = vmx->loaded_vmcs->vmcs;
 		vmcs_load(vmx->loaded_vmcs->vmcs);
-		indirect_branch_prediction_barrier();
+
+		/*
+		 * No indirect branch prediction barrier needed when switching
+		 * the active VMCS within a guest, e.g. on nested VM-Enter.
+		 * The L1 VMM can protect itself with retpolines, IBPB or IBRS.
+		 */
+		if (!buddy || WARN_ON_ONCE(buddy->vmcs != prev))
+			indirect_branch_prediction_barrier();
 	}
 
 	if (!already_loaded) {
@@ -1368,7 +1378,7 @@ void vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
 {
 	struct vcpu_vmx *vmx = to_vmx(vcpu);
 
-	vmx_vcpu_load_vmcs(vcpu, cpu);
+	vmx_vcpu_load_vmcs(vcpu, cpu, NULL);
 
 	vmx_vcpu_pi_load(vcpu, cpu);
 
@@ -7138,6 +7148,9 @@ static __init void vmx_set_cpu_caps(void)
 	/* CPUID 0x80000001 */
 	if (!cpu_has_vmx_rdtscp())
 		kvm_cpu_cap_clear(X86_FEATURE_RDTSCP);
+
+	if (vmx_waitpkg_supported())
+		kvm_cpu_cap_check_and_set(X86_FEATURE_WAITPKG);
 }
 
 static void vmx_request_immediate_exit(struct kvm_vcpu *vcpu)
arch/x86/kvm/vmx/vmx.h +2 -1
index aab9df55336e..6bd7e552c534 100644
@@ -317,7 +317,8 @@ struct kvm_vmx {
 };
 
 bool nested_vmx_allowed(struct kvm_vcpu *vcpu);
-void vmx_vcpu_load_vmcs(struct kvm_vcpu *vcpu, int cpu);
+void vmx_vcpu_load_vmcs(struct kvm_vcpu *vcpu, int cpu,
+			struct loaded_vmcs *buddy);
 void vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu);
 int allocate_vpid(void);
 void free_vpid(int vpid);
arch/x86/kvm/x86.c +8 -7
index c17e6eb9ad43..97c5a92146f9 100644
@@ -4586,7 +4586,7 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
 
 		if (kvm_state.flags &
 		    ~(KVM_STATE_NESTED_RUN_PENDING | KVM_STATE_NESTED_GUEST_MODE
-		      | KVM_STATE_NESTED_EVMCS))
+		      | KVM_STATE_NESTED_EVMCS | KVM_STATE_NESTED_MTF_PENDING))
 			break;
 
 		/* nested_run_pending implies guest_mode.  */
@@ -5242,6 +5242,10 @@ static void kvm_init_msr_list(void)
 			if (!kvm_cpu_cap_has(X86_FEATURE_RDTSCP))
 				continue;
 			break;
+		case MSR_IA32_UMWAIT_CONTROL:
+			if (!kvm_cpu_cap_has(X86_FEATURE_WAITPKG))
+				continue;
+			break;
 		case MSR_IA32_RTIT_CTL:
 		case MSR_IA32_RTIT_STATUS:
 			if (!kvm_cpu_cap_has(X86_FEATURE_INTEL_PT))
@@ -6919,7 +6923,7 @@ int x86_emulate_instruction(struct kvm_vcpu *vcpu, gpa_t cr2_or_gpa,
 		if (!ctxt->have_exception ||
 		    exception_type(ctxt->exception.vector) == EXCPT_TRAP) {
 			kvm_rip_write(vcpu, ctxt->eip);
-			if (r && ctxt->tf)
+			if (r && (ctxt->tf || (vcpu->guest_debug & KVM_GUESTDBG_SINGLESTEP)))
 				r = kvm_vcpu_do_singlestep(vcpu);
 			if (kvm_x86_ops.update_emulated_instruction)
 				kvm_x86_ops.update_emulated_instruction(vcpu);
@@ -8150,9 +8154,8 @@ static void vcpu_load_eoi_exitmap(struct kvm_vcpu *vcpu)
 	kvm_x86_ops.load_eoi_exitmap(vcpu, eoi_exit_bitmap);
 }
 
-int kvm_arch_mmu_notifier_invalidate_range(struct kvm *kvm,
-		unsigned long start, unsigned long end,
-		bool blockable)
+void kvm_arch_mmu_notifier_invalidate_range(struct kvm *kvm,
+					    unsigned long start, unsigned long end)
 {
 	unsigned long apic_address;
 
@@ -8163,8 +8166,6 @@ int kvm_arch_mmu_notifier_invalidate_range(struct kvm *kvm,
 	apic_address = gfn_to_hva(kvm, APIC_DEFAULT_PHYS_BASE >> PAGE_SHIFT);
 	if (start <= apic_address && apic_address < end)
 		kvm_make_all_cpus_request(kvm, KVM_REQ_APIC_PAGE_RELOAD);
-
-	return 0;
 }
 
 void kvm_vcpu_reload_apic_access_page(struct kvm_vcpu *vcpu)
arch/x86/mm/dump_pagetables.c +20 -13
index 69309cd56fdf..33093fdedb02 100644
@@ -249,10 +249,22 @@ static void note_wx(struct pg_state *st, unsigned long addr)
 		  (void *)st->start_address);
 }
 
-static inline pgprotval_t effective_prot(pgprotval_t prot1, pgprotval_t prot2)
+static void effective_prot(struct ptdump_state *pt_st, int level, u64 val)
 {
-	return (prot1 & prot2 & (_PAGE_USER | _PAGE_RW)) |
-	       ((prot1 | prot2) & _PAGE_NX);
+	struct pg_state *st = container_of(pt_st, struct pg_state, ptdump);
+	pgprotval_t prot = val & PTE_FLAGS_MASK;
+	pgprotval_t effective;
+
+	if (level > 0) {
+		pgprotval_t higher_prot = st->prot_levels[level - 1];
+
+		effective = (higher_prot & prot & (_PAGE_USER | _PAGE_RW)) |
+			    ((higher_prot | prot) & _PAGE_NX);
+	} else {
+		effective = prot;
+	}
+
+	st->prot_levels[level] = effective;
 }
 
 /*
@@ -270,16 +282,10 @@ static void note_page(struct ptdump_state *pt_st, unsigned long addr, int level,
 	struct seq_file *m = st->seq;
 
 	new_prot = val & PTE_FLAGS_MASK;
-
-	if (level > 0) {
-		new_eff = effective_prot(st->prot_levels[level - 1],
-					 new_prot);
-	} else {
-		new_eff = new_prot;
-	}
-
-	if (level >= 0)
-		st->prot_levels[level] = new_eff;
+	if (!val)
+		new_eff = 0;
+	else
+		new_eff = st->prot_levels[level];
 
 	/*
 	 * If we have a "break" in the series, we need to flush the state that
@@ -374,6 +380,7 @@ static void ptdump_walk_pgd_level_core(struct seq_file *m,
 	struct pg_state st = {
 		.ptdump = {
 			.note_page	= note_page,
+			.effective_prot = effective_prot,
 			.range		= ptdump_ranges
 		},
 		.level = -1,
arch/x86/pci/fixup.c +4 -0
index e723559c386a..0c67a5a94de3 100644
@@ -572,6 +572,10 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2fc0, pci_invalid_bar);
 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x6f60, pci_invalid_bar);
 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x6fa0, pci_invalid_bar);
 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x6fc0, pci_invalid_bar);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0xa1ec, pci_invalid_bar);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0xa1ed, pci_invalid_bar);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0xa26c, pci_invalid_bar);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0xa26d, pci_invalid_bar);
 
 /*
  * Device [1022:7808]
crypto/algapi.c +1 -1
index f8b4dc161c02..f1e6ccaff853 100644
@@ -403,7 +403,7 @@ static void crypto_wait_for_test(struct crypto_larval *larval)
 	err = wait_for_completion_killable(&larval->completion);
 	WARN_ON(err);
 	if (!err)
-		crypto_probing_notify(CRYPTO_MSG_ALG_LOADED, larval);
+		crypto_notify(CRYPTO_MSG_ALG_LOADED, larval);
 
 out:
 	crypto_larval_kill(&larval->alg);
crypto/drbg.c +3 -1
index b6929eb5f565..04379ca624cd 100644
@@ -1294,8 +1294,10 @@ static inline int drbg_alloc_state(struct drbg_state *drbg)
 	if (IS_ENABLED(CONFIG_CRYPTO_FIPS)) {
 		drbg->prev = kzalloc(drbg_sec_strength(drbg->core->flags),
 				     GFP_KERNEL);
-		if (!drbg->prev)
+		if (!drbg->prev) {
+			ret = -ENOMEM;
 			goto fini;
+		}
 		drbg->fips_primed = false;
 	}
 
drivers/acpi/cppc_acpi.c +1 -0
index 8b2e89c20c11..067067bc03d4 100644
@@ -846,6 +846,7 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr)
 			"acpi_cppc");
 	if (ret) {
 		per_cpu(cpc_desc_ptr, pr->id) = NULL;
+		kobject_put(&cpc_ptr->kobj);
 		goto out_free;
 	}
 
drivers/acpi/device_pm.c +1 -1
index 5832bc10aca8..95e200b618bd 100644
@@ -186,7 +186,7 @@ int acpi_device_set_power(struct acpi_device *device, int state)
 		 * possibly drop references to the power resources in use.
 		 */
 		state = ACPI_STATE_D3_HOT;
-		/* If _PR3 is not available, use D3hot as the target state. */
+		/* If D3cold is not supported, use D3hot as the target state. */
 		if (!device->power.states[ACPI_STATE_D3_COLD].flags.valid)
 			target_state = state;
 	} else if (!device->power.states[state].flags.valid) {
drivers/acpi/evged.c +19 -3
index aba0d0027586..6d7a522952bf 100644
@@ -79,6 +79,8 @@ static acpi_status acpi_ged_request_interrupt(struct acpi_resource *ares,
 	struct resource r;
 	struct acpi_resource_irq *p = &ares->data.irq;
 	struct acpi_resource_extended_irq *pext = &ares->data.extended_irq;
+	char ev_name[5];
+	u8 trigger;
 
 	if (ares->type == ACPI_RESOURCE_TYPE_END_TAG)
 		return AE_OK;
@@ -87,14 +89,28 @@ static acpi_status acpi_ged_request_interrupt(struct acpi_resource *ares,
 		dev_err(dev, "unable to parse IRQ resource\n");
 		return AE_ERROR;
 	}
-	if (ares->type == ACPI_RESOURCE_TYPE_IRQ)
+	if (ares->type == ACPI_RESOURCE_TYPE_IRQ) {
 		gsi = p->interrupts[0];
-	else
+		trigger = p->triggering;
+	} else {
 		gsi = pext->interrupts[0];
+		trigger = p->triggering;
+	}
 
 	irq = r.start;
 
-	if (ACPI_FAILURE(acpi_get_handle(handle, "_EVT", &evt_handle))) {
+	switch (gsi) {
+	case 0 ... 255:
+		sprintf(ev_name, "_%c%02hhX",
+			trigger == ACPI_EDGE_SENSITIVE ? 'E' : 'L', gsi);
+
+		if (ACPI_SUCCESS(acpi_get_handle(handle, ev_name, &evt_handle)))
+			break;
+		/* fall through */
+	default:
+		if (ACPI_SUCCESS(acpi_get_handle(handle, "_EVT", &evt_handle)))
+			break;
+
 		dev_err(dev, "cannot locate _EVT method\n");
 		return AE_ERROR;
 	}
drivers/acpi/scan.c +19 -9
index 6d3448895382..1b255e98de4d 100644
@@ -919,12 +919,9 @@ static void acpi_bus_init_power_state(struct acpi_device *device, int state)
 
 		if (buffer.length && package
 		    && package->type == ACPI_TYPE_PACKAGE
-		    && package->package.count) {
-			int err = acpi_extract_power_resources(package, 0,
-							       &ps->resources);
-			if (!err)
-				device->power.flags.power_resources = 1;
-		}
+		    && package->package.count)
+			acpi_extract_power_resources(package, 0, &ps->resources);
+
 		ACPI_FREE(buffer.pointer);
 	}
 
@@ -971,14 +968,27 @@ static void acpi_bus_get_power_flags(struct acpi_device *device)
 		acpi_bus_init_power_state(device, i);
 
 	INIT_LIST_HEAD(&device->power.states[ACPI_STATE_D3_COLD].resources);
-	if (!list_empty(&device->power.states[ACPI_STATE_D3_HOT].resources))
-		device->power.states[ACPI_STATE_D3_COLD].flags.valid = 1;
 
-	/* Set defaults for D0 and D3hot states (always valid) */
+	/* Set the defaults for D0 and D3hot (always supported). */
 	device->power.states[ACPI_STATE_D0].flags.valid = 1;
 	device->power.states[ACPI_STATE_D0].power = 100;
 	device->power.states[ACPI_STATE_D3_HOT].flags.valid = 1;
 
+	/*
+	 * Use power resources only if the D0 list of them is populated, because
+	 * some platforms may provide _PR3 only to indicate D3cold support and
+	 * in those cases the power resources list returned by it may be bogus.
+	 */
+	if (!list_empty(&device->power.states[ACPI_STATE_D0].resources)) {
+		device->power.flags.power_resources = 1;
+		/*
+		 * D3cold is supported if the D3hot list of power resources is
+		 * not empty.
+		 */
+		if (!list_empty(&device->power.states[ACPI_STATE_D3_HOT].resources))
+			device->power.states[ACPI_STATE_D3_COLD].flags.valid = 1;
+	}
+
 	if (acpi_bus_init_power(device))
 		device->flags.power_manageable = 0;
 }
drivers/acpi/sysfs.c +3 -1
index c60d2c6d31d6..3a89909b50a6 100644
@@ -993,8 +993,10 @@ void acpi_sysfs_add_hotplug_profile(struct acpi_hotplug_profile *hotplug,
 
 	error = kobject_init_and_add(&hotplug->kobj,
 		&acpi_hotplug_profile_ktype, hotplug_kobj, "%s", name);
-	if (error)
+	if (error) {
+		kobject_put(&hotplug->kobj);
 		goto err_out;
+	}
 
 	kobject_uevent(&hotplug->kobj, KOBJ_ADD);
 	return;
drivers/base/core.c +26 -8
index 0cad34f1eede..213106ed8a56 100644
@@ -643,9 +643,17 @@ static void device_links_missing_supplier(struct device *dev)
 {
 	struct device_link *link;
 
-	list_for_each_entry(link, &dev->links.suppliers, c_node)
-		if (link->status == DL_STATE_CONSUMER_PROBE)
+	list_for_each_entry(link, &dev->links.suppliers, c_node) {
+		if (link->status != DL_STATE_CONSUMER_PROBE)
+			continue;
+
+		if (link->supplier->links.status == DL_DEV_DRIVER_BOUND) {
 			WRITE_ONCE(link->status, DL_STATE_AVAILABLE);
+		} else {
+			WARN_ON(!(link->flags & DL_FLAG_SYNC_STATE_ONLY));
+			WRITE_ONCE(link->status, DL_STATE_DORMANT);
+		}
+	}
 }
 
 /**
@@ -684,11 +692,11 @@ int device_links_check_suppliers(struct device *dev)
 	device_links_write_lock();
 
 	list_for_each_entry(link, &dev->links.suppliers, c_node) {
-		if (!(link->flags & DL_FLAG_MANAGED) ||
-		    link->flags & DL_FLAG_SYNC_STATE_ONLY)
+		if (!(link->flags & DL_FLAG_MANAGED))
 			continue;
 
-		if (link->status != DL_STATE_AVAILABLE) {
+		if (link->status != DL_STATE_AVAILABLE &&
+		    !(link->flags & DL_FLAG_SYNC_STATE_ONLY)) {
 			device_links_missing_supplier(dev);
 			ret = -EPROBE_DEFER;
 			break;
@@ -949,11 +957,21 @@ static void __device_links_no_driver(struct device *dev)
 		if (!(link->flags & DL_FLAG_MANAGED))
 			continue;
 
-		if (link->flags & DL_FLAG_AUTOREMOVE_CONSUMER)
+		if (link->flags & DL_FLAG_AUTOREMOVE_CONSUMER) {
 			device_link_drop_managed(link);
-		else if (link->status == DL_STATE_CONSUMER_PROBE ||
-			 link->status == DL_STATE_ACTIVE)
+			continue;
+		}
+
+		if (link->status != DL_STATE_CONSUMER_PROBE &&
+		    link->status != DL_STATE_ACTIVE)
+			continue;
+
+		if (link->supplier->links.status == DL_DEV_DRIVER_BOUND) {
 			WRITE_ONCE(link->status, DL_STATE_AVAILABLE);
+		} else {
+			WARN_ON(!(link->flags & DL_FLAG_SYNC_STATE_ONLY));
+			WRITE_ONCE(link->status, DL_STATE_DORMANT);
+		}
 	}
 
 	dev->links.status = DL_DEV_NO_DRIVER;
drivers/block/floppy.c +5 -5
index c3daa64cb52c..975cd0a6baa1 100644
@@ -2938,17 +2938,17 @@ static blk_status_t floppy_queue_rq(struct blk_mq_hw_ctx *hctx,
 		 (unsigned long long) current_req->cmd_flags))
 		return BLK_STS_IOERR;
 
-	spin_lock_irq(&floppy_lock);
-	list_add_tail(&bd->rq->queuelist, &floppy_reqs);
-	spin_unlock_irq(&floppy_lock);
-
 	if (test_and_set_bit(0, &fdc_busy)) {
 		/* fdc busy, this new request will be treated when the
 		   current one is done */
 		is_alive(__func__, "old request running");
-		return BLK_STS_OK;
+		return BLK_STS_RESOURCE;
 	}
 
+	spin_lock_irq(&floppy_lock);
+	list_add_tail(&bd->rq->queuelist, &floppy_reqs);
+	spin_unlock_irq(&floppy_lock);
+
 	command_status = FD_COMMAND_NONE;
 	__reschedule_timeout(MAXTIMEOUT, "fd_request");
 	set_fdc(0);
drivers/char/agp/intel-gtt.c +3 -1
index 66a62d17a3f5..3d42fc4290bc 100644
@@ -846,6 +846,7 @@ void intel_gtt_insert_page(dma_addr_t addr,
 			   unsigned int flags)
 {
 	intel_private.driver->write_entry(addr, pg, flags);
+	readl(intel_private.gtt + pg);
 	if (intel_private.driver->chipset_flush)
 		intel_private.driver->chipset_flush();
 }
@@ -871,7 +872,7 @@ void intel_gtt_insert_sg_entries(struct sg_table *st,
 			j++;
 		}
 	}
-	wmb();
+	readl(intel_private.gtt + j - 1);
 	if (intel_private.driver->chipset_flush)
 		intel_private.driver->chipset_flush();
 }
@@ -1105,6 +1106,7 @@ static void i9xx_cleanup(void)
 
 static void i9xx_chipset_flush(void)
 {
+	wmb();
 	if (intel_private.i9xx_flush_page)
 		writel(1, intel_private.i9xx_flush_page);
 }
drivers/clk/clk.c +5 -1
index 2dfb30b963c4..407f6919604c 100644
@@ -114,7 +114,11 @@ static int clk_pm_runtime_get(struct clk_core *core)
 		return 0;
 
 	ret = pm_runtime_get_sync(core->dev);
-	return ret < 0 ? ret : 0;
+	if (ret < 0) {
+		pm_runtime_put_noidle(core->dev);
+		return ret;
+	}
+	return 0;
 }
 
 static void clk_pm_runtime_put(struct clk_core *core)
drivers/cpufreq/cpufreq.c +6 -5
index 045f9fe157ce..d03f250f68e4 100644
@@ -2535,26 +2535,27 @@ EXPORT_SYMBOL_GPL(cpufreq_update_limits);
 static int cpufreq_boost_set_sw(int state)
 {
 	struct cpufreq_policy *policy;
-	int ret = -EINVAL;
 
 	for_each_active_policy(policy) {
+		int ret;
+
 		if (!policy->freq_table)
-			continue;
+			return -ENXIO;
 
 		ret = cpufreq_frequency_table_cpuinfo(policy,
 						      policy->freq_table);
 		if (ret) {
 			pr_err("%s: Policy frequency update failed\n",
 			       __func__);
-			break;
+			return ret;
 		}
 
 		ret = freq_qos_update_request(policy->max_freq_req, policy->max);
 		if (ret < 0)
-			break;
+			return ret;
 	}
 
-	return ret;
+	return 0;
 }
 
 int cpufreq_boost_trigger_state(int state)
drivers/crypto/cavium/nitrox/nitrox_main.c +2 -2
index e91be9b8b083..eeba262bd458 100644
@@ -278,7 +278,7 @@ static void nitrox_remove_from_devlist(struct nitrox_device *ndev)
 
 struct nitrox_device *nitrox_get_first_device(void)
 {
-	struct nitrox_device *ndev = NULL;
+	struct nitrox_device *ndev;
 
 	mutex_lock(&devlist_lock);
 	list_for_each_entry(ndev, &ndevlist, list) {
@@ -286,7 +286,7 @@ struct nitrox_device *nitrox_get_first_device(void)
 			break;
 	}
 	mutex_unlock(&devlist_lock);
-	if (!ndev)
+	if (&ndev->list == &ndevlist)
 		return NULL;
 
 	refcount_inc(&ndev->refcnt);
drivers/crypto/virtio/virtio_crypto_algs.c +14 -7
index fd045e64972a..cb8a6ea2a4bc 100644
@@ -350,13 +350,18 @@ __virtio_crypto_skcipher_do_req(struct virtio_crypto_sym_request *vc_sym_req,
 	int err;
 	unsigned long flags;
 	struct scatterlist outhdr, iv_sg, status_sg, **sgs;
-	int i;
 	u64 dst_len;
 	unsigned int num_out = 0, num_in = 0;
 	int sg_total;
 	uint8_t *iv;
+	struct scatterlist *sg;
 
 	src_nents = sg_nents_for_len(req->src, req->cryptlen);
+	if (src_nents < 0) {
+		pr_err("Invalid number of src SG.\n");
+		return src_nents;
+	}
+
 	dst_nents = sg_nents(req->dst);
 
 	pr_debug("virtio_crypto: Number of sgs (src_nents: %d, dst_nents: %d)\n",
@@ -402,6 +407,7 @@ __virtio_crypto_skcipher_do_req(struct virtio_crypto_sym_request *vc_sym_req,
 		goto free;
 	}
 
+	dst_len = min_t(unsigned int, req->cryptlen, dst_len);
 	pr_debug("virtio_crypto: src_len: %u, dst_len: %llu\n",
 			req->cryptlen, dst_len);
 
@@ -442,12 +448,12 @@ __virtio_crypto_skcipher_do_req(struct virtio_crypto_sym_request *vc_sym_req,
 	vc_sym_req->iv = iv;
 
 	/* Source data */
-	for (i = 0; i < src_nents; i++)
-		sgs[num_out++] = &req->src[i];
+	for (sg = req->src; src_nents; sg = sg_next(sg), src_nents--)
+		sgs[num_out++] = sg;
 
 	/* Destination data */
-	for (i = 0; i < dst_nents; i++)
-		sgs[num_out + num_in++] = &req->dst[i];
+	for (sg = req->dst; sg; sg = sg_next(sg))
+		sgs[num_out + num_in++] = sg;
 
 	/* Status */
 	sg_init_one(&status_sg, &vc_req->status, sizeof(vc_req->status));
@@ -577,10 +583,11 @@ static void virtio_crypto_skcipher_finalize_req(
 		scatterwalk_map_and_copy(req->iv, req->dst,
 					 req->cryptlen - AES_BLOCK_SIZE,
 					 AES_BLOCK_SIZE, 0);
-	crypto_finalize_skcipher_request(vc_sym_req->base.dataq->engine,
-					   req, err);
 	kzfree(vc_sym_req->iv);
 	virtcrypto_clear_request(&vc_sym_req->base);
+
+	crypto_finalize_skcipher_request(vc_sym_req->base.dataq->engine,
+					   req, err);
 }
 
 static struct virtio_crypto_algo virtio_crypto_algs[] = { {
drivers/edac/i10nm_base.c +1 -1
index df08de963d10..916d37f0503b 100644
@@ -161,7 +161,7 @@ static int i10nm_get_dimm_config(struct mem_ctl_info *mci)
 				 mtr, mcddrtcfg, imc->mc, i, j);
 
 			if (IS_DIMM_PRESENT(mtr))
-				ndimms += skx_get_dimm_info(mtr, 0, dimm,
+				ndimms += skx_get_dimm_info(mtr, 0, 0, dimm,
 							    imc, i, j);
 			else if (IS_NVDIMM_PRESENT(mcddrtcfg, j))
 				ndimms += skx_get_nvdimm_info(dimm, imc, i, j,
drivers/edac/skx_base.c +8 -12
index 46a3a3440f5e..a51954bc488c 100644
@@ -163,27 +163,23 @@ static const struct x86_cpu_id skx_cpuids[] = {
 };
 MODULE_DEVICE_TABLE(x86cpu, skx_cpuids);
 
-#define SKX_GET_MTMTR(dev, reg) \
-	pci_read_config_dword((dev), 0x87c, &(reg))
-
-static bool skx_check_ecc(struct pci_dev *pdev)
+static bool skx_check_ecc(u32 mcmtr)
 {
-	u32 mtmtr;
-
-	SKX_GET_MTMTR(pdev, mtmtr);
-
-	return !!GET_BITFIELD(mtmtr, 2, 2);
+	return !!GET_BITFIELD(mcmtr, 2, 2);
 }
 
 static int skx_get_dimm_config(struct mem_ctl_info *mci)
 {
 	struct skx_pvt *pvt = mci->pvt_info;
+	u32 mtr, mcmtr, amap, mcddrtcfg;
 	struct skx_imc *imc = pvt->imc;
-	u32 mtr, amap, mcddrtcfg;
 	struct dimm_info *dimm;
 	int i, j;
 	int ndimms;
 
+	/* Only the mcmtr on the first channel is effective */
+	pci_read_config_dword(imc->chan[0].cdev, 0x87c, &mcmtr);
+
 	for (i = 0; i < SKX_NUM_CHANNELS; i++) {
 		ndimms = 0;
 		pci_read_config_dword(imc->chan[i].cdev, 0x8C, &amap);
@@ -193,14 +189,14 @@ static int skx_get_dimm_config(struct mem_ctl_info *mci)
 			pci_read_config_dword(imc->chan[i].cdev,
 					      0x80 + 4 * j, &mtr);
 			if (IS_DIMM_PRESENT(mtr)) {
-				ndimms += skx_get_dimm_info(mtr, amap, dimm, imc, i, j);
+				ndimms += skx_get_dimm_info(mtr, mcmtr, amap, dimm, imc, i, j);
 			} else if (IS_NVDIMM_PRESENT(mcddrtcfg, j)) {
 				ndimms += skx_get_nvdimm_info(dimm, imc, i, j,
 							      EDAC_MOD_STR);
 				nvdimm_count++;
 			}
 		}
-		if (ndimms && !skx_check_ecc(imc->chan[0].cdev)) {
+		if (ndimms && !skx_check_ecc(mcmtr)) {
 			skx_printk(KERN_ERR, "ECC is disabled on imc %d\n", imc->mc);
 			return -ENODEV;
 		}
drivers/edac/skx_common.c +3 -3
index 99bbaf629b8d..412c651bef26 100644
@@ -304,7 +304,7 @@ static int skx_get_dimm_attr(u32 reg, int lobit, int hibit, int add,
 #define numrow(reg)	skx_get_dimm_attr(reg, 2, 4, 12, 1, 6, "rows")
 #define numcol(reg)	skx_get_dimm_attr(reg, 0, 1, 10, 0, 2, "cols")
 
-int skx_get_dimm_info(u32 mtr, u32 amap, struct dimm_info *dimm,
+int skx_get_dimm_info(u32 mtr, u32 mcmtr, u32 amap, struct dimm_info *dimm,
 		      struct skx_imc *imc, int chan, int dimmno)
 {
 	int  banks = 16, ranks, rows, cols, npages;
@@ -324,8 +324,8 @@ int skx_get_dimm_info(u32 mtr, u32 amap, struct dimm_info *dimm,
 		 imc->mc, chan, dimmno, size, npages,
 		 banks, 1 << ranks, rows, cols);
 
-	imc->chan[chan].dimms[dimmno].close_pg = GET_BITFIELD(mtr, 0, 0);
-	imc->chan[chan].dimms[dimmno].bank_xor_enable = GET_BITFIELD(mtr, 9, 9);
+	imc->chan[chan].dimms[dimmno].close_pg = GET_BITFIELD(mcmtr, 0, 0);
+	imc->chan[chan].dimms[dimmno].bank_xor_enable = GET_BITFIELD(mcmtr, 9, 9);
 	imc->chan[chan].dimms[dimmno].fine_grain_bank = GET_BITFIELD(amap, 0, 0);
 	imc->chan[chan].dimms[dimmno].rowbits = rows;
 	imc->chan[chan].dimms[dimmno].colbits = cols;
drivers/edac/skx_common.h +1 -1
index 60d1ea669afd..319f9b2f1f89 100644
@@ -128,7 +128,7 @@ int skx_get_all_bus_mappings(unsigned int did, int off, enum type,
 
 int skx_get_hi_lo(unsigned int did, int off[], u64 *tolm, u64 *tohm);
 
-int skx_get_dimm_info(u32 mtr, u32 amap, struct dimm_info *dimm,
+int skx_get_dimm_info(u32 mtr, u32 mcmtr, u32 amap, struct dimm_info *dimm,
 		      struct skx_imc *imc, int chan, int dimmno);
 
 int skx_get_nvdimm_info(struct dimm_info *dimm, struct skx_imc *imc,
drivers/firmware/efi/efivars.c +3 -1
index 78ad1ba8c987..26528a46d99e 100644
@@ -522,8 +522,10 @@ efivar_create_sysfs_entry(struct efivar_entry *new_var)
 	ret = kobject_init_and_add(&new_var->kobj, &efivar_ktype,
 				   NULL, "%s", short_name);
 	kfree(short_name);
-	if (ret)
+	if (ret) {
+		kobject_put(&new_var->kobj);
 		return ret;
+	}
 
 	kobject_uevent(&new_var->kobj, KOBJ_ADD);
 	if (efivar_entry_add(new_var, &efivar_sysfs_list)) {
drivers/firmware/imx/imx-scu.c +47 -15

123 lines not on this page · raw message

drivers/gpu/drm/i915/gem/i915_gem_userptr.c +8 -0
index 7ffd7afeb7a5..f80cf6ac20c5 100644
@@ -598,6 +598,14 @@ static int i915_gem_userptr_get_pages(struct drm_i915_gem_object *obj)
 				      GFP_KERNEL |
 				      __GFP_NORETRY |
 				      __GFP_NOWARN);
+		/*
+		 * Using __get_user_pages_fast() with a read-only
+		 * access is questionable. A read-only page may be
+		 * COW-broken, and then this might end up giving
+		 * the wrong side of the COW..
+		 *
+		 * We may or may not care.
+		 */
 		if (pvec) /* defer to worker if malloc fails */
 			pinned = __get_user_pages_fast(obj->userptr.ptr,
 						       num_pages,
drivers/gpu/drm/vkms/vkms_drv.h +0 -5
index eda04ffba7b1..f4036bb0b9a8 100644
@@ -117,11 +117,6 @@ struct drm_plane *vkms_plane_init(struct vkms_device *vkmsdev,
 				  enum drm_plane_type type, int index);
 
 /* Gem stuff */
-struct drm_gem_object *vkms_gem_create(struct drm_device *dev,
-				       struct drm_file *file,
-				       u32 *handle,
-				       u64 size);
-
 vm_fault_t vkms_gem_fault(struct vm_fault *vmf);
 
 int vkms_dumb_create(struct drm_file *file, struct drm_device *dev,
drivers/gpu/drm/vkms/vkms_gem.c +6 -5
index 2e01186fb943..c541fec57566 100644
@@ -97,10 +97,10 @@ vm_fault_t vkms_gem_fault(struct vm_fault *vmf)
 	return ret;
 }
 
-struct drm_gem_object *vkms_gem_create(struct drm_device *dev,
-				       struct drm_file *file,
-				       u32 *handle,
-				       u64 size)
+static struct drm_gem_object *vkms_gem_create(struct drm_device *dev,
+					      struct drm_file *file,
+					      u32 *handle,
+					      u64 size)
 {
 	struct vkms_gem_object *obj;
 	int ret;
@@ -113,7 +113,6 @@ struct drm_gem_object *vkms_gem_create(struct drm_device *dev,
 		return ERR_CAST(obj);
 
 	ret = drm_gem_handle_create(file, &obj->gem, handle);
-	drm_gem_object_put_unlocked(&obj->gem);
 	if (ret)
 		return ERR_PTR(ret);
 
@@ -142,6 +141,8 @@ int vkms_dumb_create(struct drm_file *file, struct drm_device *dev,
 	args->size = gem_obj->size;
 	args->pitch = pitch;
 
+	drm_gem_object_put_unlocked(gem_obj);
+
 	DRM_DEBUG_DRIVER("Created object of size %lld\n", size);
 
 	return 0;
drivers/infiniband/core/uverbs_main.c +2 -0
index 1bab8de14757..b94572e9c24f 100644
@@ -296,6 +296,8 @@ static __poll_t ib_uverbs_event_poll(struct ib_uverbs_event_queue *ev_queue,
 	spin_lock_irq(&ev_queue->lock);
 	if (!list_empty(&ev_queue->event_list))
 		pollflags = EPOLLIN | EPOLLRDNORM;
+	else if (ev_queue->is_closed)
+		pollflags = EPOLLERR;
 	spin_unlock_irq(&ev_queue->lock);
 
 	return pollflags;
drivers/media/common/videobuf2/videobuf2-dma-contig.c +2 -18
index d3a3ee5b597b..f4b4a7c135eb 100644
@@ -726,9 +726,8 @@ EXPORT_SYMBOL_GPL(vb2_dma_contig_memops);
 int vb2_dma_contig_set_max_seg_size(struct device *dev, unsigned int size)
 {
 	if (!dev->dma_parms) {
-		dev->dma_parms = kzalloc(sizeof(*dev->dma_parms), GFP_KERNEL);
-		if (!dev->dma_parms)
-			return -ENOMEM;
+		dev_err(dev, "Failed to set max_seg_size: dma_parms is NULL\n");
+		return -ENODEV;
 	}
 	if (dma_get_max_seg_size(dev) < size)
 		return dma_set_max_seg_size(dev, size);
@@ -737,21 +736,6 @@ int vb2_dma_contig_set_max_seg_size(struct device *dev, unsigned int size)
 }
 EXPORT_SYMBOL_GPL(vb2_dma_contig_set_max_seg_size);
 
-/*
- * vb2_dma_contig_clear_max_seg_size() - release resources for DMA parameters
- * @dev:	device for configuring DMA parameters
- *
- * This function releases resources allocated to configure DMA parameters
- * (see vb2_dma_contig_set_max_seg_size() function). It should be called from
- * device drivers on driver remove.
- */
-void vb2_dma_contig_clear_max_seg_size(struct device *dev)
-{
-	kfree(dev->dma_parms);
-	dev->dma_parms = NULL;
-}
-EXPORT_SYMBOL_GPL(vb2_dma_contig_clear_max_seg_size);
-
 MODULE_DESCRIPTION("DMA-contig memory handling routines for videobuf2");
 MODULE_AUTHOR("Pawel Osciak <[email protected]>");
 MODULE_LICENSE("GPL");
drivers/mmc/core/sdio.c +28 -33

126 lines not on this page · raw message

drivers/mmc/host/mmci_stm32_sdmmc.c +3 -0
index d33e62bd6153..cca7b3b3f618 100644
@@ -188,6 +188,9 @@ static int sdmmc_idma_start(struct mmci_host *host, unsigned int *datactrl)
 static void sdmmc_idma_finalize(struct mmci_host *host, struct mmc_data *data)
 {
 	writel_relaxed(0, host->base + MMCI_STM32_IDMACTRLR);
+
+	if (!data->host_cookie)
+		sdmmc_idma_unprep_data(host, data, 0);
 }
 
 static void mmci_sdmmc_set_clkreg(struct mmci_host *host, unsigned int desired)
drivers/mmc/host/sdhci-msm.c +6 -0
index a8bcb3f16aa4..87de46b6ed07 100644
@@ -1129,6 +1129,12 @@ static int sdhci_msm_execute_tuning(struct mmc_host *mmc, u32 opcode)
 	/* Clock-Data-Recovery used to dynamically adjust RX sampling point */
 	msm_host->use_cdr = true;
 
+	/*
+	 * Clear tuning_done flag before tuning to ensure proper
+	 * HS400 settings.
+	 */
+	msm_host->tuning_done = 0;
+
 	/*
 	 * For HS400 tuning in HS200 timing requires:
 	 * - select MCLK/2 in VENDOR_SPEC
drivers/mmc/host/sdhci-of-at91.c +5 -2
index c79bff5e2280..117ad7232767 100644
@@ -120,9 +120,12 @@ static void sdhci_at91_reset(struct sdhci_host *host, u8 mask)
 	    || mmc_gpio_get_cd(host->mmc) >= 0)
 		sdhci_at91_set_force_card_detect(host);
 
-	if (priv->cal_always_on && (mask & SDHCI_RESET_ALL))
-		sdhci_writel(host, SDMMC_CALCR_ALWYSON | SDMMC_CALCR_EN,
+	if (priv->cal_always_on && (mask & SDHCI_RESET_ALL)) {
+		u32 calcr = sdhci_readl(host, SDMMC_CALCR);
+
+		sdhci_writel(host, calcr | SDMMC_CALCR_ALWYSON | SDMMC_CALCR_EN,
 			     SDMMC_CALCR);
+	}
 }
 
 static const struct sdhci_ops sdhci_at91_sama5d2_ops = {
drivers/mmc/host/tmio_mmc_core.c +4 -2
index 9520bd94cf43..98be09c5e3ff 100644
@@ -1231,12 +1231,14 @@ void tmio_mmc_host_remove(struct tmio_mmc_host *host)
 	cancel_work_sync(&host->done);
 	cancel_delayed_work_sync(&host->delayed_reset_work);
 	tmio_mmc_release_dma(host);
+	tmio_mmc_disable_mmc_irqs(host, TMIO_MASK_ALL);
 
-	pm_runtime_dont_use_autosuspend(&pdev->dev);
 	if (host->native_hotplug)
 		pm_runtime_put_noidle(&pdev->dev);
-	pm_runtime_put_sync(&pdev->dev);
+
 	pm_runtime_disable(&pdev->dev);
+	pm_runtime_dont_use_autosuspend(&pdev->dev);
+	pm_runtime_put_noidle(&pdev->dev);
 }
 EXPORT_SYMBOL_GPL(tmio_mmc_host_remove);
 
drivers/mmc/host/uniphier-sd.c +7 -5
index a1683c49cb90..f82baf99fd69 100644
@@ -610,11 +610,6 @@ static int uniphier_sd_probe(struct platform_device *pdev)
 		}
 	}
 
-	ret = devm_request_irq(dev, irq, tmio_mmc_irq, IRQF_SHARED,
-			       dev_name(dev), host);
-	if (ret)
-		goto free_host;
-
 	if (priv->caps & UNIPHIER_SD_CAP_EXTENDED_IP)
 		host->dma_ops = &uniphier_sd_internal_dma_ops;
 	else
@@ -642,8 +637,15 @@ static int uniphier_sd_probe(struct platform_device *pdev)
 	if (ret)
 		goto free_host;
 
+	ret = devm_request_irq(dev, irq, tmio_mmc_irq, IRQF_SHARED,
+			       dev_name(dev), host);
+	if (ret)
+		goto remove_host;
+
 	return 0;
 
+remove_host:
+	tmio_mmc_host_remove(host);
 free_host:
 	tmio_mmc_host_free(host);
 
drivers/net/dsa/qca8k.c +1 -2
index 9f4205b4439b..d2b5ab403e06 100644
@@ -1079,8 +1079,7 @@ qca8k_sw_probe(struct mdio_device *mdiodev)
 	if (id != QCA8K_ID_QCA8337)
 		return -ENODEV;
 
-	priv->ds = devm_kzalloc(&mdiodev->dev, sizeof(*priv->ds),
-				QCA8K_NUM_PORTS);
+	priv->ds = devm_kzalloc(&mdiodev->dev, sizeof(*priv->ds), GFP_KERNEL);
 	if (!priv->ds)
 		return -ENOMEM;
 
drivers/net/ethernet/amazon/ena/ena_netdev.c +5 -5
index 2cc765df8da3..15ce93be05ea 100644
@@ -355,7 +355,7 @@ static int ena_xdp_xmit_buff(struct net_device *dev,
 	ena_unmap_tx_buff(xdp_ring, tx_info);
 	tx_info->xdpf = NULL;
 error_drop_packet:
-
+	__free_page(tx_info->xdp_rx_page);
 	return NETDEV_TX_OK;
 }
 
@@ -1638,11 +1638,9 @@ static int ena_clean_rx_irq(struct ena_ring *rx_ring, struct napi_struct *napi,
 					 &next_to_clean);
 
 		if (unlikely(!skb)) {
-			if (xdp_verdict == XDP_TX) {
+			if (xdp_verdict == XDP_TX)
 				ena_free_rx_page(rx_ring,
 						 &rx_ring->rx_buffer_info[rx_ring->ena_bufs[0].req_id]);
-				res_budget--;
-			}
 			for (i = 0; i < ena_rx_ctx.descs; i++) {
 				rx_ring->free_ids[next_to_clean] =
 					rx_ring->ena_bufs[i].req_id;
@@ -1650,8 +1648,10 @@ static int ena_clean_rx_irq(struct ena_ring *rx_ring, struct napi_struct *napi,
 					ENA_RX_RING_IDX_NEXT(next_to_clean,
 							     rx_ring->ring_size);
 			}
-			if (xdp_verdict == XDP_TX || xdp_verdict == XDP_DROP)
+			if (xdp_verdict != XDP_PASS) {
+				res_budget--;
 				continue;
+			}
 			break;
 		}
 
drivers/net/ethernet/cadence/macb_main.c +8 -6
index 36290a8e2a84..67933079aeea 100644
@@ -2558,19 +2558,21 @@ static int macb_open(struct net_device *dev)
 
 	err = macb_phylink_connect(bp);
 	if (err)
-		goto pm_exit;
+		goto napi_exit;
 
 	netif_tx_start_all_queues(dev);
 
 	if (bp->ptp_info)
 		bp->ptp_info->ptp_init(dev);
 
-pm_exit:
-	if (err) {
-		pm_runtime_put_sync(&bp->pdev->dev);
-		return err;
-	}
 	return 0;
+
+napi_exit:
+	for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue)
+		napi_disable(&queue->napi);
+pm_exit:
+	pm_runtime_put_sync(&bp->pdev->dev);
+	return err;
 }
 
 static int macb_close(struct net_device *dev)
drivers/net/ethernet/marvell/mvneta.c +13 -0
index 51889770958d..43b44a1e8f69 100644
@@ -451,11 +451,17 @@ struct mvneta_pcpu_port {
 	u32			cause_rx_tx;
 };
 
+enum {
+	__MVNETA_DOWN,
+};
+
 struct mvneta_port {
 	u8 id;
 	struct mvneta_pcpu_port __percpu	*ports;
 	struct mvneta_pcpu_stats __percpu	*stats;
 
+	unsigned long state;
+
 	int pkt_size;
 	void __iomem *base;
 	struct mvneta_rx_queue *rxqs;
@@ -2112,6 +2118,9 @@ mvneta_xdp_xmit(struct net_device *dev, int num_frame,
 	struct netdev_queue *nq;
 	u32 ret;
 
+	if (unlikely(test_bit(__MVNETA_DOWN, &pp->state)))
+		return -ENETDOWN;
+
 	if (unlikely(flags & ~XDP_XMIT_FLAGS_MASK))
 		return -EINVAL;
 
@@ -3562,12 +3571,16 @@ static void mvneta_start_dev(struct mvneta_port *pp)
 
 	phylink_start(pp->phylink);
 	netif_tx_start_all_queues(pp->dev);
+
+	clear_bit(__MVNETA_DOWN, &pp->state);
 }
 
 static void mvneta_stop_dev(struct mvneta_port *pp)
 {
 	unsigned int cpu;
 
+	set_bit(__MVNETA_DOWN, &pp->state);
+
 	phylink_stop(pp->phylink);
 
 	if (!pp->neta_armada3700) {
drivers/net/ethernet/mellanox/mlx5/core/devlink.c +0 -2
index e94f0c4d74a7..a99fe4b02b9b 100644
@@ -283,7 +283,6 @@ int mlx5_devlink_register(struct devlink *devlink, struct device *dev)
 		goto params_reg_err;
 	mlx5_devlink_set_params_init_values(devlink);
 	devlink_params_publish(devlink);
-	devlink_reload_enable(devlink);
 	return 0;
 
 params_reg_err:
@@ -293,7 +292,6 @@ int mlx5_devlink_register(struct devlink *devlink, struct device *dev)
 
 void mlx5_devlink_unregister(struct devlink *devlink)
 {
-	devlink_reload_disable(devlink);
 	devlink_params_unregister(devlink, mlx5_devlink_params,
 				  ARRAY_SIZE(mlx5_devlink_params));
 	devlink_unregister(devlink);
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c +8 -8
index 4eb305af0106..153d6eb19d3c 100644
@@ -320,21 +320,21 @@ mlx5_tc_ct_parse_mangle_to_mod_act(struct flow_action_entry *act,
 
 	case FLOW_ACT_MANGLE_HDR_TYPE_IP6:
 		MLX5_SET(set_action_in, modact, length, 0);
-		if (offset == offsetof(struct ipv6hdr, saddr))
+		if (offset == offsetof(struct ipv6hdr, saddr) + 12)
 			field = MLX5_ACTION_IN_FIELD_OUT_SIPV6_31_0;
-		else if (offset == offsetof(struct ipv6hdr, saddr) + 4)
-			field = MLX5_ACTION_IN_FIELD_OUT_SIPV6_63_32;
 		else if (offset == offsetof(struct ipv6hdr, saddr) + 8)
+			field = MLX5_ACTION_IN_FIELD_OUT_SIPV6_63_32;
+		else if (offset == offsetof(struct ipv6hdr, saddr) + 4)
 			field = MLX5_ACTION_IN_FIELD_OUT_SIPV6_95_64;
-		else if (offset == offsetof(struct ipv6hdr, saddr) + 12)
+		else if (offset == offsetof(struct ipv6hdr, saddr))
 			field = MLX5_ACTION_IN_FIELD_OUT_SIPV6_127_96;
-		else if (offset == offsetof(struct ipv6hdr, daddr))
+		else if (offset == offsetof(struct ipv6hdr, daddr) + 12)
 			field = MLX5_ACTION_IN_FIELD_OUT_DIPV6_31_0;
-		else if (offset == offsetof(struct ipv6hdr, daddr) + 4)
-			field = MLX5_ACTION_IN_FIELD_OUT_DIPV6_63_32;
 		else if (offset == offsetof(struct ipv6hdr, daddr) + 8)
+			field = MLX5_ACTION_IN_FIELD_OUT_DIPV6_63_32;
+		else if (offset == offsetof(struct ipv6hdr, daddr) + 4)
 			field = MLX5_ACTION_IN_FIELD_OUT_DIPV6_95_64;
-		else if (offset == offsetof(struct ipv6hdr, daddr) + 12)
+		else if (offset == offsetof(struct ipv6hdr, daddr))
 			field = MLX5_ACTION_IN_FIELD_OUT_DIPV6_127_96;
 		else
 			return -EOPNOTSUPP;
drivers/net/ethernet/mellanox/mlx5/core/en/xsk/setup.c +4 -0
index c28cbae42331..2c80205dc939 100644
@@ -152,6 +152,10 @@ void mlx5e_close_xsk(struct mlx5e_channel *c)
 	mlx5e_close_cq(&c->xskicosq.cq);
 	mlx5e_close_xdpsq(&c->xsksq);
 	mlx5e_close_cq(&c->xsksq.cq);
+
+	memset(&c->xskrq, 0, sizeof(c->xskrq));
+	memset(&c->xsksq, 0, sizeof(c->xsksq));
+	memset(&c->xskicosq, 0, sizeof(c->xskicosq));
 }
 
 void mlx5e_activate_xsk(struct mlx5e_channel *c)
drivers/net/ethernet/mellanox/mlx5/core/health.c +11 -3
index f99e1752d4e5..e22b7ae11275 100644
@@ -193,15 +193,23 @@ static bool reset_fw_if_needed(struct mlx5_core_dev *dev)
 
 void mlx5_enter_error_state(struct mlx5_core_dev *dev, bool force)
 {
+	bool err_detected = false;
+
+	/* Mark the device as fatal in order to abort FW commands */
+	if ((check_fatal_sensors(dev) || force) &&
+	    dev->state == MLX5_DEVICE_STATE_UP) {
+		dev->state = MLX5_DEVICE_STATE_INTERNAL_ERROR;
+		err_detected = true;
+	}
 	mutex_lock(&dev->intf_state_mutex);
-	if (dev->state == MLX5_DEVICE_STATE_INTERNAL_ERROR)
-		goto unlock;
+	if (!err_detected && dev->state == MLX5_DEVICE_STATE_INTERNAL_ERROR)
+		goto unlock;/* a previous error is still being handled */
 	if (dev->state == MLX5_DEVICE_STATE_UNINITIALIZED) {
 		dev->state = MLX5_DEVICE_STATE_INTERNAL_ERROR;
 		goto unlock;
 	}
 
-	if (check_fatal_sensors(dev) || force) {
+	if (check_fatal_sensors(dev) || force) { /* protected state setting */
 		dev->state = MLX5_DEVICE_STATE_INTERNAL_ERROR;
 		mlx5_cmd_flush(dev);
 	}
drivers/net/ethernet/mellanox/mlx5/core/main.c +7 -0
index 17f818a54090..980f6b833cbe 100644
@@ -795,6 +795,11 @@ static int mlx5_pci_init(struct mlx5_core_dev *dev, struct pci_dev *pdev,
 
 static void mlx5_pci_close(struct mlx5_core_dev *dev)
 {
+	/* health work might still be active, and it needs pci bar in
+	 * order to know the NIC state. Therefore, drain the health WQ
+	 * before removing the pci bars
+	 */
+	mlx5_drain_health_wq(dev);
 	iounmap(dev->iseg);
 	pci_clear_master(dev->pdev);
 	release_bar(dev->pdev);
@@ -1368,6 +1373,7 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 		dev_err(&pdev->dev, "mlx5_crdump_enable failed with error code %d\n", err);
 
 	pci_save_state(pdev);
+	devlink_reload_enable(devlink);
 	return 0;
 
 err_load_one:
@@ -1385,6 +1391,7 @@ static void remove_one(struct pci_dev *pdev)
 	struct mlx5_core_dev *dev  = pci_get_drvdata(pdev);
 	struct devlink *devlink = priv_to_devlink(dev);
 
+	devlink_reload_disable(devlink);
 	mlx5_crdump_disable(dev);
 	mlx5_devlink_unregister(devlink);
 
drivers/net/ethernet/mellanox/mlxsw/core_thermal.c +19 -4
index ce0a6837daa3..05f8d5a92862 100644
@@ -391,8 +391,7 @@ static int mlxsw_thermal_set_trip_hyst(struct thermal_zone_device *tzdev,
 static int mlxsw_thermal_trend_get(struct thermal_zone_device *tzdev,
 				   int trip, enum thermal_trend *trend)
 {
-	struct mlxsw_thermal_module *tz = tzdev->devdata;
-	struct mlxsw_thermal *thermal = tz->parent;
+	struct mlxsw_thermal *thermal = tzdev->devdata;
 
 	if (trip < 0 || trip >= MLXSW_THERMAL_NUM_TRIPS)
 		return -EINVAL;
@@ -593,6 +592,22 @@ mlxsw_thermal_module_trip_hyst_set(struct thermal_zone_device *tzdev, int trip,
 	return 0;
 }
 
+static int mlxsw_thermal_module_trend_get(struct thermal_zone_device *tzdev,
+					  int trip, enum thermal_trend *trend)
+{
+	struct mlxsw_thermal_module *tz = tzdev->devdata;
+	struct mlxsw_thermal *thermal = tz->parent;
+
+	if (trip < 0 || trip >= MLXSW_THERMAL_NUM_TRIPS)
+		return -EINVAL;
+
+	if (tzdev == thermal->tz_highest_dev)
+		return 1;
+
+	*trend = THERMAL_TREND_STABLE;
+	return 0;
+}
+
 static struct thermal_zone_device_ops mlxsw_thermal_module_ops = {
 	.bind		= mlxsw_thermal_module_bind,
 	.unbind		= mlxsw_thermal_module_unbind,
@@ -604,7 +619,7 @@ static struct thermal_zone_device_ops mlxsw_thermal_module_ops = {
 	.set_trip_temp	= mlxsw_thermal_module_trip_temp_set,
 	.get_trip_hyst	= mlxsw_thermal_module_trip_hyst_get,
 	.set_trip_hyst	= mlxsw_thermal_module_trip_hyst_set,
-	.get_trend	= mlxsw_thermal_trend_get,
+	.get_trend	= mlxsw_thermal_module_trend_get,
 };
 
 static int mlxsw_thermal_gearbox_temp_get(struct thermal_zone_device *tzdev,
@@ -643,7 +658,7 @@ static struct thermal_zone_device_ops mlxsw_thermal_gearbox_ops = {
 	.set_trip_temp	= mlxsw_thermal_module_trip_temp_set,
 	.get_trip_hyst	= mlxsw_thermal_module_trip_hyst_get,
 	.set_trip_hyst	= mlxsw_thermal_module_trip_hyst_set,
-	.get_trend	= mlxsw_thermal_trend_get,
+	.get_trend	= mlxsw_thermal_module_trend_get,
 };
 
 static int mlxsw_thermal_get_max_state(struct thermal_cooling_device *cdev,
drivers/net/ethernet/pensando/ionic/ionic_lif.c +2 -2
index f8a9c1bcffc9..7aa037c3fe02 100644
@@ -105,7 +105,7 @@ static void ionic_link_status_check(struct ionic_lif *lif)
 			netif_carrier_on(netdev);
 		}
 
-		if (netif_running(lif->netdev))
+		if (lif->netdev->flags & IFF_UP && netif_running(lif->netdev))
 			ionic_start_queues(lif);
 	} else {
 		if (netif_carrier_ok(netdev)) {
@@ -113,7 +113,7 @@ static void ionic_link_status_check(struct ionic_lif *lif)
 			netif_carrier_off(netdev);
 		}
 
-		if (netif_running(lif->netdev))
+		if (lif->netdev->flags & IFF_UP && netif_running(lif->netdev))
 			ionic_stop_queues(lif);
 	}
 
drivers/net/ethernet/ti/am65-cpsw-nuss.c +1 -1
index 88f52a2f85b3..3e4388e6b5fa 100644
@@ -1804,7 +1804,7 @@ MODULE_DEVICE_TABLE(of, am65_cpsw_nuss_of_mtable);
 
 static int am65_cpsw_nuss_probe(struct platform_device *pdev)
 {
-	struct cpsw_ale_params ale_params;
+	struct cpsw_ale_params ale_params = { 0 };
 	const struct of_device_id *of_id;
 	struct device *dev = &pdev->dev;
 	struct am65_cpsw_common *common;
drivers/net/ethernet/ti/cpsw_ale.c +40 -9

65 lines not on this page · raw message

drivers/net/net_failover.c +2 -1
index b16a1221d19b..fb182bec8f06 100644
@@ -61,7 +61,8 @@ static int net_failover_open(struct net_device *dev)
 	return 0;
 
 err_standby_open:
-	dev_close(primary_dev);
+	if (primary_dev)
+		dev_close(primary_dev);
 err_primary_open:
 	netif_tx_disable(dev);
 	return err;
drivers/net/tun.c +10 -4
index 44889eba1dbc..b984733c6c31 100644
@@ -1871,8 +1871,11 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,
 		skb->dev = tun->dev;
 		break;
 	case IFF_TAP:
-		if (!frags)
-			skb->protocol = eth_type_trans(skb, tun->dev);
+		if (frags && !pskb_may_pull(skb, ETH_HLEN)) {
+			err = -ENOMEM;
+			goto drop;
+		}
+		skb->protocol = eth_type_trans(skb, tun->dev);
 		break;
 	}
 
@@ -1929,9 +1932,12 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,
 	}
 
 	if (frags) {
+		u32 headlen;
+
 		/* Exercise flow dissector code path. */
-		u32 headlen = eth_get_headlen(tun->dev, skb->data,
-					      skb_headlen(skb));
+		skb_push(skb, ETH_HLEN);
+		headlen = eth_get_headlen(tun->dev, skb->data,
+					  skb_headlen(skb));
 
 		if (unlikely(headlen > skb_headlen(skb))) {
 			this_cpu_inc(tun->pcpu_stats->rx_dropped);
drivers/net/vxlan.c +4 -0
index a5b415fed11e..779e56c43d27 100644
@@ -1924,6 +1924,10 @@ static struct sk_buff *vxlan_na_create(struct sk_buff *request,
 	ns_olen = request->len - skb_network_offset(request) -
 		sizeof(struct ipv6hdr) - sizeof(*ns);
 	for (i = 0; i < ns_olen-1; i += (ns->opt[i+1]<<3)) {
+		if (!ns->opt[i + 1]) {
+			kfree_skb(reply);
+			return NULL;
+		}
 		if (ns->opt[i] == ND_OPT_SOURCE_LL_ADDR) {
 			daddr = ns->opt + i + sizeof(struct nd_opt_hdr);
 			break;
drivers/net/wireless/ath/ath9k/hif_usb.c +45 -13

164 lines not on this page · raw message

drivers/net/wireless/ath/ath9k/hif_usb.h +6 -0
index 7846916aa01d..5985aa15ca93 100644
@@ -86,6 +86,11 @@ struct tx_buf {
 	struct list_head list;
 };
 
+struct rx_buf {
+	struct sk_buff *skb;
+	struct hif_device_usb *hif_dev;
+};
+
 #define HIF_USB_TX_STOP  BIT(0)
 #define HIF_USB_TX_FLUSH BIT(1)
 
@@ -133,5 +138,6 @@ struct hif_device_usb {
 
 int ath9k_hif_usb_init(void);
 void ath9k_hif_usb_exit(void);
+void ath9k_hif_usb_dealloc_urbs(struct hif_device_usb *hif_dev);
 
 #endif /* HTC_USB_H */
drivers/net/wireless/ath/ath9k/htc_drv_init.c +7 -3
index d961095ab01f..40a065028ebe 100644
@@ -931,8 +931,9 @@ static int ath9k_init_device(struct ath9k_htc_priv *priv,
 int ath9k_htc_probe_device(struct htc_target *htc_handle, struct device *dev,
 			   u16 devid, char *product, u32 drv_info)
 {
-	struct ieee80211_hw *hw;
+	struct hif_device_usb *hif_dev;
 	struct ath9k_htc_priv *priv;
+	struct ieee80211_hw *hw;
 	int ret;
 
 	hw = ieee80211_alloc_hw(sizeof(struct ath9k_htc_priv), &ath9k_htc_ops);
@@ -967,7 +968,10 @@ int ath9k_htc_probe_device(struct htc_target *htc_handle, struct device *dev,
 	return 0;
 
 err_init:
-	ath9k_deinit_wmi(priv);
+	ath9k_stop_wmi(priv);
+	hif_dev = (struct hif_device_usb *)htc_handle->hif_dev;
+	ath9k_hif_usb_dealloc_urbs(hif_dev);
+	ath9k_destoy_wmi(priv);
 err_free:
 	ieee80211_free_hw(hw);
 	return ret;
@@ -982,7 +986,7 @@ void ath9k_htc_disconnect_device(struct htc_target *htc_handle, bool hotunplug)
 			htc_handle->drv_priv->ah->ah_flags |= AH_UNPLUGGED;
 
 		ath9k_deinit_device(htc_handle->drv_priv);
-		ath9k_deinit_wmi(htc_handle->drv_priv);
+		ath9k_stop_wmi(htc_handle->drv_priv);
 		ieee80211_free_hw(htc_handle->drv_priv->hw);
 	}
 }
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c +3 -3
index 9cec5c216e1f..118e5550b10c 100644
@@ -999,9 +999,9 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,
 	 * which are not PHY_ERROR (short radar pulses have a length of 3)
 	 */
 	if (unlikely(!rs_datalen || (rs_datalen < 10 && !is_phyerr))) {
-		ath_warn(common,
-			 "Short RX data len, dropping (dlen: %d)\n",
-			 rs_datalen);
+		ath_dbg(common, ANY,
+			"Short RX data len, dropping (dlen: %d)\n",
+			rs_datalen);
 		goto rx_next;
 	}
 
drivers/net/wireless/ath/ath9k/htc_hst.c +3 -3
index d091c8ebdcf0..d2e062eaf561 100644
@@ -113,6 +113,9 @@ static void htc_process_conn_rsp(struct htc_target *target,
 
 	if (svc_rspmsg->status == HTC_SERVICE_SUCCESS) {
 		epid = svc_rspmsg->endpoint_id;
+		if (epid < 0 || epid >= ENDPOINT_MAX)
+			return;
+
 		service_id = be16_to_cpu(svc_rspmsg->service_id);
 		max_msglen = be16_to_cpu(svc_rspmsg->max_msg_len);
 		endpoint = &target->endpoint[epid];
@@ -170,7 +173,6 @@ static int htc_config_pipe_credits(struct htc_target *target)
 	time_left = wait_for_completion_timeout(&target->cmd_wait, HZ);
 	if (!time_left) {
 		dev_err(target->dev, "HTC credit config timeout\n");
-		kfree_skb(skb);
 		return -ETIMEDOUT;
 	}
 
@@ -206,7 +208,6 @@ static int htc_setup_complete(struct htc_target *target)
 	time_left = wait_for_completion_timeout(&target->cmd_wait, HZ);
 	if (!time_left) {
 		dev_err(target->dev, "HTC start timeout\n");
-		kfree_skb(skb);
 		return -ETIMEDOUT;
 	}
 
@@ -279,7 +280,6 @@ int htc_connect_service(struct htc_target *target,
 	if (!time_left) {
 		dev_err(target->dev, "Service connection timeout for: %d\n",
 			service_connreq->service_id);
-		kfree_skb(skb);
 		return -ETIMEDOUT;
 	}
 
drivers/net/wireless/ath/ath9k/wmi.c +4 -2
index cdc146091194..e7a3127395be 100644
@@ -112,14 +112,17 @@ struct wmi *ath9k_init_wmi(struct ath9k_htc_priv *priv)
 	return wmi;
 }
 
-void ath9k_deinit_wmi(struct ath9k_htc_priv *priv)
+void ath9k_stop_wmi(struct ath9k_htc_priv *priv)
 {
 	struct wmi *wmi = priv->wmi;
 
 	mutex_lock(&wmi->op_mutex);
 	wmi->stopped = true;
 	mutex_unlock(&wmi->op_mutex);
+}
 
+void ath9k_destoy_wmi(struct ath9k_htc_priv *priv)
+{
 	kfree(priv->wmi);
 }
 
@@ -336,7 +339,6 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,
 		ath_dbg(common, WMI, "Timeout waiting for WMI command: %s\n",
 			wmi_cmd_to_name(cmd_id));
 		mutex_unlock(&wmi->op_mutex);
-		kfree_skb(skb);
 		return -ETIMEDOUT;
 	}
 
drivers/net/wireless/ath/ath9k/wmi.h +2 -1
index 380175d5ecd7..d8b912206232 100644
@@ -179,7 +179,6 @@ struct wmi {
 };
 
 struct wmi *ath9k_init_wmi(struct ath9k_htc_priv *priv);
-void ath9k_deinit_wmi(struct ath9k_htc_priv *priv);
 int ath9k_wmi_connect(struct htc_target *htc, struct wmi *wmi,
 		      enum htc_endpoint_id *wmi_ctrl_epid);
 int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,
@@ -189,6 +188,8 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,
 void ath9k_wmi_event_tasklet(unsigned long data);
 void ath9k_fatal_work(struct work_struct *work);
 void ath9k_wmi_event_drain(struct ath9k_htc_priv *priv);
+void ath9k_stop_wmi(struct ath9k_htc_priv *priv);
+void ath9k_destoy_wmi(struct ath9k_htc_priv *priv);
 
 #define WMI_CMD(_wmi_cmd)						\
 	do {								\
drivers/pci/pci.c +2 -2
index 595fcf59843f..6d3234f75692 100644
@@ -4673,10 +4673,10 @@ static bool pcie_wait_for_link_delay(struct pci_dev *pdev, bool active,
 
 	/*
 	 * Some controllers might not implement link active reporting. In this
-	 * case, we wait for 1000 + 100 ms.
+	 * case, we wait for 1000 ms + any delay requested by the caller.
 	 */
 	if (!pdev->link_active_reporting) {
-		msleep(1100);
+		msleep(timeout + delay);
 		return true;
 	}
 
drivers/platform/x86/sony-laptop.c +29 -31

92 lines not on this page · raw message

drivers/remoteproc/remoteproc_core.c +1 -1
index e12a54e67588..be15aace9b3c 100644
@@ -517,7 +517,7 @@ static int rproc_handle_vdev(struct rproc *rproc, struct fw_rsc_vdev *rsc,
 
 	/* Initialise vdev subdevice */
 	snprintf(name, sizeof(name), "vdev%dbuffer", rvdev->index);
-	rvdev->dev.parent = rproc->dev.parent;
+	rvdev->dev.parent = &rproc->dev;
 	rvdev->dev.dma_pfn_offset = rproc->dev.parent->dma_pfn_offset;
 	rvdev->dev.release = rproc_rvdev_release;
 	dev_set_name(&rvdev->dev, "%s#%s", dev_name(rvdev->dev.parent), name);
drivers/remoteproc/remoteproc_virtio.c +12 -0
index e61d738d9b47..44187fe43677 100644
@@ -376,6 +376,18 @@ int rproc_add_virtio_dev(struct rproc_vdev *rvdev, int id)
 				goto out;
 			}
 		}
+	} else {
+		struct device_node *np = rproc->dev.parent->of_node;
+
+		/*
+		 * If we don't have dedicated buffer, just attempt to re-assign
+		 * the reserved memory from our parent. A default memory-region
+		 * at index 0 from the parent's memory-regions is assigned for
+		 * the rvdev dev to allocate from. Failure is non-critical and
+		 * the allocations will fall back to global pools, so don't
+		 * check return value either.
+		 */
+		of_reserved_mem_device_init_by_idx(dev, np, 0);
 	}
 
 	/* Allocate virtio device */
drivers/scsi/lpfc/lpfc_ct.c +0 -1
index 2aa578d20f8c..7fce73c39c1c 100644
@@ -462,7 +462,6 @@ lpfc_prep_node_fc4type(struct lpfc_vport *vport, uint32_t Did, uint8_t fc4_type)
 	struct lpfc_nodelist *ndlp;
 
 	if ((vport->port_type != LPFC_NPIV_PORT) ||
-	    (fc4_type == FC_TYPE_FCP) ||
 	    !(vport->ct_flags & FC_CT_RFF_ID) || !vport->cfg_restrict_login) {
 
 		ndlp = lpfc_setup_disc_node(vport, Did);
drivers/scsi/megaraid/megaraid_sas.h +2 -2
index 83d8c4cb1ad5..98827363bc49 100644
@@ -511,7 +511,7 @@ union MR_PROGRESS {
  */
 struct MR_PD_PROGRESS {
 	struct {
-#ifndef MFI_BIG_ENDIAN
+#ifndef __BIG_ENDIAN_BITFIELD
 		u32     rbld:1;
 		u32     patrol:1;
 		u32     clear:1;
@@ -537,7 +537,7 @@ struct MR_PD_PROGRESS {
 	};
 
 	struct {
-#ifndef MFI_BIG_ENDIAN
+#ifndef __BIG_ENDIAN_BITFIELD
 		u32     rbld:1;
 		u32     patrol:1;
 		u32     clear:1;
drivers/scsi/megaraid/megaraid_sas_fusion.c +6 -1
index b2ad96564484..03a6c86475c8 100644
@@ -4238,6 +4238,7 @@ void megasas_refire_mgmt_cmd(struct megasas_instance *instance,
 	struct fusion_context *fusion;
 	struct megasas_cmd *cmd_mfi;
 	union MEGASAS_REQUEST_DESCRIPTOR_UNION *req_desc;
+	struct MPI2_RAID_SCSI_IO_REQUEST *scsi_io_req;
 	u16 smid;
 	bool refire_cmd = 0;
 	u8 result;
@@ -4305,6 +4306,11 @@ void megasas_refire_mgmt_cmd(struct megasas_instance *instance,
 			result = COMPLETE_CMD;
 		}
 
+		scsi_io_req = (struct MPI2_RAID_SCSI_IO_REQUEST *)
+				cmd_fusion->io_request;
+		if (scsi_io_req->Function == MPI2_FUNCTION_SCSI_TASK_MGMT)
+			result = RETURN_CMD;
+
 		switch (result) {
 		case REFIRE_CMD:
 			megasas_fire_cmd_fusion(instance, req_desc);
@@ -4533,7 +4539,6 @@ megasas_issue_tm(struct megasas_instance *instance, u16 device_handle,
 	if (!timeleft) {
 		dev_err(&instance->pdev->dev,
 			"task mgmt type 0x%x timed out\n", type);
-		cmd_mfi->flags |= DRV_DCMD_SKIP_REFIRE;
 		mutex_unlock(&instance->reset_mutex);
 		rc = megasas_reset_fusion(instance->host, MFI_IO_TIMEOUT_OCR);
 		mutex_lock(&instance->reset_mutex);
drivers/scsi/megaraid/megaraid_sas_fusion.h +3 -3
index d57ecc7f88d8..30de4b01f703 100644
@@ -774,7 +774,7 @@ struct MR_SPAN_BLOCK_INFO {
 struct MR_CPU_AFFINITY_MASK {
 	union {
 		struct {
-#ifndef MFI_BIG_ENDIAN
+#ifndef __BIG_ENDIAN_BITFIELD
 		u8 hw_path:1;
 		u8 cpu0:1;
 		u8 cpu1:1;
@@ -866,7 +866,7 @@ struct MR_LD_RAID {
 	__le16     seqNum;
 
 struct {
-#ifndef MFI_BIG_ENDIAN
+#ifndef __BIG_ENDIAN_BITFIELD
 	u32 ldSyncRequired:1;
 	u32 regTypeReqOnReadIsValid:1;
 	u32 isEPD:1;
@@ -889,7 +889,7 @@ struct {
 	/* 0x30 - 0x33, Logical block size for the LD */
 	u32 logical_block_length;
 	struct {
-#ifndef MFI_BIG_ENDIAN
+#ifndef __BIG_ENDIAN_BITFIELD
 	/* 0x34, P_I_EXPONENT from READ CAPACITY 16 */
 	u32 ld_pi_exp:4;
 	/* 0x34, LOGICAL BLOCKS PER PHYSICAL
drivers/spi/spi-bcm-qspi.c +9 -11
index 23d295f36c80..c64be5e8fb8a 100644
@@ -670,7 +670,7 @@ static void read_from_hw(struct bcm_qspi *qspi, int slots)
 			if (buf)
 				buf[tp.byte] = read_rxram_slot_u8(qspi, slot);
 			dev_dbg(&qspi->pdev->dev, "RD %02x\n",
-				buf ? buf[tp.byte] : 0xff);
+				buf ? buf[tp.byte] : 0x0);
 		} else {
 			u16 *buf = tp.trans->rx_buf;
 
@@ -678,7 +678,7 @@ static void read_from_hw(struct bcm_qspi *qspi, int slots)
 				buf[tp.byte / 2] = read_rxram_slot_u16(qspi,
 								      slot);
 			dev_dbg(&qspi->pdev->dev, "RD %04x\n",
-				buf ? buf[tp.byte] : 0xffff);
+				buf ? buf[tp.byte / 2] : 0x0);
 		}
 
 		update_qspi_trans_byte_count(qspi, &tp,
@@ -733,13 +733,13 @@ static int write_to_hw(struct bcm_qspi *qspi, struct spi_device *spi)
 	while (!tstatus && slot < MSPI_NUM_CDRAM) {
 		if (tp.trans->bits_per_word <= 8) {
 			const u8 *buf = tp.trans->tx_buf;
-			u8 val = buf ? buf[tp.byte] : 0xff;
+			u8 val = buf ? buf[tp.byte] : 0x00;
 
 			write_txram_slot_u8(qspi, slot, val);
 			dev_dbg(&qspi->pdev->dev, "WR %02x\n", val);
 		} else {
 			const u16 *buf = tp.trans->tx_buf;
-			u16 val = buf ? buf[tp.byte / 2] : 0xffff;
+			u16 val = buf ? buf[tp.byte / 2] : 0x0000;
 
 			write_txram_slot_u16(qspi, slot, val);
 			dev_dbg(&qspi->pdev->dev, "WR %04x\n", val);
@@ -1222,6 +1222,11 @@ int bcm_qspi_probe(struct platform_device *pdev,
 	}
 
 	qspi = spi_master_get_devdata(master);
+
+	qspi->clk = devm_clk_get_optional(&pdev->dev, NULL);
+	if (IS_ERR(qspi->clk))
+		return PTR_ERR(qspi->clk);
+
 	qspi->pdev = pdev;
 	qspi->trans_pos.trans = NULL;
 	qspi->trans_pos.byte = 0;
@@ -1335,13 +1340,6 @@ int bcm_qspi_probe(struct platform_device *pdev,
 		qspi->soc_intc = NULL;
 	}
 
-	qspi->clk = devm_clk_get(&pdev->dev, NULL);
-	if (IS_ERR(qspi->clk)) {
-		dev_warn(dev, "unable to get clock\n");
-		ret = PTR_ERR(qspi->clk);
-		goto qspi_probe_err;
-	}
-
 	ret = clk_prepare_enable(qspi->clk);
 	if (ret) {
 		dev_err(dev, "failed to prepare clock\n");
drivers/spi/spi-bcm2835.c +3 -1
index 11c235879bb7..fd887a6492f4 100644
@@ -1347,7 +1347,7 @@ static int bcm2835_spi_probe(struct platform_device *pdev)
 		goto out_dma_release;
 	}
 
-	err = devm_spi_register_controller(&pdev->dev, ctlr);
+	err = spi_register_controller(ctlr);
 	if (err) {
 		dev_err(&pdev->dev, "could not register SPI controller: %d\n",
 			err);
@@ -1374,6 +1374,8 @@ static int bcm2835_spi_remove(struct platform_device *pdev)
 
 	bcm2835_debugfs_remove(bs);
 
+	spi_unregister_controller(ctlr);
+
 	/* Clear FIFOs, and disable the HW block */
 	bcm2835_wr(bs, BCM2835_SPI_CS,
 		   BCM2835_SPI_CS_CLEAR_RX | BCM2835_SPI_CS_CLEAR_TX);
drivers/spi/spi-bcm2835aux.c +3 -1
index a2162ff56a12..c331efd6e86b 100644
@@ -569,7 +569,7 @@ static int bcm2835aux_spi_probe(struct platform_device *pdev)
 		goto out_clk_disable;
 	}
 
-	err = devm_spi_register_master(&pdev->dev, master);
+	err = spi_register_master(master);
 	if (err) {
 		dev_err(&pdev->dev, "could not register SPI master: %d\n", err);
 		goto out_clk_disable;
@@ -593,6 +593,8 @@ static int bcm2835aux_spi_remove(struct platform_device *pdev)
 
 	bcm2835aux_debugfs_remove(bs);
 
+	spi_unregister_master(master);
+
 	bcm2835aux_spi_reset_hw(bs);
 
 	/* disable the HW block by releasing the clock */
drivers/spi/spi-dw.c +12 -2
index 31e3f866d11a..dbf9b8d5cebe 100644
@@ -128,12 +128,20 @@ void dw_spi_set_cs(struct spi_device *spi, bool enable)
 {
 	struct dw_spi *dws = spi_controller_get_devdata(spi->controller);
 	struct chip_data *chip = spi_get_ctldata(spi);
+	bool cs_high = !!(spi->mode & SPI_CS_HIGH);
 
 	/* Chip select logic is inverted from spi_set_cs() */
 	if (chip && chip->cs_control)
 		chip->cs_control(!enable);
 
-	if (!enable)
+	/*
+	 * DW SPI controller demands any native CS being set in order to
+	 * proceed with data transfer. So in order to activate the SPI
+	 * communications we must set a corresponding bit in the Slave
+	 * Enable register no matter whether the SPI core is configured to
+	 * support active-high or active-low CS level.
+	 */
+	if (cs_high == enable)
 		dw_writel(dws, DW_SPI_SER, BIT(spi->chip_select));
 	else if (dws->cs_override)
 		dw_writel(dws, DW_SPI_SER, 0);
@@ -526,7 +534,7 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws)
 		}
 	}
 
-	ret = devm_spi_register_controller(dev, master);
+	ret = spi_register_controller(master);
 	if (ret) {
 		dev_err(&master->dev, "problem registering spi master\n");
 		goto err_dma_exit;
@@ -550,6 +558,8 @@ void dw_spi_remove_host(struct dw_spi *dws)
 {
 	dw_spi_debugfs_remove(dws);
 
+	spi_unregister_controller(dws->master);
+
 	if (dws->dma_ops && dws->dma_ops->dma_exit)
 		dws->dma_ops->dma_exit(dws);
 
drivers/spi/spi-pxa2xx.c +3 -2
index 73d2a65d0b6e..f6e87344a36c 100644
@@ -1884,7 +1884,7 @@ static int pxa2xx_spi_probe(struct platform_device *pdev)
 
 	/* Register with the SPI framework */
 	platform_set_drvdata(pdev, drv_data);
-	status = devm_spi_register_controller(&pdev->dev, controller);
+	status = spi_register_controller(controller);
 	if (status != 0) {
 		dev_err(&pdev->dev, "problem registering spi controller\n");
 		goto out_error_pm_runtime_enabled;
@@ -1893,7 +1893,6 @@ static int pxa2xx_spi_probe(struct platform_device *pdev)
 	return status;
 
 out_error_pm_runtime_enabled:
-	pm_runtime_put_noidle(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
 
 out_error_clock_enabled:
@@ -1916,6 +1915,8 @@ static int pxa2xx_spi_remove(struct platform_device *pdev)
 
 	pm_runtime_get_sync(&pdev->dev);
 
+	spi_unregister_controller(drv_data->controller);
+
 	/* Disable the SSP at the peripheral and SOC level */
 	pxa2xx_spi_write(drv_data, SSCR0, 0);
 	clk_disable_unprepare(ssp->clk);
drivers/spi/spi.c +2 -1
index c92c89467e7e..7067e4c44400 100644
@@ -2760,6 +2760,8 @@ void spi_unregister_controller(struct spi_controller *ctlr)
 	struct spi_controller *found;
 	int id = ctlr->bus_num;
 
+	device_for_each_child(&ctlr->dev, NULL, __unregister);
+
 	/* First make sure that this controller was ever added */
 	mutex_lock(&board_lock);
 	found = idr_find(&spi_master_idr, id);
@@ -2772,7 +2774,6 @@ void spi_unregister_controller(struct spi_controller *ctlr)
 	list_del(&ctlr->list);
 	mutex_unlock(&board_lock);
 
-	device_for_each_child(&ctlr->dev, NULL, __unregister);
 	device_unregister(&ctlr->dev);
 	/* free bus id */
 	mutex_lock(&board_lock);
drivers/staging/mt7621-pci/pci-mt7621.c +10 -2
index f58e3a51fc71..b9d460a9c041 100644
@@ -502,17 +502,25 @@ static void mt7621_pcie_init_ports(struct mt7621_pcie *pcie)
 
 	mt7621_pcie_reset_ep_deassert(pcie);
 
+	tmp = NULL;
 	list_for_each_entry(port, &pcie->ports, list) {
 		u32 slot = port->slot;
 
 		if (!mt7621_pcie_port_is_linkup(port)) {
 			dev_err(dev, "pcie%d no card, disable it (RST & CLK)\n",
 				slot);
-			if (slot != 1)
-				phy_power_off(port->phy);
 			mt7621_control_assert(port);
 			mt7621_pcie_port_clk_disable(port);
 			port->enabled = false;
+
+			if (slot == 0) {
+				tmp = port;
+				continue;
+			}
+
+			if (slot == 1 && tmp && !tmp->enabled)
+				phy_power_off(tmp->phy);
+
 		}
 	}
 }
drivers/staging/wfx/main.c +0 -1
index 3c4c240229ad..8f19bd0fd2a1 100644
@@ -466,7 +466,6 @@ int wfx_probe(struct wfx_dev *wdev)
 
 err2:
 	ieee80211_unregister_hw(wdev->hw);
-	ieee80211_free_hw(wdev->hw);
 err1:
 	wfx_bh_unregister(wdev);
 	return err;
drivers/tty/serial/amba-pl011.c +1 -0
index 2296bb0f9578..458fc3d9d48c 100644
@@ -2575,6 +2575,7 @@ static int pl011_setup_port(struct device *dev, struct uart_amba_port *uap,
 	uap->port.has_sysrq = IS_ENABLED(CONFIG_SERIAL_AMBA_PL011_CONSOLE);
 	uap->port.flags = UPF_BOOT_AUTOCONF;
 	uap->port.line = index;
+	spin_lock_init(&uap->port.lock);
 
 	amba_ports[index] = uap;
 
drivers/tty/serial/imx.c +3 -0
index f4d68109bc8b..d5979a8bdc40 100644
@@ -2398,6 +2398,9 @@ static int imx_uart_probe(struct platform_device *pdev)
 		}
 	}
 
+	/* We need to initialize lock even for non-registered console */
+	spin_lock_init(&sport->port.lock);
+
 	imx_uart_ports[sport->port.line] = sport;
 
 	platform_set_drvdata(pdev, sport);
drivers/video/fbdev/vt8500lcdfb.c +1 -0
index f744479dc7df..c61476247ba8 100644
@@ -230,6 +230,7 @@ static int vt8500lcd_blank(int blank, struct fb_info *info)
 		    info->fix.visual == FB_VISUAL_STATIC_PSEUDOCOLOR)
 			for (i = 0; i < 256; i++)
 				vt8500lcd_setcolreg(i, 0, 0, 0, 0, info);
+		fallthrough;
 	case FB_BLANK_UNBLANK:
 		if (info->fix.visual == FB_VISUAL_PSEUDOCOLOR ||
 		    info->fix.visual == FB_VISUAL_STATIC_PSEUDOCOLOR)
drivers/video/fbdev/w100fb.c +2 -0
index 2d6e2738b792..d96ab28f8ce4 100644
@@ -588,6 +588,7 @@ static void w100fb_restore_vidmem(struct w100fb_par *par)
 		memsize=par->mach->mem->size;
 		memcpy_toio(remapped_fbuf + (W100_FB_BASE-MEM_WINDOW_BASE), par->saved_extmem, memsize);
 		vfree(par->saved_extmem);
+		par->saved_extmem = NULL;
 	}
 	if (par->saved_intmem) {
 		memsize=MEM_INT_SIZE;
@@ -596,6 +597,7 @@ static void w100fb_restore_vidmem(struct w100fb_par *par)
 		else
 			memcpy_toio(remapped_fbuf + (W100_FB_BASE-MEM_WINDOW_BASE), par->saved_intmem, memsize);
 		vfree(par->saved_intmem);
+		par->saved_intmem = NULL;
 	}
 }
 
drivers/watchdog/imx_sc_wdt.c +5 -0
index 60a32469f7de..e9ee22a7cb45 100644
@@ -175,6 +175,11 @@ static int imx_sc_wdt_probe(struct platform_device *pdev)
 	wdog->timeout = DEFAULT_TIMEOUT;
 
 	watchdog_init_timeout(wdog, 0, dev);
+
+	ret = imx_sc_wdt_set_timeout(wdog, wdog->timeout);
+	if (ret)
+		return ret;
+
 	watchdog_stop_on_reboot(wdog);
 	watchdog_stop_on_unregister(wdog);
 
drivers/xen/pvcalls-back.c +2 -1
index cf4ce3e9358d..41a18ece029a 100644
@@ -1088,7 +1088,8 @@ static void set_backend_state(struct xenbus_device *dev,
 		case XenbusStateInitialised:
 			switch (state) {
 			case XenbusStateConnected:
-				backend_connect(dev);
+				if (backend_connect(dev))
+					return;
 				xenbus_switch_state(dev, XenbusStateConnected);
 				break;
 			case XenbusStateClosing:
fs/aio.c +8 -0
index 5f3d3d814928..6483f9274d5e 100644
@@ -176,6 +176,7 @@ struct fsync_iocb {
 	struct file		*file;
 	struct work_struct	work;
 	bool			datasync;
+	struct cred		*creds;
 };
 
 struct poll_iocb {
@@ -1589,8 +1590,11 @@ static int aio_write(struct kiocb *req, const struct iocb *iocb,
 static void aio_fsync_work(struct work_struct *work)
 {
 	struct aio_kiocb *iocb = container_of(work, struct aio_kiocb, fsync.work);
+	const struct cred *old_cred = override_creds(iocb->fsync.creds);
 
 	iocb->ki_res.res = vfs_fsync(iocb->fsync.file, iocb->fsync.datasync);
+	revert_creds(old_cred);
+	put_cred(iocb->fsync.creds);
 	iocb_put(iocb);
 }
 
@@ -1604,6 +1608,10 @@ static int aio_fsync(struct fsync_iocb *req, const struct iocb *iocb,
 	if (unlikely(!req->file->f_op->fsync))
 		return -EINVAL;
 
+	req->creds = prepare_creds();
+	if (!req->creds)
+		return -ENOMEM;
+
 	req->datasync = datasync;
 	INIT_WORK(&req->work, aio_fsync_work);
 	schedule_work(&req->work);
fs/cifs/cifsfs.c +1 -1
index c31f362fa098..e4a6d9d10b92 100644
@@ -621,7 +621,7 @@ cifs_show_options(struct seq_file *s, struct dentry *root)
 	seq_printf(s, ",actimeo=%lu", cifs_sb->actimeo / HZ);
 
 	if (tcon->ses->chan_max > 1)
-		seq_printf(s, ",multichannel,max_channel=%zu",
+		seq_printf(s, ",multichannel,max_channels=%zu",
 			   tcon->ses->chan_max);
 
 	return 0;
fs/cifs/smb2pdu.c +3 -1
index b30aa3cdd845..cdad4d933bce 100644
@@ -2922,7 +2922,9 @@ SMB2_ioctl_init(struct cifs_tcon *tcon, struct smb_rqst *rqst,
 	 * response size smaller.
 	 */
 	req->MaxOutputResponse = cpu_to_le32(max_response_size);
-
+	req->sync_hdr.CreditCharge =
+		cpu_to_le16(DIV_ROUND_UP(max(indatalen, max_response_size),
+					 SMB2_MAX_BUFFER_SIZE));
 	if (is_fsctl)
 		req->Flags = cpu_to_le32(SMB2_0_IOCTL_IS_FSCTL);
 	else
fs/exfat/file.c +4 -4
index c9db8eb0cfc3..5b4ddff18731 100644
@@ -170,11 +170,11 @@ int __exfat_truncate(struct inode *inode, loff_t new_size)
 
 		/* File size should be zero if there is no cluster allocated */
 		if (ei->start_clu == EXFAT_EOF_CLUSTER) {
-			ep->dentry.stream.valid_size = 0;
-			ep->dentry.stream.size = 0;
+			ep2->dentry.stream.valid_size = 0;
+			ep2->dentry.stream.size = 0;
 		} else {
-			ep->dentry.stream.valid_size = cpu_to_le64(new_size);
-			ep->dentry.stream.size = ep->dentry.stream.valid_size;
+			ep2->dentry.stream.valid_size = cpu_to_le64(new_size);
+			ep2->dentry.stream.size = ep->dentry.stream.valid_size;
 		}
 
 		if (new_size == 0) {
fs/exfat/super.c +8 -4
index a846ff555656..c1b1ed306a48 100644
@@ -273,9 +273,8 @@ static int exfat_parse_param(struct fs_context *fc, struct fs_parameter *param)
 		break;
 	case Opt_charset:
 		exfat_free_iocharset(sbi);
-		opts->iocharset = kstrdup(param->string, GFP_KERNEL);
-		if (!opts->iocharset)
-			return -ENOMEM;
+		opts->iocharset = param->string;
+		param->string = NULL;
 		break;
 	case Opt_errors:
 		opts->errors = result.uint_32;
@@ -630,7 +629,12 @@ static int exfat_get_tree(struct fs_context *fc)
 
 static void exfat_free(struct fs_context *fc)
 {
-	kfree(fc->s_fs_info);
+	struct exfat_sb_info *sbi = fc->s_fs_info;
+
+	if (sbi) {
+		exfat_free_iocharset(sbi);
+		kfree(sbi);
+	}
 }
 
 static const struct fs_context_operations exfat_context_ops = {
fs/fat/inode.c +6 -0
index 71946da84388..bf8e04e25f35 100644
@@ -1520,6 +1520,12 @@ static int fat_read_bpb(struct super_block *sb, struct fat_boot_sector *b,
 		goto out;
 	}
 
+	if (bpb->fat_fat_length == 0 && bpb->fat32_length == 0) {
+		if (!silent)
+			fat_msg(sb, KERN_ERR, "bogus number of FAT sectors");
+		goto out;
+	}
+
 	error = 0;
 
 out:
fs/io_uring.c +17 -7
index bb25e3997d41..f071505e3430 100644
@@ -2038,6 +2038,10 @@ static bool io_file_supports_async(struct file *file, int rw)
 	if (S_ISREG(mode) && file->f_op != &io_uring_fops)
 		return true;
 
+	/* any ->read/write should understand O_NONBLOCK */
+	if (file->f_flags & O_NONBLOCK)
+		return true;
+
 	if (!(file->f_mode & FMODE_NOWAIT))
 		return false;
 

Lines of this file are not shown. View the raw message.

fs/nilfs2/segment.c +2 -0
index 445eef41bfaf..91b58c897f92 100644

Lines of this file are not shown. View the raw message.

fs/notify/fanotify/fanotify.c +4 -1
index c18459cea6f4..29a9de57c34c 100644

Lines of this file are not shown. View the raw message.

fs/overlayfs/copy_up.c +1 -1
index 9709cf22cab3..07e0d1961e96 100644

Lines of this file are not shown. View the raw message.

fs/overlayfs/overlayfs.h +3 -0
index e6f3670146ed..64039f36c54d 100644

Lines of this file are not shown. View the raw message.

fs/proc/inode.c +1 -1
index fb4cace9ea41..8f507f9f6d3a 100644

Lines of this file are not shown. View the raw message.

fs/proc/self.c +1 -1
index 57c0a1047250..32af065397f8 100644

Lines of this file are not shown. View the raw message.

fs/proc/thread_self.c +1 -1
index f61ae53533f5..fac9e50b33a6 100644

Lines of this file are not shown. View the raw message.

include/linux/elfnote.h +1 -1
index 594d4e78654f..69b136e4dd2b 100644

Lines of this file are not shown. View the raw message.

include/linux/kvm_host.h +2 -2
index 131cc1527d68..92efa39ea3d7 100644

Lines of this file are not shown. View the raw message.

include/linux/mm.h +1 -0
index f3fe7371855c..465e8ad671f8 100644

Lines of this file are not shown. View the raw message.

include/linux/padata.h +4 -2
index a0d8b41850b2..693cae9bfe66 100644

Lines of this file are not shown. View the raw message.

include/linux/ptdump.h +1 -0
index a67065c403c3..ac01502763bf 100644

Lines of this file are not shown. View the raw message.

include/linux/set_memory.h +1 -1
index 86281ac7c305..860e0f843c12 100644

Lines of this file are not shown. View the raw message.

include/media/videobuf2-dma-contig.h +1 -1
index 5604818d137e..5be313cbf7d7 100644

Lines of this file are not shown. View the raw message.

include/net/inet_hashtables.h +6 -0
index ad64ba6a057f..92560974ea67 100644

Lines of this file are not shown. View the raw message.

kernel/events/core.c +14 -9
index 633b4ae72ed5..1dd91f960839 100644

Lines of this file are not shown. View the raw message.

kernel/padata.c +8 -6
index a6afa12fb75e..aae789896616 100644

Lines of this file are not shown. View the raw message.

lib/bitmap.c +7 -2
index 89260aa342d6..972eb01f4d0b 100644

Lines of this file are not shown. View the raw message.

lib/lzo/lzo1x_compress.c +13 -0
index 717c940112f9..8ad5ba2b86e2 100644

Lines of this file are not shown. View the raw message.

mm/gup.c +38 -6

44 lines not on this page · raw message

mm/huge_memory.c +3 -4
index 6ecd1045113b..11fe0b4dbe67 100644

Lines of this file are not shown. View the raw message.

mm/ptdump.c +16 -1
index 26208d0d03b7..f4ce916f5602 100644

Lines of this file are not shown. View the raw message.

mm/slab_common.c +2 -1
index 23c7500eea7d..9e72ba224175 100644

Lines of this file are not shown. View the raw message.

mm/slub.c +3 -1
index b762450fc9f0..63bd39c47643 100644

Lines of this file are not shown. View the raw message.

mm/util.c +18 -0
index 988d11e6c17c..dc1c877d5481 100644

Lines of this file are not shown. View the raw message.

net/bridge/br_arp_nd_proxy.c +4 -0
index 37908561a64b..b18cdf03edb3 100644

Lines of this file are not shown. View the raw message.

net/dccp/proto.c +5 -2
index 4af8a98fe784..c13b6609474b 100644

Lines of this file are not shown. View the raw message.

net/ipv6/ipv6_sockglue.c +7 -6
index 18d05403d3b5..5af97b4f5df3 100644

Lines of this file are not shown. View the raw message.

net/mptcp/options.c +2 -0
index 7793b6011fa7..1c20dd14b2aa 100644

Lines of this file are not shown. View the raw message.

net/mptcp/protocol.c +24 -21

45 lines not on this page · raw message

net/mptcp/subflow.c +1 -0
index 8968b2c065e7..e6feb05a93dc 100644

Lines of this file are not shown. View the raw message.

net/netlink/genetlink.c +58 -36

94 lines not on this page · raw message

net/sched/sch_generic.c +1 -0
index 2efd5b61acef..9763da6daa9f 100644

Lines of this file are not shown. View the raw message.

net/tipc/msg.c +2 -2
index 4d0e0bdd997b..3ad411884e6c 100644

Lines of this file are not shown. View the raw message.

security/keys/internal.h +0 -11
index 6d0ca48ae9a5..153d35c20d3d 100644

Lines of this file are not shown. View the raw message.

security/keys/keyctl.c +5 -11
index 5e01192e222a..edde63a63007 100644

Lines of this file are not shown. View the raw message.

security/smack/smack.h +0 -6
index 62529f382942..335d2411abe4 100644

Lines of this file are not shown. View the raw message.

security/smack/smack_lsm.c +8 -17
index 8c61d175e195..14bf2f4aea3b 100644

Lines of this file are not shown. View the raw message.

security/smack/smackfs.c +10 -0
index e3e05c04dbd1..c21b656b3263 100644

Lines of this file are not shown. View the raw message.

sound/core/pcm_native.c +18 -2
index aef860256278..eeab8850ed76 100644

Lines of this file are not shown. View the raw message.

sound/firewire/fireface/ff-protocol-latter.c +6 -6
index 0e4c3a9ed5e4..76ae568489ef 100644

Lines of this file are not shown. View the raw message.

sound/firewire/fireface/ff-stream.c +1 -9
index 63b79c4a5405..5452115c0ef9 100644

Lines of this file are not shown. View the raw message.

sound/isa/es1688/es1688.c +3 -1
index ff3a05ad99c0..64610571a5e1 100644

Lines of this file are not shown. View the raw message.

sound/pci/hda/hda_intel.c +3 -0
index 0310193ea1bd..41a03c61a74b 100644

Lines of this file are not shown. View the raw message.

sound/pci/hda/patch_realtek.c +6 -0
index e62d58872b6e..2c4575909441 100644

Lines of this file are not shown. View the raw message.

sound/soc/codecs/max9867.c +2 -2
index 8600c5439e1e..2e4aa23b5a60 100644

Lines of this file are not shown. View the raw message.

sound/soc/codecs/tlv320adcx140.c +3 -3
index 38897568ee96..0f713efde046 100644

Lines of this file are not shown. View the raw message.

sound/usb/card.c +12 -7
index fd6fd1726ea0..359f7a04be1c 100644

Lines of this file are not shown. View the raw message.

sound/usb/quirks-table.h +20 -0
index eb89902a83be..0bf370d89556 100644

Lines of this file are not shown. View the raw message.

sound/usb/usbaudio.h +1 -1
index 1c892c7f14d7..e0ebfb25fbd5 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/probe-event.c +1 -2
index eea132f512b0..c6bcf5709564 100644

Lines of this file are not shown. View the raw message.

tools/testing/selftests/ftrace/test.d/ftrace/tracing-error-log.tc +2 -0
index 021c03fd885d..23465823532b 100644

Lines of this file are not shown. View the raw message.

tools/testing/selftests/net/rxtimestamp.c +1 -0
index 6dee9e636a95..422e7761254d 100644

Lines of this file are not shown. View the raw message.

tools/testing/selftests/tc-testing/tc-tests/filters/tests.json +3 -3
index 8877f7b2b809..12aa4bc1f6a0 100644

Lines of this file are not shown. View the raw message.

tools/testing/selftests/tc-testing/tdc_batch.py +3 -3
index 6a2bd2cf528e..995f66ce43eb 100755

Lines of this file are not shown. View the raw message.

virt/kvm/arm/aarch32.c +28 -0
index 0a356aa91aa1..40a62a99fbf8 100644

Lines of this file are not shown. View the raw message.

virt/kvm/arm/arm.c +17 -1
index 48d0ec44ad77..3d7e8fdeebcd 100644

Lines of this file are not shown. View the raw message.

virt/kvm/kvm_main.c +16 -10
index 731c1e517716..77aa91fb08d2 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.

#2 lore raw
In reply to Greg Kroah-Hartman

Am Mi., 17. Juni 2020 um 18:13 Uhr schrieb Greg Kroah-Hartman <[email protected]>:

Quoted 3 lines

I'm announcing the release of the 5.7.3 kernel.

Hello Greg,

Quoted 7 lines

Qiujun Huang (5):
ath9k: Fix use-after-free Read in htc_connect_service
ath9k: Fix use-after-free Read in ath9k_wmi_ctrl_rx
ath9k: Fix use-after-free Write in ath9k_htc_rx_msg
ath9x: Fix stack-out-of-bounds Write in ath9k_hif_usb_rx_cb
ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb

We got a report on IRC about 5.7.3+ breaking a USB ath9k Wifi Dongle, while working fine on <5.7.3.

I don't have myself such HW, and the reported doesn't have any experience in bisecting the kernel, so we build kernels, each with one of the above commits reverted,
to find the bad commit.

The winner is:

commit 6602f080cb28745259e2fab1a4cf55eeb5894f93

Author: Qiujun Huang <[email protected]>
Date:   Sat Apr 4 12:18:38 2020 +0800

ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb

commit 2bbcaaee1fcbd83272e29f31e2bb7e70d8c49e05 upstream.
...

Reverting this one fixed his problem.

I don't have so much info about the HW, besides a dmesg showing the phy breaking.
I also added the reporter to CC too.

https://gist.github.com/AngryPenguinPL/1e545f0da3c2339e443b9e5044fcccea

If you need more info, please let me know and I'll try my best to get it as fast as possible for you.

Best Regards,

Gabriel C

#3 lore raw

ath9k broken [was: Linux 5.7.3]

Quoted 30 lines · Gabriel C

Am Mi., 17. Juni 2020 um 18:13 Uhr schrieb Greg Kroah-Hartman <[email protected]>:

Quoted 3 lines

I'm announcing the release of the 5.7.3 kernel.

Hello Greg,

Quoted 7 lines

Qiujun Huang (5):
ath9k: Fix use-after-free Read in htc_connect_service
ath9k: Fix use-after-free Read in ath9k_wmi_ctrl_rx
ath9k: Fix use-after-free Write in ath9k_htc_rx_msg
ath9x: Fix stack-out-of-bounds Write in ath9k_hif_usb_rx_cb
ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb

We got a report on IRC about 5.7.3+ breaking a USB ath9k Wifi Dongle, while working fine on <5.7.3.

I don't have myself such HW, and the reported doesn't have any experience in bisecting the kernel, so we build kernels, each with one of the above commits reverted,
to find the bad commit.

The winner is:

commit 6602f080cb28745259e2fab1a4cf55eeb5894f93

Author: Qiujun Huang <[email protected]>
Date:   Sat Apr 4 12:18:38 2020 +0800
Quoted 6 lines

ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb

commit 2bbcaaee1fcbd83272e29f31e2bb7e70d8c49e05 upstream.
...

Reverting this one fixed his problem.

Obvious question: is 5.8-rc1 (containing the commit) broken too?

I fail to see how the commit could cause an issue like this. Is this really reproducibly broken with the commit and irreproducible without it? As it looks like a USB/wiring problem:
usb 1-2: USB disconnect, device number 2
ath: phy0: Reading Magic # failed
ath: phy0: Unable to initialize hardware; initialization status: -5
...
usb 1-2: device descriptor read/64, error -110
usb 1-2: device descriptor read/64, error -71

Ccing ath9k maintainers too.

Quoted 8 lines

I don't have so much info about the HW, besides a dmesg showing the phy breaking.
I also added the reporter to CC too.

https://gist.github.com/AngryPenguinPL/1e545f0da3c2339e443b9e5044fcccea

If you need more info, please let me know and I'll try my best to get it as fast as possible for you.

thanks,

Signature · 1 line
js
#4 lore raw

Re: ath9k broken [was: Linux 5.7.3]

Am Do., 25. Juni 2020 um 06:57 Uhr schrieb Jiri Slaby <[email protected]>:

Quoted 32 lines · Gabriel C
Quoted 30 lines

Am Mi., 17. Juni 2020 um 18:13 Uhr schrieb Greg Kroah-Hartman <[email protected]>:

Quoted 3 lines

I'm announcing the release of the 5.7.3 kernel.

Hello Greg,

Quoted 7 lines

Qiujun Huang (5):
ath9k: Fix use-after-free Read in htc_connect_service
ath9k: Fix use-after-free Read in ath9k_wmi_ctrl_rx
ath9k: Fix use-after-free Write in ath9k_htc_rx_msg
ath9x: Fix stack-out-of-bounds Write in ath9k_hif_usb_rx_cb
ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb

We got a report on IRC about 5.7.3+ breaking a USB ath9k Wifi Dongle, while working fine on <5.7.3.

I don't have myself such HW, and the reported doesn't have any experience in bisecting the kernel, so we build kernels, each with one of the above commits reverted,
to find the bad commit.

The winner is:

commit 6602f080cb28745259e2fab1a4cf55eeb5894f93

Author: Qiujun Huang <[email protected]>
Date:   Sat Apr 4 12:18:38 2020 +0800
Quoted 8 lines
Quoted 6 lines

ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb

commit 2bbcaaee1fcbd83272e29f31e2bb7e70d8c49e05 upstream.
...

Reverting this one fixed his problem.

Obvious question: is 5.8-rc1 (containing the commit) broken too?

Yes, it does, just checked.

git tag --contains 2bbcaaee1fcbd83272e29f31e2bb7e70d8c49e05 v5.8-rc1
v5.8-rc2

Quoted 4 lines

I fail to see how the commit could cause an issue like this. Is this really reproducibly broken with the commit and irreproducible without it?

I can't see something obvious wrong either, but yes it's reproducible on his HW. Kernel with this commit breaks the dongle, with the commit reverted it works.

Quoted 8 lines

As it looks like a USB/wiring problem:
usb 1-2: USB disconnect, device number 2
ath: phy0: Reading Magic # failed
ath: phy0: Unable to initialize hardware; initialization status: -5
...
usb 1-2: device descriptor read/64, error -110
usb 1-2: device descriptor read/64, error -71

Quoted 11 lines

Ccing ath9k maintainers too.

Quoted 8 lines

I don't have so much info about the HW, besides a dmesg showing the phy breaking.
I also added the reporter to CC too.

https://gist.github.com/AngryPenguinPL/1e545f0da3c2339e443b9e5044fcccea

If you need more info, please let me know and I'll try my best to get it as fast as possible for you.

Best Regards,

Gabriel C

#5 lore raw

Re: ath9k broken [was: Linux 5.7.3]

Am Do., 25. Juni 2020 um 12:48 Uhr schrieb Gabriel C <[email protected]>:

Quoted 41 lines

Am Do., 25. Juni 2020 um 06:57 Uhr schrieb Jiri Slaby <[email protected]>:

Quoted 39 lines · Gabriel C
Quoted 36 lines

Am Mi., 17. Juni 2020 um 18:13 Uhr schrieb Greg Kroah-Hartman <[email protected]>:

Quoted 3 lines

I'm announcing the release of the 5.7.3 kernel.

Hello Greg,

Quoted 7 lines

Qiujun Huang (5):
ath9k: Fix use-after-free Read in htc_connect_service
ath9k: Fix use-after-free Read in ath9k_wmi_ctrl_rx
ath9k: Fix use-after-free Write in ath9k_htc_rx_msg
ath9x: Fix stack-out-of-bounds Write in ath9k_hif_usb_rx_cb
ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb

We got a report on IRC about 5.7.3+ breaking a USB ath9k Wifi Dongle, while working fine on <5.7.3.

I don't have myself such HW, and the reported doesn't have any experience in bisecting the kernel, so we build kernels, each with one of the above commits reverted,
to find the bad commit.

The winner is:

commit 6602f080cb28745259e2fab1a4cf55eeb5894f93

Author: Qiujun Huang <[email protected]>
Date:   Sat Apr 4 12:18:38 2020 +0800

ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb

commit 2bbcaaee1fcbd83272e29f31e2bb7e70d8c49e05 upstream.
...

Reverting this one fixed his problem.

Quoted 8 lines
Quoted 1 line

Obvious question: is 5.8-rc1 (containing the commit) broken too?

Yes, it does, just checked.

git tag --contains 2bbcaaee1fcbd83272e29f31e2bb7e70d8c49e05 v5.8-rc1
v5.8-rc2

Sorry, I read the wrong, I just woke up.

We didn't test 5.8-rc{1,2} yet but we will today and let you know.

Quoted 31 lines
Quoted 4 lines

I fail to see how the commit could cause an issue like this. Is this really reproducibly broken with the commit and irreproducible without it?

I can't see something obvious wrong either, but yes it's reproducible on his HW. Kernel with this commit breaks the dongle, with the commit reverted it works.

Quoted 8 lines

As it looks like a USB/wiring problem:
usb 1-2: USB disconnect, device number 2
ath: phy0: Reading Magic # failed
ath: phy0: Unable to initialize hardware; initialization status: -5
...
usb 1-2: device descriptor read/64, error -110
usb 1-2: device descriptor read/64, error -71

Quoted 11 lines

Ccing ath9k maintainers too.

Quoted 8 lines

I don't have so much info about the HW, besides a dmesg showing the phy breaking.
I also added the reporter to CC too.

https://gist.github.com/AngryPenguinPL/1e545f0da3c2339e443b9e5044fcccea

If you need more info, please let me know and I'll try my best to get it as fast as possible for you.

Best Regards,

Gabriel C

#6 lore raw

Re: ath9k broken [was: Linux 5.7.3]

Am Do., 25. Juni 2020 um 12:52 Uhr schrieb Gabriel C <[email protected]>:

Quoted 48 lines

Am Do., 25. Juni 2020 um 12:48 Uhr schrieb Gabriel C <[email protected]>:

Quoted 45 lines

Am Do., 25. Juni 2020 um 06:57 Uhr schrieb Jiri Slaby <[email protected]>:

Quoted 32 lines · Gabriel C
Quoted 30 lines

Am Mi., 17. Juni 2020 um 18:13 Uhr schrieb Greg Kroah-Hartman <[email protected]>:

Quoted 3 lines

I'm announcing the release of the 5.7.3 kernel.

Hello Greg,

Quoted 7 lines

Qiujun Huang (5):
ath9k: Fix use-after-free Read in htc_connect_service
ath9k: Fix use-after-free Read in ath9k_wmi_ctrl_rx
ath9k: Fix use-after-free Write in ath9k_htc_rx_msg
ath9x: Fix stack-out-of-bounds Write in ath9k_hif_usb_rx_cb
ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb

We got a report on IRC about 5.7.3+ breaking a USB ath9k Wifi Dongle, while working fine on <5.7.3.

I don't have myself such HW, and the reported doesn't have any experience in bisecting the kernel, so we build kernels, each with one of the above commits reverted,
to find the bad commit.

The winner is:

commit 6602f080cb28745259e2fab1a4cf55eeb5894f93

Author: Qiujun Huang <[email protected]>
Date:   Sat Apr 4 12:18:38 2020 +0800
Quoted 8 lines
Quoted 6 lines

ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb

commit 2bbcaaee1fcbd83272e29f31e2bb7e70d8c49e05 upstream.
...

Reverting this one fixed his problem.

Obvious question: is 5.8-rc1 (containing the commit) broken too?

Yes, it does, just checked.

Quoted 9 lines
Quoted 4 lines

git tag --contains 2bbcaaee1fcbd83272e29f31e2bb7e70d8c49e05 v5.8-rc1
v5.8-rc2

Sorry, I read the wrong, I just woke up.

We didn't test 5.8-rc{1,2} yet but we will today and let you know.

We tested 5.8-rc2 and it is broken too.

The exact HW name is:

TP-link tl-wn722n (Atheros AR9271 chip)

Quoted 22 lines
Quoted 22 lines
Quoted 4 lines

I fail to see how the commit could cause an issue like this. Is this really reproducibly broken with the commit and irreproducible without it?

I can't see something obvious wrong either, but yes it's reproducible on his HW. Kernel with this commit breaks the dongle, with the commit reverted it works.

Quoted 14 lines

As it looks like a USB/wiring problem:
usb 1-2: USB disconnect, device number 2
ath: phy0: Reading Magic # failed
ath: phy0: Unable to initialize hardware; initialization status: -5
...
usb 1-2: device descriptor read/64, error -110
usb 1-2: device descriptor read/64, error -71

Ccing ath9k maintainers too.

Quoted 4 lines

I don't have so much info about the HW, besides a dmesg showing the phy breaking.
I also added the reporter to CC too.

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

https://gist.github.com/AngryPenguinPL/1e545f0da3c2339e443b9e5044fcccea

If you need more info, please let me know and I'll try my best to get it as fast as possible for you.

Best Regards,

Gabriel C

author maintainer
#7 lore raw

Re: ath9k broken [was: Linux 5.7.3]

Quoted 57 lines · Gabriel C

Am Do., 25. Juni 2020 um 12:52 Uhr schrieb Gabriel C <[email protected]>:

Quoted 55 lines

Am Do., 25. Juni 2020 um 12:48 Uhr schrieb Gabriel C <[email protected]>:

Quoted 41 lines

Am Do., 25. Juni 2020 um 06:57 Uhr schrieb Jiri Slaby <[email protected]>:

Quoted 39 lines · Gabriel C
Quoted 36 lines

Am Mi., 17. Juni 2020 um 18:13 Uhr schrieb Greg Kroah-Hartman <[email protected]>:

Quoted 3 lines

I'm announcing the release of the 5.7.3 kernel.

Hello Greg,

Quoted 7 lines

Qiujun Huang (5):
ath9k: Fix use-after-free Read in htc_connect_service
ath9k: Fix use-after-free Read in ath9k_wmi_ctrl_rx
ath9k: Fix use-after-free Write in ath9k_htc_rx_msg
ath9x: Fix stack-out-of-bounds Write in ath9k_hif_usb_rx_cb
ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb

We got a report on IRC about 5.7.3+ breaking a USB ath9k Wifi Dongle, while working fine on <5.7.3.

I don't have myself such HW, and the reported doesn't have any experience in bisecting the kernel, so we build kernels, each with one of the above commits reverted,
to find the bad commit.

The winner is:

commit 6602f080cb28745259e2fab1a4cf55eeb5894f93

Author: Qiujun Huang <[email protected]>
Date:   Sat Apr 4 12:18:38 2020 +0800

ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb

commit 2bbcaaee1fcbd83272e29f31e2bb7e70d8c49e05 upstream.
...

Reverting this one fixed his problem.

Quoted 8 lines
Quoted 1 line

Obvious question: is 5.8-rc1 (containing the commit) broken too?

Yes, it does, just checked.

git tag --contains 2bbcaaee1fcbd83272e29f31e2bb7e70d8c49e05 v5.8-rc1
v5.8-rc2

Sorry, I read the wrong, I just woke up.

Quoted 8 lines
Quoted 2 lines

We didn't test 5.8-rc{1,2} yet but we will today and let you know.

We tested 5.8-rc2 and it is broken too.

The exact HW name is:

TP-link tl-wn722n (Atheros AR9271 chip)

Great!

Can you work with the developers to fix this in Linus's tree first?

I bet they want to see the output of 'lsusb -v' for this device to see if the endpoint calculations are correct...

thanks,

greg k-h

#8 lore raw

Re: ath9k broken [was: Linux 5.7.3]

Am Fr., 26. Juni 2020 um 15:40 Uhr schrieb Greg Kroah-Hartman <[email protected]>:

Quoted 64 lines · Gabriel C
Quoted 62 lines

Am Do., 25. Juni 2020 um 12:52 Uhr schrieb Gabriel C <[email protected]>:

Quoted 48 lines

Am Do., 25. Juni 2020 um 12:48 Uhr schrieb Gabriel C <[email protected]>:

Quoted 45 lines

Am Do., 25. Juni 2020 um 06:57 Uhr schrieb Jiri Slaby <[email protected]>:

Quoted 32 lines · Gabriel C
Quoted 30 lines

Am Mi., 17. Juni 2020 um 18:13 Uhr schrieb Greg Kroah-Hartman <[email protected]>:

Quoted 3 lines

I'm announcing the release of the 5.7.3 kernel.

Hello Greg,

Quoted 7 lines

Qiujun Huang (5):
ath9k: Fix use-after-free Read in htc_connect_service
ath9k: Fix use-after-free Read in ath9k_wmi_ctrl_rx
ath9k: Fix use-after-free Write in ath9k_htc_rx_msg
ath9x: Fix stack-out-of-bounds Write in ath9k_hif_usb_rx_cb
ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb

We got a report on IRC about 5.7.3+ breaking a USB ath9k Wifi Dongle, while working fine on <5.7.3.

I don't have myself such HW, and the reported doesn't have any experience in bisecting the kernel, so we build kernels, each with one of the above commits reverted,
to find the bad commit.

The winner is:

commit 6602f080cb28745259e2fab1a4cf55eeb5894f93

Author: Qiujun Huang <[email protected]>
Date:   Sat Apr 4 12:18:38 2020 +0800
Quoted 8 lines
Quoted 6 lines

ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb

commit 2bbcaaee1fcbd83272e29f31e2bb7e70d8c49e05 upstream.
...

Reverting this one fixed his problem.

Obvious question: is 5.8-rc1 (containing the commit) broken too?

Yes, it does, just checked.

Quoted 9 lines
Quoted 4 lines

git tag --contains 2bbcaaee1fcbd83272e29f31e2bb7e70d8c49e05 v5.8-rc1
v5.8-rc2

Sorry, I read the wrong, I just woke up.

We didn't test 5.8-rc{1,2} yet but we will today and let you know.

We tested 5.8-rc2 and it is broken too.

Quoted 7 lines
Quoted 3 lines

The exact HW name is:

TP-link tl-wn722n (Atheros AR9271 chip)

Great!

Can you work with the developers to fix this in Linus's tree first?

I'm the man in the middle, but sure we will try patches or any suggestions from developers to identify and fix the problem.

Quoted 4 lines

I bet they want to see the output of 'lsusb -v' for this device to see if the endpoint calculations are correct...

Working on it. As soon the reporter gives me the output, I will post it here. I've told him to run it on a broken and one working kernel.

Quoted 3 lines

thanks,

greg k-h

Best Regards,

Gabriel C

#9 lore raw

Re: ath9k broken [was: Linux 5.7.3]

Am Fr., 26. Juni 2020 um 15:51 Uhr schrieb Gabriel C <[email protected]>:

Quoted 79 lines

Am Fr., 26. Juni 2020 um 15:40 Uhr schrieb Greg Kroah-Hartman <[email protected]>:

Quoted 64 lines · Gabriel C
Quoted 62 lines

Am Do., 25. Juni 2020 um 12:52 Uhr schrieb Gabriel C <[email protected]>:

Quoted 48 lines

Am Do., 25. Juni 2020 um 12:48 Uhr schrieb Gabriel C <[email protected]>:

Quoted 45 lines

Am Do., 25. Juni 2020 um 06:57 Uhr schrieb Jiri Slaby <[email protected]>:

Quoted 32 lines · Gabriel C
Quoted 30 lines

Am Mi., 17. Juni 2020 um 18:13 Uhr schrieb Greg Kroah-Hartman <[email protected]>:

Quoted 3 lines

I'm announcing the release of the 5.7.3 kernel.

Hello Greg,

Quoted 7 lines

Qiujun Huang (5):
ath9k: Fix use-after-free Read in htc_connect_service
ath9k: Fix use-after-free Read in ath9k_wmi_ctrl_rx
ath9k: Fix use-after-free Write in ath9k_htc_rx_msg
ath9x: Fix stack-out-of-bounds Write in ath9k_hif_usb_rx_cb
ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb

We got a report on IRC about 5.7.3+ breaking a USB ath9k Wifi Dongle, while working fine on <5.7.3.

I don't have myself such HW, and the reported doesn't have any experience in bisecting the kernel, so we build kernels, each with one of the above commits reverted,
to find the bad commit.

The winner is:

commit 6602f080cb28745259e2fab1a4cf55eeb5894f93

Author: Qiujun Huang <[email protected]>
Date:   Sat Apr 4 12:18:38 2020 +0800
Quoted 8 lines
Quoted 6 lines

ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb

commit 2bbcaaee1fcbd83272e29f31e2bb7e70d8c49e05 upstream.
...

Reverting this one fixed his problem.

Obvious question: is 5.8-rc1 (containing the commit) broken too?

Yes, it does, just checked.

Quoted 9 lines
Quoted 4 lines

git tag --contains 2bbcaaee1fcbd83272e29f31e2bb7e70d8c49e05 v5.8-rc1
v5.8-rc2

Sorry, I read the wrong, I just woke up.

We didn't test 5.8-rc{1,2} yet but we will today and let you know.

We tested 5.8-rc2 and it is broken too.

Quoted 7 lines
Quoted 3 lines

The exact HW name is:

TP-link tl-wn722n (Atheros AR9271 chip)

Great!

Can you work with the developers to fix this in Linus's tree first?

I'm the man in the middle, but sure we will try patches or any suggestions from developers to identify and fix the problem.

Quoted 1 line
Quoted 6 lines
Quoted 3 lines

I bet they want to see the output of 'lsusb -v' for this device to see if the endpoint calculations are correct...

Working on it. As soon the reporter gives me the output, I will post it here. I've told him to run it on a broken and one working kernel.

That is from a good kernel with reverted commit
https://gist.github.com/AngryPenguinPL/07c8e2abd3b103eaf8978a39ad8577d1

That is from the broken kernel without the commit reverted
https://gist.github.com/AngryPenguinPL/5cdc0dd16ce5e59ff3c32c048e2f5111

This is from 5.7.5 kernel, I don't have yet a 5.8-rc2 package with the reverted commit.

author maintainer
#10 lore raw

Re: ath9k broken [was: Linux 5.7.3]

Quoted 88 lines · Gabriel C

Am Fr., 26. Juni 2020 um 15:51 Uhr schrieb Gabriel C <[email protected]>:

Quoted 79 lines

Am Fr., 26. Juni 2020 um 15:40 Uhr schrieb Greg Kroah-Hartman <[email protected]>:

Quoted 64 lines · Gabriel C
Quoted 62 lines

Am Do., 25. Juni 2020 um 12:52 Uhr schrieb Gabriel C <[email protected]>:

Quoted 48 lines

Am Do., 25. Juni 2020 um 12:48 Uhr schrieb Gabriel C <[email protected]>:

Quoted 45 lines

Am Do., 25. Juni 2020 um 06:57 Uhr schrieb Jiri Slaby <[email protected]>:

Quoted 32 lines · Gabriel C
Quoted 30 lines

Am Mi., 17. Juni 2020 um 18:13 Uhr schrieb Greg Kroah-Hartman <[email protected]>:

Quoted 3 lines

I'm announcing the release of the 5.7.3 kernel.

Hello Greg,

Quoted 7 lines

Qiujun Huang (5):
ath9k: Fix use-after-free Read in htc_connect_service
ath9k: Fix use-after-free Read in ath9k_wmi_ctrl_rx
ath9k: Fix use-after-free Write in ath9k_htc_rx_msg
ath9x: Fix stack-out-of-bounds Write in ath9k_hif_usb_rx_cb
ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb

We got a report on IRC about 5.7.3+ breaking a USB ath9k Wifi Dongle, while working fine on <5.7.3.

I don't have myself such HW, and the reported doesn't have any experience in bisecting the kernel, so we build kernels, each with one of the above commits reverted,
to find the bad commit.

The winner is:

commit 6602f080cb28745259e2fab1a4cf55eeb5894f93

Author: Qiujun Huang <[email protected]>
Date:   Sat Apr 4 12:18:38 2020 +0800
Quoted 8 lines
Quoted 6 lines

ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb

commit 2bbcaaee1fcbd83272e29f31e2bb7e70d8c49e05 upstream.
...

Reverting this one fixed his problem.

Obvious question: is 5.8-rc1 (containing the commit) broken too?

Yes, it does, just checked.

Quoted 9 lines
Quoted 4 lines

git tag --contains 2bbcaaee1fcbd83272e29f31e2bb7e70d8c49e05 v5.8-rc1
v5.8-rc2

Sorry, I read the wrong, I just woke up.

We didn't test 5.8-rc{1,2} yet but we will today and let you know.

We tested 5.8-rc2 and it is broken too.

Quoted 7 lines
Quoted 3 lines

The exact HW name is:

TP-link tl-wn722n (Atheros AR9271 chip)

Great!

Can you work with the developers to fix this in Linus's tree first?

I'm the man in the middle, but sure we will try patches or any suggestions from developers to identify and fix the problem.

Quoted 1 line
Quoted 6 lines
Quoted 3 lines

I bet they want to see the output of 'lsusb -v' for this device to see if the endpoint calculations are correct...

Working on it. As soon the reporter gives me the output, I will post it here. I've told him to run it on a broken and one working kernel.

Quoted 8 lines

That is from a good kernel with reverted commit
https://gist.github.com/AngryPenguinPL/07c8e2abd3b103eaf8978a39ad8577d1

That is from the broken kernel without the commit reverted
https://gist.github.com/AngryPenguinPL/5cdc0dd16ce5e59ff3c32c048e2f5111

This is from 5.7.5 kernel, I don't have yet a 5.8-rc2 package with the reverted commit.

Did this ever get resolved?

thanks,

greg k-h

#11 lore raw

Re: ath9k broken [was: Linux 5.7.3]

Quoted 95 lines · Greg Kroah-Hartman
Quoted 94 lines · Gabriel C

Am Fr., 26. Juni 2020 um 15:51 Uhr schrieb Gabriel C <[email protected]>:

Quoted 79 lines

Am Fr., 26. Juni 2020 um 15:40 Uhr schrieb Greg Kroah-Hartman <[email protected]>:

Quoted 64 lines · Gabriel C
Quoted 62 lines

Am Do., 25. Juni 2020 um 12:52 Uhr schrieb Gabriel C <[email protected]>:

Quoted 48 lines

Am Do., 25. Juni 2020 um 12:48 Uhr schrieb Gabriel C <[email protected]>:

Quoted 45 lines

Am Do., 25. Juni 2020 um 06:57 Uhr schrieb Jiri Slaby <[email protected]>:

Quoted 32 lines · Gabriel C
Quoted 30 lines

Am Mi., 17. Juni 2020 um 18:13 Uhr schrieb Greg Kroah-Hartman <[email protected]>:

Quoted 3 lines

I'm announcing the release of the 5.7.3 kernel.

Hello Greg,

Quoted 7 lines

Qiujun Huang (5):
ath9k: Fix use-after-free Read in htc_connect_service
ath9k: Fix use-after-free Read in ath9k_wmi_ctrl_rx
ath9k: Fix use-after-free Write in ath9k_htc_rx_msg
ath9x: Fix stack-out-of-bounds Write in ath9k_hif_usb_rx_cb
ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb

We got a report on IRC about 5.7.3+ breaking a USB ath9k Wifi Dongle, while working fine on <5.7.3.

I don't have myself such HW, and the reported doesn't have any experience in bisecting the kernel, so we build kernels, each with one of the above commits reverted,
to find the bad commit.

The winner is:

commit 6602f080cb28745259e2fab1a4cf55eeb5894f93

Author: Qiujun Huang <[email protected]>
Date:   Sat Apr 4 12:18:38 2020 +0800
Quoted 8 lines
Quoted 6 lines

ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb

commit 2bbcaaee1fcbd83272e29f31e2bb7e70d8c49e05 upstream.
...

Reverting this one fixed his problem.

Obvious question: is 5.8-rc1 (containing the commit) broken too?

Yes, it does, just checked.

Quoted 9 lines
Quoted 4 lines

git tag --contains 2bbcaaee1fcbd83272e29f31e2bb7e70d8c49e05 v5.8-rc1
v5.8-rc2

Sorry, I read the wrong, I just woke up.

We didn't test 5.8-rc{1,2} yet but we will today and let you know.

We tested 5.8-rc2 and it is broken too.

Quoted 7 lines
Quoted 3 lines

The exact HW name is:

TP-link tl-wn722n (Atheros AR9271 chip)

Great!

Can you work with the developers to fix this in Linus's tree first?

I'm the man in the middle, but sure we will try patches or any suggestions from developers to identify and fix the problem.

Quoted 1 line
Quoted 6 lines
Quoted 3 lines

I bet they want to see the output of 'lsusb -v' for this device to see if the endpoint calculations are correct...

Working on it. As soon the reporter gives me the output, I will post it here. I've told him to run it on a broken and one working kernel.

That is from a good kernel with reverted commit
https://gist.github.com/AngryPenguinPL/07c8e2abd3b103eaf8978a39ad8577d1

That is from the broken kernel without the commit reverted
https://gist.github.com/AngryPenguinPL/5cdc0dd16ce5e59ff3c32c048e2f5111

Quoted 9 lines
Quoted 2 lines

This is from 5.7.5 kernel, I don't have yet a 5.8-rc2 package with the reverted commit.

Did this ever get resolved?

thanks,

greg k-h

This bug was also reported on the thread where it had been posted originally:
https://lore.kernel.org/linux-wireless/20200621020428.6417d6fb@natsu/

I am waiting for Kalle Valo to accept my patch (v2) which reverts the above mentioned commit and which looks correct according to him. He wrote that he would take a closer look at this as soon as he could.

I don't know how busy Kalle is, especially under the current circumstances. I will remind him on Thursday (one week after his last e-mail). At the latest I want this to be fixed with the 5.8 release. I think that the patch has to land in several networking trees before it reaches the mainline kernel, so if I can do anything to speed things up, just tell me.

Thanks,
Viktor

#12 lore raw

Re: ath9k broken [was: Linux 5.7.3]

Quoted 106 lines · Viktor Jägersküpper
Quoted 95 lines · Greg Kroah-Hartman
Quoted 94 lines · Gabriel C

Am Fr., 26. Juni 2020 um 15:51 Uhr schrieb Gabriel C <[email protected]>:

Quoted 79 lines

Am Fr., 26. Juni 2020 um 15:40 Uhr schrieb Greg Kroah-Hartman <[email protected]>:

Quoted 64 lines · Gabriel C
Quoted 62 lines

Am Do., 25. Juni 2020 um 12:52 Uhr schrieb Gabriel C <[email protected]>:

Quoted 48 lines

Am Do., 25. Juni 2020 um 12:48 Uhr schrieb Gabriel C <[email protected]>:

Quoted 45 lines

Am Do., 25. Juni 2020 um 06:57 Uhr schrieb Jiri Slaby <[email protected]>:

Quoted 32 lines · Gabriel C
Quoted 30 lines

Am Mi., 17. Juni 2020 um 18:13 Uhr schrieb Greg Kroah-Hartman <[email protected]>:

Quoted 3 lines

I'm announcing the release of the 5.7.3 kernel.

Hello Greg,

Quoted 7 lines

Qiujun Huang (5):
ath9k: Fix use-after-free Read in htc_connect_service
ath9k: Fix use-after-free Read in ath9k_wmi_ctrl_rx
ath9k: Fix use-after-free Write in ath9k_htc_rx_msg
ath9x: Fix stack-out-of-bounds Write in ath9k_hif_usb_rx_cb
ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb

We got a report on IRC about 5.7.3+ breaking a USB ath9k Wifi Dongle, while working fine on <5.7.3.

I don't have myself such HW, and the reported doesn't have any experience in bisecting the kernel, so we build kernels, each with one of the above commits reverted,
to find the bad commit.

The winner is:

commit 6602f080cb28745259e2fab1a4cf55eeb5894f93

Author: Qiujun Huang <[email protected]>
Date:   Sat Apr 4 12:18:38 2020 +0800
Quoted 8 lines
Quoted 6 lines

ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb

commit 2bbcaaee1fcbd83272e29f31e2bb7e70d8c49e05 upstream.
...

Reverting this one fixed his problem.

Obvious question: is 5.8-rc1 (containing the commit) broken too?

Yes, it does, just checked.

Quoted 9 lines
Quoted 4 lines

git tag --contains 2bbcaaee1fcbd83272e29f31e2bb7e70d8c49e05 v5.8-rc1
v5.8-rc2

Sorry, I read the wrong, I just woke up.

We didn't test 5.8-rc{1,2} yet but we will today and let you know.

We tested 5.8-rc2 and it is broken too.

Quoted 7 lines
Quoted 3 lines

The exact HW name is:

TP-link tl-wn722n (Atheros AR9271 chip)

Great!

Can you work with the developers to fix this in Linus's tree first?

I'm the man in the middle, but sure we will try patches or any suggestions from developers to identify and fix the problem.

Quoted 1 line
Quoted 6 lines
Quoted 3 lines

I bet they want to see the output of 'lsusb -v' for this device to see if the endpoint calculations are correct...

Working on it. As soon the reporter gives me the output, I will post it here. I've told him to run it on a broken and one working kernel.

That is from a good kernel with reverted commit
https://gist.github.com/AngryPenguinPL/07c8e2abd3b103eaf8978a39ad8577d1

That is from the broken kernel without the commit reverted
https://gist.github.com/AngryPenguinPL/5cdc0dd16ce5e59ff3c32c048e2f5111

Quoted 9 lines
Quoted 2 lines

This is from 5.7.5 kernel, I don't have yet a 5.8-rc2 package with the reverted commit.

Did this ever get resolved?

thanks,

greg k-h

Quoted 6 lines

This bug was also reported on the thread where it had been posted originally:
https://lore.kernel.org/linux-wireless/20200621020428.6417d6fb@natsu/

I am waiting for Kalle Valo to accept my patch (v2) which reverts the above mentioned commit and which looks correct according to him. He wrote that he would take a closer look at this as soon as he could.

Mark posted a patch which I'm hoping to fix the issue:

[1/1] ath9k: Fix regression with Atheros 9271

https://patchwork.kernel.org/patch/11657669/

Can someone confirm this, please? I would rather take Mark's fix than the revert.

Signature · 1 line
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#13 lore raw

Re: ath9k broken [was: Linux 5.7.3]

[CC'ed Roman]

Kalle Valo:

Quoted 115 lines
Quoted 106 lines · Viktor Jägersküpper
Quoted 95 lines · Greg Kroah-Hartman
Quoted 94 lines · Gabriel C

Am Fr., 26. Juni 2020 um 15:51 Uhr schrieb Gabriel C <[email protected]>:

Quoted 79 lines

Am Fr., 26. Juni 2020 um 15:40 Uhr schrieb Greg Kroah-Hartman <[email protected]>:

Quoted 64 lines · Gabriel C
Quoted 62 lines

Am Do., 25. Juni 2020 um 12:52 Uhr schrieb Gabriel C <[email protected]>:

Quoted 48 lines

Am Do., 25. Juni 2020 um 12:48 Uhr schrieb Gabriel C <[email protected]>:

Quoted 45 lines

Am Do., 25. Juni 2020 um 06:57 Uhr schrieb Jiri Slaby <[email protected]>:

Quoted 32 lines · Gabriel C
Quoted 30 lines

Am Mi., 17. Juni 2020 um 18:13 Uhr schrieb Greg Kroah-Hartman <[email protected]>:

Quoted 3 lines

I'm announcing the release of the 5.7.3 kernel.

Hello Greg,

Quoted 7 lines

Qiujun Huang (5):
ath9k: Fix use-after-free Read in htc_connect_service
ath9k: Fix use-after-free Read in ath9k_wmi_ctrl_rx
ath9k: Fix use-after-free Write in ath9k_htc_rx_msg
ath9x: Fix stack-out-of-bounds Write in ath9k_hif_usb_rx_cb
ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb

We got a report on IRC about 5.7.3+ breaking a USB ath9k Wifi Dongle, while working fine on <5.7.3.

I don't have myself such HW, and the reported doesn't have any experience in bisecting the kernel, so we build kernels, each with one of the above commits reverted,
to find the bad commit.

The winner is:

commit 6602f080cb28745259e2fab1a4cf55eeb5894f93

Author: Qiujun Huang <[email protected]>
Date:   Sat Apr 4 12:18:38 2020 +0800
Quoted 8 lines
Quoted 6 lines

ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb

commit 2bbcaaee1fcbd83272e29f31e2bb7e70d8c49e05 upstream.
...

Reverting this one fixed his problem.

Obvious question: is 5.8-rc1 (containing the commit) broken too?

Yes, it does, just checked.

Quoted 9 lines
Quoted 4 lines

git tag --contains 2bbcaaee1fcbd83272e29f31e2bb7e70d8c49e05 v5.8-rc1
v5.8-rc2

Sorry, I read the wrong, I just woke up.

We didn't test 5.8-rc{1,2} yet but we will today and let you know.

We tested 5.8-rc2 and it is broken too.

Quoted 7 lines
Quoted 3 lines

The exact HW name is:

TP-link tl-wn722n (Atheros AR9271 chip)

Great!

Can you work with the developers to fix this in Linus's tree first?

I'm the man in the middle, but sure we will try patches or any suggestions from developers to identify and fix the problem.

Quoted 1 line
Quoted 6 lines
Quoted 3 lines

I bet they want to see the output of 'lsusb -v' for this device to see if the endpoint calculations are correct...

Working on it. As soon the reporter gives me the output, I will post it here. I've told him to run it on a broken and one working kernel.

That is from a good kernel with reverted commit
https://gist.github.com/AngryPenguinPL/07c8e2abd3b103eaf8978a39ad8577d1

That is from the broken kernel without the commit reverted
https://gist.github.com/AngryPenguinPL/5cdc0dd16ce5e59ff3c32c048e2f5111

Quoted 9 lines
Quoted 2 lines

This is from 5.7.5 kernel, I don't have yet a 5.8-rc2 package with the reverted commit.

Did this ever get resolved?

thanks,

greg k-h

Quoted 6 lines

This bug was also reported on the thread where it had been posted originally:
https://lore.kernel.org/linux-wireless/20200621020428.6417d6fb@natsu/

I am waiting for Kalle Valo to accept my patch (v2) which reverts the above mentioned commit and which looks correct according to him. He wrote that he would take a closer look at this as soon as he could.

Quoted 9 lines

Mark posted a patch which I'm hoping to fix the issue:

[1/1] ath9k: Fix regression with Atheros 9271

https://patchwork.kernel.org/patch/11657669/

Can someone confirm this, please? I would rather take Mark's fix than the revert.

12345678901234567890123456789012345678901234567890123456789012345678901234567890 This fixes the issue for me. Unfortunately the revert landed in 5.7.9 (it was also queued for the older releases, but I didn't check them) because Hans de Goede requested it since he didn't know about Mark's patch. So if you want to fix the stable and longterm kernels properly, we need another patch which includes a re-revert and Mark's patch. But Mark's patch should definitely land in the mainline kernel first.

#14 lore raw

Re: ath9k broken [was: Linux 5.7.3]

Quoted 11 lines · Viktor Jägersküpper
Quoted 11 lines
Quoted 6 lines

This bug was also reported on the thread where it had been posted originally:
https://lore.kernel.org/linux-wireless/20200621020428.6417d6fb@natsu/

I am waiting for Kalle Valo to accept my patch (v2) which reverts the above mentioned commit and which looks correct according to him. He wrote that he would take a closer look at this as soon as he could.

Mark posted a patch which I'm hoping to fix the issue:

[1/1] ath9k: Fix regression with Atheros 9271

Quoted 7 lines
Quoted 5 lines

https://patchwork.kernel.org/patch/11657669/

Can someone confirm this, please? I would rather take Mark's fix than the revert.

This fixes the issue for me.

Great, thanks for testing. I'll wait at least another day for more comments and then queue it for v5.8.

Signature · 1 line
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#15 lore raw

Re: ath9k broken [was: Linux 5.7.3]

In reply to Jiri Slaby
Quoted 11 lines · On Thu, 25 Jun 2020 06:57:13 +0200 Jiri Slaby <[email protected]> wrote:

I fail to see how the commit could cause an issue like this. Is this really reproducibly broken with the commit and irreproducible without it? As it looks like a USB/wiring problem:
usb 1-2: USB disconnect, device number 2
ath: phy0: Reading Magic # failed
ath: phy0: Unable to initialize hardware; initialization status: -5
...
usb 1-2: device descriptor read/64, error -110
usb 1-2: device descriptor read/64, error -71

Ccing ath9k maintainers too.

Note that this has been previously reported in:
https://bugzilla.kernel.org/show_bug.cgi?id=208251
and confirmed by several people on various stable series and the mainline that the referenced commit is indeed causing the problem.

I don't get the "device descriptor read" errors though, my dmesg is posted on the bug report, it just says "ath9k_htc: Failed to initialize the device".

Quoted 8 lines
Quoted 8 lines

I don't have so much info about the HW, besides a dmesg showing the phy breaking.
I also added the reporter to CC too.

https://gist.github.com/AngryPenguinPL/1e545f0da3c2339e443b9e5044fcccea

If you need more info, please let me know and I'll try my best to get it as fast as possible for you.

Signature · 2 lines
With respect,
Roman