Linux 6.12.49
Greg Kroah-Hartman
maintainerI'm announcing the release of the 6.12.49 kernel.
All users of the 6.12 kernel series must upgrade.
The updated 6.12.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.12.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/admin-guide/hw-vuln/srso.rst | 13 Documentation/netlink/specs/mptcp_pm.yaml | 4 Makefile | 2 arch/loongarch/Kconfig | 8 arch/loongarch/include/asm/acenv.h | 7 arch/loongarch/kernel/env.c | 2 arch/loongarch/kernel/stacktrace.c | 3 arch/loongarch/kernel/vdso.c | 3 arch/um/drivers/virtio_uml.c | 6 arch/um/os-Linux/file.c | 2 arch/x86/events/intel/core.c | 2 arch/x86/include/asm/cpufeatures.h | 5 arch/x86/include/asm/msr-index.h | 1 arch/x86/kernel/cpu/bugs.c | 28 +- arch/x86/kvm/svm/svm.c | 68 ++++ arch/x86/kvm/svm/svm.h | 2 arch/x86/lib/msr.c | 2 crypto/af_alg.c | 10 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 39 ++ drivers/gpu/drm/bridge/analogix/anx7625.c | 6 drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c | 6 drivers/gpu/drm/xe/xe_tile_sysfs.c | 12 drivers/gpu/drm/xe/xe_vm.c | 4 drivers/iommu/amd/amd_iommu_types.h | 1 drivers/iommu/amd/io_pgtable.c | 25 + drivers/iommu/intel/iommu.c | 7 drivers/md/dm-raid.c | 6 drivers/md/dm-stripe.c | 10 drivers/mmc/host/mvsdio.c | 2 drivers/net/bonding/bond_main.c | 2 drivers/net/ethernet/broadcom/cnic.c | 3 drivers/net/ethernet/cavium/liquidio/request_manager.c | 2 drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c | 2 drivers/net/ethernet/intel/i40e/i40e_txrx.c | 3 drivers/net/ethernet/intel/ice/ice.h | 3 drivers/net/ethernet/intel/ice/ice_base.c | 34 +- drivers/net/ethernet/intel/ice/ice_txrx.c | 80 ++--- drivers/net/ethernet/intel/ice/ice_txrx.h | 4 drivers/net/ethernet/intel/ice/ice_virtchnl.c | 7 drivers/net/ethernet/intel/igc/igc.h | 1 drivers/net/ethernet/intel/igc/igc_main.c | 12 drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c | 3 drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c | 2 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 27 + drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c | 1 drivers/net/ethernet/mellanox/mlx5/core/lib/mlx5.h | 15 + drivers/net/ethernet/natsemi/ns83820.c | 13 drivers/net/ethernet/qlogic/qed/qed_debug.c | 7 drivers/net/vmxnet3/vmxnet3_drv.c | 10 drivers/net/wireless/microchip/wilc1000/wlan_cfg.c | 37 +- drivers/net/wireless/microchip/wilc1000/wlan_cfg.h | 5 drivers/nvme/host/core.c | 18 - drivers/pcmcia/omap_cf.c | 8 drivers/platform/x86/asus-nb-wmi.c | 25 + drivers/platform/x86/asus-wmi.h | 3 drivers/power/supply/bq27xxx_battery.c | 4 drivers/rtc/rtc-pcf2127.c | 10 drivers/usb/host/xhci-dbgcap.c | 94 ++++-- drivers/usb/host/xhci-debugfs.c | 5 drivers/usb/host/xhci-mem.c | 74 ++--- drivers/usb/host/xhci.c | 24 - drivers/usb/host/xhci.h | 9 fs/btrfs/tree-checker.c | 4 fs/btrfs/tree-log.c | 2 fs/nilfs2/sysfs.c | 4 fs/nilfs2/sysfs.h | 8 fs/smb/client/cifsproto.h | 4 fs/smb/client/inode.c | 6 fs/smb/client/misc.c | 38 +- fs/smb/client/smbdirect.c | 7 fs/smb/server/transport_rdma.c | 26 + include/crypto/if_alg.h | 10 include/linux/io_uring_types.h | 4 include/linux/minmax.h | 205 ++++++--------- include/linux/mlx5/driver.h | 1 include/linux/mm.h | 55 ++++ include/uapi/linux/mptcp.h | 2 include/uapi/linux/mptcp_pm.h | 4 io_uring/io_uring.c | 12 io_uring/io_uring.h | 13 io_uring/kbuf.h | 2 io_uring/msg_ring.c | 24 - io_uring/notif.c | 2 io_uring/poll.c | 3 io_uring/timeout.c | 2 io_uring/uring_cmd.c | 6 kernel/cgroup/cgroup.c | 43 ++- mm/gup.c | 41 ++- mm/migrate.c | 22 - mm/vmscan.c | 2 net/ipv4/tcp.c | 5 net/ipv4/tcp_ao.c | 4 net/mac80211/driver-ops.h | 2 net/mac80211/main.c | 7 net/mptcp/options.c | 6 net/mptcp/pm_netlink.c | 7 net/mptcp/protocol.c | 16 + net/mptcp/subflow.c | 4 net/rds/ib_frmr.c | 20 - net/rfkill/rfkill-gpio.c | 4 net/tls/tls.h | 1 net/tls/tls_strp.c | 14 - net/tls/tls_sw.c | 3 sound/firewire/motu/motu-hwdep.c | 2 sound/pci/hda/patch_realtek.c | 1 sound/soc/codecs/wm8940.c | 9 sound/soc/codecs/wm8974.c | 8 sound/soc/intel/catpt/pcm.c | 23 + sound/soc/qcom/qdsp6/audioreach.c | 1 sound/soc/qcom/qdsp6/q6apm-lpass-dais.c | 7 sound/soc/sof/intel/hda-stream.c | 2 tools/arch/loongarch/include/asm/inst.h | 12 tools/objtool/arch/loongarch/decode.c | 33 ++ tools/testing/selftests/net/mptcp/mptcp_connect.c | 11 tools/testing/selftests/net/mptcp/mptcp_sockopt.c | 16 - tools/testing/selftests/net/mptcp/pm_nl_ctl.c | 7 tools/testing/selftests/net/mptcp/userspace_pm.sh | 14 - 118 files changed, 1062 insertions(+), 564 deletions(-)
[email protected] (1):
wifi: wilc1000: avoid buffer overflow in WID string configuration
Alexey Nepomnyashih (1):
net: liquidio: fix overflow in octeon_init_instr_queue()
Amadeusz Sławiński (1):
ASoC: Intel: catpt: Expose correct bit depth to userspace
Anderson Nascimento (1):
net/tcp: Fix a NULL pointer dereference when using TCP-AO with TCP_REPAIR
Antheas Kapenekakis (2):
platform/x86: asus-wmi: Fix ROG button mapping, tablet mode on ASUS ROG Z13 platform/x86: asus-wmi: Re-add extra keys to ignore_key_wlan quirk
Borislav Petkov (1):
x86/bugs: KVM: Add support for SRSO_MSR_FIX
Borislav Petkov (AMD) (1):
x86/bugs: Add SRSO_USER_KERNEL_NO support
Bruno Thomsen (1):
rtc: pcf2127: fix SPI command byte for PCF2131 backport
Charles Keepax (3):
ASoC: wm8940: Correct PLL rate rounding
ASoC: wm8940: Correct typo in control name
ASoC: wm8974: Correct PLL rate rounding
Chen Ridong (1):
cgroup: split cgroup_destroy_wq into 3 workqueues
Christoph Hellwig (1):
nvme: fix PI insert on write
Colin Ian King (1):
ASoC: SOF: Intel: hda-stream: Fix incorrect variable used in error message
Dan Carpenter (1):
drm/xe: Fix a NULL vs IS_ERR() in xe_vm_add_compute_exec_queue()
David Laight (7):
minmax.h: add whitespace around operators and after commas minmax.h: update some comments
minmax.h: reduce the #define expansion of min(), max() and clamp() minmax.h: use BUILD_BUG_ON_MSG() for the lo < hi test in clamp() minmax.h: move all the clamp() definitions after the min/max() ones minmax.h: simplify the variants of clamp()
minmax.h: remove some #defines that are only expanded once
Duoming Zhou (2):
cnic: Fix use-after-free bugs in cnic_delete_task
octeontx2-pf: Fix use-after-free bugs in otx2_sync_tstamp()
Eugene Koira (1):
iommu/vt-d: Fix __domain_mapping()'s usage of switch_to_super_page()
Filipe Manana (1):
btrfs: fix invalid extref key setup when replaying dentry
Geert Uytterhoeven (1):
pcmcia: omap_cf: Mark driver struct with __refdata to prevent section mismatch
Geliang Tang (1):
selftests: mptcp: sockopt: fix error messages
Greg Kroah-Hartman (1):
Linux 6.12.49
Guangshuo Li (1):
LoongArch: vDSO: Check kcalloc() result in init_vdso()
H. Nikolaus Schaller (2):
power: supply: bq27xxx: fix error return in case of no bq27000 hdq battery
power: supply: bq27xxx: restrict no-battery detection to bq27000
Hangbin Liu (2):
bonding: set random address only when slaves already exist
bonding: don't set oif to bond dev when getting NS target destination
Hans de Goede (1):
net: rfkill: gpio: Fix crash due to dereferencering uninitialized pointer
Herbert Xu (2):
crypto: af_alg - Disallow concurrent writes in af_alg_sendmsg
crypto: af_alg - Set merge to zero early in af_alg_sendmsg
Huacai Chen (1):
LoongArch: Align ACPI structures if ARCH_STRICT_ALIGN enabled
Hugh Dickins (2):
mm: revert "mm: vmscan.c: fix OOM on swap stress test" mm/gup: check ref_count instead of lru before migration
Håkon Bugge (1):
rds: ib: Increment i_fastreg_wrs before bailing out
Ioana Ciornei (1):
dpaa2-switch: fix buffer pool seeding for control traffic
Ivan Lipski (1):
drm/amd/display: Allow RX6xxx & RX7700 to invoke amdgpu_irq_get/put
Jacob Keller (2):
ice: store max_frame and rx_buf_len only in ice_rx_ring
ice: fix Rx page leak on multi-buffer frames
Jakub Kicinski (1):
tls: make sure to abort the stream if headers are bogus
Jamie Bainbridge (1):
qed: Don't collect too many protection override GRC elements
Jens Axboe (4):
io_uring: backport io_should_terminate_tw()
io_uring: include dying ring in task_work "should cancel" state io_uring/msg_ring: kill alloc_cache for io_kiocb allocations io_uring/kbuf: drop WARN_ON_ONCE() from incremental length check
Jianbo Liu (1):
net/mlx5e: Harden uplink netdev access against device unbind
Kan Liang (1):
perf/x86/intel: Fix crash in icl_update_topdown_event()
Kohei Enju (1):
igc: don't fail igc_probe() on LED setup error
Krzysztof Kozlowski (1):
ASoC: qcom: q6apm-lpass-dais: Fix NULL pointer dereference if source graph failed
Kuniyuki Iwashima (1):
tcp: Clear tcp_sk(sk)->fastopen_rsk in tcp_disconnect().
Lachlan Hodges (1):
wifi: mac80211: increase scan_ies_len for S1G
Li Zhe (1):
gup: optimize longterm pin_user_pages() for large folio
Liao Yuanhong (1):
wifi: mac80211: fix incorrect type for ret
Loic Poulain (1):
drm: bridge: anx7625: Fix NULL pointer dereference with early IRQ
Maciej Fijalkowski (1):
i40e: remove redundant memory barrier when cleaning Tx descs
Maciej S. Szmigiero (1):
KVM: SVM: Sync TPR from LAPIC into VMCB::V_TPR even if AVIC is active
Mathias Nyman (2):
xhci: dbc: decouple endpoint allocation from initialization
xhci: dbc: Fix full DbC transfer ring after several reconnects
Matthieu Baerts (NGI0) (7):
mptcp: set remote_deny_join_id0 on SYN recv
selftests: mptcp: userspace pm: validate deny-join-id0 flag
mptcp: tfo: record 'deny join id0' info
mptcp: propagate shutdown to subflows when possible
selftests: mptcp: connect: catch IO errors on listen side
selftests: mptcp: avoid spurious errors on TCP disconnect
mptcp: pm: nl: announce deny-join-id0 flag
Miaoqian Lin (1):
um: virtio_uml: Fix use-after-free after put_device in probe
Mikulas Patocka (2):
dm-raid: don't set io_min and io_opt for raid1
dm-stripe: fix a possible integer overflow
Mohammad Rafi Shaik (2):
ASoC: qcom: audioreach: Fix lpaif_type configuration for the I2S interface
ASoC: qcom: q6apm-lpass-dais: Fix missing set_fmt DAI op for I2S
Namjae Jeon (1):
ksmbd: smbdirect: validate data_offset and data_length field of smb_direct_data_transfer
Nathan Chancellor (1):
nilfs2: fix CFI failure when accessing /sys/fs/nilfs2/features/*
Niklas Neronin (2):
usb: xhci: introduce macro for ring segment list iteration
usb: xhci: remove option to change a default ring's TRB cycle bit
Paulo Alcantara (1):
smb: client: fix filename matching of deferred files
Pavel Begunkov (1):
io_uring/cmd: let cmds to know about dying task
Praful Adiga (1):
ALSA: hda/realtek: Fix mute led for HP Laptop 15-dw4xx
Qi Xi (1):
drm: bridge: cdns-mhdp8546: Fix missing mutex unlock on error path
Qu Wenruo (1):
btrfs: tree-checker: fix the incorrect inode ref size check
Sankararaman Jayaraman (1):
vmxnet3: unregister xdp rxq info in the reset path
Sathesh B Edara (1):
octeon_ep: fix VF MAC address lifecycle handling
Sean Christopherson (1):
KVM: SVM: Set/clear SRSO's BP_SPEC_REDUCE on 0 <=> 1 VM count transitions
Shivank Garg (1):
mm: add folio_expected_ref_count() for reference count calculation
Shuicheng Lin (1):
drm/xe/tile: Release kobject for the failure path
Stefan Metzmacher (3):
ksmbd: smbdirect: verify remaining_data_length respects max_fragmented_recv_size
smb: client: let smbd_destroy() call disable_work_sync(&info->post_send_credits_work)
smb: client: fix smbdirect_recv_io leak in smbd_negotiate() error path
Takashi Sakamoto (1):
ALSA: firewire-motu: drop EPOLLOUT from poll return values as write is not supported
Tao Cui (1):
LoongArch: Check the return value when creating kobj
Tariq Toukan (1):
Revert "net/mlx5e: Update and set Xon/Xoff upon port speed set"
Thomas Fourier (1):
mmc: mvsdio: Fix dma_unmap_sg() nents value
Tiezhu Yang (4):
LoongArch: Update help info of ARCH_STRICT_ALIGN objtool/LoongArch: Mark types based on break immediate code objtool/LoongArch: Mark special atomic instruction as INSN_BUG type
LoongArch: Fix unreliable stack for live patching
Tiwei Bie (1):
um: Fix FD copy size in os_rcv_fd_msg()
Vasant Hegde (1):
iommu/amd/pgtbl: Fix possible race while increase page table level
Yang Xiuwei (1):
io_uring: fix incorrect io_kiocb reference in io_link_skb
Yeounsu Moon (1):
net: natsemi: fix rx_dropped double accounting on netif_rx() failure
Greg Kroah-Hartman
maintainerDocumentation/admin-guide/hw-vuln/srso.rst +13 -0
@@ -104,7 +104,20 @@ The possible values in this file are: (spec_rstack_overflow=ibpb-vmexit) + * 'Mitigation: Reduced Speculation': + This mitigation gets automatically enabled when the above one "IBPB on + VMEXIT" has been selected and the CPU supports the BpSpecReduce bit. + + It gets automatically enabled on machines which have the + SRSO_USER_KERNEL_NO=1 CPUID bit. In that case, the code logic is to switch + to the above =ibpb-vmexit mitigation because the user/kernel boundary is + not affected anymore and thus "safe RET" is not needed. + + After enabling the IBPB on VMEXIT mitigation option, the BpSpecReduce bit + is detected (functionality present on all such machines) and that + practically overrides IBPB on VMEXIT as it has a lot less performance + impact and takes care of the guest->host attack vector too. In order to exploit vulnerability, an attacker needs to:
Documentation/netlink/specs/mptcp_pm.yaml +2 -2
@@ -28,13 +28,13 @@ definitions: traffic-patterns it can take a long time until the MPTCP_EVENT_ESTABLISHED is sent. Attributes: token, family, saddr4 | saddr6, daddr4 | daddr6, sport, - dport, server-side. + dport, server-side, [flags]. - name: established doc: >- A MPTCP connection is established (can start new subflows). Attributes: token, family, saddr4 | saddr6, daddr4 | daddr6, sport, - dport, server-side. + dport, server-side, [flags]. - name: closed doc: >-
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 12 -SUBLEVEL = 48 +SUBLEVEL = 49 EXTRAVERSION = NAME = Baby Opossum Posse
arch/loongarch/Kconfig +6 -2
@@ -540,10 +540,14 @@ config ARCH_STRICT_ALIGN -mstrict-align build parameter to prevent unaligned accesses. CPUs with h/w unaligned access support: - Loongson-2K2000/2K3000/3A5000/3C5000/3D5000. + Loongson-2K2000/2K3000 and all of Loongson-3 series processors + based on LoongArch. CPUs without h/w unaligned access support: - Loongson-2K500/2K1000. + Loongson-2K0300/2K0500/2K1000. + + If you want to make sure whether to support unaligned memory access + on your hardware, please read the bit 20 (UAL) of CPUCFG1 register. This option is enabled by default to make the kernel be able to run on all LoongArch systems. But you can disable it manually if you want
arch/loongarch/include/asm/acenv.h +3 -4
@@ -10,9 +10,8 @@#ifndef _ASM_LOONGARCH_ACENV_H#define _ASM_LOONGARCH_ACENV_H -/* -* This header is required by ACPI core, but we have nothing to fill in -* right now. Will be updated later when needed. -*/ +#ifdef CONFIG_ARCH_STRICT_ALIGN +#define ACPI_MISALIGNMENT_NOT_SUPPORTED +#endif /* CONFIG_ARCH_STRICT_ALIGN */ #endif /* _ASM_LOONGARCH_ACENV_H */
arch/loongarch/kernel/env.c +2 -0
@@ -109,6 +109,8 @@ static int __init boardinfo_init(void)struct kobject *loongson_kobj; loongson_kobj =kobject_create_and_add ("loongson" , firmware_kobj); +if (!loongson_kobj) +return -ENOMEM ;return sysfs_create_file (loongson_kobj, &boardinfo_attr.attr); }
arch/loongarch/kernel/stacktrace.c +2 -1
@@ -51,12 +51,13 @@ int arch_stack_walk_reliable(stack_trace_consume_fn consume_entry,if (task == current) { regs->regs[3 ] = (unsigned long )__builtin_frame_address (0 ); regs->csr_era = (unsigned long )__builtin_return_address (0 ); + regs->regs[22 ] =0 ; }else { regs->regs[3 ] =thread_saved_fp (task); regs->csr_era =thread_saved_ra (task); + regs->regs[22 ] = task->thread.reg22; } regs->regs[1 ] =0 ; - regs->regs[22 ] =0 ;for (unwind_start (&state, task, regs); !unwind_done (&state) && !unwind_error (&state);unwind_next_frame (&state)) {
arch/loongarch/kernel/vdso.c +3 -0
@@ -108,6 +108,9 @@ static int __init init_vdso(void) vdso_info.code_mapping.pages =kcalloc (vdso_info.size /PAGE_SIZE ,sizeof (struct page *),GFP_KERNEL ); +if (!vdso_info.code_mapping.pages) +return -ENOMEM ; + pfn =__phys_to_pfn (__pa_symbol (vdso_info.vdso));for (i =0 ; i < vdso_info.size /PAGE_SIZE ; i++) vdso_info.code_mapping.pages[i] =pfn_to_page (pfn + i);
arch/um/drivers/virtio_uml.c +4 -2
@@ -1231,10 +1231,12 @@ static int virtio_uml_probe(struct platform_device *pdev)device_set_wakeup_capable (&vu_dev->vdev.dev, true); rc =register_virtio_device (&vu_dev->vdev); -if (rc) +if (rc) {put_device (&vu_dev->vdev.dev); +return rc; + } vu_dev->registered =1 ; -return rc; +return 0 ; error_init:os_close_file (vu_dev->sock);
arch/um/os-Linux/file.c +1 -1
@@ -556,7 +556,7 @@ ssize_t os_rcv_fd_msg(int fd, int *fds, unsigned int n_fds, cmsg->cmsg_type != SCM_RIGHTS)return n; -memcpy (fds,CMSG_DATA (cmsg), cmsg->cmsg_len); +memcpy (fds,CMSG_DATA (cmsg), cmsg->cmsg_len -CMSG_LEN (0 ));return n; }
arch/x86/events/intel/core.c +1 -1
@@ -2793,7 +2793,7 @@ static void intel_pmu_read_event(struct perf_event *event)if (pmu_enabled)intel_pmu_disable_all (); -if (is_topdown_event (event)) +if (is_topdown_count (event))static_call (intel_pmu_update_topdown_event)(event);else intel_pmu_drain_pebs_buffer ();
arch/x86/include/asm/cpufeatures.h +5 -0
@@ -464,6 +464,11 @@#define X86_FEATURE_SBPB (20*32+27)/* Selective Branch Prediction Barrier */ #define X86_FEATURE_IBPB_BRTYPE (20*32+28)/* MSR_PRED_CMD[IBPB] flushes all branch type predictions */ #define X86_FEATURE_SRSO_NO (20*32+29)/* CPU is not affected by SRSO */ +#define X86_FEATURE_SRSO_USER_KERNEL_NO (20*32+30)/* CPU is not affected by SRSO across user/kernel boundaries */ +#define X86_FEATURE_SRSO_BP_SPEC_REDUCE (20*32+31)/* +* BP_CFG[BpSpecReduce] can be used to mitigate SRSO for VMs. +* (SRSO_MSR_FIX in the official doc). +*/ /* * Extended auxiliary flags: Linux defined - for features scattered in various
arch/x86/include/asm/msr-index.h +1 -0
@@ -728,6 +728,7 @@/* Zen4 */ #define MSR_ZEN4_BP_CFG 0xc001102e +#define MSR_ZEN4_BP_CFG_BP_SPEC_REDUCE_BIT 4#define MSR_ZEN4_BP_CFG_SHARED_BTB_FIX_BIT 5/* Fam 19h MSRs */
arch/x86/kernel/cpu/bugs.c +24 -4
@@ -2718,6 +2718,7 @@ enum srso_mitigation {SRSO_MITIGATION_SAFE_RET ,SRSO_MITIGATION_IBPB ,SRSO_MITIGATION_IBPB_ON_VMEXIT , + SRSO_MITIGATION_BP_SPEC_REDUCE, }; enum srso_mitigation_cmd {
@@ -2735,7 +2736,8 @@ static const char * const srso_strings[] = { [SRSO_MITIGATION_MICROCODE] = "Vulnerable: Microcode, no safe RET", [SRSO_MITIGATION_SAFE_RET] = "Mitigation: Safe RET", [SRSO_MITIGATION_IBPB] = "Mitigation: IBPB", - [SRSO_MITIGATION_IBPB_ON_VMEXIT] = "Mitigation: IBPB on VMEXIT only" + [SRSO_MITIGATION_IBPB_ON_VMEXIT] = "Mitigation: IBPB on VMEXIT only", + [SRSO_MITIGATION_BP_SPEC_REDUCE] = "Mitigation: Reduced Speculation" };static enum srso_mitigation srso_mitigation__ro_after_init =SRSO_MITIGATION_NONE ;
@@ -2774,7 +2776,7 @@ static void __init srso_select_mitigation(void) srso_cmd == SRSO_CMD_OFF) {if (boot_cpu_has (X86_FEATURE_SBPB )) x86_pred_cmd =PRED_CMD_SBPB ; -return ; + goto out; }if (has_microcode) {
@@ -2786,7 +2788,7 @@ static void __init srso_select_mitigation(void)*/ if (boot_cpu_data.x86 <0x19 && !cpu_smt_possible ()) {setup_force_cpu_cap (X86_FEATURE_SRSO_NO ); -return ; + goto out; }if (retbleed_mitigation ==RETBLEED_MITIGATION_IBPB ) {
@@ -2810,6 +2812,9 @@ static void __init srso_select_mitigation(void)break ;case SRSO_CMD_SAFE_RET : +if (boot_cpu_has (X86_FEATURE_SRSO_USER_KERNEL_NO )) + goto ibpb_on_vmexit; +if (IS_ENABLED (CONFIG_MITIGATION_SRSO )) {/* * Enable the return thunk for generated code
@@ -2861,7 +2866,14 @@ static void __init srso_select_mitigation(void) }break ; +ibpb_on_vmexit:case SRSO_CMD_IBPB_ON_VMEXIT : +if (boot_cpu_has (X86_FEATURE_SRSO_BP_SPEC_REDUCE )) { +pr_notice ("Reducing speculation to address VM/HV SRSO attack vector.\n" ); + srso_mitigation =SRSO_MITIGATION_BP_SPEC_REDUCE ; +break ; + } +if (IS_ENABLED (CONFIG_MITIGATION_IBPB_ENTRY )) {if (has_microcode) {setup_force_cpu_cap (X86_FEATURE_IBPB_ON_VMEXIT );
@@ -2883,7 +2895,15 @@ static void __init srso_select_mitigation(void) } out: -pr_info ("%s\n" , srso_strings[srso_mitigation]); +/* +* Clear the feature flag if this mitigation is not selected as that +* feature flag controls the BpSpecReduce MSR bit toggling in KVM. +*/ +if (srso_mitigation !=SRSO_MITIGATION_BP_SPEC_REDUCE ) +setup_clear_cpu_cap (X86_FEATURE_SRSO_BP_SPEC_REDUCE ); + +if (srso_mitigation !=SRSO_MITIGATION_NONE ) +pr_info ("%s\n" , srso_strings[srso_mitigation]); }#undef pr_fmt
arch/x86/kvm/svm/svm.c +66 -2
98 lines not on this page · raw message
arch/x86/kvm/svm/svm.h +2 -0
@@ -335,6 +335,8 @@ struct svm_cpu_data {u32 next_asid;u32 min_asid; +bool bp_spec_reduce_set; +struct vmcb *save_area;unsigned long save_area_pa;
arch/x86/lib/msr.c +2 -0
@@ -103,6 +103,7 @@ int msr_set_bit(u32 msr, u8 bit) {return __flip_bit (msr, bit, true); } +EXPORT_SYMBOL_GPL (msr_set_bit);/** * msr_clear_bit - Clear @bit in a MSR @msr.
@@ -118,6 +119,7 @@ int msr_clear_bit(u32 msr, u8 bit) {return __flip_bit (msr, bit, false); } +EXPORT_SYMBOL_GPL (msr_clear_bit);#ifdef CONFIG_TRACEPOINTS void do_trace_write_msr (unsigned int msr,u64 val,int failed)
crypto/af_alg.c +9 -1
@@ -970,6 +970,12 @@ int af_alg_sendmsg(struct socket *sock, struct msghdr *msg, size_t size, }lock_sock (sk); +if (ctx->write) { +release_sock (sk); +return -EBUSY ; + } + ctx->write = true; +if (ctx->init && !ctx->more) {if (ctx->used) { err = -EINVAL ;
@@ -1019,6 +1025,8 @@ int af_alg_sendmsg(struct socket *sock, struct msghdr *msg, size_t size,continue ; } + ctx->merge =0 ; +if (!af_alg_writable (sk)) { err =af_alg_wait_for_wmem (sk, msg->msg_flags);if (err)
@@ -1058,7 +1066,6 @@ int af_alg_sendmsg(struct socket *sock, struct msghdr *msg, size_t size, ctx->used += plen; copied += plen; size -= plen; - ctx->merge =0 ; }else { do { struct page *pg;
@@ -1104,6 +1111,7 @@ int af_alg_sendmsg(struct socket *sock, struct msghdr *msg, size_t size, unlock:af_alg_data_wakeup (sk); + ctx->write = false;release_sock (sk);return copied ?: err;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +38 -1
@@ -8462,7 +8462,16 @@ static int amdgpu_dm_encoder_init(struct drm_device *dev,static void manage_dm_interrupts (struct amdgpu_device *adev,struct amdgpu_crtc *acrtc,struct dm_crtc_state *acrtc_state) -{ +{/* +* We cannot be sure that the frontend index maps to the same +* backend index - some even map to more than one. +* So we have to go through the CRTC to find the right IRQ. +*/ +int irq_type =amdgpu_display_crtc_idx_to_irq_type ( + adev, + acrtc->crtc_id); +struct drm_device *dev =adev_to_drm (adev); +struct drm_vblank_crtc_config config = {0 };struct dc_crtc_timing *timing;int offdelay;
@@ -8515,7 +8524,35 @@ static void manage_dm_interrupts(struct amdgpu_device *adev,drm_crtc_vblank_on_config (&acrtc->base, &config); +/* Allow RX6xxx, RX7700, RX7800 GPUs to call amdgpu_irq_get.*/ +switch (amdgpu_ip_version (adev,DCE_HWIP ,0 )) { +case IP_VERSION (3 ,0 ,0 ): +case IP_VERSION (3 ,0 ,2 ): +case IP_VERSION (3 ,0 ,3 ): +case IP_VERSION (3 ,2 ,0 ): +if (amdgpu_irq_get (adev, &adev->pageflip_irq, irq_type)) +drm_err (dev,"DM_IRQ: Cannot get pageflip irq!\n" ); +#if defined(CONFIG_DRM_AMD_SECURE_DISPLAY ) +if (amdgpu_irq_get (adev, &adev->vline0_irq, irq_type)) +drm_err (dev,"DM_IRQ: Cannot get vline0 irq!\n" ); +#endif + } + }else { +/* Allow RX6xxx, RX7700, RX7800 GPUs to call amdgpu_irq_put.*/ +switch (amdgpu_ip_version (adev,DCE_HWIP ,0 )) { +case IP_VERSION (3 ,0 ,0 ): +case IP_VERSION (3 ,0 ,2 ): +case IP_VERSION (3 ,0 ,3 ): +case IP_VERSION (3 ,2 ,0 ): +#if defined(CONFIG_DRM_AMD_SECURE_DISPLAY ) +if (amdgpu_irq_put (adev, &adev->vline0_irq, irq_type)) +drm_err (dev,"DM_IRQ: Cannot put vline0 irq!\n" ); +#endif +if (amdgpu_irq_put (adev, &adev->pageflip_irq, irq_type)) +drm_err (dev,"DM_IRQ: Cannot put pageflip irq!\n" ); + } +drm_crtc_vblank_off (&acrtc->base); } }
drivers/gpu/drm/bridge/analogix/anx7625.c +4 -2
@@ -2683,7 +2683,7 @@ static int anx7625_i2c_probe(struct i2c_client *client) ret =devm_request_threaded_irq (dev, platform->pdata.intp_irq,NULL , anx7625_intr_hpd_isr,IRQF_TRIGGER_FALLING | -IRQF_ONESHOT , +IRQF_ONESHOT |IRQF_NO_AUTOEN ,"anx7625-intp" , platform);if (ret) {DRM_DEV_ERROR (dev,"fail to request irq\n" );
@@ -2753,8 +2753,10 @@ static int anx7625_i2c_probe(struct i2c_client *client) }/* Add work function */ -if (platform->pdata.intp_irq) +if (platform->pdata.intp_irq) { +enable_irq (platform->pdata.intp_irq);queue_work (platform->workqueue, &platform->work); + }if (platform->pdata.audio_en)anx7625_register_audio (dev, platform);
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c +4 -2
@@ -2054,8 +2054,10 @@ static void cdns_mhdp_atomic_enable(struct drm_bridge *bridge, mhdp_state =to_cdns_mhdp_bridge_state (new_state); mhdp_state->current_mode =drm_mode_duplicate (bridge->dev, mode); -if (!mhdp_state->current_mode) -return ; +if (!mhdp_state->current_mode) { + ret = -EINVAL ; + goto out; + }drm_mode_set_name (mhdp_state->current_mode);
drivers/gpu/drm/xe/xe_tile_sysfs.c +7 -5
@@ -44,16 +44,18 @@ int xe_tile_sysfs_init(struct xe_tile *tile) kt->tile = tile; err =kobject_add (&kt->base, &dev->kobj,"tile%d" , tile->id); -if (err) { -kobject_put (&kt->base); -return err; - } +if (err) + goto err_object; tile->sysfs = &kt->base; err =xe_vram_freq_sysfs_init (tile);if (err) -return err; + goto err_object;return devm_add_action_or_reset (xe->drm.dev, tile_sysfs_fini, tile); + +err_object: +kobject_put (&kt->base); +return err; }
drivers/gpu/drm/xe/xe_vm.c +2 -2
@@ -239,8 +239,8 @@ int xe_vm_add_compute_exec_queue(struct xe_vm *vm, struct xe_exec_queue *q) pfence =xe_preempt_fence_create (q, q->lr.context, ++q->lr.seqno); -if (!pfence) { - err = -ENOMEM ; +if (IS_ERR (pfence)) { + err =PTR_ERR (pfence); goto out_fini; }
drivers/iommu/amd/amd_iommu_types.h +1 -0
@@ -545,6 +545,7 @@ struct gcr3_tbl_info { };struct amd_io_pgtable { +seqcount_t seqcount;/* Protects root/mode update */ struct io_pgtable pgtbl;int mode;u64 *root;
drivers/iommu/amd/io_pgtable.c +21 -4
@@ -17,6 +17,7 @@#include <linux/slab.h> #include <linux/types.h> #include <linux/dma-mapping.h> +#include <linux/seqlock.h> #include <asm/barrier.h>
@@ -144,8 +145,11 @@ static bool increase_address_space(struct amd_io_pgtable *pgtable, *pte =PM_LEVEL_PDE (pgtable->mode,iommu_virt_to_phys (pgtable->root)); +write_seqcount_begin (&pgtable->seqcount); pgtable->root = pte; pgtable->mode +=1 ; +write_seqcount_end (&pgtable->seqcount); +amd_iommu_update_and_flush_device_table (domain); pte =NULL ;
@@ -167,6 +171,7 @@ static u64 *alloc_pte(struct amd_io_pgtable *pgtable, {unsigned long last_addr = address + (page_size -1 );struct io_pgtable_cfg *cfg = &pgtable->pgtbl.cfg; +unsigned int seqcount;int level, end_lvl;u64 *pte, *page;
@@ -184,8 +189,14 @@ static u64 *alloc_pte(struct amd_io_pgtable *pgtable, } - level = pgtable->mode -1 ; - pte = &pgtable->root[PM_LEVEL_INDEX (level, address)]; +do { + seqcount =read_seqcount_begin (&pgtable->seqcount); + + level = pgtable->mode -1 ; + pte = &pgtable->root[PM_LEVEL_INDEX (level, address)]; + }while (read_seqcount_retry (&pgtable->seqcount, seqcount)); + + address =PAGE_SIZE_ALIGN (address, page_size); end_lvl =PAGE_SIZE_LEVEL (page_size);
@@ -262,6 +273,7 @@ static u64 *fetch_pte(struct amd_io_pgtable *pgtable, unsigned long *page_size) {int level; +unsigned int seqcount;u64 *pte; *page_size =0 ;
@@ -269,8 +281,12 @@ static u64 *fetch_pte(struct amd_io_pgtable *pgtable,if (address >PM_LEVEL_SIZE (pgtable->mode))return NULL ; - level = pgtable->mode -1 ; - pte = &pgtable->root[PM_LEVEL_INDEX (level, address)]; +do { + seqcount =read_seqcount_begin (&pgtable->seqcount); + level = pgtable->mode -1 ; + pte = &pgtable->root[PM_LEVEL_INDEX (level, address)]; + }while (read_seqcount_retry (&pgtable->seqcount, seqcount)); + *page_size =PTE_LEVEL_PAGE_SIZE (level);while (level >0 ) {
@@ -552,6 +568,7 @@ static struct io_pgtable *v1_alloc_pgtable(struct io_pgtable_cfg *cfg, void *cooif (!pgtable->root)return NULL ; pgtable->mode =PAGE_MODE_3_LEVEL ; +seqcount_init (&pgtable->seqcount); cfg->pgsize_bitmap = amd_iommu_pgsize_bitmap; cfg->ias =IOMMU_IN_ADDR_BIT_SIZE ;
drivers/iommu/intel/iommu.c +6 -1
@@ -1768,6 +1768,10 @@ static void switch_to_super_page(struct dmar_domain *domain,unsigned long lvl_pages =lvl_to_nr_pages (level);struct dma_pte *pte =NULL ; +if (WARN_ON (!IS_ALIGNED (start_pfn, lvl_pages) || + !IS_ALIGNED (end_pfn +1 , lvl_pages))) +return ; +while (start_pfn <= end_pfn) {if (!pte) pte = pfn_to_dma_pte(domain, start_pfn, &level,
@@ -1844,7 +1848,8 @@ __domain_mapping(struct dmar_domain *domain, unsigned long iov_pfn,unsigned long pages_to_remove; pteval |=DMA_PTE_LARGE_PAGE ; - pages_to_remove = min_t(unsigned long, nr_pages, + pages_to_remove = min_t(unsigned long, +round_down (nr_pages, lvl_pages),nr_pte_to_next_page (pte) * lvl_pages); end_pfn = iov_pfn + pages_to_remove -1 ;switch_to_super_page (domain, iov_pfn, end_pfn, largepage_lvl);
drivers/md/dm-raid.c +4 -2
@@ -3811,8 +3811,10 @@ static void raid_io_hints(struct dm_target *ti, struct queue_limits *limits)struct raid_set *rs = ti->private;unsigned int chunk_size_bytes =to_bytes (rs->md.chunk_sectors); - limits->io_min = chunk_size_bytes; - limits->io_opt = chunk_size_bytes *mddev_data_stripes (rs); +if (chunk_size_bytes) { + limits->io_min = chunk_size_bytes; + limits->io_opt = chunk_size_bytes *mddev_data_stripes (rs); + } }static void raid_presuspend (struct dm_target *ti)
drivers/md/dm-stripe.c +7 -3
@@ -457,11 +457,15 @@ static void stripe_io_hints(struct dm_target *ti, struct queue_limits *limits) {struct stripe_c *sc = ti->private; -unsigned int chunk_size = sc->chunk_size <<SECTOR_SHIFT ; +unsigned int io_min, io_opt; limits->chunk_sectors = sc->chunk_size; - limits->io_min = chunk_size; - limits->io_opt = chunk_size * sc->stripes; + +if (!check_shl_overflow (sc->chunk_size,SECTOR_SHIFT , &io_min) && + !check_mul_overflow (io_min, sc->stripes, &io_opt)) { + limits->io_min = io_min; + limits->io_opt = io_opt; + } }static struct target_type stripe_target = {
drivers/mmc/host/mvsdio.c +1 -1
@@ -292,7 +292,7 @@ static u32 mvsd_finish_data(struct mvsd_host *host, struct mmc_data *data, host->pio_ptr =NULL ; host->pio_size =0 ; }else { -dma_unmap_sg (mmc_dev (host->mmc), data->sg, host->sg_frags, +dma_unmap_sg (mmc_dev (host->mmc), data->sg, data->sg_len,mmc_get_dma_dir (data)); }
drivers/net/bonding/bond_main.c +1 -1
@@ -2117,6 +2117,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev,memcpy (ss.__data, bond_dev->dev_addr, bond_dev->addr_len); }else if (bond->params.fail_over_mac ==BOND_FOM_FOLLOW &&BOND_MODE (bond) ==BOND_MODE_ACTIVEBACKUP && +bond_has_slaves (bond) &&memcmp (slave_dev->dev_addr, bond_dev->dev_addr, bond_dev->addr_len) ==0 ) {/* Set slave to random address to avoid duplicate mac * address in later fail over.
@@ -3337,7 +3338,6 @@ static void bond_ns_send_all(struct bonding *bond, struct slave *slave)/* Find out through which dev should the packet go */ memset (&fl6,0 ,sizeof (struct flowi6 )); fl6.daddr = targets[i]; - fl6.flowi6_oif = bond->dev->ifindex; dst =ip6_route_output (dev_net (bond->dev),NULL , &fl6);if (dst->error) {
drivers/net/ethernet/broadcom/cnic.c +1 -2
@@ -4230,8 +4230,7 @@ static void cnic_cm_stop_bnx2x_hw(struct cnic_dev *dev)cnic_bnx2x_delete_wait (dev,0 ); -cancel_delayed_work (&cp->delete_task); -flush_workqueue (cnic_wq); +cancel_delayed_work_sync (&cp->delete_task);if (atomic_read (&cp->iscsi_conn) !=0 ) netdev_warn(dev->netdev, "%d iSCSI connections not destroyed\n",
drivers/net/ethernet/cavium/liquidio/request_manager.c +1 -1
@@ -126,7 +126,7 @@ int octeon_init_instr_queue(struct octeon_device *oct, oct->io_qmask.iq |=BIT_ULL (iq_no);/* Set the 32B/64B mode for each input queue */ - oct->io_qmask.iq64B |= ((conf->instr_type ==64 ) << iq_no); + oct->io_qmask.iq64B |= ((u64)(conf->instr_type ==64 ) << iq_no); iq->iqcmd_64B = (conf->instr_type ==64 ); oct->fn_list.setup_iq_regs (oct, iq_no);
drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c +1 -1
@@ -2735,7 +2735,7 @@ static int dpaa2_switch_setup_dpbp(struct ethsw_core *ethsw)dev_err (dev,"dpsw_ctrl_if_set_pools() failed\n" ); goto err_get_attr; } - ethsw->bpid = dpbp_attrs.id; + ethsw->bpid = dpbp_attrs.bpid;return 0 ;
drivers/net/ethernet/intel/i40e/i40e_txrx.c +0 -3
@@ -947,9 +947,6 @@ static bool i40e_clean_tx_irq(struct i40e_vsi *vsi,if (!eop_desc)break ; -/* prevent any other reads prior to eop_desc */ -smp_rmb (); -i40e_trace (clean_tx_irq, tx_ring, tx_desc, tx_buf);/* we have caught up to head, no work left to do */ if (tx_head == tx_desc)
drivers/net/ethernet/intel/ice/ice.h +0 -3
@@ -372,9 +372,6 @@ struct ice_vsi {spinlock_t arfs_lock;/* protects aRFS hash table and filter state */ atomic_t *arfs_last_fltr_id; -u16 max_frame; -u16 rx_buf_len; -struct ice_aqc_vsi_props info;/* VSI properties */ struct ice_vsi_vlan_info vlan_info;/* vlan config to be restored */
drivers/net/ethernet/intel/ice/ice_base.c +18 -16
@@ -445,7 +445,7 @@ static int ice_setup_rx_ctx(struct ice_rx_ring *ring)/* Max packet size for this queue - must not be set to a larger value * than 5 x DBUF */ - rlan_ctx.rxmax =min_t (u32, vsi->max_frame, + rlan_ctx.rxmax =min_t (u32, ring->max_frame,ICE_MAX_CHAINED_RX_BUFS * ring->rx_buf_len);/* Rx queue threshold in units of 64 */
@@ -541,8 +541,6 @@ static int ice_vsi_cfg_rxq(struct ice_rx_ring *ring)u32 num_bufs =ICE_RX_DESC_UNUSED (ring);int err; - ring->rx_buf_len = ring->vsi->rx_buf_len; -if (ring->vsi->type ==ICE_VSI_PF || ring->vsi->type ==ICE_VSI_SF ) {if (!xdp_rxq_info_is_reg (&ring->xdp_rxq)) { err = __xdp_rxq_info_reg(&ring->xdp_rxq, ring->netdev,
@@ -641,21 +639,25 @@ int ice_vsi_cfg_single_rxq(struct ice_vsi *vsi, u16 q_idx)/** * ice_vsi_cfg_frame_size - setup max frame size and Rx buffer length * @vsi: VSI +* @ring: Rx ring to configure +* +* Determine the maximum frame size and Rx buffer length to use for a PF VSI. +* Set these in the associated Rx ring structure. */ -static void ice_vsi_cfg_frame_size (struct ice_vsi *vsi) +static void ice_vsi_cfg_frame_size (struct ice_vsi *vsi,struct ice_rx_ring *ring) {if (!vsi->netdev ||test_bit (ICE_FLAG_LEGACY_RX , vsi->back->flags)) { - vsi->max_frame =ICE_MAX_FRAME_LEGACY_RX ; - vsi->rx_buf_len =ICE_RXBUF_1664 ; + ring->max_frame =ICE_MAX_FRAME_LEGACY_RX ; + ring->rx_buf_len =ICE_RXBUF_1664 ;#if (PAGE_SIZE <8192 ) } else if (!ICE_2K_TOO_SMALL_WITH_PADDING && (vsi->netdev->mtu <=ETH_DATA_LEN )) { - vsi->max_frame =ICE_RXBUF_1536 -NET_IP_ALIGN ; - vsi->rx_buf_len =ICE_RXBUF_1536 -NET_IP_ALIGN ; + ring->max_frame =ICE_RXBUF_1536 -NET_IP_ALIGN ; + ring->rx_buf_len =ICE_RXBUF_1536 -NET_IP_ALIGN ;#endif }else { - vsi->max_frame =ICE_AQ_SET_MAC_FRAME_SIZE_MAX ; - vsi->rx_buf_len =ICE_RXBUF_3072 ; + ring->max_frame =ICE_AQ_SET_MAC_FRAME_SIZE_MAX ; + ring->rx_buf_len =ICE_RXBUF_3072 ; } }
@@ -670,15 +672,15 @@ int ice_vsi_cfg_rxqs(struct ice_vsi *vsi) {u16 i; -if (vsi->type ==ICE_VSI_VF ) - goto setup_rings; - -ice_vsi_cfg_frame_size (vsi); -setup_rings:/* set up individual rings */ ice_for_each_rxq (vsi, i) { -int err =ice_vsi_cfg_rxq (vsi->rx_rings[i]); +struct ice_rx_ring *ring = vsi->rx_rings[i]; +int err; + +if (vsi->type !=ICE_VSI_VF ) +ice_vsi_cfg_frame_size (vsi, ring); + err =ice_vsi_cfg_rxq (ring);if (err)return err; }
drivers/net/ethernet/intel/ice/ice_txrx.c +34 -46
163 lines not on this page · raw message
drivers/net/ethernet/intel/ice/ice_txrx.h +2 -2
@@ -357,9 +357,9 @@ struct ice_rx_ring {struct ice_tx_ring *xdp_ring;struct ice_rx_ring *next;/* pointer to next ring in q_vector */ struct xsk_buff_pool *xsk_pool; -u32 nr_frags; -dma_addr_t dma;/* physical address of ring */ +u16 max_frame;u16 rx_buf_len; +dma_addr_t dma;/* physical address of ring */ u8 dcb_tc;/* Traffic class of ring */ u8 ptp_rx;#define ICE_RX_FLAGS_RING_BUILD_SKB BIT(1)
drivers/net/ethernet/intel/ice/ice_virtchnl.c +3 -4
@@ -1748,19 +1748,18 @@ static int ice_vc_cfg_qs_msg(struct ice_vf *vf, u8 *msg) (qpi->rxq.databuffer_size > ((16 * 1024) - 128) || qpi->rxq.databuffer_size < 1024)) goto error_param; - vsi->rx_buf_len = qpi->rxq.databuffer_size; - ring->rx_buf_len = vsi->rx_buf_len; + ring->rx_buf_len = qpi->rxq.databuffer_size;if (qpi->rxq.max_pkt_size > max_frame_size || qpi->rxq.max_pkt_size <64 ) goto error_param; - vsi->max_frame = qpi->rxq.max_pkt_size; + ring->max_frame = qpi->rxq.max_pkt_size;/* add space for the port VLAN since the VF driver is * not expected to account for it in the MTU * calculation */ if (ice_vf_is_port_vlan_ena (vf)) - vsi->max_frame +=VLAN_HLEN ; + ring->max_frame +=VLAN_HLEN ;if (ice_vsi_cfg_single_rxq (vsi, q_idx)) { dev_warn(ice_pf_to_dev(pf), "VF-%d failed to configure RX queue %d\n",
drivers/net/ethernet/intel/igc/igc.h +1 -0
@@ -336,6 +336,7 @@ struct igc_adapter {/* LEDs */ struct mutex led_mutex;struct igc_led_classdev *leds; +bool leds_available; };void igc_up (struct igc_adapter *adapter);
drivers/net/ethernet/intel/igc/igc_main.c +9 -3
@@ -7169,8 +7169,14 @@ static int igc_probe(struct pci_dev *pdev,if (IS_ENABLED (CONFIG_IGC_LEDS )) { err =igc_led_setup (adapter); -if (err) - goto err_register; +if (err) { +netdev_warn_once (netdev, +"LED init failed (%d); continuing without LED support\n" , + err); + adapter->leds_available = false; + }else { + adapter->leds_available = true; + } }return 0 ;
@@ -7226,7 +7232,7 @@ static void igc_remove(struct pci_dev *pdev)cancel_work_sync (&adapter->watchdog_task);hrtimer_cancel (&adapter->hrtimer); -if (IS_ENABLED (CONFIG_IGC_LEDS )) +if (IS_ENABLED (CONFIG_IGC_LEDS ) && adapter->leds_available)igc_led_free (adapter);/* Release control of h/w to f/w. If f/w is AMT enabled, this
drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c +3 -0
@@ -177,6 +177,7 @@ static void octep_pfvf_get_mac_addr(struct octep_device *oct, u32 vf_id,dev_err (&oct->pdev->dev,"Get VF MAC address failed via host control Mbox\n" );return ; } +ether_addr_copy (oct->vf_info[vf_id].mac_addr, rsp->s_set_mac.mac_addr); rsp->s_set_mac.type =OCTEP_PFVF_MBOX_TYPE_RSP_ACK ; }
@@ -186,6 +187,8 @@ static void octep_pfvf_dev_remove(struct octep_device *oct, u32 vf_id, {int err; +/* Reset VF-specific information maintained by the PF */ +memset (&oct->vf_info[vf_id],0 ,sizeof (struct octep_pfvf_info )); err =octep_ctrl_net_dev_remove (oct, vf_id);if (err) { rsp->s.type =OCTEP_PFVF_MBOX_TYPE_RSP_NACK ;
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c +1 -1
@@ -491,7 +491,7 @@ void otx2_ptp_destroy(struct otx2_nic *pfvf)if (!ptp)return ; -cancel_delayed_work (&pfvf->ptp->synctstamp_work); +cancel_delayed_work_sync (&pfvf->ptp->synctstamp_work);ptp_clock_unregister (ptp->ptp_clock);kfree (ptp);
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +0 -2
@@ -135,8 +135,6 @@ void mlx5e_update_carrier(struct mlx5e_priv *priv)if (up) {netdev_info (priv->netdev,"Link up\n" );netif_carrier_on (priv->netdev); -mlx5e_port_manual_buffer_config (priv,0 , priv->netdev->mtu, -NULL ,NULL ,NULL ); }else {netdev_info (priv->netdev,"Link down\n" );netif_carrier_off (priv->netdev);
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c +22 -5
@@ -1497,12 +1497,21 @@ static const struct mlx5e_profile mlx5e_uplink_rep_profile = {static int mlx5e_vport_uplink_rep_load (struct mlx5_core_dev *dev,struct mlx5_eswitch_rep *rep) { -struct mlx5e_priv *priv =netdev_priv (mlx5_uplink_netdev_get (dev));struct mlx5e_rep_priv *rpriv =mlx5e_rep_to_rep_priv (rep); +struct net_device *netdev; +struct mlx5e_priv *priv; +int err; + + netdev =mlx5_uplink_netdev_get (dev); +if (!netdev) +return 0 ; + priv =netdev_priv (netdev); rpriv->netdev = priv->netdev; -return mlx5e_netdev_change_profile (priv, &mlx5e_uplink_rep_profile, - rpriv); + err =mlx5e_netdev_change_profile (priv, &mlx5e_uplink_rep_profile, + rpriv); +mlx5_uplink_netdev_put (dev, netdev); +return err; } static void
@@ -1629,8 +1638,16 @@ mlx5e_vport_rep_unload(struct mlx5_eswitch_rep *rep) {struct mlx5e_rep_priv *rpriv =mlx5e_rep_to_rep_priv (rep);struct net_device *netdev = rpriv->netdev; -struct mlx5e_priv *priv =netdev_priv (netdev); -void *ppriv = priv->ppriv; +struct mlx5e_priv *priv; +void *ppriv; + +if (!netdev) { + ppriv = rpriv; + goto free_ppriv; + } + + priv =netdev_priv (netdev); + ppriv = priv->ppriv;if (rep->vport ==MLX5_VPORT_UPLINK ) {mlx5e_vport_uplink_rep_unload (rpriv);
drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c +1 -0
@@ -733,6 +733,7 @@ static u32 mlx5_esw_qos_lag_link_speed_get_locked(struct mlx5_core_dev *mdev) speed = lksettings.base.speed; out: +mlx5_uplink_netdev_put (mdev, slave);return speed; }
drivers/net/ethernet/mellanox/mlx5/core/lib/mlx5.h +14 -1
@@ -52,7 +52,20 @@ static inline struct net *mlx5_core_net(struct mlx5_core_dev *dev)static inline struct net_device *mlx5_uplink_netdev_get (struct mlx5_core_dev *mdev) { -return mdev->mlx5e_res.uplink_netdev; +struct mlx5e_resources *mlx5e_res = &mdev->mlx5e_res; +struct net_device *netdev; + +mutex_lock (&mlx5e_res->uplink_netdev_lock); + netdev = mlx5e_res->uplink_netdev; +netdev_hold (netdev, &mlx5e_res->tracker,GFP_KERNEL ); +mutex_unlock (&mlx5e_res->uplink_netdev_lock); +return netdev; +} + +static inline void mlx5_uplink_netdev_put (struct mlx5_core_dev *mdev, +struct net_device *netdev) +{ +netdev_put (netdev, &mdev->mlx5e_res.tracker); }struct mlx5_sd ;
drivers/net/ethernet/natsemi/ns83820.c +6 -7
@@ -820,7 +820,7 @@ static void rx_irq(struct net_device *ndev)struct ns83820 *dev =PRIV (ndev);struct rx_info *info = &dev->rx_info;unsigned next_rx; -int rx_rc, len; +int len;u32 cmdsts;__le32 *desc;unsigned long flags;
@@ -881,8 +881,10 @@ static void rx_irq(struct net_device *ndev)if (likely (CMDSTS_OK & cmdsts)) {#endif skb_put (skb, len); -if (unlikely (!skb)) +if (unlikely (!skb)) { + ndev->stats.rx_dropped++; goto netdev_mangle_me_harder_failed; + }if (cmdsts &CMDSTS_DEST_MULTI ) ndev->stats.multicast++; ndev->stats.rx_packets++;
@@ -901,15 +903,12 @@ static void rx_irq(struct net_device *ndev) __vlan_hwaccel_put_tag(skb, htons(ETH_P_IPV6), tag); }#endif - rx_rc =netif_rx (skb); -if (NET_RX_DROP == rx_rc) { -netdev_mangle_me_harder_failed: - ndev->stats.rx_dropped++; - } +netif_rx (skb); }else {dev_kfree_skb_irq (skb); } +netdev_mangle_me_harder_failed: nr++; next_rx = info->next_rx; desc = info->descs + (DESC_SIZE * next_rx);
drivers/net/ethernet/qlogic/qed/qed_debug.c +4 -3
@@ -4461,10 +4461,11 @@ static enum dbg_status qed_protection_override_dump(struct qed_hwfn *p_hwfn, goto out; } -/* Add override window info to buffer */ +/* Add override window info to buffer, preventing buffer overflow */ override_window_dwords = -qed_rd (p_hwfn, p_ptt,GRC_REG_NUMBER_VALID_OVERRIDE_WINDOW ) * -PROTECTION_OVERRIDE_ELEMENT_DWORDS ; +min (qed_rd (p_hwfn, p_ptt,GRC_REG_NUMBER_VALID_OVERRIDE_WINDOW ) * +PROTECTION_OVERRIDE_ELEMENT_DWORDS , +PROTECTION_OVERRIDE_DEPTH_DWORDS );if (override_window_dwords) { addr =BYTES_TO_DWORDS (GRC_REG_PROTECTION_OVERRIDE_WINDOW ); offset += qed_grc_dump_addr_range(p_hwfn,
drivers/net/vmxnet3/vmxnet3_drv.c +5 -5
@@ -2051,6 +2051,11 @@ vmxnet3_rq_cleanup(struct vmxnet3_rx_queue *rq, rq->comp_ring.gen =VMXNET3_INIT_GEN ; rq->comp_ring.next2proc =0 ; + +if (xdp_rxq_info_is_reg (&rq->xdp_rxq)) +xdp_rxq_info_unreg (&rq->xdp_rxq); +page_pool_destroy (rq->page_pool); + rq->page_pool =NULL ; }
@@ -2091,11 +2096,6 @@ static void vmxnet3_rq_destroy(struct vmxnet3_rx_queue *rq, } } -if (xdp_rxq_info_is_reg (&rq->xdp_rxq)) -xdp_rxq_info_unreg (&rq->xdp_rxq); -page_pool_destroy (rq->page_pool); - rq->page_pool =NULL ; -if (rq->data_ring.base) { dma_free_coherent(&adapter->pdev->dev, rq->rx_ring[0].size * rq->data_ring.desc_size,
drivers/net/wireless/microchip/wilc1000/wlan_cfg.c +27 -10
@@ -41,10 +41,10 @@ static const struct wilc_cfg_word g_cfg_word[] = { };static const struct wilc_cfg_str g_cfg_str[] = { - {WID_FIRMWARE_VERSION ,NULL }, - {WID_MAC_ADDR ,NULL }, - {WID_ASSOC_RES_INFO ,NULL }, - {WID_NIL ,NULL } + {WID_FIRMWARE_VERSION ,0 ,NULL }, + {WID_MAC_ADDR ,0 ,NULL }, + {WID_ASSOC_RES_INFO ,0 ,NULL }, + {WID_NIL ,0 ,NULL } };#define WILC_RESP_MSG_TYPE_CONFIG_REPLY 'R'
@@ -147,44 +147,58 @@ static void wilc_wlan_parse_response_frame(struct wilc *wl, u8 *info, int size)switch (FIELD_GET (WILC_WID_TYPE , wid)) {case WID_CHAR : + len =3 ; +if (len +2 > size) +return ; +while (cfg->b[i].id !=WID_NIL && cfg->b[i].id != wid) i++;if (cfg->b[i].id == wid) cfg->b[i].val = info[4 ]; - len =3 ;break ;case WID_SHORT : + len =4 ; +if (len +2 > size) +return ; +while (cfg->hw[i].id !=WID_NIL && cfg->hw[i].id != wid) i++;if (cfg->hw[i].id == wid) cfg->hw[i].val =get_unaligned_le16 (&info[4 ]); - len =4 ;break ;case WID_INT : + len =6 ; +if (len +2 > size) +return ; +while (cfg->w[i].id !=WID_NIL && cfg->w[i].id != wid) i++;if (cfg->w[i].id == wid) cfg->w[i].val =get_unaligned_le32 (&info[4 ]); - len =6 ;break ;case WID_STR : + len =2 +get_unaligned_le16 (&info[2 ]); +while (cfg->s[i].id !=WID_NIL && cfg->s[i].id != wid) i++; -if (cfg->s[i].id == wid) +if (cfg->s[i].id == wid) { +if (len > cfg->s[i].len || (len +2 > size)) +return ; +memcpy (cfg->s[i].str, &info[2 ], -get_unaligned_le16 (&info[2 ]) +2 ); + len); + } - len =2 +get_unaligned_le16 (&info[2 ]);break ;default :
@@ -384,12 +398,15 @@ int wilc_wlan_cfg_init(struct wilc *wl)/* store the string cfg parameters */ wl->cfg.s[i].id =WID_FIRMWARE_VERSION ; wl->cfg.s[i].str = str_vals->firmware_version; + wl->cfg.s[i].len =sizeof (str_vals->firmware_version); i++; wl->cfg.s[i].id =WID_MAC_ADDR ; wl->cfg.s[i].str = str_vals->mac_address; + wl->cfg.s[i].len =sizeof (str_vals->mac_address); i++; wl->cfg.s[i].id =WID_ASSOC_RES_INFO ; wl->cfg.s[i].str = str_vals->assoc_rsp; + wl->cfg.s[i].len =sizeof (str_vals->assoc_rsp); i++; wl->cfg.s[i].id =WID_NIL ; wl->cfg.s[i].str =NULL ;
drivers/net/wireless/microchip/wilc1000/wlan_cfg.h +3 -2
@@ -24,12 +24,13 @@ struct wilc_cfg_word {struct wilc_cfg_str {u16 id; +u16 len;u8 *str; };struct wilc_cfg_str_vals { -u8 mac_address[7 ]; -u8 firmware_version[129 ]; +u8 mac_address[8 ]; +u8 firmware_version[130 ];u8 assoc_rsp[WILC_MAX_ASSOC_RESP_FRAME_SIZE ]; };
drivers/nvme/host/core.c +11 -7
@@ -890,6 +890,15 @@ static void nvme_set_ref_tag(struct nvme_ns *ns, struct nvme_command *cmnd,u32 upper, lower;u64 ref48; +/* only type1 and type 2 PI formats have a reftag */ +switch (ns->head->pi_type) { +case NVME_NS_DPS_PI_TYPE1 : +case NVME_NS_DPS_PI_TYPE2 : +break ; +default : +return ; + } +/* both rw and write zeroes share the same reftag format */ switch (ns->head->guard_type) {case NVME_NVM_NS_16B_GUARD :
@@ -929,13 +938,7 @@ static inline blk_status_t nvme_setup_write_zeroes(struct nvme_ns *ns,if (nvme_ns_has_pi (ns->head)) { cmnd->write_zeroes.control |=cpu_to_le16 (NVME_RW_PRINFO_PRACT ); - -switch (ns->head->pi_type) { -case NVME_NS_DPS_PI_TYPE1 : -case NVME_NS_DPS_PI_TYPE2 : -nvme_set_ref_tag (ns, cmnd, req); -break ; - } +nvme_set_ref_tag (ns, cmnd, req); }return BLK_STS_OK ;
@@ -1014,6 +1017,7 @@ static inline blk_status_t nvme_setup_rw(struct nvme_ns *ns,if (WARN_ON_ONCE (!nvme_ns_has_pi (ns->head)))return BLK_STS_NOTSUPP ; control |=NVME_RW_PRINFO_PRACT ; +nvme_set_ref_tag (ns, cmnd, req); }switch (ns->head->pi_type) {
drivers/pcmcia/omap_cf.c +7 -1
@@ -304,7 +304,13 @@ static void __exit omap_cf_remove(struct platform_device *pdev)kfree (cf); } -static struct platform_driver omap_cf_driver = { +/* +* omap_cf_remove() lives in .exit.text. For drivers registered via +* platform_driver_probe() this is ok because they cannot get unbound at +* runtime. So mark the driver struct with __refdata to prevent modpost +* triggering a section mismatch warning. +*/ +static struct platform_driver omap_cf_driver__refdata = { .driver = { .name = driver_name, },
drivers/platform/x86/asus-nb-wmi.c +21 -4
@@ -146,7 +146,12 @@ static struct quirk_entry quirk_asus_ignore_fan = { };static struct quirk_entry quirk_asus_zenbook_duo_kbd = { - .ignore_key_wlan = true, + .key_wlan_event =ASUS_WMI_KEY_IGNORE , +}; + +static struct quirk_entry quirk_asus_z13 = { + .key_wlan_event =ASUS_WMI_KEY_ARMOURY , + .tablet_switch_mode = asus_wmi_kbd_dock_devid, };static int dmi_matched (const struct dmi_system_id *dmi)
@@ -538,6 +543,15 @@ static const struct dmi_system_id asus_quirks[] = { }, .driver_data = &quirk_asus_zenbook_duo_kbd, }, + { + .callback = dmi_matched, + .ident = "ASUS ROG Z13", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), + DMI_MATCH(DMI_PRODUCT_NAME, "ROG Flow Z13"), + }, + .driver_data = &quirk_asus_z13, + }, {}, };
@@ -635,6 +649,7 @@ static const struct key_entry asus_nb_wmi_keymap[] = { { KE_IGNORE, 0xCF, }, /* AC mode */ { KE_KEY, 0xFA, { KEY_PROG2 } }, /* Lid flip action */ { KE_KEY, 0xBD, { KEY_PROG2 } }, /* Lid flip action on ROG xflow laptops */ + { KE_KEY, ASUS_WMI_KEY_ARMOURY, { KEY_PROG3 } }, { KE_END, 0}, };
@@ -654,9 +669,11 @@ static void asus_nb_wmi_key_filter(struct asus_wmi_driver *asus_wmi, int *code,if (atkbd_reports_vol_keys) *code =ASUS_WMI_KEY_IGNORE ;break ; -case 0x5F :/* Wireless console Disable */ -if (quirks->ignore_key_wlan) - *code =ASUS_WMI_KEY_IGNORE ; +case 0x5D :/* Wireless console Toggle */ +case 0x5E :/* Wireless console Enable / Keyboard Attach, Detach */ +case 0x5F :/* Wireless console Disable / Special Key */ +if (quirks->key_wlan_event) + *code = quirks->key_wlan_event;break ; } }
drivers/platform/x86/asus-wmi.h +2 -1
@@ -18,6 +18,7 @@#include <linux/i8042.h> #define ASUS_WMI_KEY_IGNORE (-1) +#define ASUS_WMI_KEY_ARMOURY 0xffff01#define ASUS_WMI_BRN_DOWN 0x2e#define ASUS_WMI_BRN_UP 0x2f
@@ -40,7 +41,7 @@ struct quirk_entry {bool wmi_force_als_set;bool wmi_ignore_fan;bool filter_i8042_e1_extended_codes; -bool ignore_key_wlan; +int key_wlan_event;enum asus_wmi_tablet_switch_mode tablet_switch_mode;int wapf;/*
drivers/power/supply/bq27xxx_battery.c +2 -2
@@ -1909,8 +1909,8 @@ static void bq27xxx_battery_update_unlocked(struct bq27xxx_device_info *di)bool has_singe_flag = di->opts &BQ27XXX_O_ZERO ; cache.flags =bq27xxx_read (di,BQ27XXX_REG_FLAGS , has_singe_flag); -if ((cache.flags &0xff ) ==0xff ) - cache.flags =-1 ;/* read error */ +if (di->chip ==BQ27000 && (cache.flags &0xff ) ==0xff ) + cache.flags = -ENODEV ;/* bq27000 hdq read error */ if (cache.flags >=0 ) { cache.capacity =bq27xxx_battery_read_soc (di);
drivers/rtc/rtc-pcf2127.c +5 -5
@@ -1383,11 +1383,6 @@ static int pcf2127_i2c_probe(struct i2c_client *client) variant = &pcf21xx_cfg[type]; } -if (variant->type ==PCF2131 ) { - config.read_flag_mask =0x0 ; - config.write_flag_mask =0x0 ; - } - config.max_register = variant->max_register, regmap = devm_regmap_init(&client->dev, &pcf2127_i2c_regmap,
@@ -1461,6 +1456,11 @@ static int pcf2127_spi_probe(struct spi_device *spi) variant = &pcf21xx_cfg[type]; } +if (variant->type ==PCF2131 ) { + config.read_flag_mask =0x0 ; + config.write_flag_mask =0x0 ; + } + config.max_register = variant->max_register; regmap =devm_regmap_init_spi (spi, &config);
drivers/usb/host/xhci-dbgcap.c +67 -27
135 lines not on this page · raw message
drivers/usb/host/xhci-debugfs.c +1 -4
@@ -214,14 +214,11 @@ static void xhci_ring_dump_segment(struct seq_file *s,static int xhci_ring_trb_show (struct seq_file *s,void *unused) { -int i;struct xhci_ring *ring = *(struct xhci_ring **)s->private;struct xhci_segment *seg = ring->first_seg; -for (i =0 ; i < ring->num_segs; i++) { +xhci_for_each_ring_seg (ring->first_seg, seg)xhci_ring_dump_segment (s, seg); - seg = seg->next; - }return 0 ; }
drivers/usb/host/xhci-mem.c +30 -44
223 lines not on this page · raw message
drivers/usb/host/xhci.c +10 -14
@@ -41,15 +41,15 @@ MODULE_PARM_DESC(quirks, "Bit flags for quirks to be enabled as default");static bool td_on_ring (struct xhci_td *td,struct xhci_ring *ring) { -struct xhci_segment *seg = ring->first_seg; +struct xhci_segment *seg;if (!td || !td->start_seg)return false; -do { + +xhci_for_each_ring_seg (ring->first_seg, seg) {if (seg == td->start_seg)return true; - seg = seg->next; - }while (seg && seg != ring->first_seg); + }return false; }
@@ -764,16 +764,12 @@ static void xhci_clear_command_ring(struct xhci_hcd *xhci)struct xhci_segment *seg; ring = xhci->cmd_ring; - seg = ring->deq_seg; -do { -memset (seg->trbs,0 , -sizeof (union xhci_trb ) * (TRBS_PER_SEGMENT -1 )); - seg->trbs[TRBS_PER_SEGMENT -1 ].link.control &= -cpu_to_le32 (~TRB_CYCLE ); - seg = seg->next; - }while (seg != ring->deq_seg); - -xhci_initialize_ring_info (ring,1 ); +xhci_for_each_ring_seg (ring->deq_seg, seg) { +memset (seg->trbs,0 ,sizeof (union xhci_trb ) * (TRBS_PER_SEGMENT -1 )); + seg->trbs[TRBS_PER_SEGMENT -1 ].link.control &=cpu_to_le32 (~TRB_CYCLE ); + } + +xhci_initialize_ring_info (ring);/* * Reset the hardware dequeue pointer. * Yes, this will need to be re-written after resume, but we're paranoid
drivers/usb/host/xhci.h +5 -4
@@ -1263,6 +1263,9 @@ static inline const char *xhci_trb_type_string(u8 type)#define AVOID_BEI_INTERVAL_MIN 8#define AVOID_BEI_INTERVAL_MAX 32 +#define xhci_for_each_ring_seg (head, seg) \ + for (seg = head; seg != NULL; seg = (seg->next != head ? seg->next : NULL)) +struct xhci_segment {union xhci_trb *trbs;/* private to HCD */
@@ -1800,14 +1803,12 @@ void xhci_slot_copy(struct xhci_hcd *xhci,int xhci_endpoint_init (struct xhci_hcd *xhci,struct xhci_virt_device *virt_dev,struct usb_device *udev,struct usb_host_endpoint *ep,gfp_t mem_flags); -struct xhci_ring *xhci_ring_alloc (struct xhci_hcd *xhci, -unsigned int num_segs,unsigned int cycle_state, +struct xhci_ring *xhci_ring_alloc (struct xhci_hcd *xhci,unsigned int num_segs,enum xhci_ring_type type,unsigned int max_packet,gfp_t flags);void xhci_ring_free (struct xhci_hcd *xhci,struct xhci_ring *ring);int xhci_ring_expansion (struct xhci_hcd *xhci,struct xhci_ring *ring,unsigned int num_trbs,gfp_t flags); -void xhci_initialize_ring_info (struct xhci_ring *ring, -unsigned int cycle_state); +void xhci_initialize_ring_info (struct xhci_ring *ring);void xhci_free_endpoint_ring (struct xhci_hcd *xhci,struct xhci_virt_device *virt_dev,unsigned int ep_index);
fs/btrfs/tree-checker.c +2 -2
@@ -1744,10 +1744,10 @@ static int check_inode_ref(struct extent_buffer *leaf,while (ptr < end) {u16 namelen; -if (unlikely (ptr +sizeof (iref) > end)) { +if (unlikely (ptr +sizeof (*iref) > end)) {inode_ref_err (leaf, slot,"inode ref overflow, ptr %lu end %lu inode_ref_size %zu" , - ptr, end,sizeof (iref)); + ptr, end,sizeof (*iref));return -EUCLEAN ; }
fs/btrfs/tree-log.c +1 -1
@@ -1946,7 +1946,7 @@ static noinline int replay_one_name(struct btrfs_trans_handle *trans, search_key.objectid = log_key.objectid; search_key.type =BTRFS_INODE_EXTREF_KEY ; - search_key.offset = key->objectid; + search_key.offset =btrfs_extref_hash (key->objectid, name.name, name.len); ret =backref_in_log (root->log_root, &search_key, key->objectid, &name);if (ret <0 ) { goto out;
fs/nilfs2/sysfs.c +2 -2
@@ -1075,7 +1075,7 @@ void nilfs_sysfs_delete_device_group(struct the_nilfs *nilfs)************************************************************************/ static ssize_t nilfs_feature_revision_show (struct kobject *kobj, -struct attribute *attr,char *buf) +struct kobj_attribute *attr,char *buf) {return sysfs_emit (buf,"%d.%d\n" ,NILFS_CURRENT_REV ,NILFS_MINOR_REV );
@@ -1087,7 +1087,7 @@ static const char features_readme_str[] ="(1) revision\n\tshow current revision of NILFS file system driver.\n" ;static ssize_t nilfs_feature_README_show (struct kobject *kobj, -struct attribute *attr, +struct kobj_attribute *attr,char *buf) {return sysfs_emit (buf, features_readme_str);
fs/nilfs2/sysfs.h +4 -4
@@ -50,16 +50,16 @@ struct nilfs_sysfs_dev_subgroups {struct completion sg_segments_kobj_unregister; }; -#define NILFS_COMMON_ATTR_STRUCT (name) \ +#define NILFS_KOBJ_ATTR_STRUCT (name) \ struct nilfs_##name##_attr { \ struct attribute attr; \ - ssize_t (*show)(struct kobject *, struct attribute *, \ + ssize_t (*show)(struct kobject *, struct kobj_attribute *, \ char *); \ - ssize_t (*store)(struct kobject *, struct attribute *, \ + ssize_t (*store)(struct kobject *, struct kobj_attribute *, \ const char *, size_t); \ } -NILFS_COMMON_ATTR_STRUCT (feature); +NILFS_KOBJ_ATTR_STRUCT (feature);#define NILFS_DEV_ATTR_STRUCT (name) \ struct nilfs_##name##_attr { \
fs/smb/client/cifsproto.h +2 -2
@@ -298,8 +298,8 @@ extern void cifs_close_deferred_file(struct cifsInodeInfo *cifs_inode);extern void cifs_close_all_deferred_files (struct cifs_tcon *cifs_tcon); -extern void cifs_close_deferred_file_under_dentry (struct cifs_tcon *cifs_tcon, -const char *path); +void cifs_close_deferred_file_under_dentry (struct cifs_tcon *cifs_tcon, +struct dentry *dentry);extern void cifs_mark_open_handles_for_deleted_file (struct inode *inode,const char *path);
fs/smb/client/inode.c +3 -3
@@ -1958,7 +1958,7 @@ int cifs_unlink(struct inode *dir, struct dentry *dentry) }netfs_wait_for_outstanding_io (inode); -cifs_close_deferred_file_under_dentry (tcon, full_path); +cifs_close_deferred_file_under_dentry (tcon, dentry);#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY if (cap_unix (tcon->ses) && (CIFS_UNIX_POSIX_PATH_OPS_CAP &le64_to_cpu (tcon->fsUnixInfo.Capability))) {
@@ -2489,10 +2489,10 @@ cifs_rename2(struct mnt_idmap *idmap, struct inode *source_dir, goto cifs_rename_exit; } -cifs_close_deferred_file_under_dentry (tcon, from_name); +cifs_close_deferred_file_under_dentry (tcon, source_dentry);if (d_inode (target_dentry) !=NULL ) {netfs_wait_for_outstanding_io (d_inode (target_dentry)); -cifs_close_deferred_file_under_dentry (tcon, to_name); +cifs_close_deferred_file_under_dentry (tcon, target_dentry); } rc = cifs_do_rename(xid, source_dentry, from_name, target_dentry,
fs/smb/client/misc.c +16 -22
@@ -829,33 +829,28 @@ cifs_close_all_deferred_files(struct cifs_tcon *tcon)kfree (tmp_list); } } -void -cifs_close_deferred_file_under_dentry (struct cifs_tcon *tcon,const char *path) + +void cifs_close_deferred_file_under_dentry (struct cifs_tcon *tcon, +struct dentry *dentry) { -struct cifsFileInfo *cfile;struct file_list *tmp_list, *tmp_next_list; -void *page; -const char *full_path; +struct cifsFileInfo *cfile;LIST_HEAD (file_head); - page =alloc_dentry_path ();spin_lock (&tcon->open_file_lock);list_for_each_entry (cfile, &tcon->openFileList, tlist) { - full_path =build_path_from_dentry (cfile->dentry, page); -if (strstr (full_path, path)) { -if (delayed_work_pending (&cfile->deferred)) { -if (cancel_delayed_work (&cfile->deferred)) { -spin_lock (&CIFS_I (d_inode (cfile->dentry))->deferred_lock); -cifs_del_deferred_close (cfile); -spin_unlock (&CIFS_I (d_inode (cfile->dentry))->deferred_lock); - - tmp_list =kmalloc (sizeof (struct file_list ),GFP_ATOMIC ); -if (tmp_list ==NULL ) -break ; - tmp_list->cfile = cfile; -list_add_tail (&tmp_list->list, &file_head); - } - } +if ((cfile->dentry == dentry) && +delayed_work_pending (&cfile->deferred) && +cancel_delayed_work (&cfile->deferred)) { +spin_lock (&CIFS_I (d_inode (cfile->dentry))->deferred_lock); +cifs_del_deferred_close (cfile); +spin_unlock (&CIFS_I (d_inode (cfile->dentry))->deferred_lock); + + tmp_list =kmalloc (sizeof (struct file_list ),GFP_ATOMIC ); +if (tmp_list ==NULL ) +break ; + tmp_list->cfile = cfile; +list_add_tail (&tmp_list->list, &file_head); } }spin_unlock (&tcon->open_file_lock);
@@ -865,7 +860,6 @@ cifs_close_deferred_file_under_dentry(struct cifs_tcon *tcon, const char *path)list_del (&tmp_list->list);kfree (tmp_list); } -free_dentry_path (page); }/*
fs/smb/client/smbdirect.c +6 -1
@@ -1075,8 +1075,10 @@ static int smbd_negotiate(struct smbd_connection *info)log_rdma_event (INFO ,"smbd_post_recv rc=%d iov.addr=0x%llx iov.length=%u iov.lkey=0x%x\n" , rc, response->sge.addr, response->sge.length, response->sge.lkey); -if (rc) +if (rc) { +put_receive_buffer (info, response);return rc; + }init_completion (&info->negotiate_completion); info->negotiate_done = false;
@@ -1308,6 +1310,9 @@ void smbd_destroy(struct TCP_Server_Info *server) sc->status == SMBDIRECT_SOCKET_DISCONNECTED); } +log_rdma_event (INFO ,"cancelling post_send_credits_work\n" ); +disable_work_sync (&info->post_send_credits_work); +log_rdma_event (INFO ,"destroying qp\n" );ib_drain_qp (sc->ib.qp);rdma_destroy_qp (sc->rdma.cm_id);
fs/smb/server/transport_rdma.c +18 -8
@@ -553,7 +553,7 @@ static void recv_done(struct ib_cq *cq, struct ib_wc *wc)case SMB_DIRECT_MSG_DATA_TRANSFER : {struct smb_direct_data_transfer *data_transfer = (struct smb_direct_data_transfer *)recvmsg->packet; -unsigned int data_length; +u32 remaining_data_length, data_offset, data_length;int avail_recvmsg_count, receive_credits; if (wc->byte_len <
@@ -563,15 +563,25 @@ static void recv_done(struct ib_cq *cq, struct ib_wc *wc)return ; } + remaining_data_length =le32_to_cpu (data_transfer->remaining_data_length); data_length =le32_to_cpu (data_transfer->data_length); -if (data_length) { -if (wc->byte_len <sizeof (struct smb_direct_data_transfer ) + - (u64 )data_length) { -put_recvmsg (t, recvmsg); -smb_direct_disconnect_rdma_connection (t); -return ; - } + data_offset =le32_to_cpu (data_transfer->data_offset); +if (wc->byte_len < data_offset || + wc->byte_len < (u64 )data_offset + data_length) { +put_recvmsg (t, recvmsg); +smb_direct_disconnect_rdma_connection (t); +return ; + } +if (remaining_data_length > t->max_fragmented_recv_size || + data_length > t->max_fragmented_recv_size || + (u64 )remaining_data_length + (u64 )data_length > + (u64 )t->max_fragmented_recv_size) { +put_recvmsg (t, recvmsg); +smb_direct_disconnect_rdma_connection (t); +return ; + } +if (data_length) {if (t->full_packet_received) recvmsg->first_segment = true;
include/crypto/if_alg.h +6 -4
@@ -135,6 +135,7 @@ struct af_alg_async_req {* SG? * @enc: Cryptographic operation to be performed when * recvmsg is invoked. +* @write: True if we are in the middle of a write. * @init: True if metadata has been sent. * @len: Length of memory allocated for this data structure. * @inflight: Non-zero when AIO requests are in flight.
@@ -151,10 +152,11 @@ struct af_alg_ctx {size_t used;atomic_t rcvused; -bool more; -bool merge; -bool enc; -bool init; + u32 more:1, + merge:1, + enc:1, + write:1, + init:1;unsigned int len;
include/linux/io_uring_types.h +1 -3
@@ -37,6 +37,7 @@ enum io_uring_cmd_flags {/* set when uring wants to cancel a previously issued command */ IO_URING_F_CANCEL = (1 <<11 ),IO_URING_F_COMPAT = (1 <<12 ), + IO_URING_F_TASK_DEAD = (1 << 13), }; struct io_wq_work_node {
@@ -399,9 +400,6 @@ struct io_ring_ctx {struct callback_head poll_wq_task_work;struct list_head defer_list; -struct io_alloc_cache msg_cache; -spinlock_t msg_lock; -#ifdef CONFIG_NET_RX_BUSY_POLL struct list_head napi_list;/* track busy poll napi_id */ spinlock_t napi_lock;/* napi_list lock */
include/linux/minmax.h +95 -110
288 lines not on this page · raw message
include/linux/mlx5/driver.h +1 -0
@@ -689,6 +689,7 @@ struct mlx5e_resources {bool tisn_valid; } hw_objs;struct net_device *uplink_netdev; +netdevice_tracker tracker;struct mutex uplink_netdev_lock;struct mlx5_crypto_dek_priv *dek_priv; };
include/linux/mm.h +55 -0
61 lines not on this page · raw message
include/uapi/linux/mptcp.h +2 -0
@@ -31,6 +31,8 @@#define MPTCP_INFO_FLAG_FALLBACK _BITUL(0)#define MPTCP_INFO_FLAG_REMOTE_KEY_RECEIVED _BITUL(1) +#define MPTCP_PM_EV_FLAG_DENY_JOIN_ID0 _BITUL(0) +#define MPTCP_PM_ADDR_FLAG_SIGNAL (1 << 0)#define MPTCP_PM_ADDR_FLAG_SUBFLOW (1 << 1)#define MPTCP_PM_ADDR_FLAG_BACKUP (1 << 2)
include/uapi/linux/mptcp_pm.h +2 -2
@@ -16,10 +16,10 @@* good time to allocate memory and send ADD_ADDR if needed. Depending on the * traffic-patterns it can take a long time until the MPTCP_EVENT_ESTABLISHED * is sent. Attributes: token, family, saddr4 | saddr6, daddr4 | daddr6, -* sport, dport, server-side. +* sport, dport, server-side, [flags]. * @MPTCP_EVENT_ESTABLISHED: A MPTCP connection is established (can start new * subflows). Attributes: token, family, saddr4 | saddr6, daddr4 | daddr6, -* sport, dport, server-side. +* sport, dport, server-side, [flags]. * @MPTCP_EVENT_CLOSED: A MPTCP connection has stopped. Attribute: token. * @MPTCP_EVENT_ANNOUNCED: A new address has been announced by the peer. * Attributes: token, rem_id, family, daddr4 | daddr6 [, dport].
io_uring/io_uring.c +4 -8
@@ -316,9 +316,6 @@ static __cold struct io_ring_ctx *io_ring_ctx_alloc(struct io_uring_params *p) sizeof(struct io_async_rw)); ret |=io_alloc_cache_init (&ctx->uring_cache,IO_ALLOC_CACHE_MAX ,sizeof (struct uring_cache )); -spin_lock_init (&ctx->msg_lock); - ret |=io_alloc_cache_init (&ctx->msg_cache,IO_ALLOC_CACHE_MAX , -sizeof (struct io_kiocb )); ret |=io_futex_cache_init (ctx);if (ret) goto free_ref;
@@ -358,7 +355,6 @@ static __cold struct io_ring_ctx *io_ring_ctx_alloc(struct io_uring_params *p)io_alloc_cache_free (&ctx->netmsg_cache, io_netmsg_cache_free);io_alloc_cache_free (&ctx->rw_cache, io_rw_cache_free);io_alloc_cache_free (&ctx->uring_cache, kfree); -io_alloc_cache_free (&ctx->msg_cache, io_msg_cache_free);io_futex_cache_free (ctx);kfree (ctx->cancel_table.hbs);kfree (ctx->cancel_table_locked.hbs);
@@ -1358,9 +1354,10 @@ static void io_req_task_cancel(struct io_kiocb *req, struct io_tw_state *ts)void io_req_task_submit (struct io_kiocb *req,struct io_tw_state *ts) { -io_tw_lock (req->ctx, ts); -/* req->task == current here, checking PF_EXITING is safe */ -if (unlikely (req->task->flags &PF_EXITING )) +struct io_ring_ctx *ctx = req->ctx; + +io_tw_lock (ctx, ts); +if (unlikely (io_should_terminate_tw (ctx)))io_req_defer_failed (req, -EFAULT );else if (req->flags &REQ_F_FORCE_ASYNC )io_queue_iowq (req);
@@ -2742,7 +2739,6 @@ static __cold void io_ring_ctx_free(struct io_ring_ctx *ctx)io_alloc_cache_free (&ctx->netmsg_cache, io_netmsg_cache_free);io_alloc_cache_free (&ctx->rw_cache, io_rw_cache_free);io_alloc_cache_free (&ctx->uring_cache, kfree); -io_alloc_cache_free (&ctx->msg_cache, io_msg_cache_free);io_futex_cache_free (ctx);io_destroy_buffers (ctx);mutex_unlock (&ctx->uring_lock);
io_uring/io_uring.h +13 -0
@@ -421,6 +421,19 @@ static inline bool io_allowed_run_tw(struct io_ring_ctx *ctx) ctx->submitter_task == current); } +/* +* Terminate the request if either of these conditions are true: +* +* 1) It's being executed by the original task, but that task is marked +* with PF_EXITING as it's exiting. +* 2) PF_KTHREAD is set, in which case the invoker of the task_work is +* our fallback task_work. +*/ +static inline bool io_should_terminate_tw (struct io_ring_ctx *ctx) +{ +return (current->flags & (PF_KTHREAD |PF_EXITING )) ||percpu_ref_is_dying (&ctx->refs); +} +static inline void io_req_queue_tw_complete (struct io_kiocb *req,s32 res) {io_req_set_res (req, res,0 );
io_uring/kbuf.h +1 -1
@@ -143,7 +143,7 @@ static inline bool io_kbuf_commit(struct io_kiocb *req,struct io_uring_buf *buf; buf =io_ring_head_to_buf (bl->buf_ring, bl->head, bl->mask); -if (WARN_ON_ONCE (len > buf->len)) +if (len > buf->len) len = buf->len; buf->len -= len;if (buf->len) {
io_uring/msg_ring.c +2 -22
@@ -11,7 +11,6 @@#include "io_uring.h" #include "rsrc.h" #include "filetable.h" -#include "alloc_cache.h" #include "msg_ring.h" /* All valid masks for MSG_RING */
@@ -76,13 +75,7 @@ static void io_msg_tw_complete(struct io_kiocb *req, struct io_tw_state *ts)struct io_ring_ctx *ctx = req->ctx;io_add_aux_cqe (ctx, req->cqe.user_data, req->cqe.res, req->cqe.flags); -if (spin_trylock (&ctx->msg_lock)) { -if (io_alloc_cache_put (&ctx->msg_cache, req)) - req =NULL ; -spin_unlock (&ctx->msg_lock); - } -if (req) -kfree_rcu (req, rcu_head); +kfree_rcu (req, rcu_head);percpu_ref_put (&ctx->refs); }
@@ -104,19 +97,6 @@ static int io_msg_remote_post(struct io_ring_ctx *ctx, struct io_kiocb *req,return 0 ; } -static struct io_kiocb *io_msg_get_kiocb (struct io_ring_ctx *ctx) -{ -struct io_kiocb *req =NULL ; - -if (spin_trylock (&ctx->msg_lock)) { - req =io_alloc_cache_get (&ctx->msg_cache); -spin_unlock (&ctx->msg_lock); -if (req) -return req; - } -return kmem_cache_alloc (req_cachep,GFP_KERNEL | __GFP_NOWARN | __GFP_ZERO); -} -static int io_msg_data_remote (struct io_kiocb *req) {struct io_ring_ctx *target_ctx = req->file->private_data;
@@ -124,7 +104,7 @@ static int io_msg_data_remote(struct io_kiocb *req)struct io_kiocb *target;u32 flags =0 ; - target =io_msg_get_kiocb (req->ctx); + target =kmem_cache_alloc (req_cachep,GFP_KERNEL | __GFP_NOWARN | __GFP_ZERO);if (unlikely (!target))return -ENOMEM ;
io_uring/notif.c +1 -1
@@ -85,7 +85,7 @@ static int io_link_skb(struct sk_buff *skb, struct ubuf_info *uarg)return -EEXIST ; prev_nd = container_of(prev_uarg, struct io_notif_data, uarg); - prev_notif =cmd_to_io_kiocb (nd); + prev_notif =cmd_to_io_kiocb (prev_nd);/* make sure all noifications can be finished in the same task_work */ if (unlikely(notif->ctx != prev_notif->ctx ||
io_uring/poll.c +1 -2
@@ -265,8 +265,7 @@ static int io_poll_check_events(struct io_kiocb *req, struct io_tw_state *ts) {int v; -/* req->task == current here, checking PF_EXITING is safe */ -if (unlikely (req->task->flags &PF_EXITING )) +if (unlikely (io_should_terminate_tw (req->ctx)))return -ECANCELED ; do {
io_uring/timeout.c +1 -1
@@ -303,7 +303,7 @@ static void io_req_task_link_timeout(struct io_kiocb *req, struct io_tw_state *tint ret = -ENOENT ;if (prev) { -if (!(req->task->flags &PF_EXITING )) { +if (!io_should_terminate_tw (req->ctx)) {struct io_cancel_data cd = { .ctx = req->ctx, .data = prev->cqe.user_data,
io_uring/uring_cmd.c +5 -1
@@ -116,9 +116,13 @@ EXPORT_SYMBOL_GPL(io_uring_cmd_mark_cancelable);static void io_uring_cmd_work (struct io_kiocb *req,struct io_tw_state *ts) { struct io_uring_cmd *ioucmd = io_kiocb_to_cmd(req, struct io_uring_cmd); +unsigned int flags =IO_URING_F_COMPLETE_DEFER ; + +if (io_should_terminate_tw (req->ctx)) + flags |=IO_URING_F_TASK_DEAD ;/* task_work executor checks the deffered list completion */ - ioucmd->task_work_cb (ioucmd,IO_URING_F_COMPLETE_DEFER ); + ioucmd->task_work_cb (ioucmd, flags); } void __io_uring_cmd_do_in_task(struct io_uring_cmd *ioucmd,
kernel/cgroup/cgroup.c +36 -7
80 lines not on this page · raw message
mm/gup.c +32 -9
61 lines not on this page · raw message
mm/migrate.c +4 -18
@@ -453,20 +453,6 @@ void pmd_migration_entry_wait(struct mm_struct *mm, pmd_t *pmd) }#endif -static int folio_expected_refs (struct address_space *mapping, -struct folio *folio) -{ -int refs =1 ; -if (!mapping) -return refs; - - refs +=folio_nr_pages (folio); -if (folio_test_private (folio)) - refs++; - -return refs; -} -/* * Replace the folio in the mapping. *
@@ -609,7 +595,7 @@ static int __folio_migrate_mapping(struct address_space *mapping,int folio_migrate_mapping (struct address_space *mapping,struct folio *newfolio,struct folio *folio,int extra_count) { -int expected_count =folio_expected_refs (mapping, folio) + extra_count; +int expected_count =folio_expected_ref_count (folio) + extra_count +1 ;if (folio_ref_count (folio) != expected_count)return -EAGAIN ;
@@ -626,7 +612,7 @@ int migrate_huge_page_move_mapping(struct address_space *mapping, struct folio *dst, struct folio *src) { XA_STATE(xas, &mapping->i_pages, folio_index(src)); -int rc, expected_count =folio_expected_refs (mapping, src); +int rc, expected_count =folio_expected_ref_count (src) +1 ;if (folio_ref_count (src) != expected_count)return -EAGAIN ;
@@ -756,7 +742,7 @@ static int __migrate_folio(struct address_space *mapping, struct folio *dst, struct folio *src, void *src_private, enum migrate_mode mode) { - int rc, expected_count = folio_expected_refs(mapping, src); + int rc, expected_count = folio_expected_ref_count(src) + 1;/* Check whether src does not have extra refs before we do more work */ if (folio_ref_count (src) != expected_count)
@@ -844,7 +830,7 @@ static int __buffer_migrate_folio(struct address_space *mapping,return migrate_folio (mapping, dst, src, mode);/* Check whether page does not have extra refs before we do more work */ - expected_count =folio_expected_refs (mapping, src); + expected_count =folio_expected_ref_count (src) +1 ;if (folio_ref_count (src) != expected_count)return -EAGAIN ;
mm/vmscan.c +1 -1
@@ -4352,7 +4352,7 @@ static bool sort_folio(struct lruvec *lruvec, struct folio *folio, struct scan_c }/* ineligible */ -if (!folio_test_lru (folio) || zone > sc->reclaim_idx) { +if (zone > sc->reclaim_idx) { gen =folio_inc_gen (lruvec, folio, false);list_move_tail (&folio->lru, &lrugen->folios[gen][type][zone]);return true;
net/ipv4/tcp.c +5 -0
@@ -3286,6 +3286,7 @@ int tcp_disconnect(struct sock *sk, int flags)struct inet_connection_sock *icsk =inet_csk (sk);struct tcp_sock *tp =tcp_sk (sk);int old_state = sk->sk_state; +struct request_sock *req;u32 seq;if (old_state !=TCP_CLOSE )
@@ -3400,6 +3401,10 @@ int tcp_disconnect(struct sock *sk, int flags)/* Clean up fastopen related fields */ + req =rcu_dereference_protected (tp->fastopen_rsk, +lockdep_sock_is_held (sk)); +if (req) +reqsk_fastopen_remove (sk, req, false);tcp_free_fastopen_req (tp);inet_clear_bit (DEFER_CONNECT , sk); tp->fastopen_client_fail =0 ;
net/ipv4/tcp_ao.c +3 -1
@@ -1178,7 +1178,9 @@ void tcp_ao_finish_connect(struct sock *sk, struct sk_buff *skb)if (!ao)return ; -WRITE_ONCE (ao->risn,tcp_hdr (skb)->seq); +/* sk with TCP_REPAIR_ON does not have skb in tcp_finish_connect */ +if (skb) +WRITE_ONCE (ao->risn,tcp_hdr (skb)->seq); ao->rcv_sne =0 ;hlist_for_each_entry_rcu (key, &ao->head, node,lockdep_sock_is_held (sk))
net/mac80211/driver-ops.h +1 -1
@@ -1388,7 +1388,7 @@ drv_get_ftm_responder_stats(struct ieee80211_local *local,struct ieee80211_sub_if_data *sdata, struct cfg80211_ftm_responder_stats *ftm_stats) { - u32 ret = -EOPNOTSUPP; + int ret = -EOPNOTSUPP;might_sleep ();lockdep_assert_wiphy (local->hw.wiphy);
net/mac80211/main.c +6 -1
@@ -1120,7 +1120,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)int result, i;enum nl80211_band band;int channels, max_bitrates; -bool supp_ht, supp_vht, supp_he, supp_eht; +bool supp_ht, supp_vht, supp_he, supp_eht, supp_s1g;struct cfg80211_chan_def dflt_chandef = {}; if (ieee80211_hw_check(hw, QUEUE_CONTROL) &&
@@ -1236,6 +1236,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) supp_vht = false; supp_he = false; supp_eht = false; + supp_s1g = false;for (band =0 ; band <NUM_NL80211_BANDS ; band++) {const struct ieee80211_sband_iftype_data *iftd;struct ieee80211_supported_band *sband;
@@ -1283,6 +1284,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) max_bitrates = sband->n_bitrates; supp_ht = supp_ht || sband->ht_cap.ht_supported; supp_vht = supp_vht || sband->vht_cap.vht_supported; + supp_s1g = supp_s1g || sband->s1g_cap.s1g;for_each_sband_iftype_data (sband, i, iftd) {u8 he_40_mhz_cap;
@@ -1411,6 +1413,9 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) local->scan_ies_len +=2 +sizeof (struct ieee80211_vht_cap ); +if (supp_s1g) + local->scan_ies_len +=2 +sizeof (struct ieee80211_s1g_cap ); +/* * HE cap element is variable in size - set len to allow max size */ if (supp_he) {
net/mptcp/options.c +3 -3
@@ -985,13 +985,13 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk,return false; } -if (mp_opt->deny_join_id0) -WRITE_ONCE (msk->pm.remote_deny_join_id0, true); -if (unlikely (!READ_ONCE (msk->pm.server_side)))pr_warn_once ("bogus mpc option on established client sk" ); set_fully_established: +if (mp_opt->deny_join_id0) +WRITE_ONCE (msk->pm.remote_deny_join_id0, true); +mptcp_data_lock ((struct sock *)msk);__mptcp_subflow_fully_established (msk, subflow, mp_opt);mptcp_data_unlock ((struct sock *)msk);
net/mptcp/pm_netlink.c +7 -0
@@ -2211,6 +2211,7 @@ static int mptcp_event_created(struct sk_buff *skb, const struct sock *ssk) {int err =nla_put_u32 (skb,MPTCP_ATTR_TOKEN ,READ_ONCE (msk->token)); +u16 flags =0 ;if (err)return err;
@@ -2218,6 +2219,12 @@ static int mptcp_event_created(struct sk_buff *skb,if (nla_put_u8 (skb,MPTCP_ATTR_SERVER_SIDE ,READ_ONCE (msk->pm.server_side)))return -EMSGSIZE ; +if (READ_ONCE (msk->pm.remote_deny_join_id0)) + flags |=MPTCP_PM_EV_FLAG_DENY_JOIN_ID0 ; + +if (flags &&nla_put_u16 (skb,MPTCP_ATTR_FLAGS , flags)) +return -EMSGSIZE ; +return mptcp_event_add_subflow (skb, ssk); }
net/mptcp/protocol.c +16 -0
@@ -413,6 +413,20 @@ static void mptcp_close_wake_up(struct sock *sk)sk_wake_async (sk,SOCK_WAKE_WAITD ,POLL_IN ); } +static void mptcp_shutdown_subflows (struct mptcp_sock *msk) +{ +struct mptcp_subflow_context *subflow; + +mptcp_for_each_subflow (msk, subflow) { +struct sock *ssk =mptcp_subflow_tcp_sock (subflow); +bool slow; + + slow =lock_sock_fast (ssk); +tcp_shutdown (ssk,SEND_SHUTDOWN ); +unlock_sock_fast (ssk, slow); + } +} +/* called under the msk socket lock */ static bool mptcp_pending_data_fin_ack (struct sock *sk) {
@@ -437,6 +451,7 @@ static void mptcp_check_data_fin_ack(struct sock *sk)break ;case TCP_CLOSING :case TCP_LAST_ACK : +mptcp_shutdown_subflows (msk);mptcp_set_state (sk,TCP_CLOSE );break ; }
@@ -605,6 +620,7 @@ static bool mptcp_check_data_fin(struct sock *sk)mptcp_set_state (sk,TCP_CLOSING );break ;case TCP_FIN_WAIT2 : +mptcp_shutdown_subflows (msk);mptcp_set_state (sk,TCP_CLOSE );break ;default :
net/mptcp/subflow.c +4 -0
@@ -888,6 +888,10 @@ static struct sock *subflow_syn_recv_sock(const struct sock *sk, ctx->subflow_id =1 ; owner =mptcp_sk (ctx->conn); + +if (mp_opt.deny_join_id0) +WRITE_ONCE (owner->pm.remote_deny_join_id0, true); +mptcp_pm_new_connection (owner, child,1 );/* with OoO packets we can reach here without ingress
net/rds/ib_frmr.c +12 -8
@@ -133,12 +133,15 @@ static int rds_ib_post_reg_frmr(struct rds_ib_mr *ibmr) ret =ib_map_mr_sg_zbva (frmr->mr, ibmr->sg, ibmr->sg_dma_len, &off,PAGE_SIZE ); -if (unlikely (ret != ibmr->sg_dma_len)) -return ret <0 ? ret : -EINVAL ; +if (unlikely (ret != ibmr->sg_dma_len)) { + ret = ret <0 ? ret : -EINVAL ; + goto out_inc; + } -if (cmpxchg (&frmr->fr_state, -FRMR_IS_FREE ,FRMR_IS_INUSE ) !=FRMR_IS_FREE ) -return -EBUSY ; +if (cmpxchg (&frmr->fr_state,FRMR_IS_FREE ,FRMR_IS_INUSE ) !=FRMR_IS_FREE ) { + ret = -EBUSY ; + goto out_inc; + }atomic_inc (&ibmr->ic->i_fastreg_inuse_count);
@@ -166,11 +169,10 @@ static int rds_ib_post_reg_frmr(struct rds_ib_mr *ibmr)/* Failure here can be because of -ENOMEM as well */ rds_transition_frwr_state (ibmr,FRMR_IS_INUSE ,FRMR_IS_STALE ); -atomic_inc (&ibmr->ic->i_fastreg_wrs);if (printk_ratelimit ())pr_warn ("RDS/IB: %s returned error(%d)\n" , __func__, ret); - goto out; + goto out_inc; }/* Wait for the registration to complete in order to prevent an invalid
@@ -179,8 +181,10 @@ static int rds_ib_post_reg_frmr(struct rds_ib_mr *ibmr)*/ wait_event (frmr->fr_reg_done, !frmr->fr_reg); -out: +return ret; +out_inc: +atomic_inc (&ibmr->ic->i_fastreg_wrs);return ret; }
net/rfkill/rfkill-gpio.c +2 -2
@@ -94,10 +94,10 @@ static const struct dmi_system_id rfkill_gpio_deny_table[] = {static int rfkill_gpio_probe (struct platform_device *pdev) {
Lines of this file are not shown. View the raw message.
sound/soc/qcom/qdsp6/q6apm-lpass-dais.c +5 -2
Lines of this file are not shown. View the raw message.
tools/arch/loongarch/include/asm/inst.h +12 -0
Lines of this file are not shown. View the raw message.
tools/testing/selftests/net/mptcp/mptcp_connect.c +6 -5
Lines of this file are not shown. View the raw message.
tools/testing/selftests/net/mptcp/mptcp_sockopt.c +10 -6
Lines of this file are not shown. View the raw message.
tools/testing/selftests/net/mptcp/pm_nl_ctl.c +7 -0
Lines of this file are not shown. View the raw message.
tools/testing/selftests/net/mptcp/userspace_pm.sh +11 -3
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.