Skip to contentSkip to conversation

Linux 6.5.7

DISCUSSION Greg Kroah-Hartman 1 participant 2 messages Oct 10, 2023 Stable branch

lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

I'm announcing the release of the 6.5.7 kernel.

All users of the 6.5 kernel series must upgrade.

The updated 6.5.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.5.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/arch/arm64/silicon-errata.rst                   |    2 
 Documentation/networking/ip-sysctl.rst                        |    8 
 Makefile                                                      |    2 
 arch/arm64/Kconfig                                            |   13 
 arch/arm64/include/asm/cpufeature.h                           |    2 
 arch/arm64/include/asm/cputype.h                              |    2 
 arch/arm64/include/asm/hwcap.h                                |    1 
 arch/arm64/include/uapi/asm/hwcap.h                           |    1 
 arch/arm64/kernel/cpu_errata.c                                |    8 
 arch/arm64/kernel/cpufeature.c                                |    4 
 arch/arm64/kernel/cpuinfo.c                                   |    1 
 arch/arm64/kernel/entry.S                                     |    4 
 arch/arm64/tools/cpucaps                                      |    1 
 arch/arm64/tools/sysreg                                       |    6 
 arch/parisc/include/asm/ldcw.h                                |   37 -
 arch/parisc/include/asm/spinlock_types.h                      |    5 
 arch/parisc/kernel/smp.c                                      |    4 
 arch/s390/net/bpf_jit_comp.c                                  |    2 
 arch/x86/events/amd/core.c                                    |   24 
 arch/x86/kernel/sev-shared.c                                  |   69 ++
 arch/x86/kernel/sev.c                                         |    3 
 drivers/ata/libata-core.c                                     |   16 
 drivers/ata/libata-scsi.c                                     |   33 -
 drivers/base/regmap/regcache-rbtree.c                         |    3 
 drivers/gpio/gpio-aspeed.c                                    |    2 
 drivers/gpio/gpio-pxa.c                                       |    1 
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c                    |    2 
 drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c       |   41 -
 drivers/gpu/drm/i915/gt/gen8_engine_cs.c                      |   11 
 drivers/hid/Kconfig                                           |    1 
 drivers/hid/hid-nvidia-shield.c                               |    3 
 drivers/hid/hid-sony.c                                        |    2 
 drivers/hid/intel-ish-hid/ipc/pci-ish.c                       |    8 
 drivers/infiniband/core/cma.c                                 |    2 
 drivers/infiniband/core/cma_configfs.c                        |    2 
 drivers/infiniband/core/nldev.c                               |    1 
 drivers/infiniband/core/uverbs_main.c                         |    2 
 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c                    |   11 
 drivers/infiniband/hw/mlx4/sysfs.c                            |    2 
 drivers/infiniband/hw/mlx5/fs.c                               |    2 
 drivers/infiniband/hw/mlx5/main.c                             |    2 
 drivers/infiniband/hw/mlx5/mr.c                               |   14 
 drivers/infiniband/sw/siw/siw_cm.c                            |   16 
 drivers/infiniband/ulp/srp/ib_srp.c                           |   16 
 drivers/iommu/apple-dart.c                                    |    3 
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c                   |   15 
 drivers/iommu/intel/iommu.c                                   |   16 
 drivers/iommu/intel/iommu.h                                   |    2 
 drivers/iommu/mtk_iommu.c                                     |    9 
 drivers/leds/led-core.c                                       |    4 
 drivers/md/dm-zoned-target.c                                  |   15 
 drivers/md/raid5.c                                            |    7 
 drivers/mtd/ubi/build.c                                       |    7 
 drivers/net/dsa/mv88e6xxx/chip.c                              |    6 
 drivers/net/dsa/mv88e6xxx/global1.c                           |   31 -
 drivers/net/dsa/mv88e6xxx/global1.h                           |    1 
 drivers/net/dsa/mv88e6xxx/global2.c                           |    2 
 drivers/net/dsa/mv88e6xxx/global2.h                           |    1 
 drivers/net/ethernet/ibm/ibmveth.c                            |   25 -
 drivers/net/ethernet/intel/ice/ice_virtchnl.c                 |   12 
 drivers/net/ethernet/mediatek/mtk_eth_soc.c                   |    4 
 drivers/net/ethernet/microchip/Kconfig                        |    1 
 drivers/net/ethernet/microsoft/mana/mana_en.c                 |  211 +++++---
 drivers/net/ethernet/qlogic/qed/qed_ll2.h                     |    2 
 drivers/net/ethernet/renesas/rswitch.c                        |   25 -
 drivers/net/ethernet/renesas/rswitch.h                        |    4 
 drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c             |    7 
 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c         |    2 
 drivers/net/ethernet/ti/am65-cpsw-nuss.c                      |    1 
 drivers/net/usb/smsc75xx.c                                    |    4 
 drivers/net/wan/fsl_ucc_hdlc.c                                |   12 
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h |    9 
 drivers/net/wireless/intel/iwlwifi/fw/error-dump.h            |    6 
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c                   |    2 
 drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c         |  121 ++--
 drivers/net/wireless/intel/iwlwifi/mvm/scan.c                 |    2 
 drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c          |    4 
 drivers/net/wireless/marvell/mwifiex/sta_rx.c                 |   16 
 drivers/net/wireless/mediatek/mt76/dma.c                      |    8 
 drivers/net/wireless/mediatek/mt76/mt76x02_eeprom.c           |    7 
 drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.c            |   13 
 drivers/net/wireless/realtek/rtw88/rtw8723d.h                 |    1 
 drivers/of/dynamic.c                                          |    6 
 drivers/pci/controller/dwc/pcie-qcom.c                        |    4 
 drivers/pci/pci-driver.c                                      |   14 
 drivers/platform/x86/intel/ifs/runtest.c                      |    7 
 drivers/ptp/ptp_ocp.c                                         |    1 
 drivers/regulator/core.c                                      |    4 
 drivers/regulator/mt6358-regulator.c                          |   18 
 drivers/s390/scsi/zfcp_aux.c                                  |    9 
 drivers/scsi/aacraid/commsup.c                                |    2 
 drivers/scsi/mvumi.c                                          |    2 
 drivers/scsi/scsi_lib.c                                       |    2 
 drivers/scsi/scsi_priv.h                                      |    1 
 drivers/scsi/scsi_scan.c                                      |   20 
 drivers/scsi/scsi_sysfs.c                                     |    4 
 drivers/scsi/smartpqi/smartpqi_init.c                         |    2 
 drivers/scsi/storvsc_drv.c                                    |    2 
 drivers/scsi/virtio_scsi.c                                    |    2 
 drivers/target/target_core_device.c                           |   11 
 drivers/vhost/vringh.c                                        |   12 
 drivers/xen/events/events_base.c                              |   87 +--
 fs/btrfs/btrfs_inode.h                                        |    3 
 fs/btrfs/extent_io.c                                          |   58 --
 fs/btrfs/extent_io.h                                          |    2 
 fs/btrfs/inode.c                                              |   47 -
 fs/btrfs/ordered-data.c                                       |    4 
 fs/btrfs/transaction.h                                        |    4 
 fs/erofs/decompressor_lzma.c                                  |    5 
 fs/erofs/super.c                                              |    2 
 fs/nfs/nfs4state.c                                            |    7 
 fs/overlayfs/super.c                                          |    9 
 fs/smb/client/connect.c                                       |   10 
 fs/smb/server/connection.c                                    |    2 
 fs/smb/server/connection.h                                    |    1 
 fs/smb/server/mgmt/user_session.c                             |   10 
 fs/smb/server/smb2pdu.c                                       |   16 
 include/linux/bpf.h                                           |    2 
 include/linux/ipv6.h                                          |    1 
 include/linux/maple_tree.h                                    |   11 
 include/linux/netfilter/nf_conntrack_sctp.h                   |    1 
 include/net/cfg80211.h                                        |    6 
 include/net/mana/mana.h                                       |    5 
 include/net/neighbour.h                                       |    2 
 include/net/tcp.h                                             |    6 
 include/scsi/scsi_host.h                                      |    2 
 include/uapi/linux/ipv6.h                                     |    1 
 io_uring/io_uring.c                                           |   16 
 io_uring/io_uring.h                                           |   41 +
 io_uring/kbuf.c                                               |   27 -
 kernel/bpf/verifier.c                                         |    8 
 lib/maple_tree.c                                              |  246 +++++++---
 lib/test_maple_tree.c                                         |   87 ++-
 net/bluetooth/hci_core.c                                      |    6 
 net/bluetooth/hci_event.c                                     |    1 
 net/bluetooth/hci_request.h                                   |    2 
 net/bluetooth/hci_sync.c                                      |   14 
 net/bluetooth/iso.c                                           |    9 
 net/bridge/br_netfilter_hooks.c                               |    2 
 net/core/neighbour.c                                          |   14 
 net/core/sock_map.c                                           |    4 
 net/ethtool/plca.c                                            |   45 +
 net/ipv4/route.c                                              |    2 
 net/ipv4/tcp.c                                                |   10 
 net/ipv4/tcp_bpf.c                                            |    4 
 net/ipv4/tcp_input.c                                          |   13 
 net/ipv4/tcp_output.c                                         |    7 
 net/ipv6/addrconf.c                                           |   13 
 net/ipv6/ndisc.c                                              |   13 
 net/ipv6/tcp_ipv6.c                                           |   10 
 net/l2tp/l2tp_ip6.c                                           |    2 
 net/mac80211/cfg.c                                            |    3 
 net/mac80211/ieee80211_i.h                                    |    2 
 net/mac80211/key.c                                            |    2 
 net/mac80211/mesh.c                                           |    8 
 net/mac80211/mlme.c                                           |   18 
 net/mptcp/pm_userspace.c                                      |    6 
 net/mptcp/protocol.c                                          |  161 +++---
 net/mptcp/protocol.h                                          |   59 +-
 net/mptcp/subflow.c                                           |   13 
 net/netfilter/ipvs/ip_vs_sync.c                               |    4 
 net/netfilter/nf_conntrack_proto_sctp.c                       |   43 +
 net/netfilter/nf_tables_api.c                                 |   44 +
 net/netfilter/nft_payload.c                                   |   13 
 net/netfilter/nft_set_rbtree.c                                |   46 +
 net/netlink/af_netlink.c                                      |    8 
 net/nfc/llcp_core.c                                           |    2 
 net/rds/tcp_connect.c                                         |    2 
 net/sctp/associola.c                                          |    3 
 net/sctp/socket.c                                             |    1 
 net/socket.c                                                  |   29 -
 net/tipc/crypto.c                                             |    4 
 net/wireless/core.c                                           |   14 
 net/wireless/core.h                                           |    7 
 net/wireless/mlme.c                                           |    3 
 net/wireless/nl80211.c                                        |   93 ++-
 scripts/mod/file2alias.c                                      |    2 
 security/integrity/ima/Kconfig                                |   22 
 sound/soc/soc-utils.c                                         |    1 
 sound/soc/tegra/tegra_audio_graph_card.c                      |   30 -
 tools/testing/selftests/netfilter/.gitignore                  |    1 
 tools/testing/selftests/netfilter/Makefile                    |    4 
 tools/testing/selftests/netfilter/audit_logread.c             |  165 ++++++
 tools/testing/selftests/netfilter/config                      |    1 
 tools/testing/selftests/netfilter/nft_audit.sh                |  193 +++++++
 tools/tracing/rtla/src/timerlat_aa.c                          |   32 +
 tools/tracing/rtla/src/timerlat_u.c                           |    6 
 187 files changed, 2079 insertions(+), 999 deletions(-)

Al Viro (2):
ovl: move freeing ovl_entry past rcu delay
ovl: fetch inode once in ovl_dentry_revalidate_common()

Alexandra Diupina (1):
drivers/net: process the result of hdlc_open() and add call of hdlc_close() in uhdlc_close()

Andrii Nakryiko (1):
bpf: unconditionally reset backtrack_state masks on global func exit

Arnd Bergmann (2):
wifi: iwlwifi: dbg_ini: fix structure packing
ima: rework CONFIG_IMA dependency block

Bart Van Assche (2):
scsi: core: Improve type safety of scsi_rescan_device() RDMA/srp: Do not call scsi_done() from srp_abort()

Bartosz Golaszewski (1):
gpio: aspeed: fix the GPIO number passed to pinctrl_gpio_set_config()

Ben Wolsieffer (1):
net: stmmac: dwmac-stm32: fix resume on STM32 MCU

Benjamin Berg (1):
wifi: mac80211: Create resources for disabled links

Benjamin Poirier (1):
ipv4: Set offload_failed flag in fibmatch results

Bernard Metzler (1):
RDMA/siw: Fix connection failure handling

Breno Leitao (1):
perf/x86/amd: Do not WARN() on every IRQ

Chen-Yu Tsai (1):
regulator: mt6358: split ops for buck and linear range LDO regulators

Chengfeng Ye (1):

      tipc: fix a potential deadlock on &tx->lock

Christian Marangi (1):
net: ethernet: mediatek: disable irq before schedule napi

Christoph Hellwig (2):
btrfs: remove btrfs_writepage_endio_finish_ordered
btrfs: remove end_extent_writepage

Christophe JAILLET (4):
HID: sony: Fix a potential memory leak in sony_probe()
wifi: iwlwifi: mvm: Fix a memory corruption issue
HID: nvidia-shield: Fix a missing led_classdev_unregister() in the probe error handling path IB/mlx4: Fix the size of a buffer in add_port_entries()

Clark Wang (1):
net: stmmac: platform: fix the incorrect parameter

Damien Le Moal (2):
scsi: Do not attempt to rescan suspended devices
ata: libata-scsi: Fix delayed scsi_rescan_device() execution

Dan Carpenter (2):
net: ethernet: ti: am65-cpsw: Fix error code in am65_cpsw_nuss_init_tx_chns()
of: dynamic: Fix potential memory leak in of_changeset_action()

Daniel Bristot de Oliveira (4):
rtla/timerlat_aa: Zero thread sum after every sample analysis rtla/timerlat_aa: Fix negative IRQ delay
rtla/timerlat_aa: Fix previous IRQ delay for IRQs that happens after thread sample rtla/timerlat: Do not stop user-space if a cpu is offline

David Howells (1):
ipv4, ipv6: Fix handling of transhdrlen in __ip{,6}_append_data()

David Jeffery (1):
md/raid5: release batch_last before waiting for another stripe_head

David Wilder (1):
ibmveth: Remove condition to recompute TCP header checksum.

Dinghao Liu (2):
scsi: zfcp: Fix a double put in zfcp_port_enqueue()
ptp: ocp: Fix error handling in ptp_ocp_device_init

Duje Mihanović (1):
gpio: pxa: disable pinctrl calls for MMP_GPIO

Eric Dumazet (3):

      net: fix possible store tearing in neigh_periodic_work()
      neighbour: fix data-races around n->output
      netlink: annotate data-races around sk->sk_err

Fabio Estevam (1):
net: dsa: mv88e6xxx: Avoid EEPROM timeout when EEPROM is absent

Fedor Pchelkin (1):

      dm zoned: free dmz->ddev array in dmz_put_zoned_devices

Felix Fietkau (2):
wifi: mac80211: fix mesh id corruption on 32 bit systems
wifi: mt76: mt76x02: fix MT76x0 external LNA gain handling

Filipe Manana (1):
btrfs: always print transaction aborted messages with an error level

Florian Westphal (2):
netfilter: nft_payload: rebuild vlan header on h_proto access
netfilter: nf_tables: nft_set_rbtree: fix spurious insertion failure

Gao Xiang (1):
erofs: fix memory leak of LZMA global compressed deduplication

Geliang Tang (1):
mptcp: userspace pm allow creating id 0 subflow

Greg Kroah-Hartman (1):

      Linux 6.5.7

Gregory Greenman (1):
iwlwifi: mvm: handle PS changes in vif_cfg_changed

Gustavo A. R. Silva (2):
qed/red_ll2: Fix undefined behavior bug in struct qed_ll2_info
wifi: mwifiex: Fix tlv_buf_left calculation

Haiyang Zhang (3):
net: mana: Fix TX CQE error handling
net: mana: Fix the tso_bytes calculation
net: mana: Fix oversized sge0 for GSO packets

Hamdan Igbaria (1):
RDMA/mlx5: Fix mutex unlocking on error flow for steering anchor creation

Hector Martin (1):
iommu/apple-dart: Handle DMA_FQ domains in attach_dev()

Helge Deller (1):
parisc: Fix crash with nr_cpus=1 option

Ilan Peer (1):
wifi: iwlwifi: mvm: Fix incorrect usage of scan API

Ilya Maximets (1):
ipv6: tcp: add a missing nf_reset_ct() in 3WHS handling

Jakub Sitnicki (1):
bpf, sockmap: Reject sk_msg egress redirects to non-TCP sockets

Jens Axboe (3):
io_uring: don't allow IORING_SETUP_NO_MMAP rings on highmem pages io_uring/kbuf: don't allow registered buffer rings on highmem pages
io_uring: ensure io_lockdep_assert_cq_locked() handles disabled rings

Jeremy Cline (1):
net: nfc: llcp: Add lock when modifying device list

Jingbo Xu (1):
erofs: allow empty device tags in flatdev mode

Jiri Kosina (1):
HID: sony: remove duplicate NULL check before calling usb_free_urb()

Jithu Joseph (1):
platform/x86/intel/ifs: release cpus_read_lock()

Joey Gouly (1):
arm64: add HWCAP for FEAT_HBC (hinted conditional branches)

Johannes Berg (3):
wifi: cfg80211: fix cqm_config access race
wifi: cfg80211: add missing kernel-doc for cqm_rssi_work
wifi: mac80211: fix potential key use-after-free

John David Anglin (1):
parisc: Restore __ldcw_align for PA-RISC 2.0 processors

John Fastabend (2):
bpf: tcp_read_skb needs to pop skb regardless of seq bpf, sockmap: Do not inc copied_seq when PEEK flag set

Jordan Rife (3):
net: replace calls to sock->ops->connect() with kernel_connect()
net: prevent rewrite of msg_name in sock_sendmsg()
smb: use kernel_connect() and kernel_bind()

Josef Bacik (1):
btrfs: don't clear uptodate on write errors

Juerg Haefliger (1):
wifi: brcmfmac: Replace 1-element arrays with flexible arrays

Juergen Gross (1):
xen/events: replace evtchn_rwlock with RCU

Junxiao Bi (1):
scsi: target: core: Fix deadlock due to recursive locking

Konstantin Meskhidze (1):
RDMA/uverbs: Fix typo of sizeof argument

Kristina Martsenko (1):
arm64: cpufeature: Fix CLRBHB and BC detection

Kuniyuki Iwashima (1):
mptcp: Remove unnecessary test for __mptcp_init_sock()

Leon Hwang (1):
bpf: Fix tr dereferencing

Leon Romanovsky (3):
RDMA/core: Require admin capabilities to set system parameters RDMA/cma: Fix truncation compilation warning in make_cma_ports RDMA/mlx5: Remove not-used cache disable flag

Liam R. Howlett (3):
maple_tree: add mas_is_active() to detect in-tree walks
maple_tree: reduce resets during store setup
maple_tree: add MAS_UNDERFLOW and MAS_OVERFLOW states

Lorenzo Bianconi (1):
wifi: mt76: fix lock dependency problem for wed_lock

Luiz Augusto von Dentz (3):
Bluetooth: hci_codec: Fix leaking content of local_codecs
Bluetooth: hci_sync: Fix handling of HCI_QUIRK_STRICT_DUPLICATE_FILTER
Bluetooth: ISO: Fix handling of listen for unicast

Marek Behún (1):
leds: Drop BUG_ON check for LED_COLOR_ID_MULTI

Mario Limonciello (2):
drm/amd: Fix detection of _PR3 on the PCIe root port drm/amd: Fix logic error in sienna_cichlid_update_pcie_parameters()

Mark Zhang (1):
RDMA/cma: Initialize ib_sa_multicast structure to 0 when join

Mauricio Faria de Oliveira (1):
modpost: add missing else to the "of" check

Michael Guralnik (1):
RDMA/mlx5: Fix assigning access flags to cache mkeys

Michal Schmidt (1):
ice: always add legacy 32byte RXDID in supported_rxdids

Michał Mirosław (1):

      regulator/core: regulator_register: set device->class earlier

Mika Westerberg (1):
PCI/PM: Mark devices disconnected if upstream PCIe link is down on resume

Namjae Jeon (2):
ksmbd: fix race condition between session lookup and expire
ksmbd: fix race condition from parallel smb2 lock requests

Neal Cardwell (2):
tcp: fix quick-ack counting to count actual ACKs of new data
tcp: fix delayed ACKs for MSS boundary condition

Nirmoy Das (1):
drm/i915: Don't set PIPE_CONTROL_FLUSH_L3 for aux inval

Oleksandr Tymoshenko (1):
ima: Finish deprecation of IMA_TRUSTED_KEYRING Kconfig

Paolo Abeni (3):
mptcp: rename timer related helper to less confusing names
mptcp: fix dangling connection hang-up
mptcp: fix delegated action races

Parthiban Veerasooran (1):
ethtool: plca: fix plca enable data type while parsing the value

Patrick Rohr (3):
net: add sysctl accept_ra_min_rtr_lft
net: change accept_ra_min_rtr_lft to affect all RA lifetimes
net: release reference to inet6_dev pointer

Phil Sutter (3):
selftests: netfilter: Test nf_tables audit logging
selftests: netfilter: Extend nft_audit.sh
netfilter: nf_tables: Deduplicate nft_register_obj audit logs

Pin-yen Lin (1):
wifi: mwifiex: Fix oob check condition in mwifiex_process_rx_packet

Randy Dunlap (2):
HID: nvidia-shield: add LEDS_CLASS dependency
net: lan743x: also select PHYLIB

Richard Fitzgerald (1):
regmap: rbtree: Fix wrong register marked as in-cache when creating new node

Rob Herring (2):
arm64: Add Cortex-A520 CPU part definition
arm64: errata: Add Cortex-A520 speculative unprivileged load workaround

Robin Murphy (1):
iommu/arm-smmu-v3: Avoid constructing invalid range commands

Sameer Pujar (2):
ASoC: soc-utils: Export snd_soc_dai_is_dummy() symbol
ASoC: tegra: Fix redundant PLLA and PLLA_OUT0 updates

Sandipan Das (1):
perf/x86/amd/core: Fix overflow reset on hotplug

Sascha Hauer (1):
wifi: rtw88: rtw8723d: Fix MAC address offset in EEPROM

Selvin Xavier (1):
RDMA/bnxt_re: Fix the handling of control path response data

Shay Drory (2):
RDMA/mlx5: Fix mkey cache possible deadlock on cleanup RDMA/mlx5: Fix NULL string error

Shigeru Yoshida (1):
net: usb: smsc75xx: Fix uninit-value access in __smsc75xx_read_reg

Song Liu (1):
s390/bpf: Let arch_prepare_bpf_trampoline return program size

Sricharan Ramabadhran (1):
PCI: qcom: Fix IPQ8074 enumeration

Srinivas Pandruvada (1):
HID: intel-ish-hid: ipc: Disable and reenable ACPI GPE bit

Stefano Garzarella (1):
vringh: don't use vringh_kiov_advance() in vringh_iov_xfer()

Tom Lendacky (2):
x86/sev: Change npages to unsigned long in snp_accept_memory() x86/sev: Use the GHCB protocol when available for SNP CPUID requests

Trond Myklebust (1):
NFSv4: Fix a nfs4_state_manager() race

Wen Gong (1):
wifi: cfg80211/mac80211: hold link BSSes when assoc fails for MLO connection

Xin Long (3):
netfilter: handle the connecting collision properly in nf_conntrack_proto_sctp
sctp: update transport state when processing a dupcook packet
sctp: update hb timer immediately after users change hb_interval

Yao Xiao (1):
Bluetooth: Delete unused hci_req_prepare_suspend() declaration

Ying Hsu (1):
Bluetooth: Fix hci_link_tx_to RCU lock usage

Yong Wu (1):
iommu/mediatek: Fix share pgtable for iova over 4GB

Yoshihiro Shimoda (2):
net: renesas: rswitch: Add spin lock protection for irq {un}mask
rswitch: Fix PHY station management clock setting

Zhang Rui (1):
iommu/vt-d: Avoid memory allocation in iommu_suspend()

Zhihao Cheng (1):
ubi: Refuse attaching if mtd's erasesize is 0

luosili (1):
ksmbd: fix uaf in smb20_oplock_break_ack

author maintainer
#1 lore raw
Documentation/arch/arm64/silicon-errata.rst +2 -0
index 0ac452333eb4..daa1e2ccc0d7 100644
@@ -63,6 +63,8 @@ stable kernels.
 +----------------+-----------------+-----------------+-----------------------------+
 | ARM            | Cortex-A510     | #1902691        | ARM64_ERRATUM_1902691       |
 +----------------+-----------------+-----------------+-----------------------------+
+| ARM            | Cortex-A520     | #2966298        | ARM64_ERRATUM_2966298       |
++----------------+-----------------+-----------------+-----------------------------+
 | ARM            | Cortex-A53      | #826319         | ARM64_ERRATUM_826319        |
 +----------------+-----------------+-----------------+-----------------------------+
 | ARM            | Cortex-A53      | #827319         | ARM64_ERRATUM_827319        |
Documentation/networking/ip-sysctl.rst +8 -0
index 4a010a7cde7f..5590f2f5201c 100644
@@ -2287,6 +2287,14 @@ accept_ra_min_hop_limit - INTEGER
 
 	Default: 1
 
+accept_ra_min_lft - INTEGER
+	Minimum acceptable lifetime value in Router Advertisement.
+
+	RA sections with a lifetime less than this value shall be
+	ignored. Zero lifetimes stay unaffected.
+
+	Default: 0
+
 accept_ra_pinfo - BOOLEAN
 	Learn Prefix Information in Router Advertisement.
 
Makefile +1 -1
index 81f14b15592f..f9d5970f3441 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 VERSION = 6
 PATCHLEVEL = 5
-SUBLEVEL = 6
+SUBLEVEL = 7
 EXTRAVERSION =
 NAME = Hurr durr I'ma ninja sloth
 
arch/arm64/Kconfig +13 -0
index a2511b30d0f6..73085b30b309 100644
@@ -1038,6 +1038,19 @@ config ARM64_ERRATUM_2645198
 
 	  If unsure, say Y.
 
+config ARM64_ERRATUM_2966298
+	bool "Cortex-A520: 2966298: workaround for speculatively executed unprivileged load"
+	default y
+	help
+	  This option adds the workaround for ARM Cortex-A520 erratum 2966298.
+
+	  On an affected Cortex-A520 core, a speculatively executed unprivileged
+	  load might leak data from a privileged level via a cache side channel.
+
+	  Work around this problem by executing a TLBI before returning to EL0.
+
+	  If unsure, say Y.
+
 config CAVIUM_ERRATUM_22375
 	bool "Cavium erratum 22375, 24313"
 	default y
arch/arm64/include/asm/cpufeature.h +1 -1
index 96e50227f940..5bba39376055 100644
@@ -663,7 +663,7 @@ static inline bool supports_clearbhb(int scope)
 		isar2 = read_sanitised_ftr_reg(SYS_ID_AA64ISAR2_EL1);
 
 	return cpuid_feature_extract_unsigned_field(isar2,
-						    ID_AA64ISAR2_EL1_BC_SHIFT);
+						    ID_AA64ISAR2_EL1_CLRBHB_SHIFT);
 }
 
 const struct cpumask *system_32bit_el0_cpumask(void);
arch/arm64/include/asm/cputype.h +2 -0
index 5f6f84837a49..74d00feb62f0 100644
@@ -79,6 +79,7 @@
 #define ARM_CPU_PART_CORTEX_A78AE	0xD42
 #define ARM_CPU_PART_CORTEX_X1		0xD44
 #define ARM_CPU_PART_CORTEX_A510	0xD46
+#define ARM_CPU_PART_CORTEX_A520	0xD80
 #define ARM_CPU_PART_CORTEX_A710	0xD47
 #define ARM_CPU_PART_CORTEX_A715	0xD4D
 #define ARM_CPU_PART_CORTEX_X2		0xD48
@@ -148,6 +149,7 @@
 #define MIDR_CORTEX_A78AE	MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A78AE)
 #define MIDR_CORTEX_X1	MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_X1)
 #define MIDR_CORTEX_A510 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A510)
+#define MIDR_CORTEX_A520 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A520)
 #define MIDR_CORTEX_A710 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A710)
 #define MIDR_CORTEX_A715 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A715)
 #define MIDR_CORTEX_X2 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_X2)
arch/arm64/include/asm/hwcap.h +1 -0
index 692b1ec663b2..521267478d18 100644
@@ -138,6 +138,7 @@
 #define KERNEL_HWCAP_SME_B16B16		__khwcap2_feature(SME_B16B16)
 #define KERNEL_HWCAP_SME_F16F16		__khwcap2_feature(SME_F16F16)
 #define KERNEL_HWCAP_MOPS		__khwcap2_feature(MOPS)
+#define KERNEL_HWCAP_HBC		__khwcap2_feature(HBC)
 
 /*
  * This yields a mask that user programs can use to figure out what
arch/arm64/include/uapi/asm/hwcap.h +1 -0
index a2cac4305b1e..53026f45a509 100644
@@ -103,5 +103,6 @@
 #define HWCAP2_SME_B16B16	(1UL << 41)
 #define HWCAP2_SME_F16F16	(1UL << 42)
 #define HWCAP2_MOPS		(1UL << 43)
+#define HWCAP2_HBC		(1UL << 44)
 
 #endif /* _UAPI__ASM_HWCAP_H */
arch/arm64/kernel/cpu_errata.c +8 -0
index be66e94a21bd..5706e74c5578 100644
@@ -730,6 +730,14 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
 		.cpu_enable = cpu_clear_bf16_from_user_emulation,
 	},
 #endif
+#ifdef CONFIG_ARM64_ERRATUM_2966298
+	{
+		.desc = "ARM erratum 2966298",
+		.capability = ARM64_WORKAROUND_2966298,
+		/* Cortex-A520 r0p0 - r0p1 */
+		ERRATA_MIDR_REV_RANGE(MIDR_CORTEX_A520, 0, 0, 1),
+	},
+#endif
 #ifdef CONFIG_AMPERE_ERRATUM_AC03_CPU_38
 	{
 		.desc = "AmpereOne erratum AC03_CPU_38",
arch/arm64/kernel/cpufeature.c +3 -1
index f9d456fe132d..2c0b8444fea6 100644
@@ -222,7 +222,8 @@ static const struct arm64_ftr_bits ftr_id_aa64isar1[] = {
 static const struct arm64_ftr_bits ftr_id_aa64isar2[] = {
 	ARM64_FTR_BITS(FTR_VISIBLE, FTR_NONSTRICT, FTR_LOWER_SAFE, ID_AA64ISAR2_EL1_CSSC_SHIFT, 4, 0),
 	ARM64_FTR_BITS(FTR_VISIBLE, FTR_NONSTRICT, FTR_LOWER_SAFE, ID_AA64ISAR2_EL1_RPRFM_SHIFT, 4, 0),
-	ARM64_FTR_BITS(FTR_HIDDEN, FTR_STRICT, FTR_HIGHER_SAFE, ID_AA64ISAR2_EL1_BC_SHIFT, 4, 0),
+	ARM64_FTR_BITS(FTR_HIDDEN, FTR_STRICT, FTR_LOWER_SAFE, ID_AA64ISAR2_EL1_CLRBHB_SHIFT, 4, 0),
+	ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_LOWER_SAFE, ID_AA64ISAR2_EL1_BC_SHIFT, 4, 0),
 	ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_LOWER_SAFE, ID_AA64ISAR2_EL1_MOPS_SHIFT, 4, 0),
 	ARM64_FTR_BITS(FTR_VISIBLE_IF_IS_ENABLED(CONFIG_ARM64_PTR_AUTH),
 		       FTR_STRICT, FTR_EXACT, ID_AA64ISAR2_EL1_APA3_SHIFT, 4, 0),
@@ -2844,6 +2845,7 @@ static const struct arm64_cpu_capabilities arm64_elf_hwcaps[] = {
 	HWCAP_CAP(ID_AA64ISAR2_EL1, RPRES, IMP, CAP_HWCAP, KERNEL_HWCAP_RPRES),
 	HWCAP_CAP(ID_AA64ISAR2_EL1, WFxT, IMP, CAP_HWCAP, KERNEL_HWCAP_WFXT),
 	HWCAP_CAP(ID_AA64ISAR2_EL1, MOPS, IMP, CAP_HWCAP, KERNEL_HWCAP_MOPS),
+	HWCAP_CAP(ID_AA64ISAR2_EL1, BC, IMP, CAP_HWCAP, KERNEL_HWCAP_HBC),
 #ifdef CONFIG_ARM64_SME
 	HWCAP_CAP(ID_AA64PFR1_EL1, SME, IMP, CAP_HWCAP, KERNEL_HWCAP_SME),
 	HWCAP_CAP(ID_AA64SMFR0_EL1, FA64, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_FA64),
arch/arm64/kernel/cpuinfo.c +1 -0
index 58622dc85917..98fda8500535 100644
@@ -126,6 +126,7 @@ static const char *const hwcap_str[] = {
 	[KERNEL_HWCAP_SME_B16B16]	= "smeb16b16",
 	[KERNEL_HWCAP_SME_F16F16]	= "smef16f16",
 	[KERNEL_HWCAP_MOPS]		= "mops",
+	[KERNEL_HWCAP_HBC]		= "hbc",
 };
 
 #ifdef CONFIG_COMPAT
arch/arm64/kernel/entry.S +4 -0
index 6ad61de03d0a..a6030913cd58 100644
@@ -428,6 +428,10 @@ alternative_else_nop_endif
 	ldp	x28, x29, [sp, #16 * 14]
 
 	.if	\el == 0
+alternative_if ARM64_WORKAROUND_2966298
+	tlbi	vale1, xzr
+	dsb	nsh
+alternative_else_nop_endif
 alternative_if_not ARM64_UNMAP_KERNEL_AT_EL0
 	ldr	lr, [sp, #S_LR]
 	add	sp, sp, #PT_REGS_SIZE		// restore sp
arch/arm64/tools/cpucaps +1 -0
index c80ed4f3cbce..c28a9b995f3c 100644
@@ -83,6 +83,7 @@ WORKAROUND_2077057
 WORKAROUND_2457168
 WORKAROUND_2645198
 WORKAROUND_2658417
+WORKAROUND_2966298
 WORKAROUND_AMPERE_AC03_CPU_38
 WORKAROUND_TRBE_OVERWRITE_FILL_MODE
 WORKAROUND_TSB_FLUSH_FAILURE
arch/arm64/tools/sysreg +5 -1
index 65866bf819c3..ffc81afa6cac 100644
@@ -1347,7 +1347,11 @@ UnsignedEnum	51:48	RPRFM
 	0b0000	NI
 	0b0001	IMP
 EndEnum
-Res0	47:28
+Res0	47:32
+UnsignedEnum	31:28	CLRBHB
+	0b0000	NI
+	0b0001	IMP
+EndEnum
 UnsignedEnum	27:24	PAC_frac
 	0b0000	NI
 	0b0001	IMP
arch/parisc/include/asm/ldcw.h +20 -17
index 6d28b5514699..ee9e071859b2 100644
@@ -2,39 +2,42 @@
 #ifndef __PARISC_LDCW_H
 #define __PARISC_LDCW_H
 
-#ifndef CONFIG_PA20
 /* Because kmalloc only guarantees 8-byte alignment for kmalloc'd data,
    and GCC only guarantees 8-byte alignment for stack locals, we can't
    be assured of 16-byte alignment for atomic lock data even if we
    specify "__attribute ((aligned(16)))" in the type declaration.  So,
    we use a struct containing an array of four ints for the atomic lock
    type and dynamically select the 16-byte aligned int from the array
-   for the semaphore.  */
+   for the semaphore. */
+
+/* From: "Jim Hull" <jim.hull of hp.com>
+   I've attached a summary of the change, but basically, for PA 2.0, as
+   long as the ",CO" (coherent operation) completer is implemented, then the
+   16-byte alignment requirement for ldcw and ldcd is relaxed, and instead
+   they only require "natural" alignment (4-byte for ldcw, 8-byte for
+   ldcd).
+
+   Although the cache control hint is accepted by all PA 2.0 processors,
+   it is only implemented on PA8800/PA8900 CPUs. Prior PA8X00 CPUs still
+   require 16-byte alignment. If the address is unaligned, the operation
+   of the instruction is undefined. The ldcw instruction does not generate
+   unaligned data reference traps so misaligned accesses are not detected.
+   This hid the problem for years. So, restore the 16-byte alignment dropped
+   by Kyle McMartin in "Remove __ldcw_align for PA-RISC 2.0 processors". */
 
 #define __PA_LDCW_ALIGNMENT	16
-#define __PA_LDCW_ALIGN_ORDER	4
 #define __ldcw_align(a) ({					\
 	unsigned long __ret = (unsigned long) &(a)->lock[0];	\
 	__ret = (__ret + __PA_LDCW_ALIGNMENT - 1)		\
 		& ~(__PA_LDCW_ALIGNMENT - 1);			\
 	(volatile unsigned int *) __ret;			\
 })
-#define __LDCW	"ldcw"
 
-#else /*CONFIG_PA20*/
-/* From: "Jim Hull" <jim.hull of hp.com>
-   I've attached a summary of the change, but basically, for PA 2.0, as
-   long as the ",CO" (coherent operation) completer is specified, then the
-   16-byte alignment requirement for ldcw and ldcd is relaxed, and instead
-   they only require "natural" alignment (4-byte for ldcw, 8-byte for
-   ldcd). */
-
-#define __PA_LDCW_ALIGNMENT	4
-#define __PA_LDCW_ALIGN_ORDER	2
-#define __ldcw_align(a) (&(a)->slock)
+#ifdef CONFIG_PA20
 #define __LDCW	"ldcw,co"
-
-#endif /*!CONFIG_PA20*/
+#else
+#define __LDCW	"ldcw"
+#endif
 
 /* LDCW, the only atomic read-write operation PA-RISC has. *sigh*.
    We don't explicitly expose that "*a" may be written as reload
arch/parisc/include/asm/spinlock_types.h +0 -5
index efd06a897c6a..7b986b09dba8 100644
@@ -9,15 +9,10 @@
 #ifndef __ASSEMBLY__
 
 typedef struct {
-#ifdef CONFIG_PA20
-	volatile unsigned int slock;
-# define __ARCH_SPIN_LOCK_UNLOCKED { __ARCH_SPIN_LOCK_UNLOCKED_VAL }
-#else
 	volatile unsigned int lock[4];
 # define __ARCH_SPIN_LOCK_UNLOCKED	\
 	{ { __ARCH_SPIN_LOCK_UNLOCKED_VAL, __ARCH_SPIN_LOCK_UNLOCKED_VAL, \
 	    __ARCH_SPIN_LOCK_UNLOCKED_VAL, __ARCH_SPIN_LOCK_UNLOCKED_VAL } }
-#endif
 } arch_spinlock_t;
 
 
arch/parisc/kernel/smp.c +3 -1
index 4098f9a0964b..2019c1f04bd0 100644
@@ -440,7 +440,9 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle)
 	if (cpu_online(cpu))
 		return 0;
 
-	if (num_online_cpus() < setup_max_cpus && smp_boot_one_cpu(cpu, tidle))
+	if (num_online_cpus() < nr_cpu_ids &&
+		num_online_cpus() < setup_max_cpus &&
+		smp_boot_one_cpu(cpu, tidle))
 		return -EIO;
 
 	return cpu_online(cpu) ? 0 : -EIO;
arch/s390/net/bpf_jit_comp.c +1 -1
index de2fb12120d2..2861e3360aff 100644
@@ -2513,7 +2513,7 @@ int arch_prepare_bpf_trampoline(struct bpf_tramp_image *im, void *image,
 			return -E2BIG;
 	}
 
-	return ret;
+	return tjit.common.prg;
 }
 
 bool bpf_jit_supports_subprog_tailcalls(void)
arch/x86/events/amd/core.c +17 -7
index abadd5f23425..e24976593a29 100644
@@ -534,8 +534,12 @@ static void amd_pmu_cpu_reset(int cpu)
 	/* Clear enable bits i.e. PerfCntrGlobalCtl.PerfCntrEn */
 	wrmsrl(MSR_AMD64_PERF_CNTR_GLOBAL_CTL, 0);
 
-	/* Clear overflow bits i.e. PerfCntrGLobalStatus.PerfCntrOvfl */
-	wrmsrl(MSR_AMD64_PERF_CNTR_GLOBAL_STATUS_CLR, amd_pmu_global_cntr_mask);
+	/*
+	 * Clear freeze and overflow bits i.e. PerfCntrGLobalStatus.LbrFreeze
+	 * and PerfCntrGLobalStatus.PerfCntrOvfl
+	 */
+	wrmsrl(MSR_AMD64_PERF_CNTR_GLOBAL_STATUS_CLR,
+	       GLOBAL_STATUS_LBRS_FROZEN | amd_pmu_global_cntr_mask);
 }
 
 static int amd_pmu_cpu_prepare(int cpu)
@@ -570,6 +574,7 @@ static void amd_pmu_cpu_starting(int cpu)
 	int i, nb_id;
 
 	cpuc->perf_ctr_virt_mask = AMD64_EVENTSEL_HOSTONLY;
+	amd_pmu_cpu_reset(cpu);
 
 	if (!x86_pmu.amd_nb_constraints)
 		return;
@@ -591,8 +596,6 @@ static void amd_pmu_cpu_starting(int cpu)
 
 	cpuc->amd_nb->nb_id = nb_id;
 	cpuc->amd_nb->refcnt++;
-
-	amd_pmu_cpu_reset(cpu);
 }
 
 static void amd_pmu_cpu_dead(int cpu)
@@ -601,6 +604,7 @@ static void amd_pmu_cpu_dead(int cpu)
 
 	kfree(cpuhw->lbr_sel);
 	cpuhw->lbr_sel = NULL;
+	amd_pmu_cpu_reset(cpu);
 
 	if (!x86_pmu.amd_nb_constraints)
 		return;
@@ -613,8 +617,6 @@ static void amd_pmu_cpu_dead(int cpu)
 
 		cpuhw->amd_nb = NULL;
 	}
-
-	amd_pmu_cpu_reset(cpu);
 }
 
 static inline void amd_pmu_set_global_ctl(u64 ctl)
@@ -884,7 +886,7 @@ static int amd_pmu_v2_handle_irq(struct pt_regs *regs)
 	struct hw_perf_event *hwc;
 	struct perf_event *event;
 	int handled = 0, idx;
-	u64 status, mask;
+	u64 reserved, status, mask;
 	bool pmu_enabled;
 
 	/*
@@ -909,6 +911,14 @@ static int amd_pmu_v2_handle_irq(struct pt_regs *regs)
 		status &= ~GLOBAL_STATUS_LBRS_FROZEN;
 	}
 
+	reserved = status & ~amd_pmu_global_cntr_mask;
+	if (reserved)
+		pr_warn_once("Reserved PerfCntrGlobalStatus bits are set (0x%llx), please consider updating microcode\n",
+			     reserved);
+
+	/* Clear any reserved bits set by buggy microcode */
+	status &= amd_pmu_global_cntr_mask;
+
 	for (idx = 0; idx < x86_pmu.num_counters; idx++) {
 		if (!test_bit(idx, cpuc->active_mask))
 			continue;
arch/x86/kernel/sev-shared.c +55 -14

150 lines not on this page · raw message

arch/x86/kernel/sev.c +1 -2
index 1ee7bed453de..2b0342a03c1b 100644
@@ -868,8 +868,7 @@ void snp_set_memory_private(unsigned long vaddr, unsigned long npages)
 
 void snp_accept_memory(phys_addr_t start, phys_addr_t end)
 {
-	unsigned long vaddr;
-	unsigned int npages;
+	unsigned long vaddr, npages;
 
 	if (!cc_platform_has(CC_ATTR_GUEST_SEV_SNP))
 		return;
drivers/ata/libata-core.c +16 -0
index 76bf185a73c6..6ae9cff6b50c 100644
@@ -5245,11 +5245,27 @@ static const unsigned int ata_port_suspend_ehi = ATA_EHI_QUIET
 
 static void ata_port_suspend(struct ata_port *ap, pm_message_t mesg)
 {
+	/*
+	 * We are about to suspend the port, so we do not care about
+	 * scsi_rescan_device() calls scheduled by previous resume operations.
+	 * The next resume will schedule the rescan again. So cancel any rescan
+	 * that is not done yet.
+	 */
+	cancel_delayed_work_sync(&ap->scsi_rescan_task);
+
 	ata_port_request_pm(ap, mesg, 0, ata_port_suspend_ehi, false);
 }
 
 static void ata_port_suspend_async(struct ata_port *ap, pm_message_t mesg)
 {
+	/*
+	 * We are about to suspend the port, so we do not care about
+	 * scsi_rescan_device() calls scheduled by previous resume operations.
+	 * The next resume will schedule the rescan again. So cancel any rescan
+	 * that is not done yet.
+	 */
+	cancel_delayed_work_sync(&ap->scsi_rescan_task);
+
 	ata_port_request_pm(ap, mesg, 0, ata_port_suspend_ehi, true);
 }
 
drivers/ata/libata-scsi.c +15 -18
index 702812285d8f..ed3146c46091 100644
@@ -4900,7 +4900,7 @@ void ata_scsi_dev_rescan(struct work_struct *work)
 	struct ata_link *link;
 	struct ata_device *dev;
 	unsigned long flags;
-	bool delay_rescan = false;
+	int ret = 0;
 
 	mutex_lock(&ap->scsi_scan_mutex);
 	spin_lock_irqsave(ap->lock, flags);
@@ -4909,37 +4909,34 @@ void ata_scsi_dev_rescan(struct work_struct *work)
 		ata_for_each_dev(dev, link, ENABLED) {
 			struct scsi_device *sdev = dev->sdev;
 
+			/*
+			 * If the port was suspended before this was scheduled,
+			 * bail out.
+			 */
+			if (ap->pflags & ATA_PFLAG_SUSPENDED)
+				goto unlock;
+
 			if (!sdev)
 				continue;
 			if (scsi_device_get(sdev))
 				continue;
 
-			/*
-			 * If the rescan work was scheduled because of a resume
-			 * event, the port is already fully resumed, but the
-			 * SCSI device may not yet be fully resumed. In such
-			 * case, executing scsi_rescan_device() may cause a
-			 * deadlock with the PM code on device_lock(). Prevent
-			 * this by giving up and retrying rescan after a short
-			 * delay.
-			 */
-			delay_rescan = sdev->sdev_gendev.power.is_suspended;
-			if (delay_rescan) {
-				scsi_device_put(sdev);
-				break;
-			}
-
 			spin_unlock_irqrestore(ap->lock, flags);
-			scsi_rescan_device(&(sdev->sdev_gendev));
+			ret = scsi_rescan_device(sdev);
 			scsi_device_put(sdev);
 			spin_lock_irqsave(ap->lock, flags);
+
+			if (ret)
+				goto unlock;
 		}
 	}
 
+unlock:
 	spin_unlock_irqrestore(ap->lock, flags);
 	mutex_unlock(&ap->scsi_scan_mutex);
 
-	if (delay_rescan)
+	/* Reschedule with a delay if scsi_rescan_device() returned an error */
+	if (ret)
 		schedule_delayed_work(&ap->scsi_rescan_task,
 				      msecs_to_jiffies(5));
 }
drivers/base/regmap/regcache-rbtree.c +2 -1
index 06788965aa29..31d7bc682910 100644
@@ -453,7 +453,8 @@ static int regcache_rbtree_write(struct regmap *map, unsigned int reg,
 		if (!rbnode)
 			return -ENOMEM;
 		regcache_rbtree_set_register(map, rbnode,
-					     reg - rbnode->base_reg, value);
+					     (reg - rbnode->base_reg) / map->reg_stride,
+					     value);
 		regcache_rbtree_insert(map, &rbtree_ctx->root, rbnode);
 		rbtree_ctx->cached_rbnode = rbnode;
 	}
drivers/gpio/gpio-aspeed.c +1 -1
index da33bbbdacb9..58f107194fda 100644
@@ -973,7 +973,7 @@ static int aspeed_gpio_set_config(struct gpio_chip *chip, unsigned int offset,
 	else if (param == PIN_CONFIG_BIAS_DISABLE ||
 			param == PIN_CONFIG_BIAS_PULL_DOWN ||
 			param == PIN_CONFIG_DRIVE_STRENGTH)
-		return pinctrl_gpio_set_config(offset, config);
+		return pinctrl_gpio_set_config(chip->base + offset, config);
 	else if (param == PIN_CONFIG_DRIVE_OPEN_DRAIN ||
 			param == PIN_CONFIG_DRIVE_OPEN_SOURCE)
 		/* Return -ENOTSUPP to trigger emulation, as per datasheet */
drivers/gpio/gpio-pxa.c +1 -0
index a1630ed4b741..d92650aecb06 100644
@@ -238,6 +238,7 @@ static bool pxa_gpio_has_pinctrl(void)
 	switch (gpio_type) {
 	case PXA3XX_GPIO:
 	case MMP2_GPIO:
+	case MMP_GPIO:
 		return false;
 
 	default:
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
index 2168dc92c670..8940ee73f2df 100644
@@ -2308,7 +2308,7 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
 		adev->flags |= AMD_IS_PX;
 
 	if (!(adev->flags & AMD_IS_APU)) {
-		parent = pci_upstream_bridge(adev->pdev);
+		parent = pcie_find_root_port(adev->pdev);
 		adev->has_pr3 = parent ? pci_pr3_present(parent) : false;
 	}
 
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +23 -18

59 lines not on this page · raw message

drivers/gpu/drm/i915/gt/gen8_engine_cs.c +10 -1
index 2702ad4c26c8..60e0a317ed44 100644
@@ -271,8 +271,17 @@ int gen12_emit_flush_rcs(struct i915_request *rq, u32 mode)
 		if (GRAPHICS_VER_FULL(rq->i915) >= IP_VER(12, 70))
 			bit_group_0 |= PIPE_CONTROL_CCS_FLUSH;
 
+		/*
+		 * L3 fabric flush is needed for AUX CCS invalidation
+		 * which happens as part of pipe-control so we can
+		 * ignore PIPE_CONTROL_FLUSH_L3. Also PIPE_CONTROL_FLUSH_L3
+		 * deals with Protected Memory which is not needed for
+		 * AUX CCS invalidation and lead to unwanted side effects.
+		 */
+		if (mode & EMIT_FLUSH)
+			bit_group_1 |= PIPE_CONTROL_FLUSH_L3;
+
 		bit_group_1 |= PIPE_CONTROL_TILE_CACHE_FLUSH;
-		bit_group_1 |= PIPE_CONTROL_FLUSH_L3;
 		bit_group_1 |= PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH;
 		bit_group_1 |= PIPE_CONTROL_DEPTH_CACHE_FLUSH;
 		/* Wa_1409600907:tgl,adl-p */
drivers/hid/Kconfig +1 -0
index e11c1c803676..dc456c86e956 100644
@@ -792,6 +792,7 @@ config HID_NVIDIA_SHIELD
 	tristate "NVIDIA SHIELD devices"
 	depends on USB_HID
 	depends on BT_HIDP
+	depends on LEDS_CLASS
 	help
 	  Support for NVIDIA SHIELD accessories.
 
drivers/hid/hid-nvidia-shield.c +2 -1
index 9c4497413507..1ce9e42f57c7 100644
@@ -482,7 +482,7 @@ static inline int thunderstrike_led_create(struct thunderstrike *ts)
 
 	led->name = "thunderstrike:blue:led";
 	led->max_brightness = 1;
-	led->flags = LED_CORE_SUSPENDRESUME;
+	led->flags = LED_CORE_SUSPENDRESUME | LED_RETAIN_AT_SHUTDOWN;
 	led->brightness_get = &thunderstrike_led_get_brightness;
 	led->brightness_set = &thunderstrike_led_set_brightness;
 
@@ -694,6 +694,7 @@ static int shield_probe(struct hid_device *hdev, const struct hid_device_id *id)
 err_haptics:
 	if (ts->haptics_dev)
 		input_unregister_device(ts->haptics_dev);
+	led_classdev_unregister(&ts->led_dev);
 	return ret;
 }
 
drivers/hid/hid-sony.c +2 -0
index dd942061fd77..ebc0aa4e4345 100644
@@ -2155,6 +2155,8 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)
 	return ret;
 
 err:
+	usb_free_urb(sc->ghl_urb);
+
 	hid_hw_stop(hdev);
 	return ret;
 }
drivers/hid/intel-ish-hid/ipc/pci-ish.c +8 -0
index 55cb25038e63..710fda5f19e1 100644
@@ -133,6 +133,14 @@ static int enable_gpe(struct device *dev)
 	}
 	wakeup = &adev->wakeup;
 
+	/*
+	 * Call acpi_disable_gpe(), so that reference count
+	 * gpe_event_info->runtime_count doesn't overflow.
+	 * When gpe_event_info->runtime_count = 0, the call
+	 * to acpi_disable_gpe() simply return.
+	 */
+	acpi_disable_gpe(wakeup->gpe_device, wakeup->gpe_number);
+
 	acpi_sts = acpi_enable_gpe(wakeup->gpe_device, wakeup->gpe_number);
 	if (ACPI_FAILURE(acpi_sts)) {
 		dev_err(dev, "enable ose_gpe failed\n");
drivers/infiniband/core/cma.c +1 -1
index 9891c7dc2af5..1b301e8253bb 100644
@@ -4946,7 +4946,7 @@ static int cma_iboe_join_multicast(struct rdma_id_private *id_priv,
 	int err = 0;
 	struct sockaddr *addr = (struct sockaddr *)&mc->addr;
 	struct net_device *ndev = NULL;
-	struct ib_sa_multicast ib;
+	struct ib_sa_multicast ib = {};
 	enum ib_gid_type gid_type;
 	bool send_only;
 
drivers/infiniband/core/cma_configfs.c +1 -1
index 7b68b3ea979f..f2fb2d8a6597 100644
@@ -217,7 +217,7 @@ static int make_cma_ports(struct cma_dev_group *cma_dev_group,
 		return -ENOMEM;
 
 	for (i = 0; i < ports_num; i++) {
-		char port_str[10];
+		char port_str[11];
 
 		ports[i].port_num = i + 1;
 		snprintf(port_str, sizeof(port_str), "%u", i + 1);
drivers/infiniband/core/nldev.c +1 -0
index d5d3e4f0de77..6d1dbc978759 100644
@@ -2529,6 +2529,7 @@ static const struct rdma_nl_cbs nldev_cb_table[RDMA_NLDEV_NUM_OPS] = {
 	},
 	[RDMA_NLDEV_CMD_SYS_SET] = {
 		.doit = nldev_set_sys_set_doit,
+		.flags = RDMA_NL_ADMIN_PERM,
 	},
 	[RDMA_NLDEV_CMD_STAT_SET] = {
 		.doit = nldev_stat_set_doit,
drivers/infiniband/core/uverbs_main.c +1 -1
index 7c9c79c13941..508d6712e14d 100644
@@ -535,7 +535,7 @@ static ssize_t verify_hdr(struct ib_uverbs_cmd_hdr *hdr,
 	if (hdr->in_words * 4 != count)
 		return -EINVAL;
 
-	if (count < method_elm->req_size + sizeof(hdr)) {
+	if (count < method_elm->req_size + sizeof(*hdr)) {
 		/*
 		 * rdma-core v18 and v19 have a bug where they send DESTROY_CQ
 		 * with a 16 byte write instead of 24. Old kernels didn't
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c +9 -2
index bc3aea4592b9..27da7f9f4ebd 100644
@@ -664,7 +664,6 @@ static int bnxt_qplib_process_qp_event(struct bnxt_qplib_rcfw *rcfw,
 		blocked = cookie & RCFW_CMD_IS_BLOCKING;
 		cookie &= RCFW_MAX_COOKIE_VALUE;
 		crsqe = &rcfw->crsqe_tbl[cookie];
-		crsqe->is_in_used = false;
 
 		if (WARN_ONCE(test_bit(FIRMWARE_STALL_DETECTED,
 				       &rcfw->cmdq.flags),
@@ -680,8 +679,14 @@ static int bnxt_qplib_process_qp_event(struct bnxt_qplib_rcfw *rcfw,
 			atomic_dec(&rcfw->timeout_send);
 
 		if (crsqe->is_waiter_alive) {
-			if (crsqe->resp)
+			if (crsqe->resp) {
 				memcpy(crsqe->resp, qp_event, sizeof(*qp_event));
+				/* Insert write memory barrier to ensure that
+				 * response data is copied before clearing the
+				 * flags
+				 */
+				smp_wmb();
+			}
 			if (!blocked)
 				wait_cmds++;
 		}
@@ -693,6 +698,8 @@ static int bnxt_qplib_process_qp_event(struct bnxt_qplib_rcfw *rcfw,
 		if (!is_waiter_alive)
 			crsqe->resp = NULL;
 
+		crsqe->is_in_used = false;
+
 		hwq->cons += req_size;
 
 		/* This is a case to handle below scenario -
drivers/infiniband/hw/mlx4/sysfs.c +1 -1
index 24ee79aa2122..88f534cf690e 100644
@@ -223,7 +223,7 @@ void del_sysfs_port_mcg_attr(struct mlx4_ib_dev *device, int port_num,
 static int add_port_entries(struct mlx4_ib_dev *device, int port_num)
 {
 	int i;
-	char buff[11];
+	char buff[12];
 	struct mlx4_ib_iov_port *port = NULL;
 	int ret = 0 ;
 	struct ib_port_attr attr;
drivers/infiniband/hw/mlx5/fs.c +1 -1
index 1e419e080b53..520034acf73a 100644
@@ -2470,8 +2470,8 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_STEERING_ANCHOR_CREATE)(
 	mlx5_steering_anchor_destroy_res(ft_prio);
 put_flow_table:
 	put_flow_table(dev, ft_prio, true);
-	mutex_unlock(&dev->flow_db->lock);
 free_obj:
+	mutex_unlock(&dev->flow_db->lock);
 	kfree(obj);
 
 	return err;
drivers/infiniband/hw/mlx5/main.c +1 -1
index f0b394ed7452..666e737371b7 100644
@@ -2070,7 +2070,7 @@ static inline char *mmap_cmd2str(enum mlx5_ib_mmap_cmd cmd)
 	case MLX5_IB_MMAP_DEVICE_MEM:
 		return "Device Memory";
 	default:
-		return NULL;
+		return "Unknown";
 	}
 }
 
drivers/infiniband/hw/mlx5/mr.c +11 -3
index 2017ede100a6..2f81e69f7b30 100644
@@ -301,7 +301,8 @@ static int get_mkc_octo_size(unsigned int access_mode, unsigned int ndescs)
 
 static void set_cache_mkc(struct mlx5_cache_ent *ent, void *mkc)
 {
-	set_mkc_access_pd_addr_fields(mkc, 0, 0, ent->dev->umrc.pd);
+	set_mkc_access_pd_addr_fields(mkc, ent->rb_key.access_flags, 0,
+				      ent->dev->umrc.pd);
 	MLX5_SET(mkc, mkc, free, 1);
 	MLX5_SET(mkc, mkc, umr_en, 1);
 	MLX5_SET(mkc, mkc, access_mode_1_0, ent->rb_key.access_mode & 0x3);
@@ -1024,19 +1025,26 @@ void mlx5_mkey_cache_cleanup(struct mlx5_ib_dev *dev)
 	if (!dev->cache.wq)
 		return;
 
-	cancel_delayed_work_sync(&dev->cache.remove_ent_dwork);
 	mutex_lock(&dev->cache.rb_lock);
 	for (node = rb_first(root); node; node = rb_next(node)) {
 		ent = rb_entry(node, struct mlx5_cache_ent, node);
 		xa_lock_irq(&ent->mkeys);
 		ent->disabled = true;
 		xa_unlock_irq(&ent->mkeys);
-		cancel_delayed_work_sync(&ent->dwork);
 	}
+	mutex_unlock(&dev->cache.rb_lock);
+
+	/*
+	 * After all entries are disabled and will not reschedule on WQ,
+	 * flush it and all async commands.
+	 */
+	flush_workqueue(dev->cache.wq);
 
 	mlx5_mkey_cache_debugfs_cleanup(dev);
 	mlx5_cmd_cleanup_async_ctx(&dev->async_ctx);
 
+	/* At this point all entries are disabled and have no concurrent work. */
+	mutex_lock(&dev->cache.rb_lock);
 	node = rb_first(root);
 	while (node) {
 		ent = rb_entry(node, struct mlx5_cache_ent, node);
drivers/infiniband/sw/siw/siw_cm.c +12 -4
index a2605178f4ed..43e776073f49 100644
@@ -976,6 +976,7 @@ static void siw_accept_newconn(struct siw_cep *cep)
 			siw_cep_put(cep);
 			new_cep->listen_cep = NULL;
 			if (rv) {
+				siw_cancel_mpatimer(new_cep);
 				siw_cep_set_free(new_cep);
 				goto error;
 			}
@@ -1100,9 +1101,12 @@ static void siw_cm_work_handler(struct work_struct *w)
 				/*
 				 * Socket close before MPA request received.
 				 */
-				siw_dbg_cep(cep, "no mpareq: drop listener\n");
-				siw_cep_put(cep->listen_cep);
-				cep->listen_cep = NULL;
+				if (cep->listen_cep) {
+					siw_dbg_cep(cep,
+						"no mpareq: drop listener\n");
+					siw_cep_put(cep->listen_cep);
+					cep->listen_cep = NULL;
+				}
 			}
 		}
 		release_cep = 1;
@@ -1227,7 +1231,11 @@ static void siw_cm_llp_data_ready(struct sock *sk)
 	if (!cep)
 		goto out;
 
-	siw_dbg_cep(cep, "state: %d\n", cep->state);
+	siw_dbg_cep(cep, "cep state: %d, socket state %d\n",
+		    cep->state, sk->sk_state);
+
+	if (sk->sk_state != TCP_ESTABLISHED)
+		goto out;
 
 	switch (cep->state) {
 	case SIW_EPSTATE_RDMA_MODE:
drivers/infiniband/ulp/srp/ib_srp.c +5 -11
index 1574218764e0..2916e77f589b 100644
@@ -2784,7 +2784,6 @@ static int srp_abort(struct scsi_cmnd *scmnd)
 	u32 tag;
 	u16 ch_idx;
 	struct srp_rdma_ch *ch;
-	int ret;
 
 	shost_printk(KERN_ERR, target->scsi_host, "SRP abort called\n");
 
@@ -2798,19 +2797,14 @@ static int srp_abort(struct scsi_cmnd *scmnd)
 	shost_printk(KERN_ERR, target->scsi_host,
 		     "Sending SRP abort for tag %#x\n", tag);
 	if (srp_send_tsk_mgmt(ch, tag, scmnd->device->lun,
-			      SRP_TSK_ABORT_TASK, NULL) == 0)
-		ret = SUCCESS;
-	else if (target->rport->state == SRP_RPORT_LOST)
-		ret = FAST_IO_FAIL;
-	else
-		ret = FAILED;
-	if (ret == SUCCESS) {
+			      SRP_TSK_ABORT_TASK, NULL) == 0) {
 		srp_free_req(ch, req, scmnd, 0);
-		scmnd->result = DID_ABORT << 16;
-		scsi_done(scmnd);
+		return SUCCESS;
 	}
+	if (target->rport->state == SRP_RPORT_LOST)
+		return FAST_IO_FAIL;
 
-	return ret;
+	return FAILED;
 }
 
 static int srp_reset_device(struct scsi_cmnd *scmnd)
drivers/iommu/apple-dart.c +1 -2
index 8af64b57f048..f4d880408254 100644
@@ -671,8 +671,7 @@ static int apple_dart_attach_dev(struct iommu_domain *domain,
 		return ret;
 
 	switch (domain->type) {
-	case IOMMU_DOMAIN_DMA:
-	case IOMMU_DOMAIN_UNMANAGED:
+	default:
 		ret = apple_dart_domain_add_streams(dart_domain, cfg);
 		if (ret)
 			return ret;
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +10 -5
index 9b0dc3505601..6ccbae9b93a1 100644
@@ -1895,18 +1895,23 @@ static void __arm_smmu_tlb_inv_range(struct arm_smmu_cmdq_ent *cmd,
 		/* Get the leaf page size */
 		tg = __ffs(smmu_domain->domain.pgsize_bitmap);
 
+		num_pages = size >> tg;
+
 		/* Convert page size of 12,14,16 (log2) to 1,2,3 */
 		cmd->tlbi.tg = (tg - 10) / 2;
 
 		/*
-		 * Determine what level the granule is at. For non-leaf, io-pgtable
-		 * assumes .tlb_flush_walk can invalidate multiple levels at once,
-		 * so ignore the nominal last-level granule and leave TTL=0.
+		 * Determine what level the granule is at. For non-leaf, both
+		 * io-pgtable and SVA pass a nominal last-level granule because
+		 * they don't know what level(s) actually apply, so ignore that
+		 * and leave TTL=0. However for various errata reasons we still
+		 * want to use a range command, so avoid the SVA corner case
+		 * where both scale and num could be 0 as well.
 		 */
 		if (cmd->tlbi.leaf)
 			cmd->tlbi.ttl = 4 - ((ilog2(granule) - 3) / (tg - 3));
-
-		num_pages = size >> tg;
+		else if ((num_pages & CMDQ_TLBI_RANGE_NUM_MAX) == 1)
+			num_pages++;
 	}
 
 	cmds.num = 0;
drivers/iommu/intel/iommu.c +0 -16
index 5c8c5cdc36cf..4a9d9e82847d 100644
@@ -3004,13 +3004,6 @@ static int iommu_suspend(void)
 	struct intel_iommu *iommu = NULL;
 	unsigned long flag;
 
-	for_each_active_iommu(iommu, drhd) {
-		iommu->iommu_state = kcalloc(MAX_SR_DMAR_REGS, sizeof(u32),
-					     GFP_KERNEL);
-		if (!iommu->iommu_state)
-			goto nomem;
-	}
-
 	iommu_flush_all();
 
 	for_each_active_iommu(iommu, drhd) {
@@ -3030,12 +3023,6 @@ static int iommu_suspend(void)
 		raw_spin_unlock_irqrestore(&iommu->register_lock, flag);
 	}
 	return 0;
-
-nomem:
-	for_each_active_iommu(iommu, drhd)
-		kfree(iommu->iommu_state);
-
-	return -ENOMEM;
 }
 
 static void iommu_resume(void)
@@ -3067,9 +3054,6 @@ static void iommu_resume(void)
 
 		raw_spin_unlock_irqrestore(&iommu->register_lock, flag);
 	}
-
-	for_each_active_iommu(iommu, drhd)
-		kfree(iommu->iommu_state);
 }
 
 static struct syscore_ops iommu_syscore_ops = {
drivers/iommu/intel/iommu.h +1 -1
index 1c5e1d88862b..c74f15161d2a 100644
@@ -680,7 +680,7 @@ struct intel_iommu {
 	struct iopf_queue *iopf_queue;
 	unsigned char iopfq_name[16];
 	struct q_inval  *qi;            /* Queued invalidation info */
-	u32 *iommu_state; /* Store iommu states between suspend and resume.*/
+	u32 iommu_state[MAX_SR_DMAR_REGS]; /* Store iommu states between suspend and resume.*/
 
 #ifdef CONFIG_IRQ_REMAP
 	struct ir_table *ir_table;	/* Interrupt remapping info */
drivers/iommu/mtk_iommu.c +4 -5
index c2764891a779..ef27f9f1e17e 100644
@@ -258,7 +258,7 @@ struct mtk_iommu_data {
 	struct device			*smicomm_dev;
 
 	struct mtk_iommu_bank_data	*bank;
-	struct mtk_iommu_domain		*share_dom; /* For 2 HWs share pgtable */
+	struct mtk_iommu_domain		*share_dom;
 
 	struct regmap			*pericfg;
 	struct mutex			mutex; /* Protect m4u_group/m4u_dom above */
@@ -625,8 +625,8 @@ static int mtk_iommu_domain_finalise(struct mtk_iommu_domain *dom,
 	struct mtk_iommu_domain	*share_dom = data->share_dom;
 	const struct mtk_iommu_iova_region *region;
 
-	/* Always use share domain in sharing pgtable case */
-	if (MTK_IOMMU_HAS_FLAG(data->plat_data, SHARE_PGTABLE) && share_dom) {
+	/* Share pgtable when 2 MM IOMMU share the pgtable or one IOMMU use multiple iova ranges */
+	if (share_dom) {
 		dom->iop = share_dom->iop;
 		dom->cfg = share_dom->cfg;
 		dom->domain.pgsize_bitmap = share_dom->cfg.pgsize_bitmap;
@@ -659,8 +659,7 @@ static int mtk_iommu_domain_finalise(struct mtk_iommu_domain *dom,
 	/* Update our support page sizes bitmap */
 	dom->domain.pgsize_bitmap = dom->cfg.pgsize_bitmap;
 
-	if (MTK_IOMMU_HAS_FLAG(data->plat_data, SHARE_PGTABLE))
-		data->share_dom = dom;
+	data->share_dom = dom;
 
 update_iova_region:
 	/* Update the iova region for this domain */
drivers/leds/led-core.c +0 -4
index 04f9ea675f2c..214ed81eb0e9 100644
@@ -479,10 +479,6 @@ int led_compose_name(struct device *dev, struct led_init_data *init_data,
 
 	led_parse_fwnode_props(dev, fwnode, &props);
 
-	/* We want to label LEDs that can produce full range of colors
-	 * as RGB, not multicolor */
-	BUG_ON(props.color == LED_COLOR_ID_MULTI);
-
 	if (props.label) {
 		/*
 		 * If init_data.devicename is NULL, then it indicates that
drivers/md/dm-zoned-target.c +7 -8
index ad8e670a2f9b..b487f7acc860 100644
@@ -748,17 +748,16 @@ static int dmz_get_zoned_device(struct dm_target *ti, char *path,
 /*
  * Cleanup zoned device information.
  */
-static void dmz_put_zoned_device(struct dm_target *ti)
+static void dmz_put_zoned_devices(struct dm_target *ti)
 {
 	struct dmz_target *dmz = ti->private;
 	int i;
 
-	for (i = 0; i < dmz->nr_ddevs; i++) {
-		if (dmz->ddev[i]) {
+	for (i = 0; i < dmz->nr_ddevs; i++)
+		if (dmz->ddev[i])
 			dm_put_device(ti, dmz->ddev[i]);
-			dmz->ddev[i] = NULL;
-		}
-	}
+
+	kfree(dmz->ddev);
 }
 
 static int dmz_fixup_devices(struct dm_target *ti)
@@ -948,7 +947,7 @@ static int dmz_ctr(struct dm_target *ti, unsigned int argc, char **argv)
 err_meta:
 	dmz_dtr_metadata(dmz->metadata);
 err_dev:
-	dmz_put_zoned_device(ti);
+	dmz_put_zoned_devices(ti);
 err:
 	kfree(dmz->dev);
 	kfree(dmz);
@@ -978,7 +977,7 @@ static void dmz_dtr(struct dm_target *ti)
 
 	bioset_exit(&dmz->bio_set);
 
-	dmz_put_zoned_device(ti);
+	dmz_put_zoned_devices(ti);
 
 	mutex_destroy(&dmz->chunk_lock);
 
drivers/md/raid5.c +7 -0
index 85b3004594e0..e6ac4d0d94d8 100644
@@ -854,6 +854,13 @@ struct stripe_head *raid5_get_active_stripe(struct r5conf *conf,
 
 		set_bit(R5_INACTIVE_BLOCKED, &conf->cache_state);
 		r5l_wake_reclaim(conf->log, 0);
+
+		/* release batch_last before wait to avoid risk of deadlock */
+		if (ctx && ctx->batch_last) {
+			raid5_release_stripe(ctx->batch_last);
+			ctx->batch_last = NULL;
+		}
+
 		wait_event_lock_irq(conf->wait_for_stripe,
 				    is_inactive_blocked(conf, hash),
 				    *(conf->hash_locks + hash));
drivers/mtd/ubi/build.c +7 -0
index 8b91a55ec0d2..8ee51e49fced 100644
@@ -894,6 +894,13 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
 		return -EINVAL;
 	}
 
+	/* UBI cannot work on flashes with zero erasesize. */
+	if (!mtd->erasesize) {
+		pr_err("ubi: refuse attaching mtd%d - zero erasesize flash is not supported\n",
+			mtd->index);
+		return -EINVAL;
+	}
+
 	if (ubi_num == UBI_DEV_NUM_AUTO) {
 		/* Search for an empty slot in the @ubi_devices array */
 		for (ubi_num = 0; ubi_num < UBI_MAX_DEVICES; ubi_num++)
drivers/net/dsa/mv88e6xxx/chip.c +4 -2
index 7af2f08a62f1..0d4b236d1e34 100644
@@ -3040,14 +3040,16 @@ static void mv88e6xxx_hardware_reset(struct mv88e6xxx_chip *chip)
 		 * from the wrong location resulting in the switch booting
 		 * to wrong mode and inoperable.
 		 */
-		mv88e6xxx_g1_wait_eeprom_done(chip);
+		if (chip->info->ops->get_eeprom)
+			mv88e6xxx_g2_eeprom_wait(chip);
 
 		gpiod_set_value_cansleep(gpiod, 1);
 		usleep_range(10000, 20000);
 		gpiod_set_value_cansleep(gpiod, 0);
 		usleep_range(10000, 20000);
 
-		mv88e6xxx_g1_wait_eeprom_done(chip);
+		if (chip->info->ops->get_eeprom)
+			mv88e6xxx_g2_eeprom_wait(chip);
 	}
 }
 
drivers/net/dsa/mv88e6xxx/global1.c +0 -31
index 2fa55a643591..174c773b38c2 100644
@@ -75,37 +75,6 @@ static int mv88e6xxx_g1_wait_init_ready(struct mv88e6xxx_chip *chip)
 	return mv88e6xxx_g1_wait_bit(chip, MV88E6XXX_G1_STS, bit, 1);
 }
 
-void mv88e6xxx_g1_wait_eeprom_done(struct mv88e6xxx_chip *chip)
-{
-	const unsigned long timeout = jiffies + 1 * HZ;
-	u16 val;
-	int err;
-
-	/* Wait up to 1 second for the switch to finish reading the
-	 * EEPROM.
-	 */
-	while (time_before(jiffies, timeout)) {
-		err = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_STS, &val);
-		if (err) {
-			dev_err(chip->dev, "Error reading status");
-			return;
-		}
-
-		/* If the switch is still resetting, it may not
-		 * respond on the bus, and so MDIO read returns
-		 * 0xffff. Differentiate between that, and waiting for
-		 * the EEPROM to be done by bit 0 being set.
-		 */
-		if (val != 0xffff &&
-		    val & BIT(MV88E6XXX_G1_STS_IRQ_EEPROM_DONE))
-			return;
-
-		usleep_range(1000, 2000);
-	}
-
-	dev_err(chip->dev, "Timeout waiting for EEPROM done");
-}
-
 /* Offset 0x01: Switch MAC Address Register Bytes 0 & 1
  * Offset 0x02: Switch MAC Address Register Bytes 2 & 3
  * Offset 0x03: Switch MAC Address Register Bytes 4 & 5
drivers/net/dsa/mv88e6xxx/global1.h +0 -1
index c99ddd117fe6..1095261f5b49 100644
@@ -282,7 +282,6 @@ int mv88e6xxx_g1_set_switch_mac(struct mv88e6xxx_chip *chip, u8 *addr);
 int mv88e6185_g1_reset(struct mv88e6xxx_chip *chip);
 int mv88e6352_g1_reset(struct mv88e6xxx_chip *chip);
 int mv88e6250_g1_reset(struct mv88e6xxx_chip *chip);
-void mv88e6xxx_g1_wait_eeprom_done(struct mv88e6xxx_chip *chip);
 
 int mv88e6185_g1_ppu_enable(struct mv88e6xxx_chip *chip);
 int mv88e6185_g1_ppu_disable(struct mv88e6xxx_chip *chip);
drivers/net/dsa/mv88e6xxx/global2.c +1 -1
index 937a01f2ba75..b2b5f6ba438f 100644
@@ -340,7 +340,7 @@ int mv88e6xxx_g2_pot_clear(struct mv88e6xxx_chip *chip)
  * Offset 0x15: EEPROM Addr (for 8-bit data access)
  */
 
-static int mv88e6xxx_g2_eeprom_wait(struct mv88e6xxx_chip *chip)
+int mv88e6xxx_g2_eeprom_wait(struct mv88e6xxx_chip *chip)
 {
 	int bit = __bf_shf(MV88E6XXX_G2_EEPROM_CMD_BUSY);
 	int err;
drivers/net/dsa/mv88e6xxx/global2.h +1 -0
index 7e091965582b..d9434f7cae53 100644
@@ -365,6 +365,7 @@ int mv88e6xxx_g2_trunk_clear(struct mv88e6xxx_chip *chip);
 
 int mv88e6xxx_g2_device_mapping_write(struct mv88e6xxx_chip *chip, int target,
 				      int port);
+int mv88e6xxx_g2_eeprom_wait(struct mv88e6xxx_chip *chip);
 
 extern const struct mv88e6xxx_irq_ops mv88e6097_watchdog_ops;
 extern const struct mv88e6xxx_irq_ops mv88e6250_watchdog_ops;
drivers/net/ethernet/ibm/ibmveth.c +12 -13
index 832a2ae01950..a8d79ee350f8 100644
@@ -1303,24 +1303,23 @@ static void ibmveth_rx_csum_helper(struct sk_buff *skb,
 	 * the user space for finding a flow. During this process, OVS computes
 	 * checksum on the first packet when CHECKSUM_PARTIAL flag is set.
 	 *
-	 * So, re-compute TCP pseudo header checksum when configured for
-	 * trunk mode.
+	 * So, re-compute TCP pseudo header checksum.
 	 */
+
 	if (iph_proto == IPPROTO_TCP) {
 		struct tcphdr *tcph = (struct tcphdr *)(skb->data + iphlen);
+
 		if (tcph->check == 0x0000) {
 			/* Recompute TCP pseudo header checksum  */
-			if (adapter->is_active_trunk) {
-				tcphdrlen = skb->len - iphlen;
-				if (skb_proto == ETH_P_IP)
-					tcph->check =
-					 ~csum_tcpudp_magic(iph->saddr,
-					iph->daddr, tcphdrlen, iph_proto, 0);
-				else if (skb_proto == ETH_P_IPV6)
-					tcph->check =
-					 ~csum_ipv6_magic(&iph6->saddr,
-					&iph6->daddr, tcphdrlen, iph_proto, 0);
-			}
+			tcphdrlen = skb->len - iphlen;
+			if (skb_proto == ETH_P_IP)
+				tcph->check =
+				 ~csum_tcpudp_magic(iph->saddr,
+				iph->daddr, tcphdrlen, iph_proto, 0);
+			else if (skb_proto == ETH_P_IPV6)
+				tcph->check =
+				 ~csum_ipv6_magic(&iph6->saddr,
+				&iph6->daddr, tcphdrlen, iph_proto, 0);
 			/* Setup SKB fields for checksum offload */
 			skb_partial_csum_set(skb, iphlen,
 					     offsetof(struct tcphdr, check));
drivers/net/ethernet/intel/ice/ice_virtchnl.c +7 -5
index dcf628b1fccd..33ac6c4a8928 100644
@@ -2615,12 +2615,14 @@ static int ice_vc_query_rxdid(struct ice_vf *vf)
 		goto err;
 	}
 
-	/* Read flexiflag registers to determine whether the
-	 * corresponding RXDID is configured and supported or not.
-	 * Since Legacy 16byte descriptor format is not supported,
-	 * start from Legacy 32byte descriptor.
+	/* RXDIDs supported by DDP package can be read from the register
+	 * to get the supported RXDID bitmap. But the legacy 32byte RXDID
+	 * is not listed in DDP package, add it in the bitmap manually.
+	 * Legacy 16byte descriptor is not supported.
 	 */
-	for (i = ICE_RXDID_LEGACY_1; i < ICE_FLEX_DESC_RXDID_MAX_NUM; i++) {
+	rxdid->supported_rxdids |= BIT(ICE_RXDID_LEGACY_1);
+
+	for (i = ICE_RXDID_FLEX_NIC; i < ICE_FLEX_DESC_RXDID_MAX_NUM; i++) {
 		regval = rd32(hw, GLFLXP_RXDID_FLAGS(i, 0));
 		if ((regval >> GLFLXP_RXDID_FLAGS_FLEXIFLAG_4N_S)
 			& GLFLXP_RXDID_FLAGS_FLEXIFLAG_4N_M)
drivers/net/ethernet/mediatek/mtk_eth_soc.c +2 -2
index 7f0807672071..fa7fd42a9f02 100644
@@ -3036,8 +3036,8 @@ static irqreturn_t mtk_handle_irq_rx(int irq, void *_eth)
 
 	eth->rx_events++;
 	if (likely(napi_schedule_prep(&eth->rx_napi))) {
-		__napi_schedule(&eth->rx_napi);
 		mtk_rx_irq_disable(eth, eth->soc->txrx.rx_irq_done_mask);
+		__napi_schedule(&eth->rx_napi);
 	}
 
 	return IRQ_HANDLED;
@@ -3049,8 +3049,8 @@ static irqreturn_t mtk_handle_irq_tx(int irq, void *_eth)
 
 	eth->tx_events++;
 	if (likely(napi_schedule_prep(&eth->tx_napi))) {
-		__napi_schedule(&eth->tx_napi);
 		mtk_tx_irq_disable(eth, MTK_TX_DONE_INT);
+		__napi_schedule(&eth->tx_napi);
 	}
 
 	return IRQ_HANDLED;
drivers/net/ethernet/microchip/Kconfig +1 -0
index 329e374b9539..43ba71e82260 100644
@@ -46,6 +46,7 @@ config LAN743X
 	tristate "LAN743x support"
 	depends on PCI
 	depends on PTP_1588_CLOCK_OPTIONAL
+	select PHYLIB
 	select FIXED_PHY
 	select CRC16
 	select CRC32
drivers/net/ethernet/microsoft/mana/mana_en.c +146 -65

310 lines not on this page · raw message

drivers/net/ethernet/qlogic/qed/qed_ll2.h +1 -1
index 0bfc375161ed..a174c6fc626a 100644
@@ -110,9 +110,9 @@ struct qed_ll2_info {
 	enum core_tx_dest tx_dest;
 	u8 tx_stats_en;
 	bool main_func_queue;
+	struct qed_ll2_cbs cbs;
 	struct qed_ll2_rx_queue rx_queue;
 	struct qed_ll2_tx_queue tx_queue;
-	struct qed_ll2_cbs cbs;
 };
 
 extern const struct qed_ll2_ops qed_ll2_ops_pass;
drivers/net/ethernet/renesas/rswitch.c +24 -1
index 449ed1f5624c..660cbfe344d2 100644
@@ -4,6 +4,7 @@
  * Copyright (C) 2022 Renesas Electronics Corporation
  */
 
+#include <linux/clk.h>
 #include <linux/dma-mapping.h>
 #include <linux/err.h>
 #include <linux/etherdevice.h>
@@ -799,6 +800,7 @@ static int rswitch_poll(struct napi_struct *napi, int budget)
 	struct net_device *ndev = napi->dev;
 	struct rswitch_private *priv;
 	struct rswitch_device *rdev;
+	unsigned long flags;
 	int quota = budget;
 
 	rdev = netdev_priv(ndev);
@@ -817,8 +819,10 @@ static int rswitch_poll(struct napi_struct *napi, int budget)
 	netif_wake_subqueue(ndev, 0);
 
 	if (napi_complete_done(napi, budget - quota)) {
+		spin_lock_irqsave(&priv->lock, flags);
 		rswitch_enadis_data_irq(priv, rdev->tx_queue->index, true);
 		rswitch_enadis_data_irq(priv, rdev->rx_queue->index, true);
+		spin_unlock_irqrestore(&priv->lock, flags);
 	}
 
 out:
@@ -835,8 +839,10 @@ static void rswitch_queue_interrupt(struct net_device *ndev)
 	struct rswitch_device *rdev = netdev_priv(ndev);
 
 	if (napi_schedule_prep(&rdev->napi)) {
+		spin_lock(&rdev->priv->lock);
 		rswitch_enadis_data_irq(rdev->priv, rdev->tx_queue->index, false);
 		rswitch_enadis_data_irq(rdev->priv, rdev->rx_queue->index, false);
+		spin_unlock(&rdev->priv->lock);
 		__napi_schedule(&rdev->napi);
 	}
 }
@@ -1044,7 +1050,7 @@ static void rswitch_rmac_setting(struct rswitch_etha *etha, const u8 *mac)
 static void rswitch_etha_enable_mii(struct rswitch_etha *etha)
 {
 	rswitch_modify(etha->addr, MPIC, MPIC_PSMCS_MASK | MPIC_PSMHT_MASK,
-		       MPIC_PSMCS(0x05) | MPIC_PSMHT(0x06));
+		       MPIC_PSMCS(etha->psmcs) | MPIC_PSMHT(0x06));
 	rswitch_modify(etha->addr, MPSM, 0, MPSM_MFF_C45);
 }
 
@@ -1430,14 +1436,17 @@ static void rswitch_ether_port_deinit_all(struct rswitch_private *priv)
 static int rswitch_open(struct net_device *ndev)
 {
 	struct rswitch_device *rdev = netdev_priv(ndev);
+	unsigned long flags;
 
 	phy_start(ndev->phydev);
 
 	napi_enable(&rdev->napi);
 	netif_start_queue(ndev);
 
+	spin_lock_irqsave(&rdev->priv->lock, flags);
 	rswitch_enadis_data_irq(rdev->priv, rdev->tx_queue->index, true);
 	rswitch_enadis_data_irq(rdev->priv, rdev->rx_queue->index, true);
+	spin_unlock_irqrestore(&rdev->priv->lock, flags);
 
 	if (bitmap_empty(rdev->priv->opened_ports, RSWITCH_NUM_PORTS))
 		iowrite32(GWCA_TS_IRQ_BIT, rdev->priv->addr + GWTSDIE);
@@ -1451,6 +1460,7 @@ static int rswitch_stop(struct net_device *ndev)
 {
 	struct rswitch_device *rdev = netdev_priv(ndev);
 	struct rswitch_gwca_ts_info *ts_info, *ts_info2;
+	unsigned long flags;
 
 	netif_tx_stop_all_queues(ndev);
 	bitmap_clear(rdev->priv->opened_ports, rdev->port, 1);
@@ -1466,8 +1476,10 @@ static int rswitch_stop(struct net_device *ndev)
 		kfree(ts_info);
 	}
 
+	spin_lock_irqsave(&rdev->priv->lock, flags);
 	rswitch_enadis_data_irq(rdev->priv, rdev->tx_queue->index, false);
 	rswitch_enadis_data_irq(rdev->priv, rdev->rx_queue->index, false);
+	spin_unlock_irqrestore(&rdev->priv->lock, flags);
 
 	phy_stop(ndev->phydev);
 	napi_disable(&rdev->napi);
@@ -1670,6 +1682,12 @@ static void rswitch_etha_init(struct rswitch_private *priv, int index)
 	etha->index = index;
 	etha->addr = priv->addr + RSWITCH_ETHA_OFFSET + index * RSWITCH_ETHA_SIZE;
 	etha->coma_addr = priv->addr;
+
+	/* MPIC.PSMCS = (clk [MHz] / (MDC frequency [MHz] * 2) - 1.
+	 * Calculating PSMCS value as MDC frequency = 2.5MHz. So, multiply
+	 * both the numerator and the denominator by 10.
+	 */
+	etha->psmcs = clk_get_rate(priv->clk) / 100000 / (25 * 2) - 1;
 }
 
 static int rswitch_device_alloc(struct rswitch_private *priv, int index)
@@ -1869,6 +1887,11 @@ static int renesas_eth_sw_probe(struct platform_device *pdev)
 	priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
 	if (!priv)
 		return -ENOMEM;
+	spin_lock_init(&priv->lock);
+
+	priv->clk = devm_clk_get(&pdev->dev, NULL);
+	if (IS_ERR(priv->clk))
+		return PTR_ERR(priv->clk);
 
 	priv->ptp_priv = rcar_gen4_ptp_alloc(pdev);
 	if (!priv->ptp_priv)
drivers/net/ethernet/renesas/rswitch.h +4 -0
index bb9ed971a97c..13a401cebd8b 100644
@@ -915,6 +915,7 @@ struct rswitch_etha {
 	bool external_phy;
 	struct mii_bus *mii;
 	phy_interface_t phy_interface;
+	u32 psmcs;
 	u8 mac_addr[MAX_ADDR_LEN];
 	int link;
 	int speed;
@@ -1011,6 +1012,9 @@ struct rswitch_private {
 	struct rswitch_etha etha[RSWITCH_NUM_PORTS];
 	struct rswitch_mfwd mfwd;
 
+	spinlock_t lock;	/* lock interrupt registers' control */
+	struct clk *clk;
+
 	bool gwca_halt;
 };
 
drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c +5 -2
index bdb4de59a672..28c8ca5fba6c 100644
@@ -105,6 +105,7 @@ struct stm32_ops {
 	int (*parse_data)(struct stm32_dwmac *dwmac,
 			  struct device *dev);
 	u32 syscfg_eth_mask;
+	bool clk_rx_enable_in_suspend;
 };
 
 static int stm32_dwmac_init(struct plat_stmmacenet_data *plat_dat)
@@ -122,7 +123,8 @@ static int stm32_dwmac_init(struct plat_stmmacenet_data *plat_dat)
 	if (ret)
 		return ret;
 
-	if (!dwmac->dev->power.is_suspended) {
+	if (!dwmac->ops->clk_rx_enable_in_suspend ||
+	    !dwmac->dev->power.is_suspended) {
 		ret = clk_prepare_enable(dwmac->clk_rx);
 		if (ret) {
 			clk_disable_unprepare(dwmac->clk_tx);
@@ -514,7 +516,8 @@ static struct stm32_ops stm32mp1_dwmac_data = {
 	.suspend = stm32mp1_suspend,
 	.resume = stm32mp1_resume,
 	.parse_data = stm32mp1_parse_data,
-	.syscfg_eth_mask = SYSCFG_MP1_ETH_MASK
+	.syscfg_eth_mask = SYSCFG_MP1_ETH_MASK,
+	.clk_rx_enable_in_suspend = true
 };
 
 static const struct of_device_id stm32_dwmac_match[] = {
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +1 -1
index 231152ee5a32..5a3bd30d6c22 100644
@@ -901,7 +901,7 @@ static int __maybe_unused stmmac_pltfr_resume(struct device *dev)
 	struct platform_device *pdev = to_platform_device(dev);
 	int ret;
 
-	ret = stmmac_pltfr_init(pdev, priv->plat->bsp_priv);
+	ret = stmmac_pltfr_init(pdev, priv->plat);
 	if (ret)
 		return ret;
 
drivers/net/ethernet/ti/am65-cpsw-nuss.c +1 -0
index bebcfd5e6b57..a3d952f67ae3 100644
@@ -1749,6 +1749,7 @@ static int am65_cpsw_nuss_init_tx_chns(struct am65_cpsw_common *common)
 		if (tx_chn->irq <= 0) {
 			dev_err(dev, "Failed to get tx dma irq %d\n",
 				tx_chn->irq);
+			ret = tx_chn->irq ?: -ENXIO;
 			goto err;
 		}
 
drivers/net/usb/smsc75xx.c +3 -1
index 5d6454fedb3f..78ad2da3ee29 100644
@@ -90,7 +90,9 @@ static int __must_check __smsc75xx_read_reg(struct usbnet *dev, u32 index,
 	ret = fn(dev, USB_VENDOR_REQUEST_READ_REGISTER, USB_DIR_IN
 		 | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
 		 0, index, &buf, 4);
-	if (unlikely(ret < 0)) {
+	if (unlikely(ret < 4)) {
+		ret = ret < 0 ? ret : -ENODATA;
+
 		netdev_warn(dev->net, "Failed to read reg index 0x%08x: %d\n",
 			    index, ret);
 		return ret;
drivers/net/wan/fsl_ucc_hdlc.c +10 -2
index 47c2ad7a3e42..fd50bb313b92 100644
@@ -34,6 +34,8 @@
 #define TDM_PPPOHT_SLIC_MAXIN
 #define RX_BD_ERRORS (R_CD_S | R_OV_S | R_CR_S | R_AB_S | R_NO_S | R_LG_S)
 
+static int uhdlc_close(struct net_device *dev);
+
 static struct ucc_tdm_info utdm_primary_info = {
 	.uf_info = {
 		.tsa = 0,
@@ -708,6 +710,7 @@ static int uhdlc_open(struct net_device *dev)
 	hdlc_device *hdlc = dev_to_hdlc(dev);
 	struct ucc_hdlc_private *priv = hdlc->priv;
 	struct ucc_tdm *utdm = priv->utdm;
+	int rc = 0;
 
 	if (priv->hdlc_busy != 1) {
 		if (request_irq(priv->ut_info->uf_info.irq,
@@ -731,10 +734,13 @@ static int uhdlc_open(struct net_device *dev)
 		napi_enable(&priv->napi);
 		netdev_reset_queue(dev);
 		netif_start_queue(dev);
-		hdlc_open(dev);
+
+		rc = hdlc_open(dev);
+		if (rc)
+			uhdlc_close(dev);
 	}
 
-	return 0;
+	return rc;
 }
 
 static void uhdlc_memclean(struct ucc_hdlc_private *priv)
@@ -824,6 +830,8 @@ static int uhdlc_close(struct net_device *dev)
 	netdev_reset_queue(dev);
 	priv->hdlc_busy = 0;
 
+	hdlc_close(dev);
+
 	return 0;
 }
 
drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h +7 -2
index bece26741d3a..611d1a6aabb9 100644
@@ -442,7 +442,12 @@ struct brcmf_scan_params_v2_le {
 				 * fixed parameter portion is assumed, otherwise
 				 * ssid in the fixed portion is ignored
 				 */
-	__le16 channel_list[1];	/* list of chanspecs */
+	union {
+		__le16 padding;	/* Reserve space for at least 1 entry for abort
+				 * which uses an on stack brcmf_scan_params_v2_le
+				 */
+		DECLARE_FLEX_ARRAY(__le16, channel_list);	/* chanspecs */
+	};
 };
 
 struct brcmf_scan_results {
@@ -702,7 +707,7 @@ struct brcmf_sta_info_le {
 
 struct brcmf_chanspec_list {
 	__le32	count;		/* # of entries */
-	__le32	element[1];	/* variable length uint32 list */
+	__le32  element[];	/* variable length uint32 list */
 };
 
 /*
drivers/net/wireless/intel/iwlwifi/fw/error-dump.h +3 -3
index f5e08988dc7b..06d6f7f66430 100644
@@ -310,9 +310,9 @@ struct iwl_fw_ini_fifo_hdr {
 struct iwl_fw_ini_error_dump_range {
 	__le32 range_data_size;
 	union {
-		__le32 internal_base_addr;
-		__le64 dram_base_addr;
-		__le32 page_num;
+		__le32 internal_base_addr __packed;
+		__le64 dram_base_addr __packed;
+		__le32 page_num __packed;
 		struct iwl_fw_ini_fifo_hdr fifo_hdr;
 		struct iwl_cmd_header fw_pkt_hdr;
 	};
drivers/net/wireless/intel/iwlwifi/mvm/fw.c +1 -1
index 1f5db65a088d..1d5ee4330f29 100644
@@ -802,7 +802,7 @@ int iwl_run_init_mvm_ucode(struct iwl_mvm *mvm)
 		mvm->nvm_data->bands[0].n_channels = 1;
 		mvm->nvm_data->bands[0].n_bitrates = 1;
 		mvm->nvm_data->bands[0].bitrates =
-			(void *)((u8 *)mvm->nvm_data->channels + 1);
+			(void *)(mvm->nvm_data->channels + 1);
 		mvm->nvm_data->bands[0].bitrates->hw_value = 10;
 	}
 
drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c +63 -58

136 lines not on this page · raw message

drivers/net/wireless/intel/iwlwifi/mvm/scan.c +1 -1
index c1d9ce753468..3cbe2c0b8d6b 100644
@@ -2342,7 +2342,7 @@ iwl_mvm_scan_umac_fill_general_p_v12(struct iwl_mvm *mvm,
 	if (gen_flags & IWL_UMAC_SCAN_GEN_FLAGS_V2_FRAGMENTED_LMAC2)
 		gp->num_of_fragments[SCAN_HB_LMAC_IDX] = IWL_SCAN_NUM_OF_FRAGS;
 
-	if (version < 12) {
+	if (version < 16) {
 		gp->scan_start_mac_or_link_id = scan_vif->id;
 	} else {
 		struct iwl_mvm_vif_link_info *link_info;
drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c +2 -2
index 391793a16adc..d1d3632a3ed7 100644
@@ -965,8 +965,8 @@ void mwifiex_11n_rxba_sync_event(struct mwifiex_private *priv,
 			}
 		}
 
-		tlv_buf_left -= (sizeof(*tlv_rxba) + tlv_len);
-		tmp = (u8 *)tlv_rxba + tlv_len + sizeof(*tlv_rxba);
+		tlv_buf_left -= (sizeof(tlv_rxba->header) + tlv_len);
+		tmp = (u8 *)tlv_rxba  + sizeof(tlv_rxba->header) + tlv_len;
 		tlv_rxba = (struct mwifiex_ie_types_rxba_sync *)tmp;
 	}
 }
drivers/net/wireless/marvell/mwifiex/sta_rx.c +9 -7
index 65420ad67416..257737137cd7 100644
@@ -86,7 +86,8 @@ int mwifiex_process_rx_packet(struct mwifiex_private *priv,
 	rx_pkt_len = le16_to_cpu(local_rx_pd->rx_pkt_length);
 	rx_pkt_hdr = (void *)local_rx_pd + rx_pkt_off;
 
-	if (sizeof(*rx_pkt_hdr) + rx_pkt_off > skb->len) {
+	if (sizeof(rx_pkt_hdr->eth803_hdr) + sizeof(rfc1042_header) +
+	    rx_pkt_off > skb->len) {
 		mwifiex_dbg(priv->adapter, ERROR,
 			    "wrong rx packet offset: len=%d, rx_pkt_off=%d\n",
 			    skb->len, rx_pkt_off);
@@ -95,12 +96,13 @@ int mwifiex_process_rx_packet(struct mwifiex_private *priv,
 		return -1;
 	}
 
-	if ((!memcmp(&rx_pkt_hdr->rfc1042_hdr, bridge_tunnel_header,
-		     sizeof(bridge_tunnel_header))) ||
-	    (!memcmp(&rx_pkt_hdr->rfc1042_hdr, rfc1042_header,
-		     sizeof(rfc1042_header)) &&
-	     ntohs(rx_pkt_hdr->rfc1042_hdr.snap_type) != ETH_P_AARP &&
-	     ntohs(rx_pkt_hdr->rfc1042_hdr.snap_type) != ETH_P_IPX)) {
+	if (sizeof(*rx_pkt_hdr) + rx_pkt_off <= skb->len &&
+	    ((!memcmp(&rx_pkt_hdr->rfc1042_hdr, bridge_tunnel_header,
+		      sizeof(bridge_tunnel_header))) ||
+	     (!memcmp(&rx_pkt_hdr->rfc1042_hdr, rfc1042_header,
+		      sizeof(rfc1042_header)) &&
+	      ntohs(rx_pkt_hdr->rfc1042_hdr.snap_type) != ETH_P_AARP &&
+	      ntohs(rx_pkt_hdr->rfc1042_hdr.snap_type) != ETH_P_IPX))) {
 		/*
 		 *  Replace the 803 header and rfc1042 header (llc/snap) with an
 		 *    EthernetII header, keep the src/dst and snap_type
drivers/net/wireless/mediatek/mt76/dma.c +4 -4
index 465190ebaf1c..f539913aadf8 100644
@@ -93,13 +93,13 @@ __mt76_get_rxwi(struct mt76_dev *dev)
 {
 	struct mt76_txwi_cache *t = NULL;
 
-	spin_lock(&dev->wed_lock);
+	spin_lock_bh(&dev->wed_lock);
 	if (!list_empty(&dev->rxwi_cache)) {
 		t = list_first_entry(&dev->rxwi_cache, struct mt76_txwi_cache,
 				     list);
 		list_del(&t->list);
 	}
-	spin_unlock(&dev->wed_lock);
+	spin_unlock_bh(&dev->wed_lock);
 
 	return t;
 }
@@ -145,9 +145,9 @@ mt76_put_rxwi(struct mt76_dev *dev, struct mt76_txwi_cache *t)
 	if (!t)
 		return;
 
-	spin_lock(&dev->wed_lock);
+	spin_lock_bh(&dev->wed_lock);
 	list_add(&t->list, &dev->rxwi_cache);
-	spin_unlock(&dev->wed_lock);
+	spin_unlock_bh(&dev->wed_lock);
 }
 EXPORT_SYMBOL_GPL(mt76_put_rxwi);
 
drivers/net/wireless/mediatek/mt76/mt76x02_eeprom.c +0 -7
index 0acabba2d1a5..5d402cf2951c 100644
@@ -131,15 +131,8 @@ u8 mt76x02_get_lna_gain(struct mt76x02_dev *dev,
 			s8 *lna_2g, s8 *lna_5g,
 			struct ieee80211_channel *chan)
 {
-	u16 val;
 	u8 lna;
 
-	val = mt76x02_eeprom_get(dev, MT_EE_NIC_CONF_1);
-	if (val & MT_EE_NIC_CONF_1_LNA_EXT_2G)
-		*lna_2g = 0;
-	if (val & MT_EE_NIC_CONF_1_LNA_EXT_5G)
-		memset(lna_5g, 0, sizeof(s8) * 3);
-
 	if (chan->band == NL80211_BAND_2GHZ)
 		lna = *lna_2g;
 	else if (chan->hw_value <= 64)
drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.c +11 -2
index d5809408d1d3..8c01855885ce 100644
@@ -256,7 +256,8 @@ void mt76x2_read_rx_gain(struct mt76x02_dev *dev)
 	struct ieee80211_channel *chan = dev->mphy.chandef.chan;
 	int channel = chan->hw_value;
 	s8 lna_5g[3], lna_2g;
-	u8 lna;
+	bool use_lna;
+	u8 lna = 0;
 	u16 val;
 
 	if (chan->band == NL80211_BAND_2GHZ)
@@ -275,7 +276,15 @@ void mt76x2_read_rx_gain(struct mt76x02_dev *dev)
 	dev->cal.rx.mcu_gain |= (lna_5g[1] & 0xff) << 16;
 	dev->cal.rx.mcu_gain |= (lna_5g[2] & 0xff) << 24;
 
-	lna = mt76x02_get_lna_gain(dev, &lna_2g, lna_5g, chan);
+	val = mt76x02_eeprom_get(dev, MT_EE_NIC_CONF_1);
+	if (chan->band == NL80211_BAND_2GHZ)
+		use_lna = !(val & MT_EE_NIC_CONF_1_LNA_EXT_2G);
+	else
+		use_lna = !(val & MT_EE_NIC_CONF_1_LNA_EXT_5G);
+
+	if (use_lna)
+		lna = mt76x02_get_lna_gain(dev, &lna_2g, lna_5g, chan);
+
 	dev->cal.rx.lna_gain = mt76x02_sign_extend(lna, 8);
 }
 EXPORT_SYMBOL_GPL(mt76x2_read_rx_gain);
drivers/net/wireless/realtek/rtw88/rtw8723d.h +1 -0
index 3642a2c7f80c..2434e2480cbe 100644
@@ -46,6 +46,7 @@ struct rtw8723du_efuse {
 	u8 vender_id[2];                /* 0x100 */
 	u8 product_id[2];               /* 0x102 */
 	u8 usb_option;                  /* 0x104 */
+	u8 res5[2];			/* 0x105 */
 	u8 mac_addr[ETH_ALEN];          /* 0x107 */
 };
 
drivers/of/dynamic.c +3 -3
index 4999636eaa92..f7bb73cf821e 100644
@@ -927,13 +927,13 @@ int of_changeset_action(struct of_changeset *ocs, unsigned long action,
 {
 	struct of_changeset_entry *ce;
 
+	if (WARN_ON(action >= ARRAY_SIZE(action_names)))
+		return -EINVAL;
+
 	ce = kzalloc(sizeof(*ce), GFP_KERNEL);
 	if (!ce)
 		return -ENOMEM;
 
-	if (WARN_ON(action >= ARRAY_SIZE(action_names)))
-		return -EINVAL;
-
 	/* get a reference to the node */
 	ce->action = action;
 	ce->np = of_node_get(np);
drivers/pci/controller/dwc/pcie-qcom.c +1 -3
index 7a87a47eb7ed..5cbcdd46ed47 100644
@@ -43,7 +43,6 @@
 #define PARF_PHY_REFCLK				0x4c
 #define PARF_CONFIG_BITS			0x50
 #define PARF_DBI_BASE_ADDR			0x168
-#define PARF_SLV_ADDR_SPACE_SIZE_2_3_3		0x16c /* Register offset specific to IP ver 2.3.3 */
 #define PARF_MHI_CLOCK_RESET_CTRL		0x174
 #define PARF_AXI_MSTR_WR_ADDR_HALT		0x178
 #define PARF_AXI_MSTR_WR_ADDR_HALT_V2		0x1a8
@@ -797,8 +796,7 @@ static int qcom_pcie_post_init_2_3_3(struct qcom_pcie *pcie)
 	u16 offset = dw_pcie_find_capability(pci, PCI_CAP_ID_EXP);
 	u32 val;
 
-	writel(SLV_ADDR_SPACE_SZ,
-		pcie->parf + PARF_SLV_ADDR_SPACE_SIZE_2_3_3);
+	writel(SLV_ADDR_SPACE_SZ, pcie->parf + PARF_SLV_ADDR_SPACE_SIZE);
 
 	val = readl(pcie->parf + PARF_PHY_CTRL);
 	val &= ~PHY_TEST_PWR_DOWN;
drivers/pci/pci-driver.c +13 -1
index ae9baf801681..41ee3dd8cecb 100644
@@ -572,7 +572,19 @@ static void pci_pm_default_resume_early(struct pci_dev *pci_dev)
 
 static void pci_pm_bridge_power_up_actions(struct pci_dev *pci_dev)
 {
-	pci_bridge_wait_for_secondary_bus(pci_dev, "resume");
+	int ret;
+
+	ret = pci_bridge_wait_for_secondary_bus(pci_dev, "resume");
+	if (ret) {
+		/*
+		 * The downstream link failed to come up, so mark the
+		 * devices below as disconnected to make sure we don't
+		 * attempt to resume them.
+		 */
+		pci_walk_bus(pci_dev->subordinate, pci_dev_set_disconnected,
+			     NULL);
+		return;
+	}
 
 	/*
 	 * When powering on a bridge from D3cold, the whole hierarchy may be
drivers/platform/x86/intel/ifs/runtest.c +4 -3
index 1061eb7ec399..43c864add778 100644
@@ -331,14 +331,15 @@ int do_core_test(int cpu, struct device *dev)
 	switch (test->test_num) {
 	case IFS_TYPE_SAF:
 		if (!ifsd->loaded)
-			return -EPERM;
-		ifs_test_core(cpu, dev);
+			ret = -EPERM;
+		else
+			ifs_test_core(cpu, dev);
 		break;
 	case IFS_TYPE_ARRAY_BIST:
 		ifs_array_test_core(cpu, dev);
 		break;
 	default:
-		return -EINVAL;
+		ret = -EINVAL;
 	}
 out:
 	cpus_read_unlock();
drivers/ptp/ptp_ocp.c +0 -1
index 20a974ced8d6..a7a6947ab4bc 100644
@@ -3998,7 +3998,6 @@ ptp_ocp_device_init(struct ptp_ocp *bp, struct pci_dev *pdev)
 	return 0;
 
 out:
-	ptp_ocp_dev_release(&bp->dev);
 	put_device(&bp->dev);
 	return err;
 }
drivers/regulator/core.c +2 -2
index d8e1caaf207e..2820badc7a12 100644
@@ -5542,6 +5542,8 @@ regulator_register(struct device *dev,
 		goto rinse;
 	}
 	device_initialize(&rdev->dev);
+	dev_set_drvdata(&rdev->dev, rdev);
+	rdev->dev.class = &regulator_class;
 	spin_lock_init(&rdev->err_lock);
 
 	/*
@@ -5603,11 +5605,9 @@ regulator_register(struct device *dev,
 		rdev->supply_name = regulator_desc->supply_name;
 
 	/* register with sysfs */
-	rdev->dev.class = &regulator_class;
 	rdev->dev.parent = config->dev;
 	dev_set_name(&rdev->dev, "regulator.%lu",
 		    (unsigned long) atomic_inc_return(&regulator_no));
-	dev_set_drvdata(&rdev->dev, rdev);
 
 	/* set regulator constraints */
 	if (init_data)
drivers/regulator/mt6358-regulator.c +15 -3
index b9cda2210c33..65fbd95f1dbb 100644
@@ -43,7 +43,7 @@ struct mt6358_regulator_info {
 	.desc = {	\
 		.name = #vreg,	\
 		.of_match = of_match_ptr(match),	\
-		.ops = &mt6358_volt_range_ops,	\
+		.ops = &mt6358_buck_ops,	\
 		.type = REGULATOR_VOLTAGE,	\
 		.id = MT6358_ID_##vreg,		\
 		.owner = THIS_MODULE,		\
@@ -139,7 +139,7 @@ struct mt6358_regulator_info {
 	.desc = {	\
 		.name = #vreg,	\
 		.of_match = of_match_ptr(match),	\
-		.ops = &mt6358_volt_range_ops,	\
+		.ops = &mt6358_buck_ops,	\
 		.type = REGULATOR_VOLTAGE,	\
 		.id = MT6366_ID_##vreg,		\
 		.owner = THIS_MODULE,		\
@@ -450,7 +450,7 @@ static unsigned int mt6358_regulator_get_mode(struct regulator_dev *rdev)
 	}
 }
 
-static const struct regulator_ops mt6358_volt_range_ops = {
+static const struct regulator_ops mt6358_buck_ops = {
 	.list_voltage = regulator_list_voltage_linear,
 	.map_voltage = regulator_map_voltage_linear,
 	.set_voltage_sel = regulator_set_voltage_sel_regmap,
@@ -464,6 +464,18 @@ static const struct regulator_ops mt6358_volt_range_ops = {
 	.get_mode = mt6358_regulator_get_mode,
 };
 
+static const struct regulator_ops mt6358_volt_range_ops = {
+	.list_voltage = regulator_list_voltage_linear,
+	.map_voltage = regulator_map_voltage_linear,
+	.set_voltage_sel = regulator_set_voltage_sel_regmap,
+	.get_voltage_sel = mt6358_get_buck_voltage_sel,
+	.set_voltage_time_sel = regulator_set_voltage_time_sel,
+	.enable = regulator_enable_regmap,
+	.disable = regulator_disable_regmap,
+	.is_enabled = regulator_is_enabled_regmap,
+	.get_status = mt6358_get_status,
+};
+
 static const struct regulator_ops mt6358_volt_table_ops = {
 	.list_voltage = regulator_list_voltage_table,
 	.map_voltage = regulator_map_voltage_iterate,
drivers/s390/scsi/zfcp_aux.c +5 -4
index df782646e856..ab2f35bc294d 100644
@@ -518,12 +518,12 @@ struct zfcp_port *zfcp_port_enqueue(struct zfcp_adapter *adapter, u64 wwpn,
 	if (port) {
 		put_device(&port->dev);
 		retval = -EEXIST;
-		goto err_out;
+		goto err_put;
 	}
 
 	port = kzalloc(sizeof(struct zfcp_port), GFP_KERNEL);
 	if (!port)
-		goto err_out;
+		goto err_put;
 
 	rwlock_init(&port->unit_list_lock);
 	INIT_LIST_HEAD(&port->unit_list);
@@ -546,7 +546,7 @@ struct zfcp_port *zfcp_port_enqueue(struct zfcp_adapter *adapter, u64 wwpn,
 
 	if (dev_set_name(&port->dev, "0x%016llx", (unsigned long long)wwpn)) {
 		kfree(port);
-		goto err_out;
+		goto err_put;
 	}
 	retval = -EINVAL;
 
@@ -563,7 +563,8 @@ struct zfcp_port *zfcp_port_enqueue(struct zfcp_adapter *adapter, u64 wwpn,
 
 	return port;
 
-err_out:
+err_put:
 	zfcp_ccw_adapter_put(adapter);
+err_out:
 	return ERR_PTR(retval);
 }
drivers/scsi/aacraid/commsup.c +1 -1
index 3f062e4013ab..013a9a334972 100644
@@ -1451,7 +1451,7 @@ static void aac_handle_aif(struct aac_dev * dev, struct fib * fibptr)
 #endif
 				break;
 			}
-			scsi_rescan_device(&device->sdev_gendev);
+			scsi_rescan_device(device);
 			break;
 
 		default:
drivers/scsi/mvumi.c +1 -1
index 73aa7059b556..6cfbac518085 100644
@@ -1500,7 +1500,7 @@ static void mvumi_rescan_devices(struct mvumi_hba *mhba, int id)
 
 	sdev = scsi_device_lookup(mhba->shost, 0, id, 0);
 	if (sdev) {
-		scsi_rescan_device(&sdev->sdev_gendev);
+		scsi_rescan_device(sdev);
 		scsi_device_put(sdev);
 	}
 }
drivers/scsi/scsi_lib.c +1 -1
index ad9afae49544..ca5eb058d5c7 100644
@@ -2458,7 +2458,7 @@ static void scsi_evt_emit(struct scsi_device *sdev, struct scsi_event *evt)
 		envp[idx++] = "SDEV_MEDIA_CHANGE=1";
 		break;
 	case SDEV_EVT_INQUIRY_CHANGE_REPORTED:
-		scsi_rescan_device(&sdev->sdev_gendev);
+		scsi_rescan_device(sdev);
 		envp[idx++] = "SDEV_UA=INQUIRY_DATA_HAS_CHANGED";
 		break;
 	case SDEV_EVT_CAPACITY_CHANGE_REPORTED:
drivers/scsi/scsi_priv.h +0 -1
index f42388ecb024..65c993c97909 100644
@@ -138,7 +138,6 @@ extern int scsi_complete_async_scans(void);
 extern int scsi_scan_host_selected(struct Scsi_Host *, unsigned int,
 				   unsigned int, u64, enum scsi_scan_mode);
 extern void scsi_forget_host(struct Scsi_Host *);
-extern void scsi_rescan_device(struct device *);
 
 /* scsi_sysctl.c */
 #ifdef CONFIG_SYSCTL
drivers/scsi/scsi_scan.c +18 -2
index 97669657a997..902655d75947 100644
@@ -1619,12 +1619,24 @@ int scsi_add_device(struct Scsi_Host *host, uint channel,
 }
 EXPORT_SYMBOL(scsi_add_device);
 
-void scsi_rescan_device(struct device *dev)
+int scsi_rescan_device(struct scsi_device *sdev)
 {
-	struct scsi_device *sdev = to_scsi_device(dev);
+	struct device *dev = &sdev->sdev_gendev;
+	int ret = 0;
 
 	device_lock(dev);
 
+	/*
+	 * Bail out if the device is not running. Otherwise, the rescan may
+	 * block waiting for commands to be executed, with us holding the
+	 * device lock. This can result in a potential deadlock in the power
+	 * management core code when system resume is on-going.
+	 */
+	if (sdev->sdev_state != SDEV_RUNNING) {
+		ret = -EWOULDBLOCK;
+		goto unlock;
+	}
+
 	scsi_attach_vpd(sdev);
 	scsi_cdl_check(sdev);
 
@@ -1638,7 +1650,11 @@ void scsi_rescan_device(struct device *dev)
 			drv->rescan(dev);
 		module_put(dev->driver->owner);
 	}
+
+unlock:
 	device_unlock(dev);
+
+	return ret;
 }
 EXPORT_SYMBOL(scsi_rescan_device);
 
drivers/scsi/scsi_sysfs.c +2 -2
index 60317676e45f..24f6eefb6803 100644
@@ -747,7 +747,7 @@ static ssize_t
 store_rescan_field (struct device *dev, struct device_attribute *attr,
 		    const char *buf, size_t count)
 {
-	scsi_rescan_device(dev);
+	scsi_rescan_device(to_scsi_device(dev));
 	return count;
 }
 static DEVICE_ATTR(rescan, S_IWUSR, NULL, store_rescan_field);
@@ -840,7 +840,7 @@ store_state_field(struct device *dev, struct device_attribute *attr,
 		 * waiting for pending I/O to finish.
 		 */
 		blk_mq_run_hw_queues(sdev->request_queue, true);
-		scsi_rescan_device(dev);
+		scsi_rescan_device(sdev);
 	}
 
 	return ret == 0 ? count : -EINVAL;
drivers/scsi/smartpqi/smartpqi_init.c +1 -1
index 6aaaa7ebca37..ed694d939964 100644
@@ -2257,7 +2257,7 @@ static void pqi_update_device_list(struct pqi_ctrl_info *ctrl_info,
 			device->advertised_queue_depth = device->queue_depth;
 			scsi_change_queue_depth(device->sdev, device->advertised_queue_depth);
 			if (device->rescan) {
-				scsi_rescan_device(&device->sdev->sdev_gendev);
+				scsi_rescan_device(device->sdev);
 				device->rescan = false;
 			}
 		}
drivers/scsi/storvsc_drv.c +1 -1
index 047ffaf7d42a..a80a9e27ff9e 100644
@@ -472,7 +472,7 @@ static void storvsc_device_scan(struct work_struct *work)
 	sdev = scsi_device_lookup(wrk->host, 0, wrk->tgt_id, wrk->lun);
 	if (!sdev)
 		goto done;
-	scsi_rescan_device(&sdev->sdev_gendev);
+	scsi_rescan_device(sdev);
 	scsi_device_put(sdev);
 
 done:
drivers/scsi/virtio_scsi.c +1 -1
index bd5633667d01..9d1bdcdc1331 100644
@@ -325,7 +325,7 @@ static void virtscsi_handle_param_change(struct virtio_scsi *vscsi,
 	/* Handle "Parameters changed", "Mode parameters changed", and
 	   "Capacity data has changed".  */
 	if (asc == 0x2a && (ascq == 0x00 || ascq == 0x01 || ascq == 0x09))
-		scsi_rescan_device(&sdev->sdev_gendev);
+		scsi_rescan_device(sdev);
 
 	scsi_device_put(sdev);
 }
drivers/target/target_core_device.c +4 -7
index b7ac60f4a219..b6523d4b9259 100644
@@ -843,7 +843,6 @@ sector_t target_to_linux_sector(struct se_device *dev, sector_t lb)
 EXPORT_SYMBOL(target_to_linux_sector);
 
 struct devices_idr_iter {
-	struct config_item *prev_item;
 	int (*fn)(struct se_device *dev, void *data);
 	void *data;
 };
@@ -853,11 +852,9 @@ static int target_devices_idr_iter(int id, void *p, void *data)
 {
 	struct devices_idr_iter *iter = data;
 	struct se_device *dev = p;
+	struct config_item *item;
 	int ret;
 
-	config_item_put(iter->prev_item);
-	iter->prev_item = NULL;
-
 	/*
 	 * We add the device early to the idr, so it can be used
 	 * by backend modules during configuration. We do not want
@@ -867,12 +864,13 @@ static int target_devices_idr_iter(int id, void *p, void *data)
 	if (!target_dev_configured(dev))
 		return 0;
 
-	iter->prev_item = config_item_get_unless_zero(&dev->dev_group.cg_item);
-	if (!iter->prev_item)
+	item = config_item_get_unless_zero(&dev->dev_group.cg_item);
+	if (!item)
 		return 0;
 	mutex_unlock(&device_mutex);
 
 	ret = iter->fn(dev, iter->data);
+	config_item_put(item);
 
 	mutex_lock(&device_mutex);
 	return ret;
@@ -895,7 +893,6 @@ int target_for_each_device(int (*fn)(struct se_device *dev, void *data),
 	mutex_lock(&device_mutex);
 	ret = idr_for_each(&devices_idr, target_devices_idr_iter, &iter);
 	mutex_unlock(&device_mutex);
-	config_item_put(iter.prev_item);
 	return ret;
 }
 
drivers/vhost/vringh.c +11 -1
index 955d938eb663..7b8fd977f71c 100644
@@ -123,8 +123,18 @@ static inline ssize_t vringh_iov_xfer(struct vringh *vrh,
 		done += partlen;
 		len -= partlen;
 		ptr += partlen;
+		iov->consumed += partlen;
+		iov->iov[iov->i].iov_len -= partlen;
+		iov->iov[iov->i].iov_base += partlen;
 
-		vringh_kiov_advance(iov, partlen);
+		if (!iov->iov[iov->i].iov_len) {
+			/* Fix up old iov element then increment. */
+			iov->iov[iov->i].iov_len = iov->consumed;
+			iov->iov[iov->i].iov_base -= iov->consumed;
+
+			iov->consumed = 0;
+			iov->i++;
+		}
 	}
 	return done;
 }
drivers/xen/events/events_base.c +46 -41

187 lines not on this page · raw message

fs/btrfs/btrfs_inode.h +0 -3
index d47a927b3504..90e60ad9db62 100644
@@ -501,9 +501,6 @@ int btrfs_run_delalloc_range(struct btrfs_inode *inode, struct page *locked_page
 			     u64 start, u64 end, int *page_started,
 			     unsigned long *nr_written, struct writeback_control *wbc);
 int btrfs_writepage_cow_fixup(struct page *page);
-void btrfs_writepage_endio_finish_ordered(struct btrfs_inode *inode,
-					  struct page *page, u64 start,
-					  u64 end, bool uptodate);
 int btrfs_encoded_io_compression_from_extent(struct btrfs_fs_info *fs_info,
 					     int compress_type);
 int btrfs_encoded_read_regular_fill_pages(struct btrfs_inode *inode,
fs/btrfs/extent_io.c +18 -40

125 lines not on this page · raw message

fs/btrfs/extent_io.h +0 -2
index f61b7896320a..e7b293717dc1 100644
@@ -284,8 +284,6 @@ void btrfs_clear_buffer_dirty(struct btrfs_trans_handle *trans,
 
 int btrfs_alloc_page_array(unsigned int nr_pages, struct page **page_array);
 
-void end_extent_writepage(struct page *page, int err, u64 start, u64 end);
-
 #ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
 bool find_lock_delalloc_range(struct inode *inode,
 			     struct page *locked_page, u64 *start,
fs/btrfs/inode.c +18 -29

88 lines not on this page · raw message

fs/btrfs/ordered-data.c +4 -0
index 5b1aac3fc8e4..eea5215280df 100644
@@ -410,6 +410,10 @@ void btrfs_mark_ordered_io_finished(struct btrfs_inode *inode,
 	unsigned long flags;
 	u64 cur = file_offset;
 
+	trace_btrfs_writepage_end_io_hook(inode, file_offset,
+					  file_offset + num_bytes - 1,
+					  uptodate);
+
 	spin_lock_irqsave(&tree->lock, flags);
 	while (cur < file_offset + num_bytes) {
 		u64 entry_end;
fs/btrfs/transaction.h +2 -2
index 8e9fa23bd7fe..f800d3f7d4a9 100644
@@ -218,8 +218,8 @@ do {								\
 			(errno))) {					\
 			/* Stack trace printed. */			\
 		} else {						\
-			btrfs_debug((trans)->fs_info,			\
-				    "Transaction aborted (error %d)", \
+			btrfs_err((trans)->fs_info,			\
+				  "Transaction aborted (error %d)",	\
 				  (errno));			\
 		}						\
 	}							\
fs/erofs/decompressor_lzma.c +4 -1
index 73091fbe3ea4..dee10d22ada9 100644
@@ -217,9 +217,12 @@ int z_erofs_lzma_decompress(struct z_erofs_decompress_req *rq,
 			strm->buf.out_size = min_t(u32, outlen,
 						   PAGE_SIZE - pageofs);
 			outlen -= strm->buf.out_size;
-			if (!rq->out[no] && rq->fillgaps)	/* deduped */
+			if (!rq->out[no] && rq->fillgaps) {	/* deduped */
 				rq->out[no] = erofs_allocpage(pagepool,
 						GFP_KERNEL | __GFP_NOFAIL);
+				set_page_private(rq->out[no],
+						 Z_EROFS_SHORTLIVED_PAGE);
+			}
 			if (rq->out[no])
 				strm->buf.out = kmap(rq->out[no]) + pageofs;
 			pageofs = 0;
fs/erofs/super.c +1 -1
index 566f68ddfa36..31a103399412 100644
@@ -238,7 +238,7 @@ static int erofs_init_device(struct erofs_buf *buf, struct super_block *sb,
 		return PTR_ERR(ptr);
 	dis = ptr + erofs_blkoff(sb, *pos);
 
-	if (!dif->path) {
+	if (!sbi->devs->flatdev && !dif->path) {
 		if (!dis->tag[0]) {
 			erofs_err(sb, "empty device tag @ pos %llu", *pos);
 			return -EINVAL;
fs/nfs/nfs4state.c +7 -0
index 597ae4535fe3..9a5d911a7edc 100644
@@ -2714,6 +2714,13 @@ static void nfs4_state_manager(struct nfs_client *clp)
 		nfs4_end_drain_session(clp);
 		nfs4_clear_state_manager_bit(clp);
 
+		if (test_bit(NFS4CLNT_RUN_MANAGER, &clp->cl_state) &&
+		    !test_and_set_bit(NFS4CLNT_MANAGER_RUNNING,
+				      &clp->cl_state)) {
+			memflags = memalloc_nofs_save();
+			continue;
+		}
+
 		if (!test_and_set_bit(NFS4CLNT_RECALL_RUNNING, &clp->cl_state)) {
 			if (test_and_clear_bit(NFS4CLNT_DELEGRETURN, &clp->cl_state)) {
 				nfs_client_return_marked_delegations(clp);
fs/overlayfs/super.c +6 -3
index cc8977498c48..1090c68e5b05 100644
@@ -101,8 +101,8 @@ static int ovl_revalidate_real(struct dentry *d, unsigned int flags, bool weak)
 static int ovl_dentry_revalidate_common(struct dentry *dentry,
 					unsigned int flags, bool weak)
 {
-	struct ovl_entry *oe = OVL_E(dentry);
-	struct ovl_path *lowerstack = ovl_lowerstack(oe);
+	struct ovl_entry *oe;
+	struct ovl_path *lowerstack;
 	struct inode *inode = d_inode_rcu(dentry);
 	struct dentry *upper;
 	unsigned int i;
@@ -112,6 +112,8 @@ static int ovl_dentry_revalidate_common(struct dentry *dentry,
 	if (!inode)
 		return -ECHILD;
 
+	oe = OVL_I_E(inode);
+	lowerstack = ovl_lowerstack(oe);
 	upper = ovl_i_dentry_upper(inode);
 	if (upper)
 		ret = ovl_revalidate_real(upper, flags, weak);
@@ -164,6 +166,7 @@ static void ovl_free_inode(struct inode *inode)
 	struct ovl_inode *oi = OVL_I(inode);
 
 	kfree(oi->redirect);
+	kfree(oi->oe);
 	mutex_destroy(&oi->lock);
 	kmem_cache_free(ovl_inode_cachep, oi);
 }
@@ -173,7 +176,7 @@ static void ovl_destroy_inode(struct inode *inode)
 	struct ovl_inode *oi = OVL_I(inode);
 
 	dput(oi->__upperdentry);
-	ovl_free_entry(oi->oe);
+	ovl_stack_put(ovl_lowerstack(oi->oe), ovl_numlower(oi->oe));
 	if (S_ISDIR(inode->i_mode))
 		ovl_dir_cache_free(inode);
 	else
fs/smb/client/connect.c +5 -5
index 2456b5dd439c..352e251c4113 100644
@@ -2890,9 +2890,9 @@ bind_socket(struct TCP_Server_Info *server)
 	if (server->srcaddr.ss_family != AF_UNSPEC) {
 		/* Bind to the specified local IP address */
 		struct socket *socket = server->ssocket;
-		rc = socket->ops->bind(socket,
-				       (struct sockaddr *) &server->srcaddr,
-				       sizeof(server->srcaddr));
+		rc = kernel_bind(socket,
+				 (struct sockaddr *) &server->srcaddr,
+				 sizeof(server->srcaddr));
 		if (rc < 0) {
 			struct sockaddr_in *saddr4;
 			struct sockaddr_in6 *saddr6;
@@ -3041,8 +3041,8 @@ generic_ip_connect(struct TCP_Server_Info *server)
 		 socket->sk->sk_sndbuf,
 		 socket->sk->sk_rcvbuf, socket->sk->sk_rcvtimeo);
 
-	rc = socket->ops->connect(socket, saddr, slen,
-				  server->noblockcnt ? O_NONBLOCK : 0);
+	rc = kernel_connect(socket, saddr, slen,
+			    server->noblockcnt ? O_NONBLOCK : 0);
 	/*
 	 * When mounting SMB root file systems, we do not want to block in
 	 * connect. Otherwise bail out and then let cifs_reconnect() perform
fs/smb/server/connection.c +2 -0
index 2a717d158f02..00a87b4acd5c 100644
@@ -84,6 +84,8 @@ struct ksmbd_conn *ksmbd_conn_alloc(void)
 	spin_lock_init(&conn->llist_lock);
 	INIT_LIST_HEAD(&conn->lock_list);
 
+	init_rwsem(&conn->session_lock);
+
 	down_write(&conn_list_lock);
 	list_add(&conn->conns_list, &conn_list);
 	up_write(&conn_list_lock);
fs/smb/server/connection.h +1 -0
index ad8dfaa48ffb..335fdd714d59 100644
@@ -50,6 +50,7 @@ struct ksmbd_conn {
 	struct nls_table		*local_nls;
 	struct unicode_map		*um;
 	struct list_head		conns_list;
+	struct rw_semaphore		session_lock;
 	/* smb session 1 per user */
 	struct xarray			sessions;
 	unsigned long			last_active;
fs/smb/server/mgmt/user_session.c +7 -3
index 8a5dcab05614..b8be14a96cf6 100644
@@ -174,7 +174,7 @@ static void ksmbd_expire_session(struct ksmbd_conn *conn)
 	unsigned long id;
 	struct ksmbd_session *sess;
 
-	down_write(&sessions_table_lock);
+	down_write(&conn->session_lock);
 	xa_for_each(&conn->sessions, id, sess) {
 		if (sess->state != SMB2_SESSION_VALID ||
 		    time_after(jiffies,
@@ -185,7 +185,7 @@ static void ksmbd_expire_session(struct ksmbd_conn *conn)
 			continue;
 		}
 	}
-	up_write(&sessions_table_lock);
+	up_write(&conn->session_lock);
 }
 
 int ksmbd_session_register(struct ksmbd_conn *conn,
@@ -227,7 +227,9 @@ void ksmbd_sessions_deregister(struct ksmbd_conn *conn)
 			}
 		}
 	}
+	up_write(&sessions_table_lock);
 
+	down_write(&conn->session_lock);
 	xa_for_each(&conn->sessions, id, sess) {
 		unsigned long chann_id;
 		struct channel *chann;
@@ -244,7 +246,7 @@ void ksmbd_sessions_deregister(struct ksmbd_conn *conn)
 			ksmbd_session_destroy(sess);
 		}
 	}
-	up_write(&sessions_table_lock);
+	up_write(&conn->session_lock);
 }
 
 struct ksmbd_session *ksmbd_session_lookup(struct ksmbd_conn *conn,
@@ -252,9 +254,11 @@ struct ksmbd_session *ksmbd_session_lookup(struct ksmbd_conn *conn,
 {
 	struct ksmbd_session *sess;
 
+	down_read(&conn->session_lock);
 	sess = xa_load(&conn->sessions, id);
 	if (sess)
 		sess->last_active = jiffies;
+	up_read(&conn->session_lock);
 	return sess;
 }
 
fs/smb/server/smb2pdu.c +3 -13
index 687b750a35bf..144a4e23efcd 100644
@@ -7029,10 +7029,6 @@ int smb2_lock(struct ksmbd_work *work)
 
 				ksmbd_debug(SMB,
 					    "would have to wait for getting lock\n");
-				spin_lock(&work->conn->llist_lock);
-				list_add_tail(&smb_lock->clist,
-					      &work->conn->lock_list);
-				spin_unlock(&work->conn->llist_lock);
 				list_add(&smb_lock->llist, &rollback_list);
 
 				argv = kmalloc(sizeof(void *), GFP_KERNEL);
@@ -7063,9 +7059,6 @@ int smb2_lock(struct ksmbd_work *work)
 
 				if (work->state != KSMBD_WORK_ACTIVE) {
 					list_del(&smb_lock->llist);
-					spin_lock(&work->conn->llist_lock);
-					list_del(&smb_lock->clist);
-					spin_unlock(&work->conn->llist_lock);
 					locks_free_lock(flock);
 
 					if (work->state == KSMBD_WORK_CANCELLED) {
@@ -7087,19 +7080,16 @@ int smb2_lock(struct ksmbd_work *work)
 				}
 
 				list_del(&smb_lock->llist);
-				spin_lock(&work->conn->llist_lock);
-				list_del(&smb_lock->clist);
-				spin_unlock(&work->conn->llist_lock);
 				release_async_work(work);
 				goto retry;
 			} else if (!rc) {
[… more lines in the raw message]

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

include/linux/bpf.h +1 -1
index 477d91b926b3..6ba9d3ed8f0b 100644

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

include/linux/ipv6.h +1 -0
index 644e69354cba..af8a771a053c 100644

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

include/linux/maple_tree.h +11 -0
index 295548cca8b3..c6a19ff5fb43 100644

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

include/linux/netfilter/nf_conntrack_sctp.h +1 -0
index 625f491b95de..fb31312825ae 100644

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

include/net/cfg80211.h +4 -2
index d6fa7c8767ad..641c6edc9b81 100644

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

include/net/mana/mana.h +3 -2
index 024ad8ddb27e..571cc011b0ec 100644

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

include/net/neighbour.h +1 -1
index f6a8ecc6b1fa..ccc4a0f8b4ad 100644

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

include/net/tcp.h +4 -2
index 10fc5c5928f7..b1b1e01c6983 100644

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

include/scsi/scsi_host.h +1 -1
index a2b8d30c4c80..4c2dc8150c6d 100644

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

include/uapi/linux/ipv6.h +1 -0
index ac56605fe9bc..cf592d7b630f 100644

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

io_uring/io_uring.c +15 -1
index a1562f2cf3f3..9736416136a1 100644

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

io_uring/io_uring.h +27 -14

41 lines not on this page · raw message

io_uring/kbuf.c +19 -8
index 2f0181521c98..7ca6f4f7819c 100644

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

kernel/bpf/verifier.c +3 -5
index 9cdba4ce23d2..93fd32f2957b 100644

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

lib/maple_tree.c +183 -63

246 lines not on this page · raw message

lib/test_maple_tree.c +72 -15

87 lines not on this page · raw message

net/bluetooth/hci_core.c +6 -0
index 29ae9b254a34..26a265d9c59c 100644

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

net/bluetooth/hci_event.c +1 -0
index 2358c1835d47..a77234478b2c 100644

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

net/bluetooth/hci_request.h +0 -2
index b9c5a9823837..0be75cf0efed 100644

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

net/bluetooth/hci_sync.c +5 -9
index 402b8522c222..6aaecd6e656b 100644

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

net/bluetooth/iso.c +6 -3
index 9b6a7eb2015f..42f7b257bdfb 100644

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

net/bridge/br_netfilter_hooks.c +1 -1
index 1a801fab9543..0be889905c2b 100644

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

net/core/neighbour.c +8 -6
index ddd0f32de20e..f16ec0e8a034 100644

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

net/core/sock_map.c +4 -0
index 8f07fea39d9e..3fc4086a414e 100644

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

net/ethtool/plca.c +29 -16

45 lines not on this page · raw message

net/ipv4/route.c +2 -0
index 0a53ca6ebb0d..14fbc5cd157e 100644

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

net/ipv4/tcp.c +2 -8
index 75f24b931a18..9cfc07d1e425 100644

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

net/ipv4/tcp_bpf.c +3 -1
index 81f0dff69e0b..327268203001 100644

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

net/ipv4/tcp_input.c +13 -0
index 48c2b96b0843..a5781f86ac37 100644

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

net/ipv4/tcp_output.c +3 -4
index 9f9ca68c4702..37fd9537423f 100644

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

net/ipv6/addrconf.c +13 -0
index c93a2b9a9172..bf025b18dab5 100644

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

net/ipv6/ndisc.c +11 -2
index a42be96ae209..5b9337534a5f 100644

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

net/ipv6/tcp_ipv6.c +7 -3
index 3a88545a265d..44b6949d72b2 100644

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

net/l2tp/l2tp_ip6.c +1 -1
index ed8ebb6f5909..11f3d375cec0 100644

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

net/mac80211/cfg.c +3 -0
index 45e7a5d9c7d9..e883c41a2163 100644

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

net/mac80211/ieee80211_i.h +1 -1
index 91633a0b723e..f8cd94ba55cc 100644

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

net/mac80211/key.c +1 -1
index 21cf5a208910..f719abe33a32 100644

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

net/mac80211/mesh.c +4 -4
index af8c5fc2db14..e31c312c124a 100644

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

net/mac80211/mlme.c +10 -8
index f93eb38ae0b8..24b2833e0e47 100644

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

net/mptcp/pm_userspace.c +0 -6
index b5a8aa4c1ebd..d042d32beb4d 100644

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

net/mptcp/protocol.c +77 -84

161 lines not on this page · raw message

net/mptcp/protocol.h +35 -24

59 lines not on this page · raw message

net/mptcp/subflow.c +10 -3
index c7bd99b8e7b7..a7aed534b780 100644

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

net/netfilter/ipvs/ip_vs_sync.c +2 -2
index 264f2f87a437..f6684c052e3b 100644

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

net/netfilter/nf_conntrack_proto_sctp.c +33 -10

43 lines not on this page · raw message

net/netfilter/nf_tables_api.c +28 -16

44 lines not on this page · raw message

net/netfilter/nft_payload.c +12 -1
index 8cb800989947..120f6d395b98 100644

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

net/netfilter/nft_set_rbtree.c +29 -17

46 lines not on this page · raw message

net/netlink/af_netlink.c +4 -4
index 20082171f24a..9c6bc47bc7f7 100644

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

net/nfc/llcp_core.c +2 -0
index f60e424e0607..6705bb895e23 100644

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

net/rds/tcp_connect.c +1 -1
index f0c477c5d1db..d788c6d28986 100644

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

net/sctp/associola.c +1 -2
index 796529167e8d..c45c192b7878 100644

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

net/sctp/socket.c +1 -0
index 7cf207706eb6..652af155966f 100644

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

net/socket.c +23 -6
index b5639a650015..95942c1786e5 100644

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

net/tipc/crypto.c +2 -2
index 302fd749c424..43c3f1c971b8 100644

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

net/wireless/core.c +7 -7
index 25bc2e50a061..64e861617110 100644

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

net/wireless/core.h +5 -2
index 8a807b609ef7..86f209abc06a 100644

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

net/wireless/mlme.c +2 -1
index 775cac4d6100..3e2c398abddc 100644

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

net/wireless/nl80211.c +61 -32

93 lines not on this page · raw message

scripts/mod/file2alias.c +1 -1
index 38120f932b0d..7056751c29b1 100644

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

security/integrity/ima/Kconfig +8 -14
index c17660bf5f34..6ef7bde55126 100644

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

sound/soc/soc-utils.c +1 -0
index 11607c5f5d5a..9c746e4edef7 100644

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

sound/soc/tegra/tegra_audio_graph_card.c +17 -13
index 1f2c5018bf5a..4737e776d383 100644

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

tools/testing/selftests/netfilter/.gitignore +1 -0
index 4cb887b57413..4b2928e1c19d 100644

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

tools/testing/selftests/netfilter/Makefile +2 -2
index 3686bfa6c58d..321db8850da0 100644

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

tools/testing/selftests/netfilter/audit_logread.c new file +165 -0

165 lines not on this page · raw message

tools/testing/selftests/netfilter/config +1 -0
index 4faf2ce021d9..7c42b1b2c69b 100644

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

tools/testing/selftests/netfilter/nft_audit.sh new file +193 -0

193 lines not on this page · raw message

tools/tracing/rtla/src/timerlat_aa.c +26 -6
index e0ffe69c271c..7093fd5333be 100644

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

tools/tracing/rtla/src/timerlat_u.c +4 -2
index 05e310696dd5..01dbf9a6b5a5 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.