Linux 6.18.9
Greg Kroah-Hartman
maintainerI'm announcing the release of the 6.18.9 kernel.
All users of the 6.18 kernel series must upgrade.
The updated 6.18.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.18.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 5 arch/arm64/configs/defconfig | 1 arch/riscv/include/asm/compat.h | 2 drivers/bluetooth/hci_ldisc.c | 4 drivers/firewire/core-transaction.c | 19 drivers/gpio/gpio-brcmstb.c | 8 drivers/gpio/gpio-pca953x.c | 2 drivers/gpio/gpio-rockchip.c | 8 drivers/gpio/gpio-virtuser.c | 8 drivers/gpio/gpiolib-acpi-core.c | 21 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 7 drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 5 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 25 - drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 25 - drivers/gpu/drm/amd/amdgpu/soc21.c | 8 drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 7 drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 1 drivers/gpu/drm/amd/pm/swsmu/inc/smu_v14_0.h | 1 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 1 drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c | 1 drivers/gpu/drm/drm_gem.c | 18 drivers/gpu/drm/imx/ipuv3/imx-tve.c | 13 drivers/gpu/drm/msm/adreno/a6xx_catalog.c | 2 drivers/gpu/drm/nouveau/nouveau_display.c | 2 drivers/gpu/drm/tyr/Kconfig | 1 drivers/gpu/drm/xe/xe_configfs.c | 3 drivers/gpu/drm/xe/xe_device.c | 2 drivers/gpu/drm/xe/xe_exec.c | 6 drivers/gpu/drm/xe/xe_lrc.c | 2 drivers/gpu/drm/xe/xe_nvm.c | 55 +- drivers/gpu/drm/xe/xe_nvm.h | 2 drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c | 3 drivers/md/bcache/bcache.h | 9 drivers/md/bcache/request.c | 80 +-- drivers/md/bcache/super.c | 12 drivers/net/bonding/bond_main.c | 28 - drivers/net/bonding/bond_options.c | 8 drivers/net/can/at91_can.c | 2 drivers/net/can/usb/gs_usb.c | 4 drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c | 5 drivers/net/ethernet/intel/ice/ice_lib.c | 10 drivers/net/ethernet/intel/ice/ice_main.c | 1 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 26 - drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c | 2 drivers/net/ethernet/marvell/octeon_ep/octep_main.c | 2 drivers/net/ethernet/mellanox/mlx5/core/debugfs.c | 16 drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 3 drivers/net/ethernet/mellanox/mlx5/core/en_accel/psp_rxtx.c | 17 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 20 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 19 drivers/net/ethernet/mellanox/mlx5/core/esw/acl/ingress_lgcy.c | 2 drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 2 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 3 drivers/net/ethernet/mellanox/mlx5/core/main.c | 36 - drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h | 1 drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c | 1 drivers/net/ethernet/rocker/rocker_main.c | 5 drivers/net/ethernet/sfc/mcdi_filters.c | 7 drivers/net/ethernet/spacemit/k1_emac.c | 34 + drivers/net/phy/micrel.c | 17 drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c | 9 drivers/nvme/target/io-cmd-bdev.c | 3 drivers/of/of_reserved_mem.c | 44 +- drivers/pinctrl/meson/pinctrl-meson.c | 2 drivers/pinctrl/pinctrl-rockchip.c | 9 drivers/pinctrl/qcom/Kconfig | 15 drivers/pinctrl/qcom/Makefile | 1 drivers/pinctrl/qcom/pinctrl-lpass-lpi.c | 17 drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c | 3 drivers/pinctrl/qcom/pinctrl-sm8350-lpass-lpi.c | 151 ------ drivers/scsi/be2iscsi/be_mgmt.c | 1 drivers/scsi/qla2xxx/qla_os.c | 2 drivers/target/sbp/sbp_target.c | 4 fs/btrfs/disk-io.c | 22 - fs/btrfs/extent_io.c | 3 fs/btrfs/extent_io.h | 3 fs/btrfs/zlib.c | 1 fs/efivarfs/vars.c | 2 fs/fs-writeback.c | 14 fs/readdir.c | 3 include/linux/cma.h | 9 include/linux/fs.h | 6 include/linux/kasan.h | 14 include/linux/sched.h | 5 include/net/bonding.h | 13 include/net/nfc/nfc.h | 2 kernel/dma/contiguous.c | 16 kernel/dma/pool.c | 7 kernel/events/callchain.c | 2 kernel/events/core.c | 6 kernel/sched/deadline.c | 206 +++++++++ kernel/sched/ext.c | 57 +- kernel/sched/ext_internal.h | 6 lib/flex_proportions.c | 5 mm/kasan/common.c | 21 mm/kfence/core.c | 23 - mm/memory-failure.c | 99 ++-- mm/shmem.c | 45 +- mm/swap.h | 2 mm/swap_state.c | 3 mm/vmalloc.c | 7 net/bluetooth/mgmt.c | 3 net/bridge/br_input.c | 2 net/core/filter.c | 2 net/ipv4/tcp_offload.c | 3 net/ipv4/udp_offload.c | 3 net/ipv6/icmp.c | 4 net/ipv6/tcpv6_offload.c | 3 net/mac80211/ieee80211_i.h | 2 net/mac80211/mlme.c | 217 +++++----- net/mptcp/pm_kernel.c | 16 net/mptcp/protocol.c | 13 net/nfc/core.c | 27 + net/nfc/llcp_commands.c | 17 net/nfc/llcp_core.c | 4 net/nfc/nci/core.c | 4 net/sched/act_ife.c | 6 rust/kernel/bits.rs | 6 rust/kernel/rbtree.rs | 2 rust/kernel/sync/atomic/predefine.rs | 11 rust/kernel/sync/refcount.rs | 3 scripts/Makefile.build | 2 scripts/Makefile.vmlinux | 3 scripts/generate_rust_analyzer.py | 40 + scripts/package/kernel.spec | 65 +- sound/hda/codecs/realtek/alc269.c | 1 sound/soc/amd/yc/acp6x-mach.c | 8 sound/soc/fsl/imx-card.c | 1 sound/soc/intel/boards/sof_es8336.c | 2 sound/soc/intel/common/soc-acpi-intel-ptl-match.c | 2 tools/lib/bpf/libbpf.c | 7 tools/testing/selftests/net/mptcp/mptcp_join.sh | 81 +++ 133 files changed, 1283 insertions(+), 782 deletions(-)
Aaron Ma (1):
ice: Fix NULL pointer dereference in ice_vsi_set_napi_queues
Alex Deucher (7):
drm/amdgpu/soc21: fix xclk for APUs drm/amdgpu/gfx10: fix wptr reset in KGQ init drm/amdgpu/gfx11: fix wptr reset in KGQ init drm/amdgpu/gfx11: adjust KGQ reset sequence drm/amdgpu/gfx12: fix wptr reset in KGQ init drm/amdgpu/gfx12: adjust KGQ reset sequence drm/amdgpu: Fix cond_exec handling in amdgpu_ib_schedule()
Alexandre Courbot (2):
rust: bits: always inline functions using build_assert with arguments
rust: sync: refcount: always inline functions using build_assert with arguments
Amir Goldstein (1):
readdir: require opt-in for d_type flags
Andrey Ryabinin (1):
mm/kasan: fix KASAN poisoning in vrealloc()
Andy Shevchenko (1):
gpiolib: acpi: Fix potential out-of-boundary left shift
Bard Liao (1):
ASoC: soc-acpi-intel-ptl-match: fix name_prefix of rt1320-2
Bartosz Golaszewski (2):
pinctrl: lpass-lpi: implement .get_direction() for the GPIO driver
pinctrl: meson: mark the GPIO controller as sleeping
Benjamin Berg (3):
wifi: mac80211: parse all TTLM entries
wifi: mac80211: apply advertised TTLM from association response
wifi: mac80211: correctly decode TTLM with default link map
Chen Miao (1):
kbuild: rust: clean libpin_init_internal in mrproper
Chen Ni (1):
net/sched: act_ife: convert comma to semicolon
Cosmin Ratiu (1):
net/mlx5: Initialize events outside devlink lock
Daniel Zahka (1):
net/mlx5e: don't assume psp tx skbs are ipv6 csum handling
Denis Sergeev (1):
gpiolib: acpi: use BIT_ULL() for u64 mask in address space handler
Doug Berger (1):
gpio: brcmstb: correct hwirq to bank map
Edward Cree (1):
sfc: fix deadlock in RSS config read
Eric Dumazet (2):
bonding: annotate data-races around slave->last_rx
mptcp: fix race in mptcp_pm_nl_flush_addrs_doit()
Ethan Zuo (1):
kbuild: Fix permissions of modules.builtin.modinfo
Fabio Estevam (1):
ASoC: fsl: imx-card: Do not force slot width to sample width
Fernando Fernandez Mancera (1):
ipv6: use the right ifindex when replying to icmpv6 from localhost
Gal Pressman (1):
net/mlx5e: Account for netdev stats in ndo_get_stats64
Greg Kroah-Hartman (1):
Linux 6.18.9
Han Gao (1):
riscv: compat: fix COMPAT_UTS_MACHINE definition
Hang Shu (1):
rust: rbtree: fix documentation typo in CursorMut peek_next method
Haoxiang Li (1):
scsi: be2iscsi: Fix a memory leak in beiscsi_boot_get_sinfo()
Jan Kara (1):
flex_proportions: make fprop_new_period() hardirq safe
Jane Chu (2):
mm/memory-failure: fix missing ->mf_stats count in hugetlb poison mm/memory-failure: teach kill_accessing_process to accept hugetlb tail page pfn
Jesse Brandeburg (1):
ice: stop counting UDP csum mismatch as rx_errors
Jia-Hong Su (1):
Bluetooth: hci_uart: fix null-ptr-deref in hci_uart_write_work
Jianbo Liu (1):
net/mlx5e: Skip ESN replay window setup for IPsec crypto offload
Jianpeng Chang (1):
Bluetooth: MGMT: Fix memory leak in set_ssp_complete
Jibin Zhang (1):
net: fix segmentation of forwarding fraglist GRO
Johan Hovold (2):
drm/msm/a6xx: fix bogus hwcg register updates drm/imx/tve: fix probe device leak
John Ogness (1):
Revert "drm/nouveau/disp: Set drm_mode_config_funcs.atomic_(check|commit)"
Jon Doron (1):
drm/amdgpu: fix NULL pointer dereference in amdgpu_gmc_filter_faults_remove
Justin Chen (1):
net: bcmasp: fix early exit leak with fixed phy
Kairui Song (1):
mm/shmem, swap: fix race of truncate and swap entry split
Kery Qi (3):
net: wwan: t7xx: fix potential skb->frags overflow in RX path
rocker: fix memory leak in rocker_world_port_post_fini()
scsi: firewire: sbp-target: Fix overflow in sbp_make_tpg()
Kohei Enju (3):
ixgbe: fix memory leaks in the ixgbe_recovery_probe() path
ixgbe: don't initialize aci lock in ixgbe_recovery_probe()
efivarfs: fix error propagation in efivar_entry_get()
Krzysztof Kozlowski (1):
pinctrl: qcom: sm8350-lpass-lpi: Merge with SC7280 to fix I2S2 and SWR TX pins
Kuniyuki Iwashima (2):
nfc: llcp: Fix memleak in nfc_llcp_send_ui_frame().
nfc: nci: Fix race between rfkill and nci_unregister_device().
Laveesh Bansal (1):
writeback: fix 100% CPU usage when dirtytime_expire_interval is 0
Marc Kleine-Budde (1):
can: gs_usb: gs_usb_receive_bulk_callback(): fix error message
Mark Bloch (1):
net/mlx5e: TC, delete flows only for existing peers
Martin Kaiser (1):
net: bridge: fix static key check
Martin Larsson (1):
gpio: pca953x: mask interrupts in irq shutdown
Matthieu Baerts (NGI0) (5):
mptcp: only reset subflow errors when propagated
selftests: mptcp: check no dup close events after error
selftests: mptcp: check subflow errors in close events
selftests: mptcp: join: fix local endp not being tracked
mptcp: avoid dup SUB_CLOSED events after disconnect
Miguel Ojeda (3):
rust: kbuild: give --config-path to rustfmt in .rsi target
rust: sync: atomic: Provide stub for rusttest 32-bit hosts drm/tyr: depend on COMMON_CLK to fix build error
Mikhail Gavrilov (1):
libbpf: Fix -Wdiscarded-qualifiers under C23
Ming Lei (1):
nvmet: fix race in nvmet_bio_done() leading to NULL pointer dereference
Nathan Chancellor (1):
kbuild: rpm-pkg: Generate debuginfo package manually
Nicolin Chen (1):
iommu/tegra241-cmdqv: Reset VCMDQ in tegra241_vcmdq_hw_init_user()
Nikolay Aleksandrov (1):
bonding: fix use-after-free due to enslave fail after slave array update
Onur Özkan (1):
scripts: generate_rust_analyzer: remove sysroot assertion
Oreoluwa Babatunde (1):
of: reserved_mem: Allow reserved_mem framework detect "cma=" kernel param
Parav Pandit (1):
net/mlx5: Fix vhca_id access call trace use before alloc
Peter Zijlstra (2):
sched/deadline: Document dl_server
sched/deadline: Fix 'stuck' dl_server
Pimyn Girgis (1):
mm/kfence: randomize the freelist on initialization
Qu Wenruo (2):
btrfs: zlib: fix the folio leak on S390 hardware acceleration
btrfs: do not strictly require dirty metadata threshold for metadata writepages
Robin Murphy (1):
gpio: rockchip: Stop calling pinctrl for set_direction
Sai Sree Kartheek Adivi (1):
dma/pool: distinguish between missing and exhausted atomic pools
SeungJong Ha (1):
scripts: generate_rust_analyzer: fix resolution of #[pin_data] macros
Shay Drory (1):
net/mlx5: fs, Fix inverted cap check in tx flow table root disconnect
Shida Zhang (3):
bcache: fix improper use of bi_end_io
bcache: use bio cloning for detached device requests
bcache: fix I/O accounting leak in detached_dev_do_request
Shuicheng Lin (4):
drm/xe: Skip address copy for sync-only execs drm/xe/configfs: Fix is_bound() pci_dev lifetime drm/xe/nvm: Manage nvm aux cleanup with devres drm/xe/nvm: Fix double-free on aux add failure
Steven Rostedt (1):
perf: sched: Fix perf crash with new is_user_task() helper
Tagir Garaev (1):
ASoC: Intel: sof_es8336: fix headphone GPIO logic inversion
Takashi Sakamoto (1):
firewire: core: fix race condition against transaction list
Tamir Duberstein (4):
scripts: generate_rust_analyzer: Add pin_init -> compiler_builtins dep
scripts: generate_rust_analyzer: Add pin_init_internal deps
scripts: generate_rust_analyzer: compile sysroot with correct edition
scripts: generate_rust_analyzer: Add compiler_builtins -> core dep
Tejun Heo (2):
sched_ext: Don't kick CPUs running higher classes
sched_ext: Fix SCX_KICK_WAIT to work reliably
Thomas Fourier (1):
scsi: qla2xxx: edif: Fix dma_free_coherent() size
Tvrtko Ursulin (2):
drm: Do not allow userspace to trigger kernel warnings in drm_gem_change_handle_ioctl() drm/xe/xelp: Fix Wa_18022495364
Vivian Wang (1):
net: spacemit: Check for netif_carrier_ok() in emac_stats_update()
Wei Fang (1):
net: phy: micrel: fix clk warning when removing the driver
Yang Wang (3):
drm/amd/pm: fix race in power state check before mutex lock drm/amd/pm: fix smu v13 soft clock frequency setting issue drm/amd/pm: fix smu v14 soft clock frequency setting issue
Yuhao Huang (1):
gpio: virtuser: fix UAF in configfs release path
Yuntao Wang (1):
of/reserved_mem: Simplify the logic of fdt_scan_reserved_mem_reg_nodes()
Zeng Chi (1):
net/mlx5: Fix return type mismatch in mlx5_esw_vport_vhca_id()
Zhang Heng (2):
ASoC: amd: yc: Add DMI quirk for Acer TravelMate P216-41-TCO
ALSA: hda/realtek: fix right sounds and mute/micmute LEDs for HP machine
Zilin Guan (4):
can: at91_can: Fix memory leak in at91_can_probe() net/mlx5: Fix memory leak in esw_acl_ingress_lgcy_setup()
octeon_ep: Fix memory leak in octep_device_setup()
net: mvpp2: cls: Fix memory leak in mvpp2_ethtool_cls_rule_ins()
robin.kuo (1):
mm, swap: restore swap_space attr aviod kernel panic
Greg Kroah-Hartman
maintainerMakefile +3 -2
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 18 -SUBLEVEL = 8 +SUBLEVEL = 9 EXTRAVERSION = NAME = Baby Opossum Posse
@@ -1590,7 +1590,8 @@ MRPROPER_FILES += include/config include/generated \ certs/x509.genkey \ vmlinux-gdb.py \ rpmbuild \ - rust/libmacros.so rust/libmacros.dylib + rust/libmacros.so rust/libmacros.dylib \ + rust/libpin_init_internal.so rust/libpin_init_internal.dylib # clean - Delete most, but leave enough to build external modules #
arch/arm64/configs/defconfig +0 -1
@@ -662,7 +662,6 @@ CONFIG_PINCTRL_LPASS_LPI=m CONFIG_PINCTRL_SC7280_LPASS_LPI=m CONFIG_PINCTRL_SM6115_LPASS_LPI=m CONFIG_PINCTRL_SM8250_LPASS_LPI=m -CONFIG_PINCTRL_SM8350_LPASS_LPI=m CONFIG_PINCTRL_SM8450_LPASS_LPI=m CONFIG_PINCTRL_SC8280XP_LPASS_LPI=m CONFIG_PINCTRL_SM8550_LPASS_LPI=m
arch/riscv/include/asm/compat.h +1 -1
@@ -2,7 +2,7 @@#ifndef __ASM_COMPAT_H#define __ASM_COMPAT_H -#define COMPAT_UTS_MACHINE "riscv\0\0" +#define COMPAT_UTS_MACHINE "riscv32\0\0"/* * Architecture specific compatibility types
drivers/bluetooth/hci_ldisc.c +2 -2
@@ -685,6 +685,8 @@ static int hci_uart_register_dev(struct hci_uart *hu)return err; } +set_bit (HCI_UART_PROTO_INIT , &hu->flags); +if (test_bit (HCI_UART_INIT_PENDING , &hu->hdev_flags))return 0 ;
@@ -712,8 +714,6 @@ static int hci_uart_set_proto(struct hci_uart *hu, int id) hu->proto = p; -set_bit (HCI_UART_PROTO_INIT , &hu->flags); - err =hci_uart_register_dev (hu);if (err) {return err;
drivers/firewire/core-transaction.c +10 -9
@@ -134,20 +134,14 @@ static void split_transaction_timeout_callback(struct timer_list *timer) } } -static void start_split_transaction_timeout (struct fw_transaction *t, -struct fw_card *card) +// card->transactions.lock should be acquired in advance for the linked list. +static void start_split_transaction_timeout (struct fw_transaction *t,unsigned int delta) { -unsigned long delta; -if (list_empty (&t->link) ||WARN_ON (t->is_split_transaction))return ; t->is_split_transaction = true; -// NOTE: This can be without irqsave when we can guarantee that __fw_send_request() for -// local destination never runs in any type of IRQ context. -scoped_guard (spinlock_irqsave, &card->split_timeout.lock) - delta = card->split_timeout.jiffies;mod_timer (&t->split_timeout_timer, jiffies + delta); }
@@ -168,13 +162,20 @@ static void transmit_complete_callback(struct fw_packet *packet,break ;case ACK_PENDING : { +unsigned int delta; +// NOTE: This can be without irqsave when we can guarantee that __fw_send_request() for // local destination never runs in any type of IRQ context. scoped_guard(spinlock_irqsave, &card->split_timeout.lock) { t->split_timeout_cycle =compute_split_timeout_timestamp (card, packet->timestamp) &0xffff ; + delta = card->split_timeout.jiffies; } -start_split_transaction_timeout (t, card); + +// NOTE: This can be without irqsave when we can guarantee that __fw_send_request() for +// local destination never runs in any type of IRQ context. + scoped_guard(spinlock_irqsave, &card->transactions.lock) +start_split_transaction_timeout (t, delta);break ; }case ACK_BUSY_X :
drivers/gpio/gpio-brcmstb.c +3 -5
@@ -301,12 +301,10 @@ static struct brcmstb_gpio_bank *brcmstb_gpio_hwirq_to_bank( struct brcmstb_gpio_priv *priv, irq_hw_number_t hwirq) {struct brcmstb_gpio_bank *bank; -int i =0 ; -/* banks are in descending order */ -list_for_each_entry_reverse (bank, &priv->bank_list, node) { - i += bank->chip.gc.ngpio; -if (hwirq < i) +list_for_each_entry (bank, &priv->bank_list, node) { +if (hwirq >= bank->chip.gc.offset && + hwirq < (bank->chip.gc.offset + bank->chip.gc.ngpio))return bank; }return NULL ;
drivers/gpio/gpio-pca953x.c +2 -0
@@ -911,6 +911,8 @@ static void pca953x_irq_shutdown(struct irq_data *d)clear_bit (hwirq, chip->irq_trig_fall);clear_bit (hwirq, chip->irq_trig_level_low);clear_bit (hwirq, chip->irq_trig_level_high); + +pca953x_irq_mask (d); }static void pca953x_irq_print_chip (struct irq_data *data,struct seq_file *p)
drivers/gpio/gpio-rockchip.c +0 -8
@@ -18,7 +18,6 @@#include <linux/of.h> #include <linux/of_address.h> #include <linux/of_irq.h> -#include <linux/pinctrl/consumer.h> #include <linux/pinctrl/pinconf-generic.h> #include <linux/platform_device.h> #include <linux/regmap.h>
@@ -164,12 +163,6 @@ static int rockchip_gpio_set_direction(struct gpio_chip *chip,unsigned long flags;u32 data = input ?0 :1 ; - -if (input) -pinctrl_gpio_direction_input (chip, offset); -else -pinctrl_gpio_direction_output (chip, offset); -raw_spin_lock_irqsave (&bank->slock, flags);rockchip_gpio_writel_bit (bank, offset, data, bank->gpio_regs->port_ddr);raw_spin_unlock_irqrestore (&bank->slock, flags);
@@ -593,7 +586,6 @@ static int rockchip_gpiolib_register(struct rockchip_pin_bank *bank) gc->ngpio = bank->nr_pins; gc->label = bank->name; gc->parent = bank->dev; - gc->can_sleep = true; ret =gpiochip_add_data (gc, bank);if (ret) {
drivers/gpio/gpio-virtuser.c +4 -4
@@ -1684,10 +1684,10 @@ static void gpio_virtuser_device_config_group_release(struct config_item *item) {struct gpio_virtuser_device *dev =to_gpio_virtuser_device (item); -guard (mutex)(&dev->lock); - -if (gpio_virtuser_device_is_live (dev)) -gpio_virtuser_device_deactivate (dev); + scoped_guard(mutex, &dev->lock) { +if (gpio_virtuser_device_is_live (dev)) +gpio_virtuser_device_deactivate (dev); + }mutex_destroy (&dev->lock);ida_free (&gpio_virtuser_ida, dev->id);
drivers/gpio/gpiolib-acpi-core.c +17 -4
@@ -1104,6 +1104,7 @@ acpi_gpio_adr_space_handler(u32 function, acpi_physical_address address,unsigned int pin = agpio->pin_table[i];struct acpi_gpio_connection *conn;struct gpio_desc *desc; +u16 word, shift;bool found;mutex_lock (&achip->conn_lock);
@@ -1158,10 +1159,22 @@ acpi_gpio_adr_space_handler(u32 function, acpi_physical_address address,mutex_unlock (&achip->conn_lock); -if (function ==ACPI_WRITE ) -gpiod_set_raw_value_cansleep (desc, !!(*value &BIT (i))); -else - *value |= (u64 )gpiod_get_raw_value_cansleep (desc) << i; +/* +* For the cases when OperationRegion() consists of more than +* 64 bits calculate the word and bit shift to use that one to +* access the value. +*/ + word = i /64 ; + shift = i %64 ; + +if (function ==ACPI_WRITE ) { +gpiod_set_raw_value_cansleep (desc, value[word] &BIT_ULL (shift)); + }else { +if (gpiod_get_raw_value_cansleep (desc)) + value[word] |=BIT_ULL (shift); +else + value[word] &= ~BIT_ULL (shift); + } } out:
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +6 -1
@@ -498,8 +498,13 @@ void amdgpu_gmc_filter_faults_remove(struct amdgpu_device *adev, uint64_t addr,if (adev->irq.retry_cam_enabled)return ; +else if (adev->irq.ih1.ring_size) + ih = &adev->irq.ih1; +else if (adev->irq.ih_soft.enabled) + ih = &adev->irq.ih_soft; +else +return ; - ih = &adev->irq.ih1;/* Get the WPTR of the last entry in IH ring */ last_wptr =amdgpu_ih_get_wptr (adev, ih);/* Order wptr with ring data. */
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +3 -2
@@ -228,7 +228,7 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned int num_ibs,amdgpu_ring_ib_begin (ring); -if (ring->funcs->emit_gfx_shadow) +if (ring->funcs->emit_gfx_shadow && adev->gfx.cp_gfx_shadow)amdgpu_ring_emit_gfx_shadow (ring, shadow_va, csa_va, gds_va, init_shadow, vmid);
@@ -284,7 +284,8 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned int num_ibs, fence_flags | AMDGPU_FENCE_FLAG_64BIT); } -if (ring->funcs->emit_gfx_shadow && ring->funcs->init_cond_exec) { +if (ring->funcs->emit_gfx_shadow && ring->funcs->init_cond_exec && + adev->gfx.cp_gfx_shadow) {amdgpu_ring_emit_gfx_shadow (ring,0 ,0 ,0 , false,0 );amdgpu_ring_init_cond_exec (ring, ring->cond_exe_gpu_addr); }
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +1 -1
@@ -6878,7 +6878,7 @@ static int gfx_v10_0_kgq_init_queue(struct amdgpu_ring *ring, bool reset)memcpy_toio (mqd, adev->gfx.me.mqd_backup[mqd_idx],sizeof (*mqd));/* reset the ring */ ring->wptr =0 ; - *ring->wptr_cpu_addr =0 ; +atomic64_set ((atomic64_t *)ring->wptr_cpu_addr,0 );amdgpu_ring_clear_ring (ring); }
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +14 -11
@@ -4199,7 +4199,7 @@ static int gfx_v11_0_kgq_init_queue(struct amdgpu_ring *ring, bool reset)memcpy_toio (mqd, adev->gfx.me.mqd_backup[mqd_idx],sizeof (*mqd));/* reset the ring */ ring->wptr =0 ; - *ring->wptr_cpu_addr =0 ; +atomic64_set ((atomic64_t *)ring->wptr_cpu_addr,0 );amdgpu_ring_clear_ring (ring); }
@@ -6821,11 +6821,12 @@ static int gfx_v11_0_reset_kgq(struct amdgpu_ring *ring, struct amdgpu_fence *timedout_fence) {struct amdgpu_device *adev = ring->adev; +bool use_mmio = false;int r;amdgpu_ring_reset_helper_begin (ring, timedout_fence); - r =amdgpu_mes_reset_legacy_queue (ring->adev, ring, vmid, false); + r =amdgpu_mes_reset_legacy_queue (ring->adev, ring, vmid, use_mmio);if (r) {dev_warn (adev->dev,"reset via MES failed and try pipe reset %d\n" , r);
@@ -6834,16 +6835,18 @@ static int gfx_v11_0_reset_kgq(struct amdgpu_ring *ring,return r; } - r =gfx_v11_0_kgq_init_queue (ring, true); -if (r) { -dev_err (adev->dev,"failed to init kgq\n" ); -return r; - } +if (use_mmio) { + r =gfx_v11_0_kgq_init_queue (ring, true); +if (r) { +dev_err (adev->dev,"failed to init kgq\n" ); +return r; + } - r =amdgpu_mes_map_legacy_queue (adev, ring); -if (r) { -dev_err (adev->dev,"failed to remap kgq\n" ); -return r; + r =amdgpu_mes_map_legacy_queue (adev, ring); +if (r) { +dev_err (adev->dev,"failed to remap kgq\n" ); +return r; + } }return amdgpu_ring_reset_helper_end (ring, timedout_fence);
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +14 -11
@@ -3078,7 +3078,7 @@ static int gfx_v12_0_kgq_init_queue(struct amdgpu_ring *ring, bool reset)memcpy_toio (mqd, adev->gfx.me.mqd_backup[mqd_idx],sizeof (*mqd));/* reset the ring */ ring->wptr =0 ; - *ring->wptr_cpu_addr =0 ; +atomic64_set ((atomic64_t *)ring->wptr_cpu_addr,0 );amdgpu_ring_clear_ring (ring); }
@@ -5296,11 +5296,12 @@ static int gfx_v12_0_reset_kgq(struct amdgpu_ring *ring, struct amdgpu_fence *timedout_fence) {struct amdgpu_device *adev = ring->adev; +bool use_mmio = false;int r;amdgpu_ring_reset_helper_begin (ring, timedout_fence); - r =amdgpu_mes_reset_legacy_queue (ring->adev, ring, vmid, false); + r =amdgpu_mes_reset_legacy_queue (ring->adev, ring, vmid, use_mmio);if (r) {dev_warn (adev->dev,"reset via MES failed and try pipe reset %d\n" , r); r =gfx_v12_reset_gfx_pipe (ring);
@@ -5308,16 +5309,18 @@ static int gfx_v12_0_reset_kgq(struct amdgpu_ring *ring,return r; } - r =gfx_v12_0_kgq_init_queue (ring, true); -if (r) { -dev_err (adev->dev,"failed to init kgq\n" ); -return r; - } +if (use_mmio) { + r =gfx_v12_0_kgq_init_queue (ring, true); +if (r) { +dev_err (adev->dev,"failed to init kgq\n" ); +return r; + } - r =amdgpu_mes_map_legacy_queue (adev, ring); -if (r) { -dev_err (adev->dev,"failed to remap kgq\n" ); -return r; + r =amdgpu_mes_map_legacy_queue (adev, ring); +if (r) { +dev_err (adev->dev,"failed to remap kgq\n" ); +return r; + } }return amdgpu_ring_reset_helper_end (ring, timedout_fence);
drivers/gpu/drm/amd/amdgpu/soc21.c +7 -1
@@ -225,7 +225,13 @@ static u32 soc21_get_config_memsize(struct amdgpu_device *adev)static u32 soc21_get_xclk (struct amdgpu_device *adev) { -return adev->clock.spll.reference_freq; +u32 reference_clock = adev->clock.spll.reference_freq; + +/* reference clock is actually 99.81 Mhz rather than 100 Mhz */ +if ((adev->flags &AMD_IS_APU ) && reference_clock ==10000 ) +return 9981 ; + +return reference_clock; }
drivers/gpu/drm/amd/pm/amdgpu_dpm.c +4 -3
@@ -80,15 +80,15 @@ int amdgpu_dpm_set_powergating_by_smu(struct amdgpu_device *adev,enum ip_power_state pwr_state = gate ?POWER_STATE_OFF :POWER_STATE_ON ;bool is_vcn = block_type ==AMD_IP_BLOCK_TYPE_VCN ; +mutex_lock (&adev->pm.mutex); +if (atomic_read (&adev->pm.pwr_state[block_type]) == pwr_state && (!is_vcn || adev->vcn.num_vcn_inst ==1 )) {dev_dbg (adev->dev,"IP block%d already in the target %s state!" , block_type, gate ?"gate" :"ungate" ); -return 0 ; + goto out_unlock; } -mutex_lock (&adev->pm.mutex); -switch (block_type) {case AMD_IP_BLOCK_TYPE_UVD :case AMD_IP_BLOCK_TYPE_VCE :
@@ -115,6 +115,7 @@ int amdgpu_dpm_set_powergating_by_smu(struct amdgpu_device *adev,if (!ret)atomic_set (&adev->pm.pwr_state[block_type], pwr_state); +out_unlock:mutex_unlock (&adev->pm.mutex);return ret;
drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h +1 -0
@@ -56,6 +56,7 @@#define SMUQ10_TO_UINT (x) ((x) >> 10)#define SMUQ10_FRAC (x) ((x) & 0x3ff)#define SMUQ10_ROUND (x) ((SMUQ10_TO_UINT(x)) + ((SMUQ10_FRAC(x)) >= 0x200)) +#define SMU_V13_SOFT_FREQ_ROUND (x) ((x) + 1)extern const int pmfw_decoded_link_speed[5 ];extern const int pmfw_decoded_link_width[7 ];
drivers/gpu/drm/amd/pm/swsmu/inc/smu_v14_0.h +1 -0
@@ -57,6 +57,7 @@ extern const int decoded_link_width[8];#define DECODE_GEN_SPEED (gen_speed_idx) (decoded_link_speed[gen_speed_idx])#define DECODE_LANE_WIDTH (lane_width_idx) (decoded_link_width[lane_width_idx]) +#define SMU_V14_SOFT_FREQ_ROUND (x) ((x) + 1)struct smu_14_0_max_sustainable_clocks {uint32_t display_clock;
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c +1 -0
@@ -1555,6 +1555,7 @@ int smu_v13_0_set_soft_freq_limited_range(struct smu_context *smu,return clk_id;if (max >0 ) { + max =SMU_V13_SOFT_FREQ_ROUND (max);if (automatic) param = (uint32_t )((clk_id <<16 ) |0xffff );else
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c +1 -0
@@ -1178,6 +1178,7 @@ int smu_v14_0_set_soft_freq_limited_range(struct smu_context *smu,return clk_id;if (max >0 ) { + max =SMU_V14_SOFT_FREQ_ROUND (max);if (automatic) param = (uint32_t )((clk_id <<16 ) |0xffff );else
drivers/gpu/drm/drm_gem.c +12 -6
@@ -970,16 +970,21 @@ int drm_gem_change_handle_ioctl(struct drm_device *dev, void *data, {struct drm_gem_change_handle *args = data;struct drm_gem_object *obj; -int ret; +int handle, ret;if (!drm_core_check_feature (dev,DRIVER_GEM ))return -EOPNOTSUPP ; +/* idr_alloc() limitation. */ +if (args->new_handle >INT_MAX ) +return -EINVAL ; + handle = args->new_handle; + obj =drm_gem_object_lookup (file_priv, args->handle);if (!obj)return -ENOENT ; -if (args->handle == args->new_handle) { +if (args->handle == handle) { ret =0 ; goto out; }
@@ -987,18 +992,19 @@ int drm_gem_change_handle_ioctl(struct drm_device *dev, void *data,mutex_lock (&file_priv->prime.lock);spin_lock (&file_priv->table_lock); - ret =idr_alloc (&file_priv->object_idr, obj, - args->new_handle, args->new_handle +1 ,GFP_NOWAIT ); + ret =idr_alloc (&file_priv->object_idr, obj, handle, handle +1 , +GFP_NOWAIT );spin_unlock (&file_priv->table_lock);if (ret <0 ) goto out_unlock;if (obj->dma_buf) { - ret =drm_prime_add_buf_handle (&file_priv->prime, obj->dma_buf, args->new_handle); + ret =drm_prime_add_buf_handle (&file_priv->prime, obj->dma_buf, + handle);if (ret <0 ) {spin_lock (&file_priv->table_lock); -idr_remove (&file_priv->object_idr, args->new_handle); +idr_remove (&file_priv->object_idr, handle);spin_unlock (&file_priv->table_lock); goto out_unlock; }
drivers/gpu/drm/imx/ipuv3/imx-tve.c +13 -0
@@ -525,6 +525,13 @@ static const struct component_ops imx_tve_ops = { .bind = imx_tve_bind, }; +static void imx_tve_put_device (void *_dev) +{ +struct device *dev = _dev; + +put_device (dev); +} +static int imx_tve_probe (struct platform_device *pdev) {struct device *dev = &pdev->dev;
@@ -546,6 +553,12 @@ static int imx_tve_probe(struct platform_device *pdev)if (ddc_node) { tve->ddc =of_find_i2c_adapter_by_node (ddc_node);of_node_put (ddc_node); +if (tve->ddc) { + ret =devm_add_action_or_reset (dev, imx_tve_put_device, + &tve->ddc->dev); +if (ret) +return ret; + } } tve->mode =of_get_tve_mode (np);
drivers/gpu/drm/msm/adreno/a6xx_catalog.c +0 -2
@@ -501,8 +501,6 @@ static const struct adreno_reglist a690_hwcg[] = { {REG_A6XX_RBBM_CLOCK_CNTL_GMU_GX, 0x00000222}, {REG_A6XX_RBBM_CLOCK_DELAY_GMU_GX, 0x00000111}, {REG_A6XX_RBBM_CLOCK_HYST_GMU_GX, 0x00000555}, - {REG_A6XX_GPU_GMU_AO_GMU_CGC_DELAY_CNTL, 0x10111}, - {REG_A6XX_GPU_GMU_AO_GMU_CGC_HYST_CNTL, 0x5555}, {} };
drivers/gpu/drm/nouveau/nouveau_display.c +0 -2
@@ -351,8 +351,6 @@ nouveau_user_framebuffer_create(struct drm_device *dev,static const struct drm_mode_config_funcs nouveau_mode_config_funcs = { .fb_create = nouveau_user_framebuffer_create, - .atomic_commit = drm_atomic_helper_commit, - .atomic_check = drm_atomic_helper_check, };
drivers/gpu/drm/tyr/Kconfig +1 -0
@@ -6,6 +6,7 @@ config DRM_TYR depends on RUST depends on ARM || ARM64 || COMPILE_TEST depends on !GENERIC_ATOMIC64 # for IOMMU_IO_PGTABLE_LPAE + depends on COMMON_CLK default n help Rust DRM driver for ARM Mali CSF-based GPUs.
drivers/gpu/drm/xe/xe_configfs.c +1 -2
@@ -258,11 +258,10 @@ static bool is_bound(struct xe_config_group_device *dev)return false; ret =pci_get_drvdata (pdev); -pci_dev_put (pdev); -if (ret)pci_dbg (pdev,"Already bound to driver\n" ); +pci_dev_put (pdev);return ret; }
drivers/gpu/drm/xe/xe_device.c +0 -2
@@ -974,8 +974,6 @@ void xe_device_remove(struct xe_device *xe) {xe_display_unregister (xe); -xe_nvm_fini (xe); -drm_dev_unplug (&xe->drm);xe_bo_pci_dev_remove_all (xe);
drivers/gpu/drm/xe/xe_exec.c +3 -3
@@ -182,9 +182,9 @@ int xe_exec_ioctl(struct drm_device *dev, void *data, struct drm_file *file) goto err_syncs; } -if (xe_exec_queue_is_parallel (q)) { - err =copy_from_user (addresses, addresses_user,sizeof (u64) * - q->width); +if (args->num_batch_buffer &&xe_exec_queue_is_parallel (q)) { + err =copy_from_user (addresses, addresses_user, +sizeof (u64) * q->width);if (err) { err = -EFAULT ; goto err_syncs;
drivers/gpu/drm/xe/xe_lrc.c +1 -1
@@ -1185,7 +1185,7 @@ static ssize_t setup_invalidate_state_cache_wa(struct xe_lrc *lrc,return -ENOSPC ; *cmd++ =MI_LOAD_REGISTER_IMM |MI_LRI_NUM_REGS (1 ); - *cmd++ =CS_DEBUG_MODE1 (0 ).addr; + *cmd++ =CS_DEBUG_MODE2 (0 ).addr; *cmd++ =_MASKED_BIT_ENABLE (INSTRUCTION_STATE_CACHE_INVALIDATE );return cmd - batch;
drivers/gpu/drm/xe/xe_nvm.c +27 -28
72 lines not on this page · raw message
drivers/gpu/drm/xe/xe_nvm.h +0 -2
@@ -10,6 +10,4 @@ struct xe_device;int xe_nvm_init (struct xe_device *xe); -void xe_nvm_fini (struct xe_device *xe); -#endif
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c +3 -0
@@ -1078,6 +1078,9 @@ static int tegra241_vcmdq_hw_init_user(struct tegra241_vcmdq *vcmdq) {char header[64 ]; +/* Reset VCMDQ */ +tegra241_vcmdq_hw_deinit (vcmdq); +/* Configure the vcmdq only; User space does the enabling */ writeq_relaxed (vcmdq->cmdq.q.q_base,REG_VCMDQ_PAGE1 (vcmdq,BASE ));
drivers/md/bcache/bcache.h +9 -0
@@ -273,6 +273,8 @@ struct bcache_device {struct bio_set bio_split; +struct bio_set bio_detached; + unsigned int data_csum:1; int (*cache_miss)(struct btree *b, struct search *s,
@@ -755,6 +757,13 @@ struct bbio {struct bio bio; }; +struct detached_dev_io_private { +struct bcache_device *d; +unsigned long start_time; +struct bio *orig_bio; +struct bio bio; +}; +#define BTREE_PRIO USHRT_MAX#define INITIAL_PRIO 32768U
drivers/md/bcache/request.c +36 -44
123 lines not on this page · raw message
drivers/md/bcache/super.c +10 -2
@@ -887,6 +887,7 @@ static void bcache_device_free(struct bcache_device *d) }bioset_exit (&d->bio_split); +bioset_exit (&d->bio_detached);kvfree (d->full_dirty_stripes);kvfree (d->stripe_sectors_dirty);
@@ -949,6 +950,11 @@ static int bcache_device_init(struct bcache_device *d, unsigned int block_size, BIOSET_NEED_BVECS|BIOSET_NEED_RESCUER)) goto out_ida_remove; +if (bioset_init (&d->bio_detached,4 , + offsetof(struct detached_dev_io_private , bio), +BIOSET_NEED_BVECS |BIOSET_NEED_RESCUER )) + goto out_bioset_split_exit; +if (lim.logical_block_size >PAGE_SIZE && cached_bdev) {/* * This should only happen with BCACHE_SB_VERSION_BDEV.
@@ -964,7 +970,7 @@ static int bcache_device_init(struct bcache_device *d, unsigned int block_size, d->disk =blk_alloc_disk (&lim,NUMA_NO_NODE );if (IS_ERR (d->disk)) - goto out_bioset_exit; + goto out_bioset_detach_exit;set_capacity (d->disk, sectors);snprintf (d->disk->disk_name,DISK_NAME_LEN ,"bcache%i" , idx);
@@ -976,7 +982,9 @@ static int bcache_device_init(struct bcache_device *d, unsigned int block_size, d->disk->private_data = d;return 0 ; -out_bioset_exit: +out_bioset_detach_exit: +bioset_exit (&d->bio_detached); +out_bioset_split_exit:bioset_exit (&d->bio_split); out_ida_remove:ida_free (&bcache_device_idx, idx);
drivers/net/bonding/bond_main.c +15 -13
@@ -2293,11 +2293,6 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev,unblock_netpoll_tx (); } -/* broadcast mode uses the all_slaves to loop through slaves. */ -if (bond_mode_can_use_xmit_hash (bond) || -BOND_MODE (bond) ==BOND_MODE_BROADCAST ) -bond_update_slave_arr (bond,NULL ); -if (!slave_dev->netdev_ops->ndo_bpf || !slave_dev->netdev_ops->ndo_xdp_xmit) {if (bond->xdp_prog) {
@@ -2331,6 +2326,11 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev,bpf_prog_inc (bond->xdp_prog); } +/* broadcast mode uses the all_slaves to loop through slaves. */ +if (bond_mode_can_use_xmit_hash (bond) || +BOND_MODE (bond) ==BOND_MODE_BROADCAST ) +bond_update_slave_arr (bond,NULL ); +bond_xdp_set_features (bond_dev); slave_info(bond_dev, slave_dev, "Enslaving as %s interface with %s link\n",
@@ -3138,8 +3138,8 @@ static void bond_validate_arp(struct bonding *bond, struct slave *slave, __be32 __func__, &sip);return ; } - slave->last_rx = jiffies; - slave->target_last_arp_rx[i] = jiffies; +WRITE_ONCE (slave->last_rx, jiffies); +WRITE_ONCE (slave->target_last_arp_rx[i], jiffies); } static int bond_arp_rcv(const struct sk_buff *skb, struct bonding *bond,
@@ -3358,8 +3358,8 @@ static void bond_validate_na(struct bonding *bond, struct slave *slave, __func__, saddr);return ; } - slave->last_rx = jiffies; - slave->target_last_arp_rx[i] = jiffies; +WRITE_ONCE (slave->last_rx, jiffies); +WRITE_ONCE (slave->target_last_arp_rx[i], jiffies); } static int bond_na_rcv(const struct sk_buff *skb, struct bonding *bond,
@@ -3429,7 +3429,7 @@ int bond_rcv_validate(const struct sk_buff *skb, struct bonding *bond, (slave_do_arp_validate_only(bond) && is_ipv6) || #endif !slave_do_arp_validate_only(bond)) - slave->last_rx = jiffies; +WRITE_ONCE (slave->last_rx, jiffies); return RX_HANDLER_ANOTHER; }else if (is_arp) {return bond_arp_rcv (skb, bond, slave);
@@ -3497,7 +3497,7 @@ static void bond_loadbalance_arp_mon(struct bonding *bond)if (slave->link !=BOND_LINK_UP ) {if (bond_time_in_interval (bond, last_tx,1 ) && -bond_time_in_interval (bond, slave->last_rx,1 )) { +bond_time_in_interval (bond,READ_ONCE (slave->last_rx),1 )) {bond_propose_link_state (slave,BOND_LINK_UP ); slave_state_changed =1 ;
@@ -3521,8 +3521,10 @@ static void bond_loadbalance_arp_mon(struct bonding *bond)* when the source ip is 0, so don't take the link down * if we don't know our ip yet */ -if (!bond_time_in_interval (bond, last_tx, bond->params.missed_max) || - !bond_time_in_interval (bond, slave->last_rx, bond->params.missed_max)) { +if (!bond_time_in_interval (bond, last_tx, + bond->params.missed_max) || + !bond_time_in_interval (bond,READ_ONCE (slave->last_rx), + bond->params.missed_max)) {bond_propose_link_state (slave,BOND_LINK_DOWN ); slave_state_changed =1 ;
drivers/net/bonding/bond_options.c +4 -4
@@ -1152,7 +1152,7 @@ static void _bond_options_arp_ip_target_set(struct bonding *bond, int slot,if (slot >=0 && slot <BOND_MAX_ARP_TARGETS ) {bond_for_each_slave (bond, slave, iter) - slave->target_last_arp_rx[slot] = last_rx; +WRITE_ONCE (slave->target_last_arp_rx[slot], last_rx); targets[slot] = target; } }
@@ -1221,8 +1221,8 @@ static int bond_option_arp_ip_target_rem(struct bonding *bond, __be32 target)bond_for_each_slave (bond, slave, iter) { targets_rx = slave->target_last_arp_rx;for (i = ind; (i <BOND_MAX_ARP_TARGETS -1 ) && targets[i+1 ]; i++) - targets_rx[i] = targets_rx[i+1 ]; - targets_rx[i] =0 ; +WRITE_ONCE (targets_rx[i],READ_ONCE (targets_rx[i+1 ])); +WRITE_ONCE (targets_rx[i],0 ); }for (i = ind; (i <BOND_MAX_ARP_TARGETS -1 ) && targets[i+1 ]; i++) targets[i] = targets[i+1 ];
@@ -1377,7 +1377,7 @@ static void _bond_options_ns_ip6_target_set(struct bonding *bond, int slot,if (slot >=0 && slot <BOND_MAX_NS_TARGETS ) {bond_for_each_slave (bond, slave, iter) { - slave->target_last_arp_rx[slot] = last_rx; +WRITE_ONCE (slave->target_last_arp_rx[slot], last_rx);slave_set_ns_maddr (bond, slave, target, &targets[slot]); } targets[slot] = *target;
drivers/net/can/at91_can.c +1 -1
@@ -1100,7 +1100,7 @@ static int at91_can_probe(struct platform_device *pdev)if (IS_ERR (transceiver)) { err =PTR_ERR (transceiver);dev_err_probe (&pdev->dev, err,"failed to get phy\n" ); - goto exit_iounmap; + goto exit_free; } dev->netdev_ops = &at91_netdev_ops;
drivers/net/can/usb/gs_usb.c +2 -2
@@ -610,7 +610,7 @@ static void gs_usb_receive_bulk_callback(struct urb *urb) {struct gs_usb *parent = urb->context;struct gs_can *dev; -struct net_device *netdev; +struct net_device *netdev =NULL ;int rc;struct net_device_stats *stats;struct gs_host_frame *hf = urb->transfer_buffer;
@@ -768,7 +768,7 @@ static void gs_usb_receive_bulk_callback(struct urb *urb) } }else if (rc != -ESHUTDOWN &&net_ratelimit ()) {netdev_info (netdev,"failed to re-submit IN URB: %pe\n" , -ERR_PTR (urb->status)); +ERR_PTR (rc)); } }
drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c +4 -1
@@ -1261,7 +1261,7 @@ struct bcmasp_intf *bcmasp_interface_create(struct bcmasp_priv *priv,netdev_err (intf->ndev,"invalid PHY mode: %s for port %d\n" ,phy_modes (intf->phy_interface), intf->port); ret = -EINVAL ; - goto err_free_netdev; + goto err_deregister_fixed_link; } ret =of_get_ethdev_address (ndev_dn, ndev);
@@ -1286,6 +1286,9 @@ struct bcmasp_intf *bcmasp_interface_create(struct bcmasp_priv *priv,return intf; +err_deregister_fixed_link: +if (of_phy_is_fixed_link (ndev_dn)) +of_phy_deregister_fixed_link (ndev_dn); err_free_netdev:free_netdev (ndev); err:
drivers/net/ethernet/intel/ice/ice_lib.c +6 -4
@@ -2784,12 +2784,14 @@ void ice_vsi_set_napi_queues(struct ice_vsi *vsi)return ;ice_for_each_rxq (vsi, q_idx) -netif_queue_set_napi (netdev, q_idx,NETDEV_QUEUE_TYPE_RX , - &vsi->rx_rings[q_idx]->q_vector->napi); +if (vsi->rx_rings[q_idx] && vsi->rx_rings[q_idx]->q_vector) +netif_queue_set_napi (netdev, q_idx,NETDEV_QUEUE_TYPE_RX , + &vsi->rx_rings[q_idx]->q_vector->napi);ice_for_each_txq (vsi, q_idx) -netif_queue_set_napi (netdev, q_idx,NETDEV_QUEUE_TYPE_TX , - &vsi->tx_rings[q_idx]->q_vector->napi); +if (vsi->tx_rings[q_idx] && vsi->tx_rings[q_idx]->q_vector) +netif_queue_set_napi (netdev, q_idx,NETDEV_QUEUE_TYPE_TX , + &vsi->tx_rings[q_idx]->q_vector->napi);/* Also set the interrupt number for the NAPI */ ice_for_each_q_vector (vsi, v_idx) {struct ice_q_vector *q_vector = vsi->q_vectors[v_idx];
drivers/net/ethernet/intel/ice/ice_main.c +0 -1
@@ -6993,7 +6993,6 @@ void ice_update_vsi_stats(struct ice_vsi *vsi) cur_ns->rx_errors = pf->stats.crc_errors + pf->stats.illegal_bytes + pf->stats.rx_undersize + - pf->hw_csum_rx_error + pf->stats.rx_jabber + pf->stats.rx_fragments + pf->stats.rx_oversize;
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +10 -16
@@ -11468,20 +11468,17 @@ static void ixgbe_set_fw_version(struct ixgbe_adapter *adapter)*/ static int ixgbe_recovery_probe (struct ixgbe_adapter *adapter) { -struct net_device *netdev = adapter->netdev;struct pci_dev *pdev = adapter->pdev;struct ixgbe_hw *hw = &adapter->hw; -bool disable_dev;int err = -EIO ;if (hw->mac.type != ixgbe_mac_e610) - goto clean_up_probe; +return err;ixgbe_get_hw_control (adapter); -mutex_init (&hw->aci.lock); err =ixgbe_get_flash_data (&adapter->hw);if (err) - goto shutdown_aci; + goto err_release_hw_control;timer_setup (&adapter->service_timer, ixgbe_service_timer,0 );INIT_WORK (&adapter->service_task, ixgbe_recovery_service_task);
@@ -11504,16 +11501,8 @@ static int ixgbe_recovery_probe(struct ixgbe_adapter *adapter)devl_unlock (adapter->devlink);return 0 ; -shutdown_aci: -mutex_destroy (&adapter->hw.aci.lock); +err_release_hw_control:ixgbe_release_hw_control (adapter); -clean_up_probe: - disable_dev = !test_and_set_bit (__IXGBE_DISABLED, &adapter->state); -free_netdev (netdev); -devlink_free (adapter->devlink); -pci_release_mem_regions (pdev); -if (disable_dev) -pci_disable_device (pdev);return err; }
@@ -11655,8 +11644,13 @@ static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)if (err) goto err_sw_init; -if (ixgbe_check_fw_error (adapter)) -return ixgbe_recovery_probe (adapter); +if (ixgbe_check_fw_error (adapter)) { + err =ixgbe_recovery_probe (adapter); +if (err) + goto err_sw_init; + +return 0 ; + }if (adapter->hw.mac.type == ixgbe_mac_e610) { err =ixgbe_get_caps (&adapter->hw);
drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c +1 -1
@@ -1389,7 +1389,7 @@ int mvpp2_ethtool_cls_rule_ins(struct mvpp2_port *port, efs->rule.flow_type =mvpp2_cls_ethtool_flow_to_type (info->fs.flow_type);if (efs->rule.flow_type <0 ) { ret = efs->rule.flow_type; - goto clean_rule; + goto clean_eth_rule; } ret =mvpp2_cls_rfs_parse_rule (&efs->rule);
drivers/net/ethernet/marvell/octeon_ep/octep_main.c +1 -1
@@ -1338,7 +1338,7 @@ int octep_device_setup(struct octep_device *oct) ret =octep_ctrl_net_init (oct);if (ret) -return ret; + goto unsupported_dev;INIT_WORK (&oct->tx_timeout_task, octep_tx_timeout_task);INIT_WORK (&oct->ctrl_mbox_task, octep_ctrl_mbox_task);
drivers/net/ethernet/mellanox/mlx5/core/debugfs.c +16 -0
@@ -613,3 +613,19 @@ void mlx5_debug_cq_remove(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq) cq->dbg =NULL ; } } + +static int vhca_id_show (struct seq_file *file,void *priv) +{ +struct mlx5_core_dev *dev = file->private; + +seq_printf (file,"0x%x\n" ,MLX5_CAP_GEN (dev, vhca_id)); +return 0 ; +} + +DEFINE_SHOW_ATTRIBUTE (vhca_id); + +void mlx5_vhca_debugfs_init (struct mlx5_core_dev *dev) +{ +debugfs_create_file ("vhca_id" ,0400 , dev->priv.dbg.dbg_root, dev, + &vhca_id_fops); +}
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c +2 -1
@@ -430,7 +430,8 @@ void mlx5e_ipsec_build_accel_xfrm_attrs(struct mlx5e_ipsec_sa_entry *sa_entry, attrs->replay_esn.esn = sa_entry->esn_state.esn; attrs->replay_esn.esn_msb = sa_entry->esn_state.esn_msb; attrs->replay_esn.overlap = sa_entry->esn_state.overlap; -if (attrs->dir ==XFRM_DEV_OFFLOAD_OUT ) +if (attrs->dir ==XFRM_DEV_OFFLOAD_OUT || + x->xso.type !=XFRM_DEV_OFFLOAD_PACKET ) goto skip_replay_window;switch (x->replay_esn->replay_window) {
drivers/net/ethernet/mellanox/mlx5/core/en_accel/psp_rxtx.c +11 -6
@@ -177,8 +177,6 @@ bool mlx5e_psp_handle_tx_skb(struct net_device *netdev, {struct mlx5e_priv *priv =netdev_priv (netdev);struct net *net =sock_net (skb->sk); -const struct ipv6hdr *ip6; -struct tcphdr *th;if (!mlx5e_psp_set_state (priv, skb, psp_st))return true;
@@ -189,11 +187,18 @@ bool mlx5e_psp_handle_tx_skb(struct net_device *netdev,return false; }if (skb_is_gso (skb)) { - ip6 =ipv6_hdr (skb); - th =inner_tcp_hdr (skb); +int len =skb_shinfo (skb)->gso_size +inner_tcp_hdrlen (skb); +struct tcphdr *th =inner_tcp_hdr (skb); - th->check = ~tcp_v6_check (skb_shinfo (skb)->gso_size +inner_tcp_hdrlen (skb), &ip6->saddr, - &ip6->daddr,0 ); +if (skb->protocol ==htons (ETH_P_IP )) { +const struct iphdr *ip =ip_hdr (skb); + + th->check = ~tcp_v4_check (len, ip->saddr, ip->daddr,0 ); + }else { +const struct ipv6hdr *ip6 =ipv6_hdr (skb); + + th->check = ~tcp_v6_check (len, &ip6->saddr, &ip6->daddr,0 ); + } }return true;
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +11 -9
@@ -4033,6 +4033,8 @@ mlx5e_get_stats(struct net_device *dev, struct rtnl_link_stats64 *stats)mlx5e_queue_update_stats (priv); } +netdev_stats_to_stats64 (stats, &dev->stats); +if (mlx5e_is_uplink_rep (priv)) {struct mlx5e_vport_stats *vstats = &priv->stats.vport;
@@ -4049,21 +4051,21 @@ mlx5e_get_stats(struct net_device *dev, struct rtnl_link_stats64 *stats)mlx5e_fold_sw_stats64 (priv, stats); } - stats->rx_missed_errors = priv->stats.qcnt.rx_out_of_buffer; - stats->rx_dropped =PPORT_2863_GET (pstats, if_in_discards); + stats->rx_missed_errors += priv->stats.qcnt.rx_out_of_buffer; + stats->rx_dropped +=PPORT_2863_GET (pstats, if_in_discards); - stats->rx_length_errors = + stats->rx_length_errors +=PPORT_802_3_GET (pstats, a_in_range_length_errors) +PPORT_802_3_GET (pstats, a_out_of_range_length_field) +PPORT_802_3_GET (pstats, a_frame_too_long_errors) +VNIC_ENV_GET (&priv->stats.vnic, eth_wqe_too_small); - stats->rx_crc_errors = + stats->rx_crc_errors +=PPORT_802_3_GET (pstats, a_frame_check_sequence_errors); - stats->rx_frame_errors =PPORT_802_3_GET (pstats, a_alignment_errors); - stats->tx_aborted_errors =PPORT_2863_GET (pstats, if_out_discards); - stats->rx_errors = stats->rx_length_errors + stats->rx_crc_errors + - stats->rx_frame_errors; - stats->tx_errors = stats->tx_aborted_errors + stats->tx_carrier_errors; + stats->rx_frame_errors +=PPORT_802_3_GET (pstats, a_alignment_errors); + stats->tx_aborted_errors +=PPORT_2863_GET (pstats, if_out_discards); + stats->rx_errors += stats->rx_length_errors + stats->rx_crc_errors + + stats->rx_frame_errors; + stats->tx_errors += stats->tx_aborted_errors + stats->tx_carrier_errors; }static void mlx5e_nic_set_rx_mode (struct mlx5e_priv *priv)
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +13 -6
@@ -2147,11 +2147,14 @@ static void mlx5e_tc_del_fdb_peer_flow(struct mlx5e_tc_flow *flow,static void mlx5e_tc_del_fdb_peers_flow (struct mlx5e_tc_flow *flow) { +struct mlx5_devcom_comp_dev *devcom; +struct mlx5_devcom_comp_dev *pos; +struct mlx5_eswitch *peer_esw;int i; -for (i =0 ; i <MLX5_MAX_PORTS ; i++) { -if (i ==mlx5_get_dev_index (flow->priv->mdev)) -continue ; + devcom = flow->priv->mdev->priv.eswitch->devcom; +mlx5_devcom_for_each_peer_entry (devcom, peer_esw, pos) { + i =mlx5_get_dev_index (peer_esw->dev);mlx5e_tc_del_fdb_peer_flow (flow, i); } }
@@ -5511,12 +5514,16 @@ int mlx5e_tc_num_filters(struct mlx5e_priv *priv, unsigned long flags)void mlx5e_tc_clean_fdb_peer_flows (struct mlx5_eswitch *esw) { +struct mlx5_devcom_comp_dev *devcom; +struct mlx5_devcom_comp_dev *pos;struct mlx5e_tc_flow *flow, *tmp; +struct mlx5_eswitch *peer_esw;int i; -for (i =0 ; i <MLX5_MAX_PORTS ; i++) { -if (i ==mlx5_get_dev_index (esw->dev)) -continue ; + devcom = esw->devcom; + +mlx5_devcom_for_each_peer_entry (devcom, peer_esw, pos) { + i =mlx5_get_dev_index (peer_esw->dev);list_for_each_entry_safe (flow, tmp, &esw->offloads.peer_flows[i], peer[i])mlx5e_tc_del_fdb_peers_flow (flow); }
drivers/net/ethernet/mellanox/mlx5/core/esw/acl/ingress_lgcy.c +1 -1
@@ -188,7 +188,7 @@ int esw_acl_ingress_lgcy_setup(struct mlx5_eswitch *esw,if (IS_ERR (vport->ingress.acl)) { err =PTR_ERR (vport->ingress.acl); vport->ingress.acl =NULL ; -return err; + goto out; } err =esw_acl_ingress_lgcy_groups_create (esw, vport);
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h +1 -1
@@ -1002,7 +1002,7 @@ mlx5_esw_host_functions_enabled(const struct mlx5_core_dev *dev)static inline bool mlx5_esw_vport_vhca_id (struct mlx5_eswitch *esw,u16 vportn,u16 *vhca_id) { -return -EOPNOTSUPP ; +return false; }#endif /* CONFIG_MLX5_ESWITCH */
drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c +2 -1
@@ -1167,7 +1167,8 @@ int mlx5_fs_cmd_set_tx_flow_table_root(struct mlx5_core_dev *dev, u32 ft_id, boou32 out[MLX5_ST_SZ_DW (set_flow_table_root_out)] = {};u32 in[MLX5_ST_SZ_DW (set_flow_table_root_in)] = {}; -if (disconnect &&MLX5_CAP_FLOWTABLE_NIC_TX (dev, reset_root_to_default)) +if (disconnect && + !MLX5_CAP_FLOWTABLE_NIC_TX (dev, reset_root_to_default))return -EOPNOTSUPP ; MLX5_SET(set_flow_table_root_in, in, opcode,
drivers/net/ethernet/mellanox/mlx5/core/main.c +21 -15
@@ -999,16 +999,10 @@ static int mlx5_init_once(struct mlx5_core_dev *dev) goto err_irq_cleanup; } - err =mlx5_events_init (dev); -if (err) { -mlx5_core_err (dev,"failed to initialize events\n" ); - goto err_eq_cleanup; - } - err =mlx5_fw_reset_init (dev);if (err) {mlx5_core_err (dev,"failed to initialize fw reset events\n" ); - goto err_events_cleanup; + goto err_eq_cleanup; }mlx5_cq_debugfs_init (dev);
@@ -1110,8 +1104,6 @@ static int mlx5_init_once(struct mlx5_core_dev *dev)mlx5_cleanup_reserved_gids (dev);mlx5_cq_debugfs_cleanup (dev);mlx5_fw_reset_cleanup (dev); -err_events_cleanup: -mlx5_events_cleanup (dev); err_eq_cleanup:mlx5_eq_table_cleanup (dev); err_irq_cleanup:
@@ -1144,7 +1136,6 @@ static void mlx5_cleanup_once(struct mlx5_core_dev *dev)mlx5_cleanup_reserved_gids (dev);mlx5_cq_debugfs_cleanup (dev);mlx5_fw_reset_cleanup (dev); -mlx5_events_cleanup (dev);mlx5_eq_table_cleanup (dev);mlx5_irq_table_cleanup (dev);mlx5_devcom_unregister_device (dev->priv.devc);
@@ -1812,15 +1803,23 @@ static int mlx5_hca_caps_alloc(struct mlx5_core_dev *dev)return -ENOMEM ; } -static int vhca_id_show (struct seq_file *file,void *priv) +static int mlx5_notifiers_init (struct mlx5_core_dev *dev) { -struct mlx5_core_dev *dev = file->private; +int err; + + err =mlx5_events_init (dev); +if (err) { +mlx5_core_err (dev,"failed to initialize events\n" ); +return err; + } -seq_printf (file,"0x%x\n" ,MLX5_CAP_GEN (dev, vhca_id));return 0 ; } -DEFINE_SHOW_ATTRIBUTE (vhca_id); +static void mlx5_notifiers_cleanup (struct mlx5_core_dev *dev) +{ +mlx5_events_cleanup (dev); +}int mlx5_mdev_init (struct mlx5_core_dev *dev,int profile_idx) {
@@ -1846,7 +1845,7 @@ int mlx5_mdev_init(struct mlx5_core_dev *dev, int profile_idx) priv->numa_node =dev_to_node (mlx5_core_dma_dev (dev)); priv->dbg.dbg_root =debugfs_create_dir (dev_name (dev->device), mlx5_debugfs_root); -debugfs_create_file ("vhca_id" ,0400 , priv->dbg.dbg_root, dev, &vhca_id_fops); +INIT_LIST_HEAD (&priv->traps); err =mlx5_cmd_init (dev);
@@ -1877,6 +1876,10 @@ int mlx5_mdev_init(struct mlx5_core_dev *dev, int profile_idx)if (err) goto err_hca_caps; + err =mlx5_notifiers_init (dev); +if (err) + goto err_hca_caps; +/* The conjunction of sw_vhca_id with sw_owner_id will be a global * unique id per function which uses mlx5_core. * Those values are supplied to FW as part of the init HCA command to
@@ -1919,6 +1922,7 @@ void mlx5_mdev_uninit(struct mlx5_core_dev *dev)if (priv->sw_vhca_id >0 )ida_free (&sw_vhca_ida, dev->priv.sw_vhca_id); +mlx5_notifiers_cleanup (dev);mlx5_hca_caps_free (dev);mlx5_adev_cleanup (dev);mlx5_pagealloc_cleanup (dev);
@@ -1979,6 +1983,8 @@ static int probe_one(struct pci_dev *pdev, const struct pci_device_id *id) goto err_init_one; } +mlx5_vhca_debugfs_init (dev); +pci_save_state (pdev);return 0 ;
drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h +1 -0
@@ -258,6 +258,7 @@ int mlx5_wait_for_pages(struct mlx5_core_dev *dev, int *pages);void mlx5_cmd_flush (struct mlx5_core_dev *dev);void mlx5_cq_debugfs_init (struct mlx5_core_dev *dev);void mlx5_cq_debugfs_cleanup (struct mlx5_core_dev *dev); +void mlx5_vhca_debugfs_init (struct mlx5_core_dev *dev);int mlx5_query_pcam_reg (struct mlx5_core_dev *dev,u32 *pcam,u8 feature_group,u8 access_reg_group);
drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c +1 -0
@@ -76,6 +76,7 @@ static int mlx5_sf_dev_probe(struct auxiliary_device *adev, const struct auxilia goto init_one_err; } +mlx5_vhca_debugfs_init (mdev);return 0 ; init_one_err:
drivers/net/ethernet/rocker/rocker_main.c +2 -3
@@ -1524,9 +1524,8 @@ static void rocker_world_port_post_fini(struct rocker_port *rocker_port) {struct rocker_world_ops *wops = rocker_port->rocker->wops; -if (!wops->port_post_fini) -return ; - wops->port_post_fini (rocker_port); +if (wops->port_post_fini) + wops->port_post_fini (rocker_port);kfree (rocker_port->wpriv); }
drivers/net/ethernet/sfc/mcdi_filters.c +1 -6
@@ -2182,12 +2182,7 @@ int efx_mcdi_rx_pull_rss_context_config(struct efx_nic *efx,int efx_mcdi_rx_pull_rss_config (struct efx_nic *efx) { -int rc; - -mutex_lock (&efx->net_dev->ethtool->rss_lock); - rc =efx_mcdi_rx_pull_rss_context_config (efx, &efx->rss_context); -mutex_unlock (&efx->net_dev->ethtool->rss_lock); -return rc; +return efx_mcdi_rx_pull_rss_context_config (efx, &efx->rss_context); }void efx_mcdi_rx_restore_rss_contexts (struct efx_nic *efx)
drivers/net/ethernet/spacemit/k1_emac.c +27 -7
@@ -1099,7 +1099,13 @@ static int emac_read_stat_cnt(struct emac_priv *priv, u8 cnt, u32 *res, 100, 10000);if (ret) { -netdev_err (priv->ndev,"Read stat timeout\n" ); +/* +* This could be caused by the PHY stopping its refclk even when +* the link is up, for power saving. See also comments in +* emac_stats_update(). +*/ +dev_err_ratelimited (&priv->ndev->dev, +"Read stat timeout. PHY clock stopped?\n" );return ret; }
@@ -1147,17 +1153,25 @@ static void emac_stats_update(struct emac_priv *priv)assert_spin_locked (&priv->stats_lock); -if (!netif_running (priv->ndev) || !netif_device_present (priv->ndev)) { -/* Not up, don't try to update */ +/* +* We can't read statistics if the interface is not up. Also, some PHYs +* stop their reference clocks for link down power saving, which also +* causes reading statistics to time out. Don't update and don't +* reschedule in these cases. +*/ +if (!netif_running (priv->ndev) || + !netif_carrier_ok (priv->ndev) || + !netif_device_present (priv->ndev)) {return ; }for (i =0 ; i <sizeof (priv->tx_stats) /sizeof (*tx_stats); i++) {/* -* If reading stats times out, everything is broken and there's -* nothing we can do. Reading statistics also can't return an -* error, so just return without updating and without -* rescheduling. +* If reading stats times out anyway, the stat registers will be +* stuck, and we can't really recover from that. +* +* Reading statistics also can't return an error, so just return +* without updating and without rescheduling. */ if (emac_tx_read_stat_cnt (priv, i, &res))return ;
@@ -1636,6 +1650,12 @@ static void emac_adjust_link(struct net_device *dev)emac_wr (priv,MAC_GLOBAL_CONTROL , ctrl);emac_set_fc_autoneg (priv); + +/* +* Reschedule stats updates now that link is up. See comments in +* emac_stats_update(). +*/ +mod_timer (&priv->stats_timer, jiffies); }phy_print_status (phydev);
drivers/net/phy/micrel.c +13 -4
@@ -2541,11 +2541,21 @@ static int kszphy_probe(struct phy_device *phydev)kszphy_parse_led_mode (phydev); - clk =devm_clk_get_optional_enabled (&phydev->mdio.dev,"rmii-ref" ); + clk =devm_clk_get_optional (&phydev->mdio.dev,"rmii-ref" );/* NOTE: clk may be NULL if building without CONFIG_HAVE_CLK */ if (!IS_ERR_OR_NULL (clk)) { -unsigned long rate =clk_get_rate (clk);bool rmii_ref_clk_sel_25_mhz; +unsigned long rate; +int err; + + err =clk_prepare_enable (clk); +if (err) { +phydev_err (phydev,"Failed to enable rmii-ref clock\n" ); +return err; + } + + rate =clk_get_rate (clk); +clk_disable_unprepare (clk);if (type) priv->rmii_ref_clk_sel = type->has_rmii_ref_clk_sel;
@@ -2563,13 +2573,12 @@ static int kszphy_probe(struct phy_device *phydev) } }else if (!clk) {/* unnamed clock from the generic ethernet-phy binding */ - clk =devm_clk_get_optional_enabled (&phydev->mdio.dev,NULL ); + clk =devm_clk_get_optional (&phydev->mdio.dev,NULL ); }if (IS_ERR (clk))return PTR_ERR (clk); -clk_disable_unprepare (clk); priv->clk = clk;if (ksz8041_fiber_mode (phydev))
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c +7 -2
@@ -395,6 +395,7 @@ static int t7xx_dpmaif_set_frag_to_skb(const struct dpmaif_rx_queue *rxq, struct sk_buff *skb) {unsigned long long data_bus_addr, data_base_addr; +struct skb_shared_info *shinfo =skb_shinfo (skb);struct device *dev = rxq->dpmaif_ctrl->dev;struct dpmaif_bat_page *page_info;unsigned int data_len;
@@ -402,18 +403,22 @@ static int t7xx_dpmaif_set_frag_to_skb(const struct dpmaif_rx_queue *rxq, page_info = rxq->bat_frag->bat_skb; page_info +=t7xx_normal_pit_bid (pkt_info); -dma_unmap_page (dev, page_info->data_bus_addr, page_info->data_len,DMA_FROM_DEVICE );if (!page_info->page)return -EINVAL ; +if (shinfo->nr_frags >=MAX_SKB_FRAGS ) +return -EINVAL ; + +dma_unmap_page (dev, page_info->data_bus_addr, page_info->data_len,DMA_FROM_DEVICE ); + data_bus_addr =le32_to_cpu (pkt_info->pd.data_addr_h); data_bus_addr = (data_bus_addr <<32 ) +le32_to_cpu (pkt_info->pd.data_addr_l); data_base_addr = page_info->data_bus_addr; data_offset = data_bus_addr - data_base_addr; data_offset += page_info->offset; data_len =FIELD_GET (PD_PIT_DATA_LEN ,le32_to_cpu (pkt_info->header)); -skb_add_rx_frag (skb,skb_shinfo (skb)->nr_frags, page_info->page, +skb_add_rx_frag (skb, shinfo->nr_frags, page_info->page, data_offset, data_len, page_info->data_len); page_info->page =NULL ;
drivers/nvme/target/io-cmd-bdev.c +2 -1
@@ -180,9 +180,10 @@ u16 blk_to_nvme_status(struct nvmet_req *req, blk_status_t blk_sts)static void nvmet_bio_done (struct bio *bio) {struct nvmet_req *req = bio->bi_private; +blk_status_t blk_status = bio->bi_status; -nvmet_req_complete (req,blk_to_nvme_status (req, bio->bi_status));nvmet_req_bio_put (req, bio); +nvmet_req_complete (req,blk_to_nvme_status (req, blk_status)); }#ifdef CONFIG_BLK_DEV_INTEGRITY
drivers/of/of_reserved_mem.c +24 -20
91 lines not on this page · raw message
drivers/pinctrl/meson/pinctrl-meson.c +1 -1
@@ -619,7 +619,7 @@ static int meson_gpiolib_register(struct meson_pinctrl *pc) pc->chip.set = meson_gpio_set; pc->chip.base =-1 ; pc->chip.ngpio = pc->data->num_pins; - pc->chip.can_sleep = false; + pc->chip.can_sleep = true; ret =gpiochip_add_data (&pc->chip, pc);if (ret) {
drivers/pinctrl/pinctrl-rockchip.c +4 -5
@@ -3184,10 +3184,9 @@ static int rockchip_pmx_set(struct pinctrl_dev *pctldev, unsigned selector,return 0 ; } -static int rockchip_pmx_gpio_set_direction (struct pinctrl_dev *pctldev, -struct pinctrl_gpio_range *range, -unsigned offset, -bool input) +static int rockchip_pmx_gpio_request_enable (struct pinctrl_dev *pctldev, +struct pinctrl_gpio_range *range, +unsigned int offset) {struct rockchip_pinctrl *info =pinctrl_dev_get_drvdata (pctldev);struct rockchip_pin_bank *bank;
@@ -3201,7 +3200,7 @@ static const struct pinmux_ops rockchip_pmx_ops = { .get_function_name = rockchip_pmx_get_func_name, .get_function_groups = rockchip_pmx_get_groups, .set_mux = rockchip_pmx_set, - .gpio_set_direction = rockchip_pmx_gpio_set_direction, + .gpio_request_enable = rockchip_pmx_gpio_request_enable, };/*
drivers/pinctrl/qcom/Kconfig +3 -12
@@ -61,13 +61,14 @@ config PINCTRL_LPASS_LPI (Low Power Island) found on the Qualcomm Technologies Inc SoCs. config PINCTRL_SC7280_LPASS_LPI - tristate "Qualcomm Technologies Inc SC7280 LPASS LPI pin controller driver" + tristate "Qualcomm Technologies Inc SC7280 and SM8350 LPASS LPI pin controller driver" depends on ARM64 || COMPILE_TEST depends on PINCTRL_LPASS_LPI help This is the pinctrl, pinmux, pinconf and gpiolib driver for the Qualcomm Technologies Inc LPASS (Low Power Audio SubSystem) LPI - (Low Power Island) found on the Qualcomm Technologies Inc SC7280 platform. + (Low Power Island) found on the Qualcomm Technologies Inc SC7280 + and SM8350 platforms. config PINCTRL_SDM660_LPASS_LPI tristate "Qualcomm Technologies Inc SDM660 LPASS LPI pin controller driver"
@@ -106,16 +107,6 @@ config PINCTRL_SM8250_LPASS_LPI Qualcomm Technologies Inc LPASS (Low Power Audio SubSystem) LPI (Low Power Island) found on the Qualcomm Technologies Inc SM8250 platform. -config PINCTRL_SM8350_LPASS_LPI - tristate "Qualcomm Technologies Inc SM8350 LPASS LPI pin controller driver" - depends on ARM64 || COMPILE_TEST - depends on PINCTRL_LPASS_LPI - help - This is the pinctrl, pinmux, pinconf and gpiolib driver for the - Qualcomm Technologies Inc LPASS (Low Power Audio SubSystem) LPI - (Low Power Island) found on the Qualcomm Technologies Inc SM8350 - platform. - config PINCTRL_SM8450_LPASS_LPI tristate "Qualcomm Technologies Inc SM8450 LPASS LPI pin controller driver" depends on ARM64 || COMPILE_TEST
drivers/pinctrl/qcom/Makefile +0 -1
@@ -63,7 +63,6 @@ obj-$(CONFIG_PINCTRL_SM8150) += pinctrl-sm8150.o obj-$(CONFIG_PINCTRL_SM8250) += pinctrl-sm8250.o obj-$(CONFIG_PINCTRL_SM8250_LPASS_LPI) += pinctrl-sm8250-lpass-lpi.o obj-$(CONFIG_PINCTRL_SM8350) += pinctrl-sm8350.o -obj-$(CONFIG_PINCTRL_SM8350_LPASS_LPI) += pinctrl-sm8350-lpass-lpi.o obj-$(CONFIG_PINCTRL_SM8450) += pinctrl-sm8450.o obj-$(CONFIG_PINCTRL_SM8450_LPASS_LPI) += pinctrl-sm8450-lpass-lpi.o obj-$(CONFIG_PINCTRL_SM8550) += pinctrl-sm8550.o
drivers/pinctrl/qcom/pinctrl-lpass-lpi.c +17 -0
@@ -312,6 +312,22 @@ static const struct pinconf_ops lpi_gpio_pinconf_ops = { .pin_config_group_set = lpi_config_set, }; +static int lpi_gpio_get_direction (struct gpio_chip *chip,unsigned int pin) +{ +unsigned long config =pinconf_to_config_packed (PIN_CONFIG_LEVEL ,0 ); +struct lpi_pinctrl *state =gpiochip_get_data (chip); +unsigned long arg; +int ret; + + ret =lpi_config_get (state->ctrl, pin, &config); +if (ret) +return ret; + + arg =pinconf_to_config_argument (config); + +return arg ?GPIO_LINE_DIRECTION_OUT :GPIO_LINE_DIRECTION_IN ; +} +static int lpi_gpio_direction_input (struct gpio_chip *chip,unsigned int pin) {struct lpi_pinctrl *state =gpiochip_get_data (chip);
@@ -409,6 +425,7 @@ static void lpi_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)#endif static const struct gpio_chip lpi_gpio_template = { + .get_direction = lpi_gpio_get_direction, .direction_input = lpi_gpio_direction_input, .direction_output = lpi_gpio_direction_output, .get = lpi_gpio_get,
drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c +3 -0
@@ -131,6 +131,9 @@ static const struct of_device_id lpi_pinctrl_of_match[] = { { .compatible = "qcom,sc7280-lpass-lpi-pinctrl", .data = &sc7280_lpi_data, + }, { + .compatible = "qcom,sm8350-lpass-lpi-pinctrl", + .data = &sc7280_lpi_data, }, { } };
drivers/pinctrl/qcom/pinctrl-sm8350-lpass-lpi.c deleted +0 -151
151 lines not on this page · raw message
drivers/scsi/be2iscsi/be_mgmt.c +1 -0
@@ -1025,6 +1025,7 @@ unsigned int beiscsi_boot_get_sinfo(struct beiscsi_hba *phba) &nonemb_cmd->dma, GFP_KERNEL);if (!nonemb_cmd->va) { +free_mcc_wrb (ctrl, tag);mutex_unlock (&ctrl->mbox_lock);return 0 ; }
drivers/scsi/qla2xxx/qla_os.c +1 -1
@@ -4488,7 +4488,7 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len, fail_elsrej:dma_pool_destroy (ha->purex_dma_pool); fail_flt: -dma_free_coherent (&ha->pdev->dev,SFP_DEV_SIZE , +dma_free_coherent (&ha->pdev->dev,sizeof (struct qla_flt_header ) +FLT_REGIONS_SIZE , ha->flt, ha->flt_dma); fail_flt_buffer:
drivers/target/sbp/sbp_target.c +2 -2
@@ -1961,12 +1961,12 @@ static struct se_portal_group *sbp_make_tpg(struct se_wwn *wwn, container_of(wwn, struct sbp_tport, tport_wwn);struct sbp_tpg *tpg; -unsigned long tpgt; +u16 tpgt;int ret;if (strstr (name,"tpgt_" ) != name)return ERR_PTR (-EINVAL ); -if (kstrtoul (name +5 ,10 , &tpgt) || tpgt >UINT_MAX ) +if (kstrtou16 (name +5 ,10 , &tpgt))return ERR_PTR (-EINVAL );if (tport->tpg) {
fs/btrfs/disk-io.c +0 -22
@@ -490,28 +490,6 @@ static int btree_migrate_folio(struct address_space *mapping,#define btree_migrate_folio NULL#endif -static int btree_writepages (struct address_space *mapping, -struct writeback_control *wbc) -{ -int ret; - -if (wbc->sync_mode ==WB_SYNC_NONE ) { -struct btrfs_fs_info *fs_info; - -if (wbc->for_kupdate) -return 0 ; - - fs_info =inode_to_fs_info (mapping->host); -/* this is a bit racy, but that's ok */ - ret =__percpu_counter_compare (&fs_info->dirty_metadata_bytes, -BTRFS_DIRTY_METADATA_THRESH , - fs_info->dirty_metadata_batch); -if (ret <0 ) -return 0 ; - } -return btree_write_cache_pages (mapping, wbc); -} -static bool btree_release_folio (struct folio *folio,gfp_t gfp_flags) {if (folio_test_writeback (folio) ||folio_test_dirty (folio))
fs/btrfs/extent_io.c +1 -2
@@ -2289,8 +2289,7 @@ void btrfs_btree_wait_writeback_range(struct btrfs_fs_info *fs_info, u64 start, } } -int btree_write_cache_pages (struct address_space *mapping, -struct writeback_control *wbc) +int btree_writepages (struct address_space *mapping,struct writeback_control *wbc) {struct btrfs_eb_write_context ctx = { .wbc = wbc };struct btrfs_fs_info *fs_info =inode_to_fs_info (mapping->host);
fs/btrfs/extent_io.h +1 -2
@@ -238,8 +238,7 @@ void extent_write_locked_range(struct inode *inode, const struct folio *locked_f u64 start, u64 end, struct writeback_control *wbc, bool pages_dirty);int btrfs_writepages (struct address_space *mapping,struct writeback_control *wbc); -int btree_write_cache_pages (struct address_space *mapping, -struct writeback_control *wbc); +int btree_writepages (struct address_space *mapping,struct writeback_control *wbc);void btrfs_btree_wait_writeback_range (struct btrfs_fs_info *fs_info,u64 start,u64 end);void btrfs_readahead (struct readahead_control *rac);int set_folio_extent_mapped (struct folio *folio);
fs/btrfs/zlib.c +1 -0
@@ -139,6 +139,7 @@ static int copy_data_into_buffer(struct address_space *mapping, data_in =kmap_local_folio (folio, offset);memcpy (workspace->buf + cur - filepos, data_in, copy_length);kunmap_local (data_in); +folio_put (folio); cur += copy_length; }return 0 ;
fs/efivarfs/vars.c +1 -1
@@ -552,7 +552,7 @@ int efivar_entry_get(struct efivar_entry *entry, u32 *attributes, err =__efivar_entry_get (entry, attributes, size, data);efivar_unlock (); -return 0 ; +return err; }/**
fs/fs-writeback.c +10 -4
@@ -2471,7 +2471,8 @@ static void wakeup_dirtytime_writeback(struct work_struct *w)wb_wakeup (wb); }rcu_read_unlock (); -schedule_delayed_work (&dirtytime_work, dirtytime_expire_interval *HZ ); +if (dirtytime_expire_interval) +schedule_delayed_work (&dirtytime_work, dirtytime_expire_interval *HZ ); } static int dirtytime_interval_handler(const struct ctl_table *table, int write,
@@ -2480,8 +2481,12 @@ static int dirtytime_interval_handler(const struct ctl_table *table, int write,int ret; ret =proc_dointvec_minmax (table, write, buffer, lenp, ppos); -if (ret ==0 && write) -mod_delayed_work (system_percpu_wq, &dirtytime_work,0 ); +if (ret ==0 && write) { +if (dirtytime_expire_interval) +mod_delayed_work (system_percpu_wq, &dirtytime_work,0 ); +else +cancel_delayed_work_sync (&dirtytime_work); + }return ret; }
@@ -2498,7 +2503,8 @@ static const struct ctl_table vm_fs_writeback_table[] = {static int __init start_dirtytime_writeback (void ) { -schedule_delayed_work (&dirtytime_work, dirtytime_expire_interval *HZ ); +if (dirtytime_expire_interval) +schedule_delayed_work (&dirtytime_work, dirtytime_expire_interval *HZ );register_sysctl_init ("vm" , vm_fs_writeback_table);return 0 ; }
fs/readdir.c +3 -0
@@ -316,6 +316,7 @@ SYSCALL_DEFINE3(getdents, unsigned int, fd,struct getdents_callback buf = { .ctx.actor = filldir, .ctx.count = count, + .ctx.dt_flags_mask =FILLDIR_FLAG_NOINTR , .current_dir = dirent };int error;
@@ -400,6 +401,7 @@ SYSCALL_DEFINE3(getdents64, unsigned int, fd,struct getdents_callback64 buf = { .ctx.actor = filldir64, .ctx.count = count, + .ctx.dt_flags_mask =FILLDIR_FLAG_NOINTR , .current_dir = dirent };int error;
@@ -569,6 +571,7 @@ COMPAT_SYSCALL_DEFINE3(getdents, unsigned int, fd,struct compat_getdents_callback buf = { .ctx.actor = compat_filldir, .ctx.count = count, + .ctx.dt_flags_mask =FILLDIR_FLAG_NOINTR , .current_dir = dirent, };int error;
include/linux/cma.h +9 -0
@@ -57,6 +57,15 @@ extern bool cma_intersects(struct cma *cma, unsigned long start, unsigned long eextern void cma_reserve_pages_on_error (struct cma *cma); +#ifdef CONFIG_DMA_CMA +extern bool cma_skip_dt_default_reserved_mem (void ); +#else +static inline bool cma_skip_dt_default_reserved_mem (void ) +{ +return false; +} +#endif +#ifdef CONFIG_CMA struct folio *cma_alloc_folio (struct cma *cma,int order,gfp_t gfp);bool cma_free_folio (struct cma *cma,const struct folio *folio);
include/linux/fs.h +5 -1
@@ -2207,6 +2207,8 @@ struct dir_context {* INT_MAX unlimited */ int count; +/* @actor supports these flags in d_type high bits */ +unsigned int dt_flags_mask; };/* If OR-ed with d_type, pending signals are not checked */
@@ -3985,7 +3987,9 @@ static inline bool dir_emit(struct dir_context *ctx, const char *name, int namelen, u64 ino, unsigned type) { - return ctx->actor(ctx, name, namelen, ctx->pos, ino, type); + unsigned int dt_mask = S_DT_MASK | ctx->dt_flags_mask; + +return ctx->actor (ctx, name, namelen, ctx->pos, ino, type & dt_mask); }static inline bool dir_emit_dot (struct file *file,struct dir_context *ctx) {
include/linux/kasan.h +14 -0
@@ -625,6 +625,17 @@ kasan_unpoison_vmap_areas(struct vm_struct **vms, int nr_vms,__kasan_unpoison_vmap_areas (vms, nr_vms, flags); } +void __kasan_vrealloc (const void *start,unsigned long old_size, +unsigned long new_size); + +static __always_inline void kasan_vrealloc(const void *start, +unsigned long old_size, +unsigned long new_size) +{ +if (kasan_enabled ()) +__kasan_vrealloc (start, old_size, new_size); +} +#else /* CONFIG_KASAN_VMALLOC */ static inline void kasan_populate_early_vm_area_shadow(void *start,
@@ -654,6 +665,9 @@ kasan_unpoison_vmap_areas(struct vm_struct **vms, int nr_vms, kasan_vmalloc_flags_t flags) { } +static inline void kasan_vrealloc (const void *start,unsigned long old_size, +unsigned long new_size) { } +#endif /* CONFIG_KASAN_VMALLOC */ #if (defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS)) && \
include/linux/sched.h +5 -0
@@ -1798,6 +1798,11 @@ static __always_inline bool is_percpu_thread(void) (current->nr_cpus_allowed ==1 ); } +static __always_inline bool is_user_task(struct task_struct *task) +{ +return task->mm && !(task->flags & (PF_KTHREAD |PF_USER_WORKER )); +} +/* Per-process atomic flags. */ #define PFA_NO_NEW_PRIVS 0/* May not gain new privileges. */ #define PFA_SPREAD_PAGE 1/* Spread page cache over cpuset */
include/net/bonding.h +7 -6
@@ -521,13 +521,14 @@ static inline int bond_is_ip6_target_ok(struct in6_addr *addr)static inline unsigned long slave_oldest_target_arp_rx (struct bonding *bond,struct slave *slave) { +unsigned long tmp, ret =READ_ONCE (slave->target_last_arp_rx[0 ]);int i =1 ; -unsigned long ret = slave->target_last_arp_rx[0 ]; - -for (; (i <BOND_MAX_ARP_TARGETS ) && bond->params.arp_targets[i]; i++) -if (time_before (slave->target_last_arp_rx[i], ret)) - ret = slave->target_last_arp_rx[i]; +for (; (i <BOND_MAX_ARP_TARGETS ) && bond->params.arp_targets[i]; i++) { + tmp =READ_ONCE (slave->target_last_arp_rx[i]); +if (time_before (tmp, ret)) + ret = tmp; + }return ret; }
@@ -537,7 +538,7 @@ static inline unsigned long slave_last_rx(struct bonding *bond,if (bond->params.arp_all_targets ==BOND_ARP_TARGETS_ALL )return slave_oldest_target_arp_rx (bond, slave); -return slave->last_rx; +return READ_ONCE (slave->last_rx); }static inline void slave_update_last_tx (struct slave *slave)
include/net/nfc/nfc.h +2 -0
@@ -219,6 +219,8 @@ static inline void nfc_free_device(struct nfc_dev *dev)int nfc_register_device (struct nfc_dev *dev); +void nfc_unregister_rfkill (struct nfc_dev *dev); +void nfc_remove_device (struct nfc_dev *dev);void nfc_unregister_device (struct nfc_dev *dev);/**
kernel/dma/contiguous.c +10 -6
@@ -90,6 +90,16 @@ static int __init early_cma(char *p) }early_param ("cma" , early_cma); +/* +* cma_skip_dt_default_reserved_mem - This is called from the +* reserved_mem framework to detect if the default cma region is being +* set by the "cma=" kernel parameter. +*/ +bool __init cma_skip_dt_default_reserved_mem (void ) +{ +return size_cmdline !=-1 ; +} +#ifdef CONFIG_DMA_NUMA_CMA static struct cma *dma_contiguous_numa_area[MAX_NUMNODES ];
@@ -463,12 +473,6 @@ static int __init rmem_cma_setup(struct reserved_mem *rmem)struct cma *cma;int err; -if (size_cmdline !=-1 && default_cma) { -pr_info ("Reserved memory: bypass %s node, using cmdline CMA params instead\n" , - rmem->name); -return -EBUSY ; - } -if (!of_get_flat_dt_prop (node,"reusable" ,NULL ) ||of_get_flat_dt_prop (node,"no-map" ,NULL ))return -EINVAL ;
kernel/dma/pool.c +6 -1
@@ -268,15 +268,20 @@ struct page *dma_alloc_from_pool(struct device *dev, size_t size, {struct gen_pool *pool =NULL ;struct page *page; +bool pool_found = false;while ((pool =dma_guess_pool (pool, gfp))) { + pool_found = true; page =__dma_alloc_from_pool (dev, size, pool, cpu_addr, phys_addr_ok);if (page)return page; } -WARN (1 ,"Failed to get suitable pool for %s\n" ,dev_name (dev)); +if (pool_found) +WARN (!(gfp & __GFP_NOWARN),"DMA pool exhausted for %s\n" ,dev_name (dev)); +else +WARN (1 ,"Failed to get suitable pool for %s\n" ,dev_name (dev));return NULL ; }
kernel/events/callchain.c +1 -1
@@ -246,7 +246,7 @@ get_perf_callchain(struct pt_regs *regs, bool kernel, bool user,if (user && !crosstask) {if (!user_mode (regs)) { -if (current->flags & (PF_KTHREAD |PF_USER_WORKER )) +if (!is_user_task (current)) goto exit_put; regs =task_pt_regs (current); }
kernel/events/core.c +3 -3
@@ -7459,7 +7459,7 @@ static void perf_sample_regs_user(struct perf_regs *regs_user,if (user_mode (regs)) { regs_user->abi =perf_reg_abi (current); regs_user->regs = regs; - }else if (!(current->flags & (PF_KTHREAD |PF_USER_WORKER ))) { + }else if (is_user_task (current)) {perf_get_regs_user (regs_user, regs); }else { regs_user->abi =PERF_SAMPLE_REGS_ABI_NONE ;
@@ -8099,7 +8099,7 @@ static u64 perf_virt_to_phys(u64 virt)* Try IRQ-safe get_user_page_fast_only first. * If failed, leave phys_addr as 0. */ -if (!(current->flags & (PF_KTHREAD |PF_USER_WORKER ))) { +if (is_user_task (current)) {struct page *p;pagefault_disable ();
@@ -8212,7 +8212,7 @@ perf_callchain(struct perf_event *event, struct pt_regs *regs) {bool kernel = !event->attr.exclude_callchain_kernel;bool user = !event->attr.exclude_callchain_user && - !(current->flags & (PF_KTHREAD |PF_USER_WORKER )); +is_user_task (current);/* Disallow cross-task user callchains. */ bool crosstask = event->ctx->task && event->ctx->task != current;const u32 max_stack = event->attr.sample_max_stack;
kernel/sched/deadline.c +206 -0
218 lines not on this page · raw message
kernel/sched/ext.c +34 -23
101 lines not on this page · raw message
kernel/sched/ext_internal.h +4 -2
@@ -986,8 +986,10 @@ enum scx_kick_flags {SCX_KICK_PREEMPT =1LLU <<1 ,/* -* Wait for the CPU to be rescheduled. The scx_bpf_kick_cpu() call will -* return after the target CPU finishes picking the next task. +* The scx_bpf_kick_cpu() call will return after the current SCX task of +* the target CPU switches out. This can be used to implement e.g. core +* scheduling. This has no effect if the current task on the target CPU +* is not on SCX. */ SCX_KICK_WAIT = 1LLU << 2, };
lib/flex_proportions.c +3 -2
@@ -64,13 +64,14 @@ void fprop_global_destroy(struct fprop_global *p)bool fprop_new_period (struct fprop_global *p,int periods) {s64 events =percpu_counter_sum (&p->events); +unsigned long flags;/* * Don't do anything if there are no events. */ if (events <=1 )return false; -preempt_disable_nested (); +local_irq_save (flags);write_seqcount_begin (&p->sequence);if (periods <64 ) events -= events >> periods;
@@ -78,7 +79,7 @@ bool fprop_new_period(struct fprop_global *p, int periods)percpu_counter_add (&p->events, -events); p->period += periods;write_seqcount_end (&p->sequence); -preempt_enable_nested (); +local_irq_restore (flags);return true; }
mm/kasan/common.c +21 -0
@@ -613,4 +613,25 @@ void __kasan_unpoison_vmap_areas(struct vm_struct **vms, int nr_vms, __kasan_unpoison_vmalloc(addr, size, flags | KASAN_VMALLOC_KEEP_TAG); } } + +void __kasan_vrealloc (const void *addr,unsigned long old_size, +unsigned long new_size) +{ +if (new_size < old_size) { +kasan_poison_last_granule (addr, new_size); + + new_size =round_up (new_size,KASAN_GRANULE_SIZE ); + old_size =round_up (old_size,KASAN_GRANULE_SIZE ); +if (new_size < old_size) +__kasan_poison_vmalloc (addr + new_size, + old_size - new_size); + }else if (new_size > old_size) { + old_size =round_down (old_size,KASAN_GRANULE_SIZE ); +__kasan_unpoison_vmalloc (addr + old_size, + new_size - old_size, +KASAN_VMALLOC_PROT_NORMAL | +KASAN_VMALLOC_VM_ALLOC | +KASAN_VMALLOC_KEEP_TAG ); + } +}#endif
mm/kfence/core.c +19 -4
@@ -595,7 +595,7 @@ static void rcu_guarded_free(struct rcu_head *h)static unsigned long kfence_init_pool (void ) {unsigned long addr, start_pfn; -int i; +int i, rand;if (!arch_kfence_init_pool ())return (unsigned long )__kfence_pool;
@@ -645,13 +645,27 @@ static unsigned long kfence_init_pool(void)INIT_LIST_HEAD (&meta->list);raw_spin_lock_init (&meta->lock); meta->state =KFENCE_OBJECT_UNUSED ; - meta->addr = addr;/* Initialize for validation in metadata_to_pageaddr(). */ -list_add_tail (&meta->list, &kfence_freelist); +/* Use addr to randomize the freelist. */ + meta->addr = i;/* Protect the right redzone. */ -if (unlikely (!kfence_protect (addr +PAGE_SIZE ))) +if (unlikely (!kfence_protect (addr +2 * i *PAGE_SIZE +PAGE_SIZE ))) goto reset_slab; + } + +for (i =CONFIG_KFENCE_NUM_OBJECTS ; i >0 ; i--) { + rand =get_random_u32_below (i); +swap (kfence_metadata_init[i -1 ].addr, kfence_metadata_init[rand].addr); + } +for (i =0 ; i <CONFIG_KFENCE_NUM_OBJECTS ; i++) { +struct kfence_metadata *meta_1 = &kfence_metadata_init[i]; +struct kfence_metadata *meta_2 = &kfence_metadata_init[meta_1->addr]; + +list_add_tail (&meta_2->list, &kfence_freelist); + } +for (i =0 ; i <CONFIG_KFENCE_NUM_OBJECTS ; i++) { + kfence_metadata_init[i].addr = addr; addr +=2 *PAGE_SIZE ; }
@@ -664,6 +678,7 @@ static unsigned long kfence_init_pool(void)return 0 ; reset_slab: + addr +=2 * i *PAGE_SIZE ;for (i =0 ; i <KFENCE_POOL_SIZE /PAGE_SIZE ; i++) {struct slab *slab;
mm/memory-failure.c +60 -39
196 lines not on this page · raw message
mm/shmem.c +34 -11
71 lines not on this page · raw message
mm/swap.h +1 -1
@@ -198,7 +198,7 @@ int swap_writeout(struct folio *folio, struct swap_iocb **swap_plug);void __swap_writepage (struct folio *folio,struct swap_iocb **swap_plug);/* linux/mm/swap_state.c */ -extern struct address_space swap_space__ro_after_init ; +extern struct address_space swap_space__read_mostly ;static inline struct address_space *swap_address_space (swp_entry_t entry) {return &swap_space;
mm/swap_state.c +1 -2
@@ -37,8 +37,7 @@ static const struct address_space_operations swap_aops = {#endif }; -/* Set swap_space as read only as swap cache is handled by swap table */ -struct address_space swap_space__ro_after_init = { +struct address_space swap_space__read_mostly = { .a_ops = &swap_aops, };
mm/vmalloc.c +2 -5
@@ -4167,7 +4167,7 @@ void *vrealloc_node_align_noprof(const void *p, size_t size, unsigned long alignif (want_init_on_free () ||want_init_on_alloc (flags))memset ((void *)p + size,0 , old_size - size); vm->requested_size = size; -kasan_poison_vmalloc (p + size, old_size - size); +kasan_vrealloc (p, old_size, size);return (void *)p; }
@@ -4175,16 +4175,13 @@ void *vrealloc_node_align_noprof(const void *p, size_t size, unsigned long align* We already have the bytes available in the allocation; use them. */ if (size <= alloced_size) { -kasan_unpoison_vmalloc (p + old_size, size - old_size, -KASAN_VMALLOC_PROT_NORMAL | -KASAN_VMALLOC_VM_ALLOC | -KASAN_VMALLOC_KEEP_TAG );/* * No need to zero memory here, as unused memory will have * already been zeroed at initial allocation time or during * realloc shrink time. */ vm->requested_size = size; +kasan_vrealloc (p, old_size, size);return (void *)p; }
net/bluetooth/mgmt.c +3 -0
@@ -1954,6 +1954,7 @@ static void set_ssp_complete(struct hci_dev *hdev, void *data, int err) }mgmt_cmd_status (cmd->sk, cmd->hdev->id, cmd->opcode, mgmt_err); +mgmt_pending_free (cmd);return ; }
@@ -1972,6 +1973,7 @@ static void set_ssp_complete(struct hci_dev *hdev, void *data, int err)sock_put (match.sk);hci_update_eir_sync (hdev); +mgmt_pending_free (cmd); }static int set_ssp_sync (struct hci_dev *hdev,void *data)
@@ -6356,6 +6358,7 @@ static void set_advertising_complete(struct hci_dev *hdev, void *data, int err)hci_dev_clear_flag (hdev,HCI_ADVERTISING );settings_rsp (cmd, &match); +mgmt_pending_free (cmd);new_settings (hdev, match.sk);
net/bridge/br_input.c +1 -1
@@ -274,7 +274,7 @@ static int nf_hook_bridge_pre(struct sk_buff *skb, struct sk_buff **pskb)int ret; net =dev_net (skb->dev); -#ifdef HAVE_JUMP_LABEL +#ifdef CONFIG_JUMP_LABEL if (!static_key_false (&nf_hooks_needed[NFPROTO_BRIDGE ][NF_BR_PRE_ROUTING ])) goto frame_finish;#endif
net/core/filter.c +2 -0
@@ -3352,6 +3352,7 @@ static int bpf_skb_proto_4_to_6(struct sk_buff *skb) shinfo->gso_type &= ~SKB_GSO_TCPV4 ; shinfo->gso_type |=SKB_GSO_TCPV6 ; } + shinfo->gso_type |=SKB_GSO_DODGY ; }bpf_skb_change_protocol (skb,ETH_P_IPV6 );
@@ -3382,6 +3383,7 @@ static int bpf_skb_proto_6_to_4(struct sk_buff *skb) shinfo->gso_type &= ~SKB_GSO_TCPV6 ; shinfo->gso_type |=SKB_GSO_TCPV4 ; } + shinfo->gso_type |=SKB_GSO_DODGY ; }bpf_skb_change_protocol (skb,ETH_P_IP );
net/ipv4/tcp_offload.c +2 -1
@@ -107,7 +107,8 @@ static struct sk_buff *tcp4_gso_segment(struct sk_buff *skb,if (skb_shinfo (skb)->gso_type &SKB_GSO_FRAGLIST ) {struct tcphdr *th =tcp_hdr (skb); -if (skb_pagelen (skb) - th->doff *4 ==skb_shinfo (skb)->gso_size) +if ((skb_pagelen (skb) - th->doff *4 ==skb_shinfo (skb)->gso_size) && + !(skb_shinfo (skb)->gso_type &SKB_GSO_DODGY ))return __tcp4_gso_segment_list (skb, features); skb->ip_summed =CHECKSUM_NONE ;
net/ipv4/udp_offload.c +2 -1
@@ -514,7 +514,8 @@ struct sk_buff *__udp_gso_segment(struct sk_buff *gso_skb,if (skb_shinfo (gso_skb)->gso_type &SKB_GSO_FRAGLIST ) {/* Detect modified geometry and pass those to skb_segment. */ -if (skb_pagelen (gso_skb) -sizeof (*uh) ==skb_shinfo (gso_skb)->gso_size) +if ((skb_pagelen (gso_skb) -sizeof (*uh) ==skb_shinfo (gso_skb)->gso_size) && + !(skb_shinfo (gso_skb)->gso_type &SKB_GSO_DODGY ))return __udp_gso_segment_list (gso_skb, features, is_ipv6); ret =__skb_linearize (gso_skb);
net/ipv6/icmp.c +3 -1
@@ -769,7 +769,9 @@ static enum skb_drop_reason icmpv6_echo_reply(struct sk_buff *skb) fl6.daddr =ipv6_hdr (skb)->saddr;if (saddr) fl6.saddr = *saddr; - fl6.flowi6_oif =icmp6_iif (skb); + fl6.flowi6_oif =ipv6_addr_loopback (&fl6.daddr) ? + skb->dev->ifindex : +icmp6_iif (skb); fl6.fl6_icmp_type = type; fl6.flowi6_mark = mark; fl6.flowi6_uid =sock_net_uid (net,NULL );
net/ipv6/tcpv6_offload.c +2 -1
@@ -170,7 +170,8 @@ static struct sk_buff *tcp6_gso_segment(struct sk_buff *skb,if (skb_shinfo (skb)->gso_type &SKB_GSO_FRAGLIST ) {struct tcphdr *th =tcp_hdr (skb); -if (skb_pagelen (skb) - th->doff *4 ==skb_shinfo (skb)->gso_size) +if ((skb_pagelen (skb) - th->doff *4 ==skb_shinfo (skb)->gso_size) && + !(skb_shinfo (skb)->gso_type &SKB_GSO_DODGY ))return __tcp6_gso_segment_list (skb, features); skb->ip_summed =CHECKSUM_NONE ;
net/mac80211/ieee80211_i.h +0 -2
@@ -451,8 +451,6 @@ struct ieee80211_mgd_assoc_data {struct ieee80211_conn_settings conn;u16 status; - -bool disabled; } link[IEEE80211_MLD_MAX_NUM_LINKS ];u8 ap_addr[ETH_ALEN ]__aligned(2) ;
net/mac80211/mlme.c +122 -95
57 lines not on this page · raw message
scripts/package/kernel.spec +30 -35
65 lines not on this page · raw message
sound/soc/intel/common/soc-acpi-intel-ptl-match.c +1 -1
Lines of this file are not shown. View the raw message.
tools/testing/selftests/net/mptcp/mptcp_join.sh +74 -7
81 lines not on this page · 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.