Linux 5.13.8
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.13.8 kernel.
All users of the 5.13 kernel series must upgrade.
The updated 5.13.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.13.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/alpha/kernel/setup.c | 13 arch/arm/net/bpf_jit_32.c | 3 arch/arm64/net/bpf_jit_comp.c | 13 arch/mips/net/ebpf_jit.c | 3 arch/powerpc/kernel/vdso64/Makefile | 7 arch/powerpc/net/bpf_jit_comp32.c | 6 arch/powerpc/net/bpf_jit_comp64.c | 6 arch/powerpc/platforms/pseries/setup.c | 2 arch/riscv/net/bpf_jit_comp32.c | 4 arch/riscv/net/bpf_jit_comp64.c | 4 arch/s390/net/bpf_jit_comp.c | 5 arch/sparc/net/bpf_jit_comp_64.c | 3 arch/x86/kvm/ioapic.c | 2 arch/x86/kvm/ioapic.h | 4 arch/x86/kvm/x86.c | 4 arch/x86/net/bpf_jit_comp.c | 7 arch/x86/net/bpf_jit_comp32.c | 6 block/blk-iocost.c | 11 block/genhd.c | 3 drivers/acpi/dptf/dptf_pch_fivr.c | 51 ++ drivers/acpi/resource.c | 9 drivers/block/loop.c | 128 +++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 3 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 drivers/gpu/drm/amd/amdgpu/psp_v12_0.c | 7 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 2 drivers/gpu/drm/i915/display/intel_bios.c | 3 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 2 drivers/gpu/drm/msm/dp/dp_catalog.c | 1 drivers/gpu/drm/msm/dp/dp_ctrl.c | 2 drivers/gpu/drm/panel/panel-simple.c | 2 drivers/hid/wacom_wac.c | 2 drivers/infiniband/hw/bnxt_re/main.c | 4 drivers/infiniband/hw/bnxt_re/qplib_res.c | 10 drivers/infiniband/hw/bnxt_re/qplib_res.h | 1 drivers/infiniband/sw/rxe/rxe_mr.c | 27 - drivers/net/can/spi/hi311x.c | 2 drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c | 1 drivers/net/can/usb/ems_usb.c | 14 drivers/net/can/usb/esd_usb2.c | 16 drivers/net/can/usb/mcba_usb.c | 2 drivers/net/can/usb/peak_usb/pcan_usb.c | 10 drivers/net/can/usb/usb_8dev.c | 15 drivers/net/dsa/mv88e6xxx/chip.c | 2 drivers/net/ethernet/dec/tulip/winbond-840.c | 7 drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 6 drivers/net/ethernet/intel/i40e/i40e_main.c | 61 ++- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 50 ++ drivers/net/ethernet/intel/i40e/i40e_txrx.h | 2 drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 2 drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c | 1 drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c | 14 drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c | 7 drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 5 drivers/net/ethernet/mellanox/mlx4/main.c | 1 drivers/net/ethernet/mellanox/mlx5/core/dev.c | 5 drivers/net/ethernet/mellanox/mlx5/core/en/params.c | 11 drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c | 2 drivers/net/ethernet/mellanox/mlx5/core/en/trap.c | 2 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 34 + drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 33 + drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 2 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 10 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 10 drivers/net/ethernet/mellanox/mlx5/core/health.c | 12 drivers/net/ethernet/pensando/ionic/ionic_lif.c | 197 +++++------ drivers/net/ethernet/pensando/ionic/ionic_lif.h | 11 drivers/net/ethernet/pensando/ionic/ionic_phc.c | 10 drivers/net/ethernet/pensando/ionic/ionic_txrx.c | 41 +- drivers/net/ethernet/sis/sis900.c | 7 drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 2 drivers/net/ethernet/sun/niu.c | 3 drivers/net/phy/broadcom.c | 2 drivers/nfc/nfcsim.c | 3 drivers/platform/x86/amd-pmc.c | 50 ++ fs/block_dev.c | 2 fs/btrfs/compression.c | 2 fs/btrfs/tree-log.c | 4 fs/btrfs/volumes.c | 1 fs/cifs/file.c | 2 fs/ext2/dir.c | 12 fs/ext2/ext2.h | 3 fs/ext2/namei.c | 4 fs/io_uring.c | 29 + fs/ocfs2/file.c | 103 +++-- fs/pipe.c | 10 include/linux/bpf_types.h | 1 include/linux/bpf_verifier.h | 11 include/linux/filter.h | 15 include/net/llc_pdu.h | 31 + kernel/bpf/core.c | 19 + kernel/bpf/disasm.c | 16 kernel/bpf/verifier.c | 186 +++------- mm/memcontrol.c | 3 mm/slab.h | 2 net/can/j1939/transport.c | 11 net/can/raw.c | 20 + net/core/skmsg.c | 4 net/ipv4/ip_tunnel.c | 2 net/llc/af_llc.c | 10 net/llc/llc_s_ac.c | 2 net/mac80211/cfg.c | 19 + net/mac80211/ieee80211_i.h | 2 net/mac80211/mlme.c | 4 net/netfilter/nf_conntrack_core.c | 7 net/netfilter/nf_tables_api.c | 12 net/netfilter/nft_nat.c | 4 net/qrtr/qrtr.c | 6 net/sctp/input.c | 2 net/tipc/crypto.c | 14 net/tipc/socket.c | 30 - net/wireless/scan.c | 6 tools/perf/util/map.c | 2 tools/perf/util/pmu.c | 33 + tools/testing/selftests/kvm/dirty_log_perf_test.c | 1 tools/testing/selftests/vm/userfaultfd.c | 2 virt/kvm/kvm_main.c | 28 + 118 files changed, 1115 insertions(+), 597 deletions(-)
Arkadiusz Kubalewski (2):
i40e: Fix logic of disabling queues
i40e: Fix firmware LLDP agent related warning
Arnaldo Carvalho de Melo (1):
Revert "perf map: Fix dso->nsinfo refcounting"
Aya Levin (3):
net/mlx5e: Fix page allocation failure for trap-RQ over SF net/mlx5e: Fix page allocation failure for ptp-RQ over SF net/mlx5: Unload device upon firmware fatal error
Bjorn Andersson (1):
drm/msm/dp: Initialize the INTF_CONFIG register
Bob Pearson (1):
RDMA/rxe: Fix memory leak in error path code
Chris Mi (1):
net/mlx5: Fix mlx5_vport_tbl_attr chain from u16 to u32
Christoph Hellwig (1):
block: delay freeing the gendisk
Dale Zhao (1):
drm/amd/display: ensure dentist display clock update finished in DCN20
Dan Carpenter (1):
can: hi311x: fix a signedness bug in hi3110_cmd()
Daniel Borkmann (4):
bpf: Introduce BPF nospec instruction for mitigating Spectre v4
bpf: Fix leakage due to insufficient speculative store bypass mitigation
bpf: Remove superfluous aux sanitation on subprog rejection
bpf: Fix pointer arithmetic mask tightening under state pruning
David Matlack (1):
KVM: selftests: Fix missing break in dirty_log_perf_test arg parsing
Desmond Cheong Zhi Xi (1):
btrfs: fix rw device counting in __btrfs_free_extra_devids
Dima Chumak (1):
net/mlx5e: Fix nullptr in mlx5e_hairpin_get_mdev()
Dongliang Mu (1):
netfilter: nf_tables: fix audit memory leak in nf_tables_commit
Felix Fietkau (1):
mac80211: fix enabling 4-address mode on a sta vif after assoc
Filipe Manana (1):
btrfs: fix lost inode on log replay after mix of fsync, rename and inode eviction
Florian Westphal (1):
netfilter: conntrack: adjust stop timestamp to real expiry value
Geetha sowjanya (1):
octeontx2-pf: Fix interface down flag on error
Gilad Naaman (1):
net: Set true network header for ECN decapsulation
Goldwyn Rodrigues (1):
btrfs: mark compressed range uptodate only if all bio succeed
Greg Kroah-Hartman (2):
selftest: fix build error in tools/testing/selftests/vm/userfaultfd.c Linux 5.13.8
Hao Xu (1):
io_uring: fix poll requests leaking second poll entries
Hariprasad Kelam (1):
octeontx2-pf: Dont enable backpressure on LBK links
Hoang Le (1):
tipc: fix sleeping in tipc accept routine
Hui Wang (1):
Revert "ACPI: resources: Add checks for ACPI IRQ override"
Jagan Teki (1):
drm/panel: panel-simple: Fix proper bpc for ytc700tlag_05_201c
Jason Gerecke (1):
HID: wacom: Re-enable touch by default for Cintiq 24HDT / 27QHDT
Javier Pello (1):
fs/ext2: Avoid page_address on pages returned by ext2_get_page
Jedrzej Jagielski (2):
i40e: Fix queue-to-TC mapping on Tx
i40e: Fix log TC creation failure when max num of queues is exceeded
Jens Axboe (2):
io_uring: don't block level reissue off completion path
io_uring: fix race in unified task_work running
Jiapeng Chong (1):
mlx4: Fix missing error code in mlx4_load_one()
Jiri Kosina (2):
drm/amdgpu: Avoid printing of stack contents on firmware load error drm/amdgpu: Fix resource leak on probe error path
Johannes Weiner (1):
mm: memcontrol: fix blocking rstat function called from atomic cgroup1 thresholding code
John Fastabend (1):
bpf, sockmap: Zap ingress queues after stopping strparser
John Garry (1):
perf pmu: Fix alias matching
Juergen Gross (1):
x86/kvm: fix vcpu-id indexed array sizes
Junxiao Bi (2):
ocfs2: fix zero out valid data
ocfs2: issue zeroout to EOF blocks
Kevin Lo (1):
net: phy: broadcom: re-add check for PHY_BRCM_DIS_TXCRXC_NOENRGY on the BCM54811 PHY
Krzysztof Kozlowski (1):
nfc: nfcsim: fix use after free during module unload
Kuogee Hsieh (1):
drm/msm/dp: use dp_ctrl_off_link_stream during PHY compliance test run
Linus Torvalds (1):
pipe: make pipe writes always wake up readers
Lorenz Bauer (2):
bpf: Fix OOB read when printing XDP link fdinfo
bpf: verifier: Allocate idmap scratch in verifier env
Lukasz Cieplicki (1):
i40e: Add additional info to PHY type error
Maor Dickman (2):
net/mlx5e: Disable Rx ntuple offload for uplink representor
net/mlx5: E-Switch, Set destination vport vhca id only when merged eswitch is supported
Maor Gottlieb (1):
net/mlx5: Fix flow table chaining
Marc Kleine-Budde (1):
can: mcp251xfd: mcp251xfd_irq(): stop timestamping worker in case error in IRQ
Marcelo Ricardo Leitner (1):
sctp: fix return value check in __sctp_rcv_asconf_lookup
Maxim Mikityanskiy (1):
net/mlx5e: Add NETIF_F_HW_TC to hw_features when HTB offload is available
Michael Ellerman (1):
powerpc/vdso: Don't use r30 to avoid breaking Go lang
Mike Rapoport (1):
alpha: register early reserved memory in memblock
Mohammad Athari Bin Ismail (1):
net: stmmac: add est_irq_status callback function for GMAC 4.10 and 5.10
Naresh Kumar PBS (1):
RDMA/bnxt_re: Fix stats counters
Nguyen Dinh Phi (1):
cfg80211: Fix possible memory leak in function cfg80211_bss_update
Oleksij Rempel (1):
can: j1939: j1939_session_deactivate(): clarify lifetime of session object
Pablo Neira Ayuso (1):
netfilter: nft_nat: allow to specify layer 4 protocol NAT only
Paolo Bonzini (1):
KVM: add missing compat KVM_CLEAR_DIRTY_LOG
Paul Jakma (1):
NIU: fix incorrect error return, missed in previous revert
Pavel Begunkov (1):
io_uring: fix io_prep_async_link locking
Pavel Skripkin (6):
can: mcba_usb_start(): add missing urb->transfer_dma initialization
can: usb_8dev: fix memory leak
can: ems_usb: fix memory leak
can: esd_usb2: fix memory leak
net: qrtr: fix memory leaks
net: llc: fix skb_over_panic
Pratik Vishwakarma (1):
drm/amdgpu: Check pmops for desired suspend state
Robert Foss (1):
drm/msm/dpu: Fix sm8250_mdp register length
Rodrigo Vivi (1):
drm/i915/bios: Fix ports mask
Roi Dayan (1):
net/mlx5: E-Switch, handle devcom events only for ports on the same device
Shannon Nelson (5):
ionic: make all rx_mode work threadsafe
ionic: catch no ptp support earlier
ionic: remove intr coalesce update from napi
ionic: fix up dim accounting for tx and rx
ionic: count csum_none when offload enabled
Shyam Sundar S K (2):
platform/x86: amd-pmc: Fix command completion code platform/x86: amd-pmc: Fix SMU firmware reporting mechanism
Srikar Dronamraju (1):
powerpc/pseries: Fix regression while building external modules
Srinivas Pandruvada (1):
ACPI: DPTF: Fix reading of attributes
Stephane Grosjean (1):
can: peak_usb: pcan_usb_handle_bus_evt(): fix reading rxerr/txerr values
Steve French (1):
SMB3: fix readpage for large swap cache
Sunil Goutham (1):
octeontx2-af: Remove unnecessary devm_kfree
Tariq Toukan (1):
net/mlx5e: RX, Avoid possible data corruption when relaxed ordering and LRO combined
Tejun Heo (1):
blk-iocost: fix operation ordering in iocg_wake_fn()
Tetsuo Handa (1):
loop: reintroduce global lock for safe loop_validate_file() traversal
Vitaly Kuznetsov (1):
KVM: x86: Check the right feature bit for MSR_KVM_ASYNC_PF_ACK access
Vladimir Oltean (1):
net: dsa: mv88e6xxx: silently accept the deletion of VID 0 too
Wang Hai (3):
mm/memcg: fix NULL pointer dereference in memcg_slab_free_hook()
tulip: windbond-840: Fix missing pci_disable_device() in probe and remove
sis900: Fix missing pci_disable_device() in probe and remove
Xin Long (2):
tipc: fix implicit-connect for SYN+
tipc: do not write skb_shinfo frags when doing decrytion
Yang Yingliang (1):
platform/x86: amd-pmc: Fix missing unlock on error in amd_pmc_send_cmd()
Zhang Changzhong (1):
can: j1939: j1939_xtp_rx_dat_one(): fix rxtimer value between consecutive TP.DT to 750ms
Ziyang Xuan (1):
can: raw: raw_setsockopt(): fix raw_rcv panic for sock UAF
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 13 -SUBLEVEL = 7 +SUBLEVEL = 8 EXTRAVERSION = NAME = Opossums on Parade
arch/alpha/kernel/setup.c +7 -6
@@ -325,18 +325,19 @@ setup_memory(void *kernel_end) i, cluster->usage, cluster->start_pfn, cluster->start_pfn + cluster->numpages); -/* Bit 0 is console/PALcode reserved. Bit 1 is -non-volatile memory -- we might want to mark -this for later. */ -if (cluster->usage &3 ) -continue ; - end = cluster->start_pfn + cluster->numpages;if (end > max_low_pfn) max_low_pfn = end;memblock_add (PFN_PHYS (cluster->start_pfn), cluster->numpages <<PAGE_SHIFT ); + +/* Bit 0 is console/PALcode reserved. Bit 1 is +non-volatile memory -- we might want to mark +this for later. */ +if (cluster->usage &3 ) +memblock_reserve (PFN_PHYS (cluster->start_pfn), + cluster->numpages <<PAGE_SHIFT ); }/*
arch/arm/net/bpf_jit_32.c +3 -0
@@ -1602,6 +1602,9 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx) rn =arm_bpf_get_reg32 (src_lo, tmp2[1 ], ctx);emit_ldx_r (dst, rn, off, ctx,BPF_SIZE (code));break ; +/* speculation barrier */ +case BPF_ST |BPF_NOSPEC : +break ;/* ST: *(size *)(dst + off) = imm */ case BPF_ST |BPF_MEM |BPF_W :case BPF_ST |BPF_MEM |BPF_H :
arch/arm64/net/bpf_jit_comp.c +13 -0
@@ -829,6 +829,19 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx,return ret;break ; +/* speculation barrier */ +case BPF_ST |BPF_NOSPEC : +/* +* Nothing required here. +* +* In case of arm64, we rely on the firmware mitigation of +* Speculative Store Bypass as controlled via the ssbd kernel +* parameter. Whenever the mitigation is enabled, it works +* for all of the kernel code with no need to provide any +* additional instructions. +*/ +break ; +/* ST: *(size *)(dst + off) = imm */ case BPF_ST |BPF_MEM |BPF_W :case BPF_ST |BPF_MEM |BPF_H :
arch/mips/net/ebpf_jit.c +3 -0
@@ -1355,6 +1355,9 @@ static int build_one_insn(const struct bpf_insn *insn, struct jit_ctx *ctx, }break ; +case BPF_ST |BPF_NOSPEC :/* speculation barrier */ +break ; +case BPF_ST |BPF_B |BPF_MEM :case BPF_ST |BPF_H |BPF_MEM :case BPF_ST |BPF_W |BPF_MEM :
arch/powerpc/kernel/vdso64/Makefile +7 -0
@@ -27,6 +27,13 @@ KASAN_SANITIZE := n ccflags-y := -shared -fno-common -fno-builtin -nostdlib \ -Wl,-soname=linux-vdso64.so.1 -Wl,--hash-style=both + +# Go prior to 1.16.x assumes r30 is not clobbered by any VDSO code. That used to be true +# by accident when the VDSO was hand-written asm code, but may not be now that the VDSO is +# compiler generated. To avoid breaking Go tell GCC not to use r30. Impact on code +# generation is minimal, it will just use r29 instead. +ccflags-y += $(call cc-option, -ffixed-r30) + asflags-y := -D__VDSO64__ -s targets += vdso64.lds
arch/powerpc/net/bpf_jit_comp32.c +6 -0
@@ -737,6 +737,12 @@ int bpf_jit_build_body(struct bpf_prog *fp, u32 *image, struct codegen_context * }break ; +/* +* BPF_ST NOSPEC (speculation barrier) +*/ +case BPF_ST |BPF_NOSPEC : +break ; +/* * BPF_ST(X) */
arch/powerpc/net/bpf_jit_comp64.c +6 -0
@@ -627,6 +627,12 @@ int bpf_jit_build_body(struct bpf_prog *fp, u32 *image, struct codegen_context * }break ; +/* +* BPF_ST NOSPEC (speculation barrier) +*/ +case BPF_ST |BPF_NOSPEC : +break ; +/* * BPF_ST(X) */
arch/powerpc/platforms/pseries/setup.c +1 -1
@@ -77,7 +77,7 @@#include "../../../../drivers/pci/pci.h" DEFINE_STATIC_KEY_FALSE (shared_processor); -EXPORT_SYMBOL_GPL (shared_processor); +EXPORT_SYMBOL (shared_processor);int CMO_PrPSP =-1 ;int CMO_SecPSP =-1 ;
arch/riscv/net/bpf_jit_comp32.c +4 -0
@@ -1251,6 +1251,10 @@ int bpf_jit_emit_insn(const struct bpf_insn *insn, struct rv_jit_context *ctx,return -1 ;break ; +/* speculation barrier */ +case BPF_ST |BPF_NOSPEC : +break ; +case BPF_ST |BPF_MEM |BPF_B :case BPF_ST |BPF_MEM |BPF_H :case BPF_ST |BPF_MEM |BPF_W :
arch/riscv/net/bpf_jit_comp64.c +4 -0
@@ -939,6 +939,10 @@ int bpf_jit_emit_insn(const struct bpf_insn *insn, struct rv_jit_context *ctx,emit_ld (rd,0 ,RV_REG_T1 , ctx);break ; +/* speculation barrier */ +case BPF_ST |BPF_NOSPEC : +break ; +/* ST: *(size *)(dst + off) = imm */ case BPF_ST |BPF_MEM |BPF_B :emit_imm (RV_REG_T1 , imm, ctx);
arch/s390/net/bpf_jit_comp.c +5 -0
@@ -1153,6 +1153,11 @@ static noinline int bpf_jit_insn(struct bpf_jit *jit, struct bpf_prog *fp,break ; }break ; +/* +* BPF_NOSPEC (speculation barrier) +*/ +case BPF_ST |BPF_NOSPEC : +break ;/* * BPF_ST(X) */
arch/sparc/net/bpf_jit_comp_64.c +3 -0
@@ -1287,6 +1287,9 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx)return 1 ;break ; } +/* speculation barrier */ +case BPF_ST |BPF_NOSPEC : +break ;/* ST: *(size *)(dst + off) = imm */ case BPF_ST |BPF_MEM |BPF_W :case BPF_ST |BPF_MEM |BPF_H :
arch/x86/kvm/ioapic.c +1 -1
@@ -96,7 +96,7 @@ static unsigned long ioapic_read_indirect(struct kvm_ioapic *ioapic,static void rtc_irq_eoi_tracking_reset (struct kvm_ioapic *ioapic) { ioapic->rtc_status.pending_eoi =0 ; -bitmap_zero (ioapic->rtc_status.dest_map.map,KVM_MAX_VCPU_ID ); +bitmap_zero (ioapic->rtc_status.dest_map.map,KVM_MAX_VCPU_ID +1 ); }static void kvm_rtc_eoi_tracking_restore_all (struct kvm_ioapic *ioapic);
arch/x86/kvm/ioapic.h +2 -2
@@ -43,13 +43,13 @@ struct kvm_vcpu;struct dest_map {/* vcpu bitmap where IRQ has been sent */ - DECLARE_BITMAP(map, KVM_MAX_VCPU_ID); + DECLARE_BITMAP(map, KVM_MAX_VCPU_ID + 1);/* * Vector sent to a given vcpu, only valid when * the vcpu's bit in map is set */ -u8 vectors[KVM_MAX_VCPU_ID ]; +u8 vectors[KVM_MAX_VCPU_ID +1 ]; };
arch/x86/kvm/x86.c +2 -2
@@ -3314,7 +3314,7 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)return 1 ;break ;case MSR_KVM_ASYNC_PF_ACK : -if (!guest_pv_has (vcpu,KVM_FEATURE_ASYNC_PF )) +if (!guest_pv_has (vcpu,KVM_FEATURE_ASYNC_PF_INT ))return 1 ;if (data &0x1 ) { vcpu->arch.apf.pageready_pending = false;
@@ -3646,7 +3646,7 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info) msr_info->data = vcpu->arch.apf.msr_int_val;break ;case MSR_KVM_ASYNC_PF_ACK : -if (!guest_pv_has (vcpu,KVM_FEATURE_ASYNC_PF )) +if (!guest_pv_has (vcpu,KVM_FEATURE_ASYNC_PF_INT ))return 1 ; msr_info->data =0 ;
arch/x86/net/bpf_jit_comp.c +7 -0
@@ -1235,6 +1235,13 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image, }break ; +/* speculation barrier */ +case BPF_ST |BPF_NOSPEC : +if (boot_cpu_has (X86_FEATURE_XMM2 )) +/* Emit 'lfence' */ +EMIT3 (0x0F ,0xAE ,0xE8 ); +break ; +/* ST: *(u8*)(dst_reg + off) = imm */ case BPF_ST |BPF_MEM |BPF_B :if (is_ereg (dst_reg))
arch/x86/net/bpf_jit_comp32.c +6 -0
@@ -1886,6 +1886,12 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image, i++;break ; } +/* speculation barrier */ +case BPF_ST |BPF_NOSPEC : +if (boot_cpu_has (X86_FEATURE_XMM2 )) +/* Emit 'lfence' */ +EMIT3 (0x0F ,0xAE ,0xE8 ); +break ;/* ST: *(u8*)(dst_reg + off) = imm */ case BPF_ST |BPF_MEM |BPF_H :case BPF_ST |BPF_MEM |BPF_B :
block/blk-iocost.c +6 -5
@@ -1440,16 +1440,17 @@ static int iocg_wake_fn(struct wait_queue_entry *wq_entry, unsigned mode,return -1 ;iocg_commit_bio (ctx->iocg, wait->bio, wait->abs_cost, cost); + wait->committed = true;/* * autoremove_wake_function() removes the wait entry only when it -* actually changed the task state. We want the wait always -* removed. Remove explicitly and use default_wake_function(). +* actually changed the task state. We want the wait always removed. +* Remove explicitly and use default_wake_function(). Note that the +* order of operations is important as finish_wait() tests whether +* @wq_entry is removed without grabbing the lock. */ -list_del_init (&wq_entry->entry); - wait->committed = true; -default_wake_function (wq_entry, mode, flags, key); +list_del_init_careful (&wq_entry->entry);return 0 ; }
block/genhd.c +1 -2
@@ -1124,10 +1124,9 @@ static void disk_release(struct device *dev)disk_release_events (disk);kfree (disk->random);xa_destroy (&disk->part_tbl); -bdput (disk->part0);if (disk->queue)blk_put_queue (disk->queue); -kfree (disk); +bdput (disk->part0);/* frees the disk */ }struct class block_class = { .name ="block" ,
drivers/acpi/dptf/dptf_pch_fivr.c +43 -8
64 lines not on this page · raw message
drivers/acpi/resource.c +1 -8
@@ -423,13 +423,6 @@ static void acpi_dev_get_irqresource(struct resource *res, u32 gsi, } } -static bool irq_is_legacy (struct acpi_resource_irq *irq) -{ -return irq->triggering ==ACPI_EDGE_SENSITIVE && - irq->polarity ==ACPI_ACTIVE_HIGH && - irq->shareable ==ACPI_EXCLUSIVE ; -} -/** * acpi_dev_resource_interrupt - Extract ACPI interrupt resource information. * @ares: Input ACPI resource object.
@@ -468,7 +461,7 @@ bool acpi_dev_resource_interrupt(struct acpi_resource *ares, int index, }acpi_dev_get_irqresource (res, irq->interrupts[index], irq->triggering, irq->polarity, - irq->shareable,irq_is_legacy (irq)); + irq->shareable, true);break ;case ACPI_RESOURCE_TYPE_EXTENDED_IRQ : ext_irq = &ares->data.extended_irq;
drivers/block/loop.c +97 -31
217 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +2 -1
@@ -26,6 +26,7 @@#include <linux/slab.h> #include <linux/power_supply.h> #include <linux/pm_runtime.h> +#include <linux/suspend.h> #include <acpi/video.h> #include <acpi/actbl.h>
@@ -906,7 +907,7 @@ bool amdgpu_acpi_is_s0ix_supported(struct amdgpu_device *adev)#if defined(CONFIG_AMD_PMC ) || defined(CONFIG_AMD_PMC_MODULE )if (acpi_gbl_FADT.flags &ACPI_FADT_LOW_POWER_S0 ) {if (adev->flags &AMD_IS_APU ) -return true; +return pm_suspend_target_state ==PM_SUSPEND_TO_IDLE ; }#endif return false;
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -6
@@ -3412,13 +3412,13 @@ int amdgpu_device_init(struct amdgpu_device *adev, r =amdgpu_device_get_job_timeout_settings (adev);if (r) {dev_err (adev->dev,"invalid lockup_timeout parameter syntax\n" ); - goto failed_unmap; +return r; }/* early init functions */ r =amdgpu_device_ip_early_init (adev);if (r) - goto failed_unmap; +return r;/* doorbell bar mapping and doorbell index init*/ amdgpu_device_doorbell_init (adev);
@@ -3644,10 +3644,6 @@ int amdgpu_device_init(struct amdgpu_device *adev, failed:amdgpu_vf_error_trans_all (adev); -failed_unmap: -iounmap (adev->rmmio); - adev->rmmio =NULL ; -return r; }
drivers/gpu/drm/amd/amdgpu/psp_v12_0.c +3 -4
@@ -67,7 +67,7 @@ static int psp_v12_0_init_microcode(struct psp_context *psp) err =psp_init_asd_microcode (psp, chip_name);if (err) - goto out; +return err;snprintf (fw_name,sizeof (fw_name),"amdgpu/%s_ta.bin" , chip_name); err =request_firmware (&adev->psp.ta_fw, fw_name, adev->dev);
@@ -80,7 +80,7 @@ static int psp_v12_0_init_microcode(struct psp_context *psp) }else { err =amdgpu_ucode_validate (adev->psp.ta_fw);if (err) - goto out2; + goto out; ta_hdr = (const struct ta_firmware_header_v1_0 *) adev->psp.ta_fw->data;
@@ -105,10 +105,9 @@ static int psp_v12_0_init_microcode(struct psp_context *psp)return 0 ; -out2: +out:release_firmware (adev->psp.ta_fw); adev->psp.ta_fw =NULL ; -out:if (err) { dev_err(adev->dev, "psp v12.0: Failed to load firmware \"%s\"\n",
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c +1 -1
@@ -135,7 +135,7 @@ void dcn20_update_clocks_update_dentist(struct clk_mgr_internal *clk_mgr)REG_UPDATE (DENTIST_DISPCLK_CNTL ,DENTIST_DISPCLK_WDIVIDER , dispclk_wdivider); -// REG_WAIT(DENTIST_DISPCLK_CNTL, DENTIST_DISPCLK_CHG_DONE, 1, 5, 100); +REG_WAIT (DENTIST_DISPCLK_CNTL ,DENTIST_DISPCLK_CHG_DONE ,1 ,50 ,1000 );REG_UPDATE (DENTIST_DISPCLK_CNTL ,DENTIST_DPPCLK_WDIVIDER , dppclk_wdivider);REG_WAIT (DENTIST_DISPCLK_CNTL ,DENTIST_DPPCLK_CHG_DONE ,1 ,5 ,100 );
drivers/gpu/drm/i915/display/intel_bios.c +2 -1
@@ -2130,7 +2130,8 @@ static void init_vbt_missing_defaults(struct drm_i915_private *i915) {enum port port; -int ports =PORT_A |PORT_B |PORT_C |PORT_D |PORT_E |PORT_F ; +int ports =BIT (PORT_A ) |BIT (PORT_B ) |BIT (PORT_C ) | +BIT (PORT_D ) |BIT (PORT_E ) |BIT (PORT_F );if (!HAS_DDI (i915) && !IS_CHERRYVIEW (i915))return ;
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +1 -1
@@ -268,7 +268,7 @@ static const struct dpu_mdp_cfg sc7180_mdp[] = {static const struct dpu_mdp_cfg sm8250_mdp[] = { { .name ="top_0" , .id =MDP_TOP , - .base =0x0 , .len =0x45C , + .base =0x0 , .len =0x494 , .features =0 , .highest_bank_bit =0x3 ,/* TODO: 2 for LP_DDR4 */ .clk_ctrls[DPU_CLK_CTRL_VIG0 ] = {
drivers/gpu/drm/msm/dp/dp_catalog.c +1 -0
@@ -762,6 +762,7 @@ int dp_catalog_panel_timing_cfg(struct dp_catalog *dp_catalog)dp_write_link (catalog,REG_DP_HSYNC_VSYNC_WIDTH_POLARITY , dp_catalog->width_blanking);dp_write_link (catalog,REG_DP_ACTIVE_HOR_VER , dp_catalog->dp_active); +dp_write_p0 (catalog,MMSS_DP_INTF_CONFIG ,0 );return 0 ; }
drivers/gpu/drm/msm/dp/dp_ctrl.c +1 -1
@@ -1528,7 +1528,7 @@ static int dp_ctrl_process_phy_test_request(struct dp_ctrl_private *ctrl)* running. Add the global reset just before disabling the * link clocks and core clocks. */ - ret =dp_ctrl_off (&ctrl->dp_ctrl); + ret =dp_ctrl_off_link_stream (&ctrl->dp_ctrl);if (ret) {DRM_ERROR ("failed to disable DP controller\n" );return ret;
drivers/gpu/drm/panel/panel-simple.c +1 -1
@@ -4124,7 +4124,7 @@ static const struct drm_display_mode yes_optoelectronics_ytc700tlag_05_201c_modestatic const struct panel_desc yes_optoelectronics_ytc700tlag_05_201c = { .modes = &yes_optoelectronics_ytc700tlag_05_201c_mode, .num_modes =1 , - .bpc =6 , + .bpc =8 , .size = { .width =154 , .height =90 ,
drivers/hid/wacom_wac.c +1 -1
@@ -3831,7 +3831,7 @@ int wacom_setup_touch_input_capabilities(struct input_dev *input_dev, wacom_wac->shared->touch->product == 0xF6) { input_dev->evbit[0 ] |=BIT_MASK (EV_SW );__set_bit (SW_MUTE_DEVICE , input_dev->swbit); - wacom_wac->shared->has_mute_touch_switch = true; + wacom_wac->has_mute_touch_switch = true; } fallthrough;
drivers/infiniband/hw/bnxt_re/main.c +3 -1
@@ -120,6 +120,7 @@ static int bnxt_re_setup_chip_ctx(struct bnxt_re_dev *rdev, u8 wqe_mode)if (!chip_ctx)return -ENOMEM ; chip_ctx->chip_num = bp->chip_num; + chip_ctx->hw_stats_size = bp->hw_ring_stats_size; rdev->chip_ctx = chip_ctx;/* rest members to follow eventually */
@@ -547,6 +548,7 @@ static int bnxt_re_net_stats_ctx_alloc(struct bnxt_re_dev *rdev,dma_addr_t dma_map, u32 *fw_stats_ctx_id) { + struct bnxt_qplib_chip_ctx *chip_ctx = rdev->chip_ctx;struct hwrm_stat_ctx_alloc_output resp = {0 };struct hwrm_stat_ctx_alloc_input req = {0 };struct bnxt_en_dev *en_dev = rdev->en_dev;
@@ -563,7 +565,7 @@ static int bnxt_re_net_stats_ctx_alloc(struct bnxt_re_dev *rdev,bnxt_re_init_hwrm_hdr (rdev, (void *)&req,HWRM_STAT_CTX_ALLOC ,-1 ,-1 ); req.update_period_ms =cpu_to_le32 (1000 ); req.stats_dma_addr =cpu_to_le64 (dma_map); - req.stats_dma_length =cpu_to_le16 (sizeof (struct ctx_hw_stats_ext )); + req.stats_dma_length =cpu_to_le16 (chip_ctx->hw_stats_size); req.stat_ctx_flags =STAT_CTX_ALLOC_REQ_STAT_CTX_FLAGS_ROCE ;bnxt_re_fill_fw_msg (&fw_msg, (void *)&req,sizeof (req), (void *)&resp,sizeof (resp),DFLT_HWRM_CMD_TIMEOUT );
drivers/infiniband/hw/bnxt_re/qplib_res.c +4 -6
@@ -56,6 +56,7 @@static void bnxt_qplib_free_stats_ctx (struct pci_dev *pdev,struct bnxt_qplib_stats *stats);static int bnxt_qplib_alloc_stats_ctx (struct pci_dev *pdev, +struct bnxt_qplib_chip_ctx *cctx,struct bnxt_qplib_stats *stats);/* PBL */
@@ -559,7 +560,7 @@ int bnxt_qplib_alloc_ctx(struct bnxt_qplib_res *res, goto fail; stats_alloc:/* Stats */ - rc =bnxt_qplib_alloc_stats_ctx (res->pdev, &ctx->stats); + rc =bnxt_qplib_alloc_stats_ctx (res->pdev, res->cctx, &ctx->stats);if (rc) goto fail;
@@ -889,15 +890,12 @@ static void bnxt_qplib_free_stats_ctx(struct pci_dev *pdev, }static int bnxt_qplib_alloc_stats_ctx (struct pci_dev *pdev, +struct bnxt_qplib_chip_ctx *cctx,struct bnxt_qplib_stats *stats) {memset (stats,0 ,sizeof (*stats)); stats->fw_id =-1 ; -/* 128 byte aligned context memory is required only for 57500. -* However making this unconditional, it does not harm previous -* generation. -*/ - stats->size =ALIGN (sizeof (struct ctx_hw_stats ),128 ); + stats->size = cctx->hw_stats_size; stats->dma =dma_alloc_coherent (&pdev->dev, stats->size, &stats->dma_map,GFP_KERNEL );if (!stats->dma) {
drivers/infiniband/hw/bnxt_re/qplib_res.h +1 -0
@@ -60,6 +60,7 @@ struct bnxt_qplib_chip_ctx {u16 chip_num;u8 chip_rev;u8 chip_metal; +u16 hw_stats_size;struct bnxt_qplib_drv_modes modes; };
drivers/infiniband/sw/rxe/rxe_mr.c +17 -10
@@ -130,13 +130,14 @@ int rxe_mr_init_user(struct rxe_pd *pd, u64 start, u64 length, u64 iova,int num_buf;void *vaddr;int err; +int i; umem =ib_umem_get (pd->ibpd.device, start, length, access);if (IS_ERR (umem)) { -pr_warn ("err %d from rxe_umem_get\n" , - (int )PTR_ERR (umem)); +pr_warn ("%s: Unable to pin memory region err = %d\n" , + __func__, (int )PTR_ERR (umem)); err =PTR_ERR (umem); - goto err1; + goto err_out; } mr->umem = umem;
@@ -146,9 +147,9 @@ int rxe_mr_init_user(struct rxe_pd *pd, u64 start, u64 length, u64 iova, err =rxe_mr_alloc (mr, num_buf);if (err) { -pr_warn ("err %d from rxe_mr_alloc\n" , err); -ib_umem_release (umem); - goto err1; +pr_warn ("%s: Unable to allocate memory for map\n" , + __func__); + goto err_release_umem; } mr->page_shift =PAGE_SHIFT ;
@@ -168,10 +169,10 @@ int rxe_mr_init_user(struct rxe_pd *pd, u64 start, u64 length, u64 iova, vaddr =page_address (sg_page_iter_page (&sg_iter));if (!vaddr) { -pr_warn ("null vaddr\n" ); -ib_umem_release (umem); +pr_warn ("%s: Unable to get virtual address\n" , + __func__); err = -ENOMEM ; - goto err1; + goto err_cleanup_map; } buf->addr = (uintptr_t )vaddr;
@@ -194,7 +195,13 @@ int rxe_mr_init_user(struct rxe_pd *pd, u64 start, u64 length, u64 iova,return 0 ; -err1: +err_cleanup_map: +for (i =0 ; i < mr->num_map; i++) +kfree (mr->map[i]); +kfree (mr->map); +err_release_umem: +ib_umem_release (umem); +err_out:return err; }
drivers/net/can/spi/hi311x.c +1 -1
@@ -218,7 +218,7 @@ static int hi3110_spi_trans(struct spi_device *spi, int len)return ret; } -static u8 hi3110_cmd (struct spi_device *spi,u8 command) +static int hi3110_cmd (struct spi_device *spi,u8 command) {struct hi3110_priv *priv =spi_get_drvdata (spi);
drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c +1 -0
@@ -2300,6 +2300,7 @@ static irqreturn_t mcp251xfd_irq(int irq, void *dev_id) err, priv->regs_status.intf);mcp251xfd_dump (priv);mcp251xfd_chip_interrupts_disable (priv); +mcp251xfd_timestamp_stop (priv);return handled; }
drivers/net/can/usb/ems_usb.c +13 -1
@@ -255,6 +255,8 @@ struct ems_usb {unsigned int free_slots;/* remember number of available slots */ struct ems_cpc_msg active_params;/* active controller parameters */ +void *rxbuf[MAX_RX_URBS ]; +dma_addr_t rxbuf_dma[MAX_RX_URBS ]; };static void ems_usb_read_interrupt_callback (struct urb *urb)
@@ -587,6 +589,7 @@ static int ems_usb_start(struct ems_usb *dev)for (i =0 ; i <MAX_RX_URBS ; i++) {struct urb *urb =NULL ;u8 *buf =NULL ; +dma_addr_t buf_dma;/* create a URB, and a buffer for it */ urb =usb_alloc_urb (0 ,GFP_KERNEL );
@@ -596,7 +599,7 @@ static int ems_usb_start(struct ems_usb *dev) } buf =usb_alloc_coherent (dev->udev,RX_BUFFER_SIZE ,GFP_KERNEL , - &urb->transfer_dma); + &buf_dma);if (!buf) {netdev_err (netdev,"No memory left for USB buffer\n" );usb_free_urb (urb);
@@ -604,6 +607,8 @@ static int ems_usb_start(struct ems_usb *dev)break ; } + urb->transfer_dma = buf_dma; +usb_fill_bulk_urb (urb, dev->udev,usb_rcvbulkpipe (dev->udev,2 ), buf,RX_BUFFER_SIZE , ems_usb_read_bulk_callback, dev);
@@ -619,6 +624,9 @@ static int ems_usb_start(struct ems_usb *dev)break ; } + dev->rxbuf[i] = buf; + dev->rxbuf_dma[i] = buf_dma; +/* Drop reference, USB core will take care of freeing it */ usb_free_urb (urb); }
@@ -684,6 +692,10 @@ static void unlink_all_urbs(struct ems_usb *dev)usb_kill_anchored_urbs (&dev->rx_submitted); +for (i =0 ; i <MAX_RX_URBS ; ++i) +usb_free_coherent (dev->udev,RX_BUFFER_SIZE , + dev->rxbuf[i], dev->rxbuf_dma[i]); +usb_kill_anchored_urbs (&dev->tx_submitted);atomic_set (&dev->active_tx_urbs,0 );
drivers/net/can/usb/esd_usb2.c +15 -1
@@ -195,6 +195,8 @@ struct esd_usb2 {int net_count;u32 version;int rxinitdone; +void *rxbuf[MAX_RX_URBS ]; +dma_addr_t rxbuf_dma[MAX_RX_URBS ]; };struct esd_usb2_net_priv {
@@ -545,6 +547,7 @@ static int esd_usb2_setup_rx_urbs(struct esd_usb2 *dev)for (i =0 ; i <MAX_RX_URBS ; i++) {struct urb *urb =NULL ;u8 *buf =NULL ; +dma_addr_t buf_dma;/* create a URB, and a buffer for it */ urb =usb_alloc_urb (0 ,GFP_KERNEL );
@@ -554,7 +557,7 @@ static int esd_usb2_setup_rx_urbs(struct esd_usb2 *dev) } buf =usb_alloc_coherent (dev->udev,RX_BUFFER_SIZE ,GFP_KERNEL , - &urb->transfer_dma); + &buf_dma);if (!buf) {dev_warn (dev->udev->dev.parent,"No memory left for USB buffer\n" );
@@ -562,6 +565,8 @@ static int esd_usb2_setup_rx_urbs(struct esd_usb2 *dev) goto freeurb; } + urb->transfer_dma = buf_dma; + usb_fill_bulk_urb(urb, dev->udev, usb_rcvbulkpipe(dev->udev, 1), buf, RX_BUFFER_SIZE,
@@ -574,8 +579,12 @@ static int esd_usb2_setup_rx_urbs(struct esd_usb2 *dev)usb_unanchor_urb (urb);usb_free_coherent (dev->udev,RX_BUFFER_SIZE , buf, urb->transfer_dma); + goto freeurb; } + dev->rxbuf[i] = buf; + dev->rxbuf_dma[i] = buf_dma; + freeurb:/* Drop reference, USB core will take care of freeing it */ usb_free_urb (urb);
@@ -663,6 +672,11 @@ static void unlink_all_urbs(struct esd_usb2 *dev)int i, j;usb_kill_anchored_urbs (&dev->rx_submitted); + +for (i =0 ; i <MAX_RX_URBS ; ++i) +usb_free_coherent (dev->udev,RX_BUFFER_SIZE , + dev->rxbuf[i], dev->rxbuf_dma[i]); +for (i =0 ; i < dev->net_count; i++) { priv = dev->nets[i];if (priv) {
drivers/net/can/usb/mcba_usb.c +2 -0
@@ -653,6 +653,8 @@ static int mcba_usb_start(struct mcba_priv *priv)break ; } + urb->transfer_dma = buf_dma; + usb_fill_bulk_urb(urb, priv->udev, usb_rcvbulkpipe(priv->udev, MCBA_USB_EP_IN), buf, MCBA_USB_RX_BUFF_SIZE,
drivers/net/can/usb/peak_usb/pcan_usb.c +6 -4
@@ -117,7 +117,8 @@#define PCAN_USB_BERR_MASK (PCAN_USB_ERR_RXERR | PCAN_USB_ERR_TXERR)/* identify bus event packets with rx/tx error counters */ -#define PCAN_USB_ERR_CNT 0x80 +#define PCAN_USB_ERR_CNT_DEC 0x00/* counters are decreasing */ +#define PCAN_USB_ERR_CNT_INC 0x80/* counters are increasing */ /* private to PCAN-USB adapter */ struct pcan_usb {
@@ -608,11 +609,12 @@ static int pcan_usb_handle_bus_evt(struct pcan_usb_msg_context *mc, u8 ir)/* acccording to the content of the packet */ switch (ir) { -case PCAN_USB_ERR_CNT : +case PCAN_USB_ERR_CNT_DEC : +case PCAN_USB_ERR_CNT_INC :/* save rx/tx error counters from in the device context */ - pdev->bec.rxerr = mc->ptr[0 ]; - pdev->bec.txerr = mc->ptr[1 ]; + pdev->bec.rxerr = mc->ptr[1 ]; + pdev->bec.txerr = mc->ptr[2 ];break ;default :
drivers/net/can/usb/usb_8dev.c +13 -2
@@ -137,7 +137,8 @@ struct usb_8dev_priv {u8 *cmd_msg_buffer;struct mutex usb_8dev_cmd_lock; - +void *rxbuf[MAX_RX_URBS ]; +dma_addr_t rxbuf_dma[MAX_RX_URBS ]; };/* tx frame */
@@ -733,6 +734,7 @@ static int usb_8dev_start(struct usb_8dev_priv *priv)for (i =0 ; i <MAX_RX_URBS ; i++) {struct urb *urb =NULL ;u8 *buf; +dma_addr_t buf_dma;/* create a URB, and a buffer for it */ urb =usb_alloc_urb (0 ,GFP_KERNEL );
@@ -742,7 +744,7 @@ static int usb_8dev_start(struct usb_8dev_priv *priv) } buf =usb_alloc_coherent (priv->udev,RX_BUFFER_SIZE ,GFP_KERNEL , - &urb->transfer_dma); + &buf_dma);if (!buf) {netdev_err (netdev,"No memory left for USB buffer\n" );usb_free_urb (urb);
@@ -750,6 +752,8 @@ static int usb_8dev_start(struct usb_8dev_priv *priv)break ; } + urb->transfer_dma = buf_dma; + usb_fill_bulk_urb(urb, priv->udev, usb_rcvbulkpipe(priv->udev, USB_8DEV_ENDP_DATA_RX),
@@ -767,6 +771,9 @@ static int usb_8dev_start(struct usb_8dev_priv *priv)break ; } + priv->rxbuf[i] = buf; + priv->rxbuf_dma[i] = buf_dma; +/* Drop reference, USB core will take care of freeing it */ usb_free_urb (urb); }
@@ -836,6 +843,10 @@ static void unlink_all_urbs(struct usb_8dev_priv *priv)usb_kill_anchored_urbs (&priv->rx_submitted); +for (i =0 ; i <MAX_RX_URBS ; ++i) +usb_free_coherent (priv->udev,RX_BUFFER_SIZE , + priv->rxbuf[i], priv->rxbuf_dma[i]); +usb_kill_anchored_urbs (&priv->tx_submitted);atomic_set (&priv->active_tx_urbs,0 );
drivers/net/dsa/mv88e6xxx/chip.c +1 -1
@@ -2155,7 +2155,7 @@ static int mv88e6xxx_port_vlan_leave(struct mv88e6xxx_chip *chip,int i, err;if (!vid) -return -EOPNOTSUPP ; +return 0 ; err =mv88e6xxx_vtu_get (chip, vid, &vlan);if (err)
drivers/net/ethernet/dec/tulip/winbond-840.c +2 -5
@@ -357,7 +357,7 @@ static int w840_probe1(struct pci_dev *pdev, const struct pci_device_id *ent)int i, option = find_cnt <MAX_UNITS ? options[find_cnt] :0 ;void __iomem *ioaddr; - i =pci_enable_device (pdev); + i =pcim_enable_device (pdev);if (i)return i;pci_set_master (pdev);
@@ -379,7 +379,7 @@ static int w840_probe1(struct pci_dev *pdev, const struct pci_device_id *ent) ioaddr =pci_iomap (pdev,TULIP_BAR , netdev_res_size);if (!ioaddr) - goto err_out_free_res; + goto err_out_netdev;for (i =0 ; i <3 ; i++) ((__le16 *)dev->dev_addr)[i] =cpu_to_le16 (eeprom_read (ioaddr, i));
@@ -458,8 +458,6 @@ static int w840_probe1(struct pci_dev *pdev, const struct pci_device_id *ent) err_out_cleardev:pci_iounmap (pdev, ioaddr); -err_out_free_res: -pci_release_regions (pdev); err_out_netdev:free_netdev (dev);return -ENODEV ;
@@ -1526,7 +1524,6 @@ static void w840_remove1(struct pci_dev *pdev)if (dev) {struct netdev_private *np =netdev_priv (dev);unregister_netdev (dev); -pci_release_regions (pdev);pci_iounmap (pdev, np->base_addr);free_netdev (dev); }
drivers/net/ethernet/intel/i40e/i40e_ethtool.c +5 -1
@@ -980,7 +980,7 @@ static void i40e_get_settings_link_up(struct i40e_hw *hw,default :/* if we got here and link is up something bad is afoot */ netdev_info (netdev, -"WARNING: Link is up but PHY type 0x%x is not recognized.\n" , +"WARNING: Link is up but PHY type 0x%x is not recognized, or incorrect cable is in use\n" , hw_link_info->phy_type); }
@@ -5294,6 +5294,10 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags)dev_warn (&pf->pdev->dev,"Device configuration forbids SW from starting the LLDP agent.\n" );return -EINVAL ; +case I40E_AQ_RC_EAGAIN : +dev_warn (&pf->pdev->dev, +"Stop FW LLDP agent command is still being processed, please try again in a second.\n" ); +return -EBUSY ;default : dev_warn(&pf->pdev->dev, "Starting FW LLDP agent failed: error: %s, %s\n",
drivers/net/ethernet/intel/i40e/i40e_main.c +37 -24
135 lines not on this page · raw message
drivers/net/ethernet/intel/i40e/i40e_txrx.c +50 -0
56 lines not on this page · raw message
drivers/net/ethernet/intel/i40e/i40e_txrx.h +2 -0
@@ -451,6 +451,8 @@ static inline unsigned int i40e_rx_pg_order(struct i40e_ring *ring)bool i40e_alloc_rx_buffers (struct i40e_ring *rxr,u16 cleaned_count);netdev_tx_t i40e_lan_xmit_frame (struct sk_buff *skb,struct net_device *netdev); +u16 i40e_lan_select_queue (struct net_device *netdev,struct sk_buff *skb, +struct net_device *sb_dev);void i40e_clean_tx_ring (struct i40e_ring *tx_ring);void i40e_clean_rx_ring (struct i40e_ring *rx_ring);int i40e_setup_tx_descriptors (struct i40e_ring *tx_ring);
drivers/net/ethernet/marvell/octeontx2/af/cgx.c +1 -1
@@ -1243,8 +1243,8 @@ static int cgx_lmac_init(struct cgx *cgx)/* Add reference */ cgx->lmac_idmap[lmac->lmac_id] = lmac; - cgx->mac_ops->mac_pause_frm_config (cgx, lmac->lmac_id, true);set_bit (lmac->lmac_id, &cgx->lmac_bmap); + cgx->mac_ops->mac_pause_frm_config (cgx, lmac->lmac_id, true); }return cgx_lmac_verify_fwi_version (cgx);
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c +0 -1
@@ -3587,7 +3587,6 @@ static void rvu_nix_block_freemem(struct rvu *rvu, int blkaddr, vlan = &nix_hw->txvlan;kfree (vlan->rsrc.bmap);mutex_destroy (&vlan->rsrc_lock); -devm_kfree (rvu->dev, vlan->entry2pfvf_map); mcast = &nix_hw->mcast;qmem_free (rvu->dev, mcast->mce_ctx);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c +8 -6
@@ -921,12 +921,14 @@ static int otx2_cq_init(struct otx2_nic *pfvf, u16 qidx) aq->cq.drop =RQ_DROP_LVL_CQ (pfvf->hw.rq_skid, cq->cqe_cnt); aq->cq.drop_ena =1 ; -/* Enable receive CQ backpressure */ - aq->cq.bp_ena =1 ; - aq->cq.bpid = pfvf->bpid[0 ]; +if (!is_otx2_lbkvf (pfvf->pdev)) { +/* Enable receive CQ backpressure */ + aq->cq.bp_ena =1 ; + aq->cq.bpid = pfvf->bpid[0 ]; -/* Set backpressure level is same as cq pass level */ - aq->cq.bp =RQ_PASS_LVL_CQ (pfvf->hw.rq_skid, qset->rqe_cnt); +/* Set backpressure level is same as cq pass level */ + aq->cq.bp =RQ_PASS_LVL_CQ (pfvf->hw.rq_skid, qset->rqe_cnt); + } }/* Fill AQ info */
@@ -1183,7 +1185,7 @@ static int otx2_aura_init(struct otx2_nic *pfvf, int aura_id, aq->aura.fc_hyst_bits =0 ;/* Store count on all updates */ /* Enable backpressure for RQ aura */ -if (aura_id < pfvf->hw.rqpool_cnt) { +if (aura_id < pfvf->hw.rqpool_cnt && !is_otx2_lbkvf (pfvf->pdev)) { aq->aura.bp_ena =0 ; aq->aura.nix0_bpid = pfvf->bpid[0 ];/* Set backpressure level for RQ's Aura */
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c +3 -4
@@ -292,15 +292,14 @@ static int otx2_set_channels(struct net_device *dev, err =otx2_set_real_num_queues (dev, channel->tx_count, channel->rx_count);if (err) - goto fail; +return err; pfvf->hw.rx_queues = channel->rx_count; pfvf->hw.tx_queues = channel->tx_count; pfvf->qset.cq_cnt = pfvf->hw.tx_queues + pfvf->hw.rx_queues; -fail:if (if_up) - dev->netdev_ops->ndo_open (dev); + err = dev->netdev_ops->ndo_open (dev);netdev_info (dev,"Setting num Tx rings to %d, Rx rings to %d success\n" , pfvf->hw.tx_queues, pfvf->hw.rx_queues);
@@ -404,7 +403,7 @@ static int otx2_set_ringparam(struct net_device *netdev, qs->rqe_cnt = rx_count;if (if_up) - netdev->netdev_ops->ndo_open (netdev); +return netdev->netdev_ops->ndo_open (netdev);return 0 ; }
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +5 -0
@@ -1648,6 +1648,7 @@ int otx2_open(struct net_device *netdev) err_tx_stop_queues:netif_tx_stop_all_queues (netdev);netif_carrier_off (netdev); + pf->flags |=OTX2_FLAG_INTF_DOWN ; err_free_cints:otx2_free_cints (pf, qidx); vec = pci_irq_vector(pf->pdev,
@@ -1675,6 +1676,10 @@ int otx2_stop(struct net_device *netdev)struct otx2_rss_info *rss;int qidx, vec, wrk; +/* If the DOWN flag is set resources are already freed */ +if (pf->flags &OTX2_FLAG_INTF_DOWN ) +return 0 ; +netif_carrier_off (netdev);netif_tx_stop_all_queues (netdev);
drivers/net/ethernet/mellanox/mlx4/main.c +1 -0
@@ -3535,6 +3535,7 @@ static int mlx4_load_one(struct pci_dev *pdev, int pci_dev_data,if (!SRIOV_VALID_STATE (dev->flags)) {mlx4_err (dev,"Invalid SRIOV state\n" ); + err = -EINVAL ; goto err_close; } }
drivers/net/ethernet/mellanox/mlx5/core/dev.c +1 -4
@@ -500,10 +500,7 @@ static int next_phys_dev(struct device *dev, const void *data)return 1 ; } -/* This function is called with two flows: -* 1. During initialization of mlx5_core_dev and we don't need to lock it. -* 2. During LAG configure stage and caller holds &mlx5_intf_mutex. -*/ +/* Must be called with intf_mutex held */ struct mlx5_core_dev *mlx5_get_next_phys_dev (struct mlx5_core_dev *dev) {struct auxiliary_device *adev;
drivers/net/ethernet/mellanox/mlx5/core/en/params.c +10 -1
@@ -471,6 +471,15 @@ static void mlx5e_build_rx_cq_param(struct mlx5_core_dev *mdev, param->cq_period_mode = params->rx_cq_moderation.cq_period_mode; } +static u8 rq_end_pad_mode (struct mlx5_core_dev *mdev,struct mlx5e_params *params) +{ +bool ro =pcie_relaxed_ordering_enabled (mdev->pdev) && +MLX5_CAP_GEN (mdev, relaxed_ordering_write); + +return ro && params->lro_en ? +MLX5_WQ_END_PAD_MODE_NONE :MLX5_WQ_END_PAD_MODE_ALIGN ; +} + int mlx5e_build_rq_param(struct mlx5_core_dev *mdev, struct mlx5e_params *params, struct mlx5e_xsk_param *xsk,
@@ -508,7 +517,7 @@ int mlx5e_build_rq_param(struct mlx5_core_dev *mdev, }MLX5_SET (wq, wq, wq_type, params->rq_wq_type); -MLX5_SET (wq, wq, end_padding_mode,MLX5_WQ_END_PAD_MODE_ALIGN ); +MLX5_SET (wq, wq, end_padding_mode,rq_end_pad_mode (mdev, params));MLX5_SET (wq, wq, log_wq_stride,mlx5e_get_rqwq_log_stride (params->rq_wq_type, ndsegs));MLX5_SET (wq, wq, pd, mdev->mlx5e_res.hw_objs.pdn);
drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c +1 -1
@@ -494,7 +494,7 @@ static int mlx5e_init_ptp_rq(struct mlx5e_ptp *c, struct mlx5e_params *params,int err; rq->wq_type = params->rq_wq_type; - rq->pdev = mdev->device; + rq->pdev = c->pdev; rq->netdev = priv->netdev; rq->priv = priv; rq->clock = &mdev->clock;
drivers/net/ethernet/mellanox/mlx5/core/en/trap.c +1 -1
@@ -37,7 +37,7 @@ static void mlx5e_init_trap_rq(struct mlx5e_trap *t, struct mlx5e_params *paramsstruct mlx5e_priv *priv = t->priv; rq->wq_type = params->rq_wq_type; - rq->pdev = mdev->device; + rq->pdev = t->pdev; rq->netdev = priv->netdev; rq->priv = priv; rq->clock = &mdev->clock;
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +23 -11
@@ -3825,6 +3825,24 @@ int mlx5e_set_features(struct net_device *netdev, netdev_features_t features)return 0 ; } +static netdev_features_t mlx5e_fix_uplink_rep_features (struct net_device *netdev, +netdev_features_t features) +{ + features &= ~NETIF_F_HW_TLS_RX ; +if (netdev->features &NETIF_F_HW_TLS_RX ) +netdev_warn (netdev,"Disabling hw_tls_rx, not supported in switchdev mode\n" ); + + features &= ~NETIF_F_HW_TLS_TX ; +if (netdev->features &NETIF_F_HW_TLS_TX ) +netdev_warn (netdev,"Disabling hw_tls_tx, not supported in switchdev mode\n" ); + + features &= ~NETIF_F_NTUPLE ; +if (netdev->features &NETIF_F_NTUPLE ) +netdev_warn (netdev,"Disabling ntuple, not supported in switchdev mode\n" ); + +return features; +} +static netdev_features_t mlx5e_fix_features (struct net_device *netdev,netdev_features_t features) {
@@ -3856,15 +3874,8 @@ static netdev_features_t mlx5e_fix_features(struct net_device *netdev,netdev_warn (netdev,"Disabling rxhash, not supported when CQE compress is active\n" ); } -if (mlx5e_is_uplink_rep (priv)) { - features &= ~NETIF_F_HW_TLS_RX ; -if (netdev->features &NETIF_F_HW_TLS_RX ) -netdev_warn (netdev,"Disabling hw_tls_rx, not supported in switchdev mode\n" ); - - features &= ~NETIF_F_HW_TLS_TX ; -if (netdev->features &NETIF_F_HW_TLS_TX ) -netdev_warn (netdev,"Disabling hw_tls_tx, not supported in switchdev mode\n" ); - } +if (mlx5e_is_uplink_rep (priv)) + features =mlx5e_fix_uplink_rep_features (netdev, features);mutex_unlock (&priv->state_lock);
@@ -4855,6 +4866,9 @@ static void mlx5e_build_nic_netdev(struct net_device *netdev)if (MLX5_CAP_ETH (mdev, scatter_fcs)) netdev->hw_features |=NETIF_F_RXFCS ; +if (mlx5_qos_is_supported (mdev)) + netdev->hw_features |=NETIF_F_HW_TC ; + netdev->features = netdev->hw_features;/* Defaults */
@@ -4875,8 +4889,6 @@ static void mlx5e_build_nic_netdev(struct net_device *netdev) netdev->hw_features |=NETIF_F_NTUPLE ;#endif } -if (mlx5_qos_is_supported (mdev)) - netdev->features |=NETIF_F_HW_TC ; netdev->features |=NETIF_F_HIGHDMA ; netdev->features |=NETIF_F_HW_VLAN_STAG_FILTER ;
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +31 -2
@@ -424,12 +424,32 @@ static void mlx5e_detach_mod_hdr(struct mlx5e_priv *priv,static struct mlx5_core_dev *mlx5e_hairpin_get_mdev (struct net *net,int ifindex) { +struct mlx5_core_dev *mdev;struct net_device *netdev;struct mlx5e_priv *priv; - netdev =__dev_get_by_index (net, ifindex); + netdev =dev_get_by_index (net, ifindex); +if (!netdev) +return ERR_PTR (-ENODEV ); + priv =netdev_priv (netdev); -return priv->mdev; + mdev = priv->mdev; +dev_put (netdev); + +/* Mirred tc action holds a refcount on the ifindex net_device (see +* net/sched/act_mirred.c:tcf_mirred_get_dev). So, it's okay to continue using mdev +* after dev_put(netdev), while we're in the context of adding a tc flow. +* +* The mdev pointer corresponds to the peer/out net_device of a hairpin. It is then +* stored in a hairpin object, which exists until all flows, that refer to it, get +* removed. +* +* On the other hand, after a hairpin object has been created, the peer net_device may +* be removed/unbound while there are still some hairpin flows that are using it. This +* case is handled by mlx5e_tc_hairpin_update_dead_peer, which is hooked to +* NETDEV_UNREGISTER event of the peer net_device. +*/ +return mdev; }static int mlx5e_hairpin_create_transport (struct mlx5e_hairpin *hp)
@@ -638,6 +658,10 @@ mlx5e_hairpin_create(struct mlx5e_priv *priv, struct mlx5_hairpin_params *params func_mdev = priv->mdev; peer_mdev =mlx5e_hairpin_get_mdev (dev_net (priv->netdev), peer_ifindex); +if (IS_ERR (peer_mdev)) { + err =PTR_ERR (peer_mdev); + goto create_pair_err; + } pair =mlx5_core_hairpin_create (func_mdev, peer_mdev, params);if (IS_ERR (pair)) {
@@ -776,6 +800,11 @@ static int mlx5e_hairpin_flow_add(struct mlx5e_priv *priv,int err; peer_mdev =mlx5e_hairpin_get_mdev (dev_net (priv->netdev), peer_ifindex); +if (IS_ERR (peer_mdev)) { +NL_SET_ERR_MSG_MOD (extack,"invalid ifindex of mirred device" ); +return PTR_ERR (peer_mdev); + } +if (!MLX5_CAP_GEN (priv->mdev, hairpin) || !MLX5_CAP_GEN (peer_mdev, hairpin)) {NL_SET_ERR_MSG_MOD (extack,"hairpin is not supported" );return -EOPNOTSUPP ;
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h +1 -1
@@ -629,7 +629,7 @@ struct esw_vport_tbl_namespace { };struct mlx5_vport_tbl_attr { -u16 chain; +u32 chain;u16 prio;u16 vport;const struct esw_vport_tbl_namespace *vport_ns;
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +7 -3
@@ -382,10 +382,11 @@ esw_setup_vport_dest(struct mlx5_flow_destination *dest, struct mlx5_flow_act *f { dest[dest_idx].type =MLX5_FLOW_DESTINATION_TYPE_VPORT ; dest[dest_idx].vport.num = esw_attr->dests[attr_idx].rep->vport; - dest[dest_idx].vport.vhca_id = -MLX5_CAP_GEN (esw_attr->dests[attr_idx].mdev, vhca_id); -if (MLX5_CAP_ESW (esw->dev, merged_eswitch)) +if (MLX5_CAP_ESW (esw->dev, merged_eswitch)) { + dest[dest_idx].vport.vhca_id = +MLX5_CAP_GEN (esw_attr->dests[attr_idx].mdev, vhca_id); dest[dest_idx].vport.flags |=MLX5_FLOW_DEST_VPORT_VHCA_ID ; + }if (esw_attr->dests[attr_idx].flags &MLX5_ESW_DEST_ENCAP ) {if (pkt_reformat) { flow_act->action |=MLX5_FLOW_CONTEXT_ACTION_PACKET_REFORMAT ;
@@ -2350,6 +2351,9 @@ static int mlx5_esw_offloads_devcom_event(int event,switch (event) {case ESW_OFFLOADS_DEVCOM_PAIR : +if (mlx5_get_next_phys_dev (esw->dev) != peer_esw->dev) +break ; +if (mlx5_eswitch_vport_match_metadata_enabled (esw) !=mlx5_eswitch_vport_match_metadata_enabled (peer_esw))break ;
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +6 -4
@@ -1024,17 +1024,19 @@ static int connect_fwd_rules(struct mlx5_core_dev *dev,static int connect_flow_table (struct mlx5_core_dev *dev,struct mlx5_flow_table *ft,struct fs_prio *prio) { -struct mlx5_flow_table *next_ft; +struct mlx5_flow_table *next_ft, *first_ft;int err =0 ;/* Connect_prev_fts and update_root_ft_create are mutually exclusive */ -if (list_empty (&prio->node.children)) { + first_ft =list_first_entry_or_null (&prio->node.children, + struct mlx5_flow_table, node.list); +if (!first_ft || first_ft->level > ft->level) { err =connect_prev_fts (dev, ft, prio);if (err)return err; - next_ft =find_next_chained_ft (prio); + next_ft = first_ft ? first_ft :find_next_chained_ft (prio); err =connect_fwd_rules (dev, ft, next_ft);if (err)return err;
@@ -2109,7 +2111,7 @@ static int disconnect_flow_table(struct mlx5_flow_table *ft) node.list) == ft))return 0 ; - next_ft =find_next_chained_ft (prio); + next_ft =find_next_ft (ft); err =connect_fwd_rules (dev, next_ft, ft);if (err)return err;
drivers/net/ethernet/mellanox/mlx5/core/health.c +10 -2
@@ -626,8 +626,16 @@ static void mlx5_fw_fatal_reporter_err_work(struct work_struct *work) } fw_reporter_ctx.err_synd = health->synd; fw_reporter_ctx.miss_counter = health->miss_counter; -devlink_health_report (health->fw_fatal_reporter, -"FW fatal error reported" , &fw_reporter_ctx); +if (devlink_health_report (health->fw_fatal_reporter, +"FW fatal error reported" , &fw_reporter_ctx) == -ECANCELED ) { +/* If recovery wasn't performed, due to grace period, +* unload the driver. This ensures that the driver +* closes all its resources and it is not subjected to +* requests from the kernel. +*/ +mlx5_core_err (dev,"Driver is in error state. Unloading\n" ); +mlx5_unload_one (dev); + } }static const struct devlink_health_reporter_ops mlx5_fw_fatal_reporter_ops = {
drivers/net/ethernet/pensando/ionic/ionic_lif.c +96 -101
299 lines not on this page · raw message
drivers/net/ethernet/pensando/ionic/ionic_lif.h +4 -7
@@ -108,7 +108,6 @@ struct ionic_deferred_work {struct list_head list;enum ionic_deferred_work_type type;union { -unsigned int rx_mode;u8 addr[ETH_ALEN ];u8 fw_status; };
@@ -179,6 +178,7 @@ struct ionic_lif {unsigned int index;unsigned int hw_index;struct mutex queue_lock;/* lock for queue structures */ +struct mutex config_lock;/* lock for config actions */ spinlock_t adminq_lock;/* lock for AdminQ operations */ struct ionic_qcq *adminqcq;struct ionic_qcq *notifyqcq;
@@ -199,7 +199,7 @@ struct ionic_lif {unsigned int nrxq_descs;u32 rx_copybreak;u64 rxq_features; -unsigned int rx_mode; +u16 rx_mode;u64 hw_features;bool registered;bool mc_overflow;
@@ -302,7 +302,7 @@ int ionic_lif_identify(struct ionic *ionic, u8 lif_type,int ionic_lif_size (struct ionic *ionic);#if IS_ENABLED (CONFIG_PTP_1588_CLOCK ) -int ionic_lif_hwstamp_replay (struct ionic_lif *lif); +void ionic_lif_hwstamp_replay (struct ionic_lif *lif);int ionic_lif_hwstamp_set (struct ionic_lif *lif,struct ifreq *ifr);int ionic_lif_hwstamp_get (struct ionic_lif *lif,struct ifreq *ifr);ktime_t ionic_lif_phc_ktime (struct ionic_lif *lif,u64 counter);
@@ -311,10 +311,7 @@ void ionic_lif_unregister_phc(struct ionic_lif *lif);void ionic_lif_alloc_phc (struct ionic_lif *lif);void ionic_lif_free_phc (struct ionic_lif *lif);#else -static inline int ionic_lif_hwstamp_replay (struct ionic_lif *lif) -{ -return -EOPNOTSUPP ; -} +static inline void ionic_lif_hwstamp_replay (struct ionic_lif *lif) {}static inline int ionic_lif_hwstamp_set (struct ionic_lif *lif,struct ifreq *ifr) {
drivers/net/ethernet/pensando/ionic/ionic_phc.c +7 -3
@@ -188,6 +188,9 @@ int ionic_lif_hwstamp_set(struct ionic_lif *lif, struct ifreq *ifr)struct hwtstamp_config config;int err; +if (!lif->phc || !lif->phc->ptp) +return -EOPNOTSUPP ; +if (copy_from_user (&config, ifr->ifr_data,sizeof (config)))return -EFAULT ;
@@ -203,15 +206,16 @@ int ionic_lif_hwstamp_set(struct ionic_lif *lif, struct ifreq *ifr)return 0 ; } -int ionic_lif_hwstamp_replay (struct ionic_lif *lif) +void ionic_lif_hwstamp_replay (struct ionic_lif *lif) {int err; +if (!lif->phc || !lif->phc->ptp) +return ; + err =ionic_lif_hwstamp_set_ts_config (lif,NULL );if (err)netdev_info (lif->netdev,"hwstamp replay failed: %d\n" , err); - -return err; }int ionic_lif_hwstamp_get (struct ionic_lif *lif,struct ifreq *ifr)
drivers/net/ethernet/pensando/ionic/ionic_txrx.c +25 -16
83 lines not on this page · raw message
drivers/net/ethernet/sis/sis900.c +2 -5
@@ -443,7 +443,7 @@ static int sis900_probe(struct pci_dev *pci_dev,#endif /* setup various bits in PCI command register */ - ret =pci_enable_device (pci_dev); + ret =pcim_enable_device (pci_dev);if (ret)return ret; i =dma_set_mask (&pci_dev->dev,DMA_BIT_MASK (32 ));
@@ -469,7 +469,7 @@ static int sis900_probe(struct pci_dev *pci_dev, ioaddr =pci_iomap (pci_dev,0 ,0 );if (!ioaddr) { ret = -ENOMEM ; - goto err_out_cleardev; + goto err_out; } sis_priv =netdev_priv (net_dev);
@@ -581,8 +581,6 @@ static int sis900_probe(struct pci_dev *pci_dev, sis_priv->tx_ring_dma); err_out_unmap:pci_iounmap (pci_dev, ioaddr); -err_out_cleardev: -pci_release_regions (pci_dev); err_out:free_netdev (net_dev);return ret;
@@ -2499,7 +2497,6 @@ static void sis900_remove(struct pci_dev *pci_dev) sis_priv->tx_ring_dma);pci_iounmap (pci_dev, sis_priv->ioaddr);free_netdev (net_dev); -pci_release_regions (pci_dev); }static int __maybe_unused sis900_suspend (struct device *dev)
drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c +2 -0
@@ -1249,6 +1249,7 @@ const struct stmmac_ops dwmac410_ops = { .config_l3_filter = dwmac4_config_l3_filter, .config_l4_filter = dwmac4_config_l4_filter, .est_configure = dwmac5_est_configure, + .est_irq_status = dwmac5_est_irq_status, .fpe_configure = dwmac5_fpe_configure, .fpe_send_mpacket = dwmac5_fpe_send_mpacket, .fpe_irq_status = dwmac5_fpe_irq_status,
@@ -1300,6 +1301,7 @@ const struct stmmac_ops dwmac510_ops = { .config_l3_filter = dwmac4_config_l3_filter, .config_l4_filter = dwmac4_config_l4_filter, .est_configure = dwmac5_est_configure, + .est_irq_status = dwmac5_est_irq_status, .fpe_configure = dwmac5_fpe_configure, .fpe_send_mpacket = dwmac5_fpe_send_mpacket, .fpe_irq_status = dwmac5_fpe_irq_status,
drivers/net/ethernet/sun/niu.c +2 -1
@@ -8191,8 +8191,9 @@ static int niu_pci_vpd_fetch(struct niu *np, u32 start) err =niu_pci_vpd_scan_props (np, here, end);if (err <0 )return err; +/* ret == 1 is not an error */ if (err ==1 ) -return -EINVAL ; +return 0 ; }return 0 ; }
drivers/net/phy/broadcom.c +1 -1
@@ -288,7 +288,7 @@ static void bcm54xx_adjust_rxrefclk(struct phy_device *phydev)if (phydev->dev_flags &PHY_BRCM_DIS_TXCRXC_NOENRGY ) {if (BRCM_PHY_MODEL (phydev) ==PHY_ID_BCM54210E ||BRCM_PHY_MODEL (phydev) ==PHY_ID_BCM54810 || -BRCM_PHY_MODEL (phydev) ==PHY_ID_BCM54210E ) +BRCM_PHY_MODEL (phydev) ==PHY_ID_BCM54811 ) val |=BCM54XX_SHD_SCR3_RXCTXC_DIS ;else val |=BCM54XX_SHD_SCR3_TRDDAPD ;
drivers/nfc/nfcsim.c +1 -2
@@ -192,8 +192,7 @@ static void nfcsim_recv_wq(struct work_struct *work)if (!IS_ERR (skb))dev_kfree_skb (skb); - - skb =ERR_PTR (-ENODEV ); +return ; } dev->cb (dev->nfc_digital_dev, dev->arg, skb);
drivers/platform/x86/amd-pmc.c +37 -13
103 lines not on this page · raw message
fs/block_dev.c +2 -0
@@ -812,6 +812,8 @@ static void bdev_free_inode(struct inode *inode)free_percpu (bdev->bd_stats);kfree (bdev->bd_meta_info); +if (!bdev_is_partition (bdev)) +kfree (bdev->bd_disk);kmem_cache_free (bdev_cachep,BDEV_I (inode)); }
fs/btrfs/compression.c +1 -1
@@ -353,7 +353,7 @@ static void end_compressed_bio_write(struct bio *bio)btrfs_record_physical_zoned (inode, cb->start, bio);btrfs_writepage_endio_finish_ordered (cb->compressed_pages[0 ], cb->start, cb->start + cb->len -1 , - bio->bi_status ==BLK_STS_OK ); + !cb->errors); cb->compressed_pages[0 ]->mapping =NULL ;end_compressed_writeback (inode, cb);
fs/btrfs/tree-log.c +2 -2
@@ -6492,8 +6492,8 @@ void btrfs_log_new_name(struct btrfs_trans_handle *trans,* if this inode hasn't been logged and directory we're renaming it * from hasn't been logged, we don't need to log it */ -if (inode->logged_trans < trans->transid && - (!old_dir || old_dir->logged_trans < trans->transid)) +if (!inode_logged (trans, inode) && + (!old_dir || !inode_logged (trans, old_dir)))return ;/*
fs/btrfs/volumes.c +1 -0
@@ -1078,6 +1078,7 @@ static void __btrfs_free_extra_devids(struct btrfs_fs_devices *fs_devices,if (test_bit (BTRFS_DEV_STATE_WRITEABLE , &device->dev_state)) {list_del_init (&device->dev_alloc_list);clear_bit (BTRFS_DEV_STATE_WRITEABLE , &device->dev_state); + fs_devices->rw_devices--; }list_del_init (&device->dev_list); fs_devices->num_devices--;
fs/cifs/file.c +1 -1
@@ -4631,7 +4631,7 @@ static int cifs_readpage_worker(struct file *file, struct page *page,static int cifs_readpage (struct file *file,struct page *page) { -loff_t offset = (loff_t )page->index <<PAGE_SHIFT ; +loff_t offset =page_file_offset (page);int rc = -EACCES ;unsigned int xid;
fs/ext2/dir.c +6 -6
@@ -106,12 +106,11 @@ static int ext2_commit_chunk(struct page *page, loff_t pos, unsigned len)return err; } -static bool ext2_check_page (struct page *page,int quiet) +static bool ext2_check_page (struct page *page,int quiet,char *kaddr) {struct inode *dir = page->mapping->host;struct super_block *sb = dir->i_sb;unsigned chunk_size =ext2_chunk_size (dir); -char *kaddr =page_address (page);u32 max_inumber =le32_to_cpu (EXT2_SB (sb)->s_es->s_inodes_count);unsigned offs, rec_len;unsigned limit =PAGE_SIZE ;
@@ -205,7 +204,8 @@ static struct page * ext2_get_page(struct inode *dir, unsigned long n,if (!IS_ERR (page)) { *page_addr =kmap_local_page (page);if (unlikely (!PageChecked (page))) { -if (PageError (page) || !ext2_check_page (page, quiet)) +if (PageError (page) || !ext2_check_page (page, quiet, + *page_addr)) goto fail; } }
@@ -584,10 +584,10 @@ int ext2_add_link (struct dentry *dentry, struct inode *inode)* ext2_delete_entry deletes a directory entry by merging it with the * previous entry. Page is up-to-date. */ -int ext2_delete_entry (struct ext2_dir_entry_2 * dir,struct page * page ) +int ext2_delete_entry (struct ext2_dir_entry_2 *dir,struct page *page, +char *kaddr) {struct inode *inode = page->mapping->host; -char *kaddr =page_address (page);unsigned from = ((char *)dir - kaddr) & ~(ext2_chunk_size (inode)-1 );unsigned to = ((char *)dir - kaddr) +ext2_rec_len_from_disk (dir->rec_len);
@@ -607,7 +607,7 @@ int ext2_delete_entry (struct ext2_dir_entry_2 * dir, struct page * page ) de =ext2_next_entry (de); }if (pde) - from = (char *)pde - (char *)page_address (page); + from = (char *)pde - kaddr; pos =page_offset (page) + from;lock_page (page); err =ext2_prepare_chunk (page, pos, to - from);
fs/ext2/ext2.h +2 -1
@@ -740,7 +740,8 @@ extern int ext2_inode_by_name(struct inode *dir,extern int ext2_make_empty (struct inode *,struct inode *);extern struct ext2_dir_entry_2 *ext2_find_entry (struct inode *,const struct qstr *,struct page **,void **res_page_addr); -extern int ext2_delete_entry (struct ext2_dir_entry_2 *,struct page *); +extern int ext2_delete_entry (struct ext2_dir_entry_2 *dir,struct page *page, +char *kaddr);extern int ext2_empty_dir (struct inode *);extern struct ext2_dir_entry_2 *ext2_dotdot (struct inode *dir,struct page **p,void **pa); extern void ext2_set_link(struct inode *, struct ext2_dir_entry_2 *, struct page *, void *,
fs/ext2/namei.c +2 -2
@@ -293,7 +293,7 @@ static int ext2_unlink(struct inode * dir, struct dentry *dentry) goto out; } - err =ext2_delete_entry (de, page); + err =ext2_delete_entry (de, page, page_addr);ext2_put_page (page, page_addr);if (err) goto out;
@@ -397,7 +397,7 @@ static int ext2_rename (struct user_namespace * mnt_userns, old_inode->i_ctime =current_time (old_inode);mark_inode_dirty (old_inode); -ext2_delete_entry (old_de, old_page); +ext2_delete_entry (old_de, old_page, old_page_addr);if (dir_de) {if (old_dir != new_dir)
fs/io_uring.c +23 -6
@@ -1258,8 +1258,17 @@ static void io_prep_async_link(struct io_kiocb *req) {struct io_kiocb *cur; -io_for_each_link (cur, req) -io_prep_async_work (cur); +if (req->flags &REQ_F_LINK_TIMEOUT ) { +struct io_ring_ctx *ctx = req->ctx; + +spin_lock_irq (&ctx->completion_lock); +io_for_each_link (cur, req) +io_prep_async_work (cur); +spin_unlock_irq (&ctx->completion_lock); + }else { +io_for_each_link (cur, req) +io_prep_async_work (cur); + } }static void io_queue_async_work (struct io_kiocb *req)
@@ -1890,7 +1899,7 @@ static void tctx_task_work(struct callback_head *cb)clear_bit (0 , &tctx->task_state); -while (!wq_list_empty (&tctx->task_list)) { +while (true) {struct io_ring_ctx *ctx =NULL ;struct io_wq_work_list list;struct io_wq_work_node *node;
@@ -1900,6 +1909,9 @@ static void tctx_task_work(struct callback_head *cb)INIT_WQ_LIST (&tctx->task_list);spin_unlock_irq (&tctx->task_lock); +if (wq_list_empty (&list)) +break ; + node = list.first;while (node) {struct io_wq_work_node *next = node->next;
@@ -2448,6 +2460,12 @@ static bool io_rw_should_reissue(struct io_kiocb *req)*/ if (percpu_ref_is_dying (&ctx->refs))return false; +/* +* Play it safe and assume not safe to re-import and reissue if we're +* not in the original thread group (or in task context). +*/ +if (!same_thread_group (req->task, current) || !in_task ()) +return false; return true; }#else
@@ -4909,7 +4927,6 @@ static bool io_poll_complete(struct io_kiocb *req, __poll_t mask)if (req->poll.events &EPOLLONESHOT ) flags =0 ;if (!io_cqring_fill_event (ctx, req->user_data, error, flags)) { -io_poll_remove_waitqs (req); req->poll.done = true; flags =0 ; }
@@ -4933,6 +4950,7 @@ static void io_poll_task_func(struct callback_head *cb) done =io_poll_complete (req, req->result);if (done) { +io_poll_remove_double (req);hash_del (&req->hash_node); }else { req->result =0 ;
@@ -5121,7 +5139,7 @@ static __poll_t __io_arm_poll_handler(struct io_kiocb *req, ipt->error = -EINVAL ;spin_lock_irq (&ctx->completion_lock); -if (ipt->error) +if (ipt->error || (mask && (poll->events &EPOLLONESHOT )))io_poll_remove_double (req);if (likely (poll->head)) {spin_lock (&poll->head->lock);
@@ -5192,7 +5210,6 @@ static bool io_arm_poll_handler(struct io_kiocb *req) ret =__io_arm_poll_handler (req, &apoll->poll, &ipt, mask, io_async_wake);if (ret || ipt.error) { -io_poll_remove_double (req);spin_unlock_irq (&ctx->completion_lock);return false; }
fs/ocfs2/file.c +62 -41
145 lines not on this page · raw message
fs/pipe.c +5 -5
@@ -429,20 +429,20 @@ pipe_write(struct kiocb *iocb, struct iov_iter *from)#endif /* -* Only wake up if the pipe started out empty, since -* otherwise there should be no readers waiting. +* Epoll nonsensically wants a wakeup whether the pipe +* was already empty or not. * * If it wasn't empty we try to merge new data into * the last buffer. * * That naturally merges small writes, but it also -* page-aligs the rest of the writes for large writes +* page-aligns the rest of the writes for large writes * spanning multiple pages. */ head = pipe->head; - was_empty =pipe_empty (head, pipe->tail); + was_empty = true; chars = total_len & (PAGE_SIZE -1 ); -if (chars && !was_empty) { +if (chars && !pipe_empty (head, pipe->tail)) {unsigned int mask = pipe->ring_size -1 ;struct pipe_buffer *buf = &pipe->bufs[(head -1 ) & mask];int offset = buf->offset + buf->len;
include/linux/bpf_types.h +1 -0
@@ -132,4 +132,5 @@ BPF_LINK_TYPE(BPF_LINK_TYPE_CGROUP, cgroup) BPF_LINK_TYPE(BPF_LINK_TYPE_ITER, iter)#ifdef CONFIG_NET BPF_LINK_TYPE(BPF_LINK_TYPE_NETNS, netns) +BPF_LINK_TYPE(BPF_LINK_TYPE_XDP, xdp)#endif
include/linux/bpf_verifier.h +10 -1
@@ -215,6 +215,13 @@ struct bpf_idx_pair {u32 idx; }; +struct bpf_id_pair { +u32 old; +u32 cur; +}; + +/* Maximum number of register states that can exist at once */ +#define BPF_ID_MAP_SIZE (MAX_BPF_REG + MAX_BPF_STACK / BPF_REG_SIZE)#define MAX_CALL_FRAMES 8struct bpf_verifier_state {/* call stack tracking */
@@ -333,8 +340,8 @@ struct bpf_insn_aux_data { };u64 map_key_state;/* constant (32 bit) key tracking for maps */ int ctx_field_size;/* the ctx field size for load insn, maybe 0 */ -int sanitize_stack_off;/* stack slot to be cleared */ u32 seen;/* this insn was processed by the verifier at env->pass_cnt */ +bool sanitize_stack_spill;/* subject to Spectre v4 sanitation */ bool zext_dst;/* this insn zero extends dst reg */ u8 alu_state;/* used in combination with alu_limit */
@@ -407,6 +414,7 @@ struct bpf_verifier_env {u32 used_map_cnt;/* number of used maps */ u32 used_btf_cnt;/* number of used BTF objects */ u32 id_gen;/* used to generate unique reg IDs */ +bool explore_alu_limits;bool allow_ptr_leaks;bool allow_uninit_stack;bool allow_ptr_to_map_access;
@@ -418,6 +426,7 @@ struct bpf_verifier_env {const struct bpf_line_info *prev_linfo;struct bpf_verifier_log log;struct bpf_subprog_info subprog_info[BPF_MAX_SUBPROGS +1 ]; +struct bpf_id_pair idmap_scratch[BPF_ID_MAP_SIZE ];struct {int *insn_state;int *insn_stack;
include/linux/filter.h +15 -0
@@ -73,6 +73,11 @@ struct ctl_table_header;/* unused opcode to mark call to interpreter with arguments */ #define BPF_CALL_ARGS 0xe0 +/* unused opcode to mark speculation barrier for mitigating +* Speculative Store Bypass +*/ +#define BPF_NOSPEC 0xc0 +/* As per nm, we expose JITed images as text (code) section for * kallsyms. That way, tools like perf can find it to match * addresses.
@@ -390,6 +395,16 @@ static inline bool insn_is_zext(const struct bpf_insn *insn) .off = 0, \ .imm = 0 }) +/* Speculation barrier */ + +#define BPF_ST_NOSPEC () \ + ((struct bpf_insn) { \ + .code = BPF_ST | BPF_NOSPEC, \ + .dst_reg = 0, \ + .src_reg = 0, \ + .off = 0, \ + .imm = 0 }) +/* Internal classic blocks for direct assignment */ #define __BPF_STMT (CODE ,K ) \
include/net/llc_pdu.h +23 -8
@@ -15,9 +15,11 @@#include <linux/if_ether.h> /* Lengths of frame formats */ -#define LLC_PDU_LEN_I 4/* header and 2 control bytes */ -#define LLC_PDU_LEN_S 4 -#define LLC_PDU_LEN_U 3/* header and 1 control byte */ +#define LLC_PDU_LEN_I 4/* header and 2 control bytes */ +#define LLC_PDU_LEN_S 4 +#define LLC_PDU_LEN_U 3/* header and 1 control byte */ +/* header and 1 control byte and XID info */ +#define LLC_PDU_LEN_U_XID (LLC_PDU_LEN_U + sizeof(struct llc_xid_info))/* Known SAP addresses */ #define LLC_GLOBAL_SAP 0xFF#define LLC_NULL_SAP 0x00/* not network-layer visible */
@@ -50,9 +52,10 @@#define LLC_PDU_TYPE_U_MASK 0x03/* 8-bit control field */ #define LLC_PDU_TYPE_MASK 0x03 -#define LLC_PDU_TYPE_I 0/* first bit */ -#define LLC_PDU_TYPE_S 1/* first two bits */ -#define LLC_PDU_TYPE_U 3/* first two bits */ +#define LLC_PDU_TYPE_I 0/* first bit */ +#define LLC_PDU_TYPE_S 1/* first two bits */ +#define LLC_PDU_TYPE_U 3/* first two bits */ +#define LLC_PDU_TYPE_U_XID 4/* private type for detecting XID commands */ #define LLC_PDU_TYPE_IS_I (pdu) \ ((!(pdu->ctrl_1 & LLC_PDU_TYPE_I_MASK)) ? 1 : 0)
@@ -230,9 +233,18 @@ static inline struct llc_pdu_un *llc_pdu_un_hdr(struct sk_buff *skb)static inline void llc_pdu_header_init (struct sk_buff *skb,u8 type,u8 ssap,u8 dsap,u8 cr) { -const int hlen = type ==LLC_PDU_TYPE_U ?3 :4 ; +int hlen =4 ;/* default value for I and S types */ struct llc_pdu_un *pdu; +switch (type) { +case LLC_PDU_TYPE_U : + hlen =3 ; +break ; +case LLC_PDU_TYPE_U_XID : + hlen =6 ; +break ; + } +skb_push (skb, hlen);skb_reset_network_header (skb); pdu =llc_pdu_un_hdr (skb);
@@ -374,7 +386,10 @@ static inline void llc_pdu_init_as_xid_cmd(struct sk_buff *skb, xid_info->fmt_id =LLC_XID_FMT_ID ;/* 0x81 */ xid_info->type = svcs_supported; xid_info->rw = rx_window <<1 ;/* size of receive window */ -skb_put (skb,sizeof (struct llc_xid_info )); + +/* no need to push/put since llc_pdu_header_init() has already +* pushed 3 + 3 bytes +*/ }/**
kernel/bpf/core.c +18 -1
@@ -32,6 +32,8 @@#include <linux/perf_event.h> #include <linux/extable.h> #include <linux/log2.h> + +#include <asm/barrier.h> #include <asm/unaligned.h> /* Registers */
@@ -1377,6 +1379,7 @@ static u64 ___bpf_prog_run(u64 *regs, const struct bpf_insn *insn) /* Non-UAPI available opcodes. */ [BPF_JMP | BPF_CALL_ARGS] = &&JMP_CALL_ARGS, [BPF_JMP | BPF_TAIL_CALL] = &&JMP_TAIL_CALL, + [BPF_ST | BPF_NOSPEC] = &&ST_NOSPEC, [BPF_LDX | BPF_PROBE_MEM | BPF_B] = &&LDX_PROBE_MEM_B, [BPF_LDX | BPF_PROBE_MEM | BPF_H] = &&LDX_PROBE_MEM_H, [BPF_LDX | BPF_PROBE_MEM | BPF_W] = &&LDX_PROBE_MEM_W,
@@ -1621,7 +1624,21 @@ static u64 ___bpf_prog_run(u64 *regs, const struct bpf_insn *insn) COND_JMP(s, JSGE, >=) COND_JMP(s, JSLE, <=) #undef COND_JMP - /* STX and ST and LDX*/ + /* ST, STX and LDX*/ + ST_NOSPEC: + /* Speculation barrier for mitigating Speculative Store Bypass. + * In case of arm64, we rely on the firmware mitigation as + * controlled via the ssbd kernel parameter. Whenever the + * mitigation is enabled, it works for all of the kernel code + * with no need to provide any additional instructions here. + * In case of x86, we use 'lfence' insn for mitigation. We + * reuse preexisting logic from Spectre v1 mitigation that + * happens to produce the required code on x86 for v4 as well. + */ +#ifdef CONFIG_X86 + barrier_nospec(); +#endif + CONT; #define LDST(SIZEOP, SIZE) \ STX_MEM_##SIZEOP: \ *(SIZE *)(unsigned long) (DST + insn->off) = SRC; \
kernel/bpf/disasm.c +9 -7
@@ -206,15 +206,17 @@ void print_bpf_insn(const struct bpf_insn_cbs *cbs,verbose (cbs->private_data,"BUG_%02x\n" , insn->code); } }else if (class ==BPF_ST ) { -if (BPF_MODE (insn->code) !=BPF_MEM ) { +if (BPF_MODE (insn->code) ==BPF_MEM ) { +verbose (cbs->private_data,"(%02x) *(%s *)(r%d %+d) = %d\n" , + insn->code, + bpf_ldst_string[BPF_SIZE (insn->code) >>3 ], + insn->dst_reg, + insn->off, insn->imm); + }else if (BPF_MODE (insn->code) ==0xc0 /* BPF_NOSPEC, no UAPI */ ) { +verbose (cbs->private_data,"(%02x) nospec\n" , insn->code); + }else {verbose (cbs->private_data,"BUG_st_%02x\n" , insn->code); -return ; } -verbose (cbs->private_data,"(%02x) *(%s *)(r%d %+d) = %d\n" , - insn->code, - bpf_ldst_string[BPF_SIZE (insn->code) >>3 ], - insn->dst_reg, - insn->off, insn->imm); }else if (class ==BPF_LDX ) {if (BPF_MODE (insn->code) !=BPF_MEM ) {verbose (cbs->private_data,"BUG_ldx_%02x\n" , insn->code);
kernel/bpf/verifier.c +60 -126
247 lines not on this page · raw message
tools/testing/selftests/kvm/dirty_log_perf_test.c +1 -0
Lines of this file are not shown. View the raw message.
tools/testing/selftests/vm/userfaultfd.c +1 -1
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.