Linux 6.6.118
Greg Kroah-Hartman
maintainerI'm announcing the release of the 6.6.118 kernel.
All users of the 6.6 kernel series must upgrade.
The updated 6.6.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.6.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/devicetree/bindings/pinctrl/toshiba,visconti-pinctrl.yaml | 26 +-- Makefile | 2 arch/arm64/kvm/hyp/nvhe/ffa.c | 9 - arch/loongarch/include/uapi/asm/ptrace.h | 40 ++--- arch/loongarch/pci/pci.c | 8 - arch/mips/mti-malta/malta-init.c | 20 +- arch/s390/include/asm/pgtable.h | 12 - arch/s390/mm/pgtable.c | 4 arch/x86/kernel/cpu/microcode/amd.c | 20 ++ drivers/ata/libata-scsi.c | 11 + drivers/bcma/main.c | 6 drivers/firmware/arm_scmi/scmi_pm_domain.c | 13 + drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 4 drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c | 11 - drivers/gpu/drm/nouveau/nvkm/falcon/fw.c | 2 drivers/gpu/drm/tegra/dc.c | 1 drivers/gpu/drm/tegra/dsi.c | 9 - drivers/gpu/drm/tegra/uapi.c | 7 drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c | 2 drivers/hid/hid-ids.h | 4 drivers/hid/hid-quirks.c | 13 + drivers/input/keyboard/cros_ec_keyb.c | 6 drivers/input/keyboard/imx_sc_key.c | 2 drivers/input/tablet/pegasus_notetaker.c | 9 + drivers/input/touchscreen/goodix.c | 1 drivers/mtd/mtdchar.c | 6 drivers/mtd/nand/raw/cadence-nand-controller.c | 3 drivers/net/dsa/hirschmann/hellcreek_ptp.c | 14 + drivers/net/dsa/microchip/lan937x_main.c | 1 drivers/net/ethernet/emulex/benet/be_main.c | 7 drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c | 6 drivers/net/ethernet/mellanox/mlxsw/core_linecards.c | 2 drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c | 6 drivers/net/ethernet/qlogic/qede/qede_fp.c | 5 drivers/net/ethernet/ti/netcp_core.c | 10 - drivers/nvme/host/fc.c | 15 +- drivers/nvme/host/multipath.c | 2 drivers/pinctrl/cirrus/pinctrl-cs42l43.c | 23 ++- drivers/pinctrl/nxp/pinctrl-s32cc.c | 3 drivers/platform/x86/intel/speed_select_if/isst_if_mmio.c | 4 drivers/pmdomain/imx/gpc.c | 22 +- drivers/s390/net/ctcm_mpc.c | 1 drivers/scsi/hosts.c | 5 drivers/scsi/sg.c | 10 + drivers/soc/ti/knav_dma.c | 14 - drivers/target/loopback/tcm_loop.c | 3 drivers/uio/uio_hv_generic.c | 21 ++ fs/exfat/super.c | 5 fs/f2fs/compress.c | 74 +++++----- fs/f2fs/f2fs.h | 2 fs/smb/client/cached_dir.c | 43 +++++ fs/smb/client/cifsfs.c | 2 fs/smb/client/fs_context.c | 4 include/linux/array_size.h | 13 + include/linux/ata.h | 1 include/linux/kernel.h | 7 include/linux/string.h | 1 include/net/tls.h | 6 include/net/xfrm.h | 3 kernel/bpf/trampoline.c | 4 kernel/kexec_core.c | 2 kernel/time/timer.c | 7 kernel/trace/ftrace.c | 20 +- lib/maple_tree.c | 32 ++-- mm/mempool.c | 32 +++- mm/shmem.c | 15 -- net/devlink/rate.c | 4 net/ipv4/esp4_offload.c | 6 net/ipv6/esp6_offload.c | 6 net/mptcp/options.c | 54 +++++++ net/mptcp/pm_netlink.c | 20 +- net/mptcp/protocol.c | 48 ++++-- net/mptcp/protocol.h | 3 net/mptcp/subflow.c | 8 + net/openvswitch/actions.c | 68 --------- net/openvswitch/flow_netlink.c | 64 +------- net/openvswitch/flow_netlink.h | 2 net/tls/tls_device.c | 4 net/vmw_vsock/af_vsock.c | 40 ++++- net/wireless/reg.c | 5 net/xfrm/xfrm_output.c | 6 scripts/kconfig/mconf.c | 3 scripts/kconfig/nconf.c | 3 sound/usb/mixer.c | 2 tools/testing/selftests/net/bareudp.sh | 2 tools/testing/selftests/net/mptcp/mptcp_join.sh | 8 - tools/tracing/latency/latency-collector.c | 2 87 files changed, 650 insertions(+), 406 deletions(-)
Alejandro Colomar (1):
kernel.h: Move ARRAY_SIZE() to a separate header
Aleksei Nikiforov (1):
s390/ctcm: Fix double-kfree
Alexander Wetzel (1):
wifi: cfg80211: Add missing lock in cfg80211_check_and_end_cac()
Andrey Vatoropin (1):
be2net: pass wrb_params in case of OS2BMC
Bart Van Assche (2):
scsi: sg: Do not sleep in atomic context
scsi: core: Fix a regression triggered by scsi_host_busy()
Borislav Petkov (AMD) (1):
x86/microcode/AMD: Limit Entrysign signature checking to known generations
Dan Carpenter (2):
mtdchar: fix integer overflow in read/write ioctls
Input: imx_sc_key - fix memory corruption on unload
Diogo Ivo (1):
Revert "drm/tegra: dsi: Clear enable register if powered by bootloader"
Eric Dumazet (2):
mptcp: fix race condition in mptcp_schedule_work()
mptcp: fix a race in mptcp_pm_del_add_timer()
Ewan D. Milne (2):
nvme: nvme-fc: move tagset removal to nvme_fc_delete_ctrl()
nvme: nvme-fc: Ensure ->ioerr_work is cancelled in nvme_fc_delete_ctrl()
Fabio M. De Francesco (1):
mm/mempool: replace kmap_atomic() with kmap_local_page()
Greg Kroah-Hartman (1):
Linux 6.6.118
Hamza Mahfooz (1):
scsi: target: tcm_loop: Fix segfault in tcm_loop_tpg_address_show()
Hans de Goede (1):
Input: goodix - add support for ACPI ID GDIX1003
Haotian Zhang (2):
pinctrl: cirrus: Fix fwnode leak in cs42l43_pin_probe() platform/x86/intel/speed_select_if: Convert PCIBIOS_* return codes to errnos
Heiko Carstens (1):
s390/mm: Fix __ptep_rdp() inline assembly
Henrique Carvalho (2):
smb: client: introduce close_cached_dir_locked()
smb: client: fix incomplete backport in cfids_invalidation_worker()
Huacai Chen (1):
LoongArch: Don't panic if no valid cache info for PCI
Ilya Maximets (1):
net: openvswitch: remove never-working support for setting nsh fields
Jakub Horký (2):
kconfig/mconf: Initialize the default locale at startup kconfig/nconf: Initialize the default locale at startup
Jared Kangas (2):
pinctrl: s32cc: fix uninitialized memory in s32_pinctrl_desc
pinctrl: s32cc: initialize gpio_pin_config::list after kmalloc()
Jianbo Liu (2):
xfrm: Determine inner GSO type from packet inner protocol
xfrm: Prevent locally generated packets from direct output in tunnel mode
Jiayuan Chen (2):
mptcp: Disallow MPTCP subflows from sockmap
mptcp: Fix proto fallback detection with BPF
Krzysztof Kozlowski (1):
dt-bindings: pinctrl: toshiba,visconti: Fix number of items in groups
Long Li (1):
uio_hv_generic: Set event for all channels on the device
Ma Ke (1):
drm/tegra: dc: Fix reference leak in tegra_dc_couple()
Maciej W. Rozycki (1):
MIPS: Malta: Fix !EVA SOC-it PCI MMIO
Mario Limonciello (AMD) (3):
drm/amd/display: Increase DPCD read retries drm/amd/display: Move sleep into each retry for retrieve_link_cap()
HID: amd_sfh: Stop sensor before starting
Martin Kaiser (1):
maple_tree: fix tracepoint string pointers
Matthieu Baerts (NGI0) (1):
selftests: mptcp: join: endpoints: longer transfer
Miaoqian Lin (1):
pmdomain: imx: Fix reference count leak in imx_gpc_remove
Michal Luczaj (1):
vsock: Ignore signal/timeout on connect() if already established
Mike Yuan (1):
shmem: fix tmpfs reconfiguration (remount) when noswap is set
Nam Cao (1):
nouveau/firmware: Add missing kfree() of nvkm_falcon_fw::boot
Niklas Cassel (1):
ata: libata-scsi: Fix system suspend for a security locked drive
Niravkumar L Rabara (1):
mtd: rawnand: cadence: fix DMA device NULL pointer dereference
Nishanth Menon (1):
net: ethernet: ti: netcp: Standardize knav_dma_open_channel to return NULL on error
Oleksij Rempel (1):
net: dsa: microchip: lan937x: Fix RGMII delay tuning
Paolo Abeni (5):
mptcp: fix ack generation for fallback msk
mptcp: fix premature close in case of fallback
mptcp: avoid unneeded subflow-level drops
mptcp: decouple mptcp fastclose from tcp close
mptcp: do not fallback when OoO is present
Pavel Zhigulin (3):
net: dsa: hellcreek: fix missing error handling in LED registration
net: mlxsw: linecards: fix missing error check in mlxsw_linecard_devlink_info_get()
net: qlogic/qede: fix potential out-of-bounds read in qede_tpa_cont() and qede_tpa_end()
Po-Hsu Lin (1):
selftests: net: use BASH for bareudp testing
Pradyumn Rahar (1):
net/mlx5: Clean up only new IRQ glue on request_irq() failure
Prateek Agarwal (1):
drm/tegra: Add call to put_pid()
Rafał Miłecki (1):
bcma: don't register devices disabled in OF
René Rebe (1):
ALSA: usb-audio: fix uac2 clock source at terminal parser
Sebastian Ene (1):
KVM: arm64: Check the untrusted offset in FF-A memory share
Seungjin Bae (1):
Input: pegasus-notetaker - fix potential out-of-bounds access
Shahar Shitrit (1):
net: tls: Cancel RX async resync request on rcd_delta overflow
Shaurya Rane (1):
cifs: fix memory leak in smb3_fs_context_parse_param error path
Shay Drory (1):
devlink: rate: Unset parent pointer in devl_rate_nodes_destroy
Shin'ichiro Kawasaki (1):
nvme-multipath: fix lockdep WARN due to partition scan work
Song Liu (1):
ftrace: Fix BPF fexit with livepatch
Sourabh Jain (1):
crash: fix crashkernel resource shrink
Steve French (1):
cifs: fix typo in enable_gcm_256 module parameter
Sudeep Holla (1):
pmdomain: arm: scmi: Fix genpd leak on provider registration failure
Thomas Weißschuh (1):
LoongArch: Use UAPI types in ptrace UAPI header
Tzung-Bi Shih (1):
Input: cros_ec_keyb - fix an invalid memory access
Uwe Kleine-König (1):
pmdomain: imx-gpc: Convert to platform remove callback returning void
Vlastimil Babka (1):
mm/mempool: fix poisoning order>0 pages with HIGHMEM
Yifan Zha (1):
drm/amdgpu: Skip emit de meta data on gfx11 with rs64 enabled
Yihang Li (1):
ata: libata-scsi: Add missing scsi_device_put() in ata_scsi_dev_rescan()
Yipeng Zou (1):
timers: Fix NULL function pointer race in timer_shutdown_sync()
Yongpeng Yang (1):
exfat: check return value of sb_min_blocksize in exfat_read_boot_sector
Zhang Chujun (1):
tracing/tools: Fix incorrcet short option in usage text for --threads
Zhang Heng (1):
HID: quirks: work around VID/PID conflict for 0x4c4a/0x4155
Zhiguo Niu (2):
f2fs: compress: change the first parameter of page_array_{alloc,free} to sbi
f2fs: compress: fix UAF of f2fs_inode_info in f2fs_free_dic
Zilin Guan (1):
mlxsw: spectrum: Fix memory leak in mlxsw_sp_flower_stats()
Greg Kroah-Hartman
maintainerDocumentation/devicetree/bindings/pinctrl/toshiba,visconti-pinctrl.yaml +14 -12
@@ -50,18 +50,20 @@ patternProperties: groups: description: Name of the pin group to use for the functions. - $ref: /schemas/types.yaml#/definitions/string - enum: [i2c0_grp, i2c1_grp, i2c2_grp, i2c3_grp, i2c4_grp, - i2c5_grp, i2c6_grp, i2c7_grp, i2c8_grp, - spi0_grp, spi0_cs0_grp, spi0_cs1_grp, spi0_cs2_grp, - spi1_grp, spi2_grp, spi3_grp, spi4_grp, spi5_grp, spi6_grp, - uart0_grp, uart1_grp, uart2_grp, uart3_grp, - pwm0_gpio4_grp, pwm0_gpio8_grp, pwm0_gpio12_grp, - pwm0_gpio16_grp, pwm1_gpio5_grp, pwm1_gpio9_grp, - pwm1_gpio13_grp, pwm1_gpio17_grp, pwm2_gpio6_grp, - pwm2_gpio10_grp, pwm2_gpio14_grp, pwm2_gpio18_grp, - pwm3_gpio7_grp, pwm3_gpio11_grp, pwm3_gpio15_grp, - pwm3_gpio19_grp, pcmif_out_grp, pcmif_in_grp] + items: + enum: [i2c0_grp, i2c1_grp, i2c2_grp, i2c3_grp, i2c4_grp, + i2c5_grp, i2c6_grp, i2c7_grp, i2c8_grp, + spi0_grp, spi0_cs0_grp, spi0_cs1_grp, spi0_cs2_grp, + spi1_grp, spi2_grp, spi3_grp, spi4_grp, spi5_grp, spi6_grp, + uart0_grp, uart1_grp, uart2_grp, uart3_grp, + pwm0_gpio4_grp, pwm0_gpio8_grp, pwm0_gpio12_grp, + pwm0_gpio16_grp, pwm1_gpio5_grp, pwm1_gpio9_grp, + pwm1_gpio13_grp, pwm1_gpio17_grp, pwm2_gpio6_grp, + pwm2_gpio10_grp, pwm2_gpio14_grp, pwm2_gpio18_grp, + pwm3_gpio7_grp, pwm3_gpio11_grp, pwm3_gpio15_grp, + pwm3_gpio19_grp, pcmif_out_grp, pcmif_in_grp] + minItems: 1 + maxItems: 8 drive-strength: enum: [2, 4, 6, 8, 16, 24, 32]
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 6 -SUBLEVEL = 117 +SUBLEVEL = 118 EXTRAVERSION = NAME = Pinguïn Aangedreven
arch/arm64/kvm/hyp/nvhe/ffa.c +7 -2
@@ -425,7 +425,7 @@ static void __do_ffa_mem_xfer(const u64 func_id,DECLARE_REG (u32, npages_mbz, ctxt,4 );struct ffa_composite_mem_region *reg;struct ffa_mem_region *buf; -u32 offset, nr_ranges; +u32 offset, nr_ranges, checked_offset;int ret =0 ; if (addr_mbz || npages_mbz || fraglen > len ||
@@ -460,7 +460,12 @@ static void __do_ffa_mem_xfer(const u64 func_id, goto out_unlock; } -if (fraglen < offset +sizeof (struct ffa_composite_mem_region )) { +if (check_add_overflow (offset,sizeof (struct ffa_composite_mem_region ), &checked_offset)) { + ret =FFA_RET_INVALID_PARAMETERS ; + goto out_unlock; + } + +if (fraglen < checked_offset) { ret =FFA_RET_INVALID_PARAMETERS ; goto out_unlock; }
arch/loongarch/include/uapi/asm/ptrace.h +18 -22
@@ -10,10 +10,6 @@#include <linux/types.h> -#ifndef __KERNEL__ -#include <stdint.h> -#endif -/* * For PTRACE_{POKE,PEEK}USR. 0 - 31 are GPRs, * 32 is syscall's original ARG0, 33 is PC, 34 is BADVADDR.
@@ -41,44 +37,44 @@ struct user_pt_regs { } __attribute__((aligned(8)));struct user_fp_state { -uint64_t fpr[32 ]; -uint64_t fcc; -uint32_t fcsr; +__u64 fpr[32 ]; +__u64 fcc; +__u32 fcsr; };struct user_lsx_state {/* 32 registers, 128 bits width per register. */ -uint64_t vregs[32 *2 ]; +__u64 vregs[32 *2 ]; };struct user_lasx_state {/* 32 registers, 256 bits width per register. */ -uint64_t vregs[32 *4 ]; +__u64 vregs[32 *4 ]; };struct user_lbt_state { -uint64_t scr[4 ]; -uint32_t eflags; -uint32_t ftop; +__u64 scr[4 ]; +__u32 eflags; +__u32 ftop; };struct user_watch_state { -uint64_t dbg_info; +__u64 dbg_info;struct { -uint64_t addr; -uint64_t mask; -uint32_t ctrl; -uint32_t pad; +__u64 addr; +__u64 mask; +__u32 ctrl; +__u32 pad; } dbg_regs[8 ]; };struct user_watch_state_v2 { -uint64_t dbg_info; +__u64 dbg_info;struct { -uint64_t addr; -uint64_t mask; -uint32_t ctrl; -uint32_t pad; +__u64 addr; +__u64 mask; +__u32 ctrl; +__u32 pad; } dbg_regs[14 ]; };
arch/loongarch/pci/pci.c +4 -4
@@ -51,11 +51,11 @@ static int __init pcibios_init(void)*/ lsize =cpu_last_level_cache_line_size (); -BUG_ON (!lsize); +if (lsize) { + pci_dfl_cache_line_size = lsize >>2 ; - pci_dfl_cache_line_size = lsize >>2 ; - -pr_debug ("PCI: pci_cache_line_size set to %d bytes\n" , lsize); +pr_debug ("PCI: pci_cache_line_size set to %d bytes\n" , lsize); + }return 0 ; }
arch/mips/mti-malta/malta-init.c +13 -7
@@ -241,16 +241,22 @@ void __init prom_init(void)#endif /* -* Setup the Malta max (2GB) memory for PCI DMA in host bridge -* in transparent addressing mode. +* Set up memory mapping in host bridge for PCI DMA masters, +* in transparent addressing mode. For EVA use the Malta +* maximum of 2 GiB memory in the alias space at 0x80000000 +* as per PHYS_OFFSET. Otherwise use 256 MiB of memory in +* the regular space, avoiding mapping the PCI MMIO window +* for DMA as it seems to confuse the system controller's +* logic, causing PCI MMIO to stop working. */ - mask =PHYS_OFFSET |PCI_BASE_ADDRESS_MEM_PREFETCH ; -MSC_WRITE (MSC01_PCI_BAR0 , mask); -MSC_WRITE (MSC01_PCI_HEAD4 , mask); + mask =PHYS_OFFSET ?PHYS_OFFSET :0xf0000000 ; +MSC_WRITE (MSC01_PCI_BAR0 , + mask |PCI_BASE_ADDRESS_MEM_PREFETCH ); +MSC_WRITE (MSC01_PCI_HEAD4 , +PHYS_OFFSET |PCI_BASE_ADDRESS_MEM_PREFETCH ); - mask &=MSC01_PCI_BAR0_SIZE_MSK ;MSC_WRITE (MSC01_PCI_P2SCMSKL , mask); -MSC_WRITE (MSC01_PCI_P2SCMAPL , mask); +MSC_WRITE (MSC01_PCI_P2SCMAPL ,PHYS_OFFSET );/* Don't handle target retries indefinitely. */ if ((data & MSC01_PCI_CFG_MAXRTRY_MSK) ==
arch/s390/include/asm/pgtable.h +5 -7
@@ -1065,17 +1065,15 @@ static inline pte_t pte_mkhuge(pte_t pte)#define IPTE_NODAT 0x400#define IPTE_GUEST_ASCE 0x800 -static __always_inline void __ptep_rdp(unsigned long addr, pte_t *ptep, -unsigned long opt,unsigned long asce, -int local) +static __always_inline void __ptep_rdp(unsigned long addr, pte_t *ptep, int local) {unsigned long pto; pto =__pa (ptep) & ~(PTRS_PER_PTE *sizeof (pte_t) -1 ); - asmvolatile (".insn rrf,0xb98b0000,%[r1],%[r2],%[asce],%[m4]" + asmvolatile (".insn rrf,0xb98b0000,%[r1],%[r2],%%r0,%[m4]" :"+m" (*ptep) - : [r1]"a" (pto), [r2]"a" ((addr &PAGE_MASK ) | opt), - [asce]"a" (asce), [m4]"i" (local)); + : [r1]"a" (pto), [r2]"a" (addr &PAGE_MASK ), + [m4]"i" (local)); } static __always_inline void __ptep_ipte(unsigned long address, pte_t *ptep,
@@ -1259,7 +1257,7 @@ static inline void flush_tlb_fix_spurious_fault(struct vm_area_struct *vma,* A local RDP can be used to do the flush. */ if (MACHINE_HAS_RDP && !(pte_val (*ptep) & _PAGE_PROTECT)) -__ptep_rdp (address, ptep,0 ,0 ,1 ); +__ptep_rdp (address, ptep,1 ); }#define flush_tlb_fix_spurious_fault flush_tlb_fix_spurious_fault
arch/s390/mm/pgtable.c +2 -2
@@ -312,9 +312,9 @@ void ptep_reset_dat_prot(struct mm_struct *mm, unsigned long addr, pte_t *ptep,preempt_disable ();atomic_inc (&mm->context.flush_count);if (cpumask_equal (mm_cpumask (mm),cpumask_of (smp_processor_id ()))) -__ptep_rdp (addr, ptep,0 ,0 ,1 ); +__ptep_rdp (addr, ptep,1 );else -__ptep_rdp (addr, ptep,0 ,0 ,0 ); +__ptep_rdp (addr, ptep,0 );/* * PTE is not invalidated by RDP, only _PAGE_PROTECT is cleared. That * means it is still valid and active, and must not be changed according
arch/x86/kernel/cpu/microcode/amd.c +19 -1
@@ -226,6 +226,24 @@ static bool need_sha_check(u32 cur_rev)return true; } +static bool cpu_has_entrysign (void ) +{ +unsigned int fam =x86_family (bsp_cpuid_1_eax); +unsigned int model =x86_model (bsp_cpuid_1_eax); + +if (fam ==0x17 || fam ==0x19 ) +return true; + +if (fam ==0x1a ) { +if (model <=0x2f || + (0x40 <= model && model <=0x4f ) || + (0x60 <= model && model <=0x6f )) +return true; + } + +return false; +} +static bool verify_sha256_digest (u32 patch_id,u32 cur_rev,const u8 *data,unsigned int len) {struct patch_digest *pd =NULL ;
@@ -233,7 +251,7 @@ static bool verify_sha256_digest(u32 patch_id, u32 cur_rev, const u8 *data, unsistruct sha256_state s;int i; -if (x86_family (bsp_cpuid_1_eax) <0x17 ) +if (!cpu_has_entrysign ())return true;if (!need_sha_check (cur_rev))
drivers/ata/libata-scsi.c +10 -1
@@ -992,6 +992,13 @@ static void ata_gen_ata_sense(struct ata_queued_cmd *qc)return ; } +if (ata_id_is_locked (dev->id)) { +/* Security locked */ +/* LOGICAL UNIT ACCESS NOT AUTHORIZED */ +ata_scsi_set_sense (dev, cmd,DATA_PROTECT ,0x74 ,0x71 ); +return ; + } +if (!(qc->flags &ATA_QCFLAG_RTF_FILLED )) {ata_dev_dbg (dev,"Missing result TF: reporting aborted command\n" );
@@ -4831,8 +4838,10 @@ void ata_scsi_dev_rescan(struct work_struct *work)spin_unlock_irqrestore (ap->lock, flags);if (do_resume) { ret =scsi_resume_device (sdev); -if (ret == -EWOULDBLOCK ) +if (ret == -EWOULDBLOCK ) { +scsi_device_put (sdev); goto unlock_scan; + } dev->flags &= ~ATA_DFLAG_RESUMING ; } ret =scsi_rescan_device (sdev);
drivers/bcma/main.c +6 -0
@@ -294,6 +294,8 @@ static int bcma_register_devices(struct bcma_bus *bus)int err;list_for_each_entry (core, &bus->cores, list) { +struct device_node *np; +/* We support that core ourselves */ switch (core->id.id) {case BCMA_CORE_4706_CHIPCOMMON :
@@ -311,6 +313,10 @@ static int bcma_register_devices(struct bcma_bus *bus)if (bcma_is_core_needed_early (core->id.id))continue ; + np = core->dev.of_node; +if (np && !of_device_is_available (np)) +continue ; +/* Only first GMAC core on BCM4706 is connected and working */ if (core->id.id ==BCMA_CORE_4706_MAC_GBIT && core->core_unit >0 )
drivers/firmware/arm_scmi/scmi_pm_domain.c +11 -2
@@ -54,7 +54,7 @@ static int scmi_pd_power_off(struct generic_pm_domain *domain)static int scmi_pm_domain_probe (struct scmi_device *sdev) { -int num_domains, i; +int num_domains, i, ret;struct device *dev = &sdev->dev;struct device_node *np = dev->of_node;struct scmi_pm_domain *scmi_pd;
@@ -112,9 +112,18 @@ static int scmi_pm_domain_probe(struct scmi_device *sdev) scmi_pd_data->domains = domains; scmi_pd_data->num_domains = num_domains; + ret =of_genpd_add_provider_onecell (np, scmi_pd_data); +if (ret) + goto err_rm_genpds; +dev_set_drvdata (dev, scmi_pd_data); -return of_genpd_add_provider_onecell (np, scmi_pd_data); +return 0 ; +err_rm_genpds: +for (i = num_domains -1 ; i >=0 ; i--) +pm_genpd_remove (domains[i]); + +return ret; }static void scmi_pm_domain_remove (struct scmi_device *sdev)
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +2 -2
@@ -5296,9 +5296,9 @@ static void gfx_v11_0_ring_emit_ib_gfx(struct amdgpu_ring *ring,if (flags &AMDGPU_IB_PREEMPTED ) control |=INDIRECT_BUFFER_PRE_RESUME (1 ); -if (vmid) +if (vmid && !ring->adev->gfx.rs64_enable)gfx_v11_0_ring_emit_de_meta (ring, - (!amdgpu_sriov_vf (ring->adev) && flags &AMDGPU_IB_PREEMPTED ) ? true : false); + !amdgpu_sriov_vf (ring->adev) && (flags &AMDGPU_IB_PREEMPTED )); }if (ring->is_mes_queue)
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c +6 -5
@@ -1552,7 +1552,7 @@ static bool retrieve_link_cap(struct dc_link *link)union edp_configuration_cap edp_config_cap;union dp_downstream_port_present ds_port = {0 };enum dc_status status =DC_ERROR_UNEXPECTED ; -uint32_t read_dpcd_retry_cnt =3 ; +uint32_t read_dpcd_retry_cnt =20 ;int i;struct dp_sink_hw_fw_revision dp_hw_fw_revision;const uint32_t post_oui_delay =30 ;// 30ms
@@ -1598,12 +1598,13 @@ static bool retrieve_link_cap(struct dc_link *link) status =dpcd_get_tunneling_device_data (link);dpcd_set_source_specific_data (link); -/* Sink may need to configure internals based on vendor, so allow some -* time before proceeding with possibly vendor specific transactions -*/ -msleep (post_oui_delay);for (i =0 ; i < read_dpcd_retry_cnt; i++) { +/* +* Sink may need to configure internals based on vendor, so allow some +* time before proceeding with possibly vendor specific transactions +*/ +msleep (post_oui_delay); status = core_link_read_dpcd( link, DP_DPCD_REV,
drivers/gpu/drm/nouveau/nvkm/falcon/fw.c +2 -0
@@ -159,6 +159,8 @@ nvkm_falcon_fw_dtor(struct nvkm_falcon_fw *fw)nvkm_memory_unref (&fw->inst);nvkm_falcon_fw_dtor_sigs (fw);nvkm_firmware_dtor (&fw->fw); +kfree (fw->boot); + fw->boot =NULL ; } static const struct nvkm_firmware_func
drivers/gpu/drm/tegra/dc.c +1 -0
@@ -3140,6 +3140,7 @@ static int tegra_dc_couple(struct tegra_dc *dc) dc->client.parent = &parent->client;dev_dbg (dc->dev,"coupled to %s\n" ,dev_name (companion)); +put_device (companion); }return 0 ;
drivers/gpu/drm/tegra/dsi.c +0 -9
@@ -912,15 +912,6 @@ static void tegra_dsi_encoder_enable(struct drm_encoder *encoder)u32 value;int err; -/* If the bootloader enabled DSI it needs to be disabled -* in order for the panel initialization commands to be -* properly sent. -*/ - value =tegra_dsi_readl (dsi,DSI_POWER_CONTROL ); - -if (value &DSI_POWER_CONTROL_ENABLE ) -tegra_dsi_disable (dsi); - err =tegra_dsi_prepare (dsi);if (err <0 ) {dev_err (dsi->dev,"failed to prepare: %d\n" , err);
drivers/gpu/drm/tegra/uapi.c +5 -2
@@ -114,9 +114,12 @@ int tegra_drm_ioctl_channel_open(struct drm_device *drm, void *data, struct drm_if (err) goto put_channel; -if (supported) +if (supported) { +struct pid *pid =get_task_pid (current,PIDTYPE_TGID ); context->memory_context =host1x_memory_context_alloc ( - host, client->base.dev,get_task_pid (current,PIDTYPE_TGID )); + host, client->base.dev, pid); +put_pid (pid); + }if (IS_ERR (context->memory_context)) {if (PTR_ERR (context->memory_context) != -EOPNOTSUPP ) {
drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c +2 -0
@@ -163,6 +163,8 @@ static int amd_sfh1_1_hid_client_init(struct amd_mp2_dev *privdata)if (rc) goto cleanup; + mp2_ops->stop (privdata, cl_data->sensor_idx[i]); +amd_sfh_wait_for_response (privdata, cl_data->sensor_idx[i],DISABLE_SENSOR );writel (0 , privdata->mmio +AMD_P2C_MSG (0 )); mp2_ops->start (privdata, info); status = amd_sfh_wait_for_response
drivers/hid/hid-ids.h +2 -2
@@ -1511,7 +1511,7 @@#define USB_VENDOR_ID_SIGNOTEC 0x2133#define USB_DEVICE_ID_SIGNOTEC_VIEWSONIC_PD1011 0x0018 -#define USB_VENDOR_ID_SMARTLINKTECHNOLOGY 0x4c4a -#define USB_DEVICE_ID_SMARTLINKTECHNOLOGY_4155 0x4155 +#define USB_VENDOR_ID_JIELI_SDK_DEFAULT 0x4c4a +#define USB_DEVICE_ID_JIELI_SDK_4155 0x4155#endif
drivers/hid/hid-quirks.c +12 -1
@@ -900,7 +900,6 @@ static const struct hid_device_id hid_ignore_list[] = {#endif { HID_USB_DEVICE(USB_VENDOR_ID_YEALINK, USB_DEVICE_ID_YEALINK_P1K_P4K_B2K) }, { HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_HP_5MP_CAMERA_5473) }, - { HID_USB_DEVICE(USB_VENDOR_ID_SMARTLINKTECHNOLOGY, USB_DEVICE_ID_SMARTLINKTECHNOLOGY_4155) }, { } };
@@ -1057,6 +1056,18 @@ bool hid_ignore(struct hid_device *hdev) strlen(elan_acpi_id[i].id)))return true;break ; +case USB_VENDOR_ID_JIELI_SDK_DEFAULT : +/* +* Multiple USB devices with identical IDs (mic & touchscreen). +* The touch screen requires hid core processing, but the +* microphone does not. They can be distinguished by manufacturer +* and serial number. +*/ +if (hdev->product ==USB_DEVICE_ID_JIELI_SDK_4155 && +strncmp (hdev->name,"SmartlinkTechnology" ,19 ) ==0 && +strncmp (hdev->uniq,"20201111000001" ,14 ) ==0 ) +return true; +break ; } if (hdev->type == HID_TYPE_USBMOUSE &&
drivers/input/keyboard/cros_ec_keyb.c +6 -0
@@ -263,6 +263,12 @@ static int cros_ec_keyb_work(struct notifier_block *nb,case EC_MKBP_EVENT_KEY_MATRIX :pm_wakeup_event (ckdev->dev,0 ); +if (!ckdev->idev) { +dev_warn_once (ckdev->dev, +"Unexpected key matrix event\n" ); +return NOTIFY_OK ; + } +if (ckdev->ec->event_size != ckdev->cols) {dev_err (ckdev->dev,"Discarded incomplete key matrix event.\n" );
drivers/input/keyboard/imx_sc_key.c +1 -1
@@ -158,7 +158,7 @@ static int imx_sc_key_probe(struct platform_device *pdev)return error; } - error =devm_add_action_or_reset (&pdev->dev, imx_sc_key_action, &priv); + error =devm_add_action_or_reset (&pdev->dev, imx_sc_key_action, priv);if (error)return error;
drivers/input/tablet/pegasus_notetaker.c +9 -0
@@ -63,6 +63,9 @@#define BUTTON_PRESSED 0xb5#define COMMAND_VERSION 0xa9 +/* 1 Status + 1 Color + 2 X + 2 Y = 6 bytes */ +#define NOTETAKER_PACKET_SIZE 6 +/* in xy data packet */ #define BATTERY_NO_REPORT 0x40#define BATTERY_LOW 0x41
@@ -303,6 +306,12 @@ static int pegasus_probe(struct usb_interface *intf, } pegasus->data_len =usb_maxpacket (dev, pipe); +if (pegasus->data_len <NOTETAKER_PACKET_SIZE ) { +dev_err (&intf->dev,"packet size is too small (%d)\n" , + pegasus->data_len); + error = -EINVAL ; + goto err_free_mem; + } pegasus->data =usb_alloc_coherent (dev, pegasus->data_len,GFP_KERNEL , &pegasus->data_dma);
drivers/input/touchscreen/goodix.c +1 -0
@@ -1519,6 +1519,7 @@ MODULE_DEVICE_TABLE(i2c, goodix_ts_id);static const struct acpi_device_id goodix_acpi_match[] = { {"GDIX1001" ,0 }, {"GDIX1002" ,0 }, + {"GDIX1003" ,0 }, {"GDX9110" ,0 }, { } };
drivers/mtd/mtdchar.c +4 -2
@@ -599,6 +599,7 @@ mtdchar_write_ioctl(struct mtd_info *mtd, struct mtd_write_req __user *argp)uint8_t *datbuf =NULL , *oobbuf =NULL ;size_t datbuf_len, oobbuf_len;int ret =0 ; +u64 end;if (copy_from_user (&req, argp,sizeof (req)))return -EFAULT ;
@@ -618,7 +619,7 @@ mtdchar_write_ioctl(struct mtd_info *mtd, struct mtd_write_req __user *argp) req.len &=0xffffffff ; req.ooblen &=0xffffffff ; -if (req.start + req.len > mtd->size) +if (check_add_overflow (req.start, req.len, &end) || end > mtd->size)return -EINVAL ; datbuf_len =min_t (size_t, req.len, mtd->erasesize);
@@ -698,6 +699,7 @@ mtdchar_read_ioctl(struct mtd_info *mtd, struct mtd_read_req __user *argp)size_t datbuf_len, oobbuf_len;size_t orig_len, orig_ooblen;int ret =0 ; +u64 end;if (copy_from_user (&req, argp,sizeof (req)))return -EFAULT ;
@@ -724,7 +726,7 @@ mtdchar_read_ioctl(struct mtd_info *mtd, struct mtd_read_req __user *argp) req.len &=0xffffffff ; req.ooblen &=0xffffffff ; -if (req.start + req.len > mtd->size) { +if (check_add_overflow (req.start, req.len, &end) || end > mtd->size) { ret = -EINVAL ; goto out; }
drivers/mtd/nand/raw/cadence-nand-controller.c +2 -1
@@ -2876,7 +2876,7 @@ cadence_nand_irq_cleanup(int irqnum, struct cdns_nand_ctrl *cdns_ctrl)static int cadence_nand_init (struct cdns_nand_ctrl *cdns_ctrl) {dma_cap_mask_t mask; -struct dma_device *dma_dev = cdns_ctrl->dmac->device; +struct dma_device *dma_dev;int ret; cdns_ctrl->cdma_desc = dma_alloc_coherent(cdns_ctrl->dev,
@@ -2920,6 +2920,7 @@ static int cadence_nand_init(struct cdns_nand_ctrl *cdns_ctrl) } } + dma_dev = cdns_ctrl->dmac->device; cdns_ctrl->io.iova_dma =dma_map_resource (dma_dev->dev, cdns_ctrl->io.dma, cdns_ctrl->io.size,DMA_BIDIRECTIONAL ,0 );
drivers/net/dsa/hirschmann/hellcreek_ptp.c +12 -2
@@ -371,8 +371,18 @@ static int hellcreek_led_setup(struct hellcreek *hellcreek)hellcreek_set_brightness (hellcreek,STATUS_OUT_IS_GM ,1 );/* Register both leds */ -led_classdev_register (hellcreek->dev, &hellcreek->led_sync_good); -led_classdev_register (hellcreek->dev, &hellcreek->led_is_gm); + ret =led_classdev_register (hellcreek->dev, &hellcreek->led_sync_good); +if (ret) { +dev_err (hellcreek->dev,"Failed to register sync_good LED\n" ); + goto out; + } + + ret =led_classdev_register (hellcreek->dev, &hellcreek->led_is_gm); +if (ret) { +dev_err (hellcreek->dev,"Failed to register is_gm LED\n" ); +led_classdev_unregister (&hellcreek->led_sync_good); + goto out; + } ret =0 ;
drivers/net/dsa/microchip/lan937x_main.c +1 -0
@@ -336,6 +336,7 @@ static void lan937x_set_tune_adj(struct ksz_device *dev, int port,ksz_pread16 (dev, port, reg, &data16);/* Update tune Adjust */ + data16 &= ~PORT_TUNE_ADJ ; data16 |=FIELD_PREP (PORT_TUNE_ADJ , val);ksz_pwrite16 (dev, port, reg, data16);
drivers/net/ethernet/emulex/benet/be_main.c +4 -3
@@ -1296,7 +1296,8 @@ static void be_xmit_flush(struct be_adapter *adapter, struct be_tx_obj *txo) (adapter->bmc_filt_mask & BMC_FILT_MULTICAST)static bool be_send_pkt_to_bmc (struct be_adapter *adapter, -struct sk_buff **skb) +struct sk_buff **skb, +struct be_wrb_params *wrb_params) {struct ethhdr *eh = (struct ethhdr *)(*skb)->data;bool os2bmc = false;
@@ -1360,7 +1361,7 @@ static bool be_send_pkt_to_bmc(struct be_adapter *adapter,* to BMC, asic expects the vlan to be inline in the packet. */ if (os2bmc) - *skb =be_insert_vlan_in_pkt (adapter, *skb,NULL ); + *skb =be_insert_vlan_in_pkt (adapter, *skb, wrb_params);return os2bmc; }
@@ -1387,7 +1388,7 @@ static netdev_tx_t be_xmit(struct sk_buff *skb, struct net_device *netdev)/* if os2bmc is enabled and if the pkt is destined to bmc, * enqueue the pkt a 2nd time with mgmt bit set. */ -if (be_send_pkt_to_bmc (adapter, &skb)) { +if (be_send_pkt_to_bmc (adapter, &skb, &wrb_params)) {BE_WRB_F_SET (wrb_params.features,OS2BMC ,1 ); wrb_cnt =be_xmit_enqueue (adapter, txo, skb, &wrb_params);if (unlikely (!wrb_cnt))
drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c +2 -4
@@ -323,10 +323,8 @@ struct mlx5_irq *mlx5_irq_alloc(struct mlx5_irq_pool *pool, int i,free_irq (irq->map.virq, &irq->nh); err_req_irq:#ifdef CONFIG_RFS_ACCEL -if (i && rmap && *rmap) { -free_irq_cpu_rmap (*rmap); - *rmap =NULL ; - } +if (i && rmap && *rmap) +irq_cpu_rmap_remove (*rmap, irq->map.virq); err_irq_rmap:#endif if (i &&pci_msix_can_alloc_dyn (dev->pdev))
drivers/net/ethernet/mellanox/mlxsw/core_linecards.c +2 -0
@@ -601,6 +601,8 @@ int mlxsw_linecard_devlink_info_get(struct mlxsw_linecard *linecard, err =devlink_info_version_fixed_put (req,DEVLINK_INFO_VERSION_GENERIC_FW_PSID , info->psid); +if (err) + goto unlock;sprintf (buf,"%u.%u.%u" , info->fw_major, info->fw_minor, info->fw_sub_minor);
drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c +4 -2
@@ -816,8 +816,10 @@ int mlxsw_sp_flower_stats(struct mlxsw_sp *mlxsw_sp,return -EINVAL ; rule =mlxsw_sp_acl_rule_lookup (mlxsw_sp, ruleset, f->cookie); -if (!rule) -return -EINVAL ; +if (!rule) { + err = -EINVAL ; + goto err_rule_get_stats; + } err =mlxsw_sp_acl_rule_get_stats (mlxsw_sp, rule, &packets, &bytes, &drops, &lastuse, &used_hw_stats);
drivers/net/ethernet/qlogic/qede/qede_fp.c +3 -2
@@ -4,6 +4,7 @@* Copyright (c) 2019-2020 Marvell International Ltd. */ +#include <linux/array_size.h> #include <linux/netdevice.h> #include <linux/etherdevice.h> #include <linux/skbuff.h>
@@ -960,7 +961,7 @@ static inline void qede_tpa_cont(struct qede_dev *edev, {int i; -for (i =0 ; cqe->len_list[i]; i++) +for (i =0 ; cqe->len_list[i] && i <ARRAY_SIZE (cqe->len_list); i++)qede_fill_frag_skb (edev, rxq, cqe->tpa_agg_index,le16_to_cpu (cqe->len_list[i]));
@@ -985,7 +986,7 @@ static int qede_tpa_end(struct qede_dev *edev,dma_unmap_page (rxq->dev, tpa_info->buffer.mapping,PAGE_SIZE , rxq->data_direction); -for (i =0 ; cqe->len_list[i]; i++) +for (i =0 ; cqe->len_list[i] && i <ARRAY_SIZE (cqe->len_list); i++)qede_fill_frag_skb (edev, rxq, cqe->tpa_agg_index,le16_to_cpu (cqe->len_list[i]));if (unlikely (i >1 ))
drivers/net/ethernet/ti/netcp_core.c +5 -5
@@ -1338,10 +1338,10 @@ int netcp_txpipe_open(struct netcp_tx_pipe *tx_pipe) tx_pipe->dma_channel =knav_dma_open_channel (dev, tx_pipe->dma_chan_name, &config); -if (IS_ERR (tx_pipe->dma_channel)) { +if (!tx_pipe->dma_channel) {dev_err (dev,"failed opening tx chan(%s)\n" , tx_pipe->dma_chan_name); - ret =PTR_ERR (tx_pipe->dma_channel); + ret = -EINVAL ; goto err; }
@@ -1359,7 +1359,7 @@ int netcp_txpipe_open(struct netcp_tx_pipe *tx_pipe)return 0 ; err: -if (!IS_ERR_OR_NULL (tx_pipe->dma_channel)) +if (tx_pipe->dma_channel)knav_dma_close_channel (tx_pipe->dma_channel); tx_pipe->dma_channel =NULL ;return ret;
@@ -1678,10 +1678,10 @@ static int netcp_setup_navigator_resources(struct net_device *ndev) netcp->rx_channel =knav_dma_open_channel (netcp->netcp_device->device, netcp->dma_chan_name, &config); -if (IS_ERR (netcp->rx_channel)) { +if (!netcp->rx_channel) {dev_err (netcp->ndev_dev,"failed opening rx chan(%s\n" , netcp->dma_chan_name); - ret =PTR_ERR (netcp->rx_channel); + ret = -EINVAL ; goto fail; }
drivers/nvme/host/fc.c +8 -7
@@ -2349,17 +2349,11 @@ nvme_fc_ctrl_free(struct kref *ref) container_of(ref, struct nvme_fc_ctrl, ref);unsigned long flags; -if (ctrl->ctrl.tagset) -nvme_remove_io_tag_set (&ctrl->ctrl); -/* remove from rport list */ spin_lock_irqsave (&ctrl->rport->lock, flags);list_del (&ctrl->ctrl_list);spin_unlock_irqrestore (&ctrl->rport->lock, flags); -nvme_unquiesce_admin_queue (&ctrl->ctrl); -nvme_remove_admin_tag_set (&ctrl->ctrl); -kfree (ctrl->queues);put_device (ctrl->dev);
@@ -3248,13 +3242,20 @@ nvme_fc_delete_ctrl(struct nvme_ctrl *nctrl) {struct nvme_fc_ctrl *ctrl =to_fc_ctrl (nctrl); -cancel_work_sync (&ctrl->ioerr_work);cancel_delayed_work_sync (&ctrl->connect_work); +/* * kill the association on the link side. this will block * waiting for io to terminate */ nvme_fc_delete_association (ctrl); +cancel_work_sync (&ctrl->ioerr_work); + +if (ctrl->ctrl.tagset) +nvme_remove_io_tag_set (&ctrl->ctrl); + +nvme_unquiesce_admin_queue (&ctrl->ctrl); +nvme_remove_admin_tag_set (&ctrl->ctrl); } static void
drivers/nvme/host/multipath.c +1 -1
@@ -686,7 +686,7 @@ static void nvme_mpath_set_live(struct nvme_ns *ns)return ; }nvme_add_ns_head_cdev (head); -kblockd_schedule_work (&head->partition_scan_work); +queue_work (nvme_wq, &head->partition_scan_work); }mutex_lock (&head->lock);
drivers/pinctrl/cirrus/pinctrl-cs42l43.c +19 -4
@@ -532,6 +532,11 @@ static int cs42l43_gpio_add_pin_ranges(struct gpio_chip *chip)return ret; } +static void cs42l43_fwnode_put (void *data) +{ +fwnode_handle_put (data); +} +static int cs42l43_pin_probe (struct platform_device *pdev) {struct cs42l43 *cs42l43 =dev_get_drvdata (pdev->dev.parent);
@@ -563,10 +568,20 @@ static int cs42l43_pin_probe(struct platform_device *pdev) priv->gpio_chip.ngpio =CS42L43_NUM_GPIOS ;if (is_of_node (fwnode)) { - fwnode =fwnode_get_named_child_node (fwnode,"pinctrl" ); - -if (fwnode && !fwnode->dev) - fwnode->dev = priv->dev; +struct fwnode_handle *child; + + child =fwnode_get_named_child_node (fwnode,"pinctrl" ); +if (child) { + ret =devm_add_action_or_reset (&pdev->dev, + cs42l43_fwnode_put, child); +if (ret) { +fwnode_handle_put (child); +return ret; + } +if (!child->dev) + child->dev = priv->dev; + fwnode = child; + } } priv->gpio_chip.fwnode = fwnode;
drivers/pinctrl/nxp/pinctrl-s32cc.c +2 -1
@@ -392,6 +392,7 @@ static int s32_pmx_gpio_request_enable(struct pinctrl_dev *pctldev, gpio_pin->pin_id = offset; gpio_pin->config = config; +INIT_LIST_HEAD (&gpio_pin->list);spin_lock_irqsave (&ipctl->gpio_configs_lock, flags);list_add (&gpio_pin->list, &ipctl->gpio_configs);
@@ -943,7 +944,7 @@ int s32_pinctrl_probe(struct platform_device *pdev,spin_lock_init (&ipctl->gpio_configs_lock); s32_pinctrl_desc = -devm_kmalloc (&pdev->dev,sizeof (*s32_pinctrl_desc),GFP_KERNEL ); +devm_kzalloc (&pdev->dev,sizeof (*s32_pinctrl_desc),GFP_KERNEL );if (!s32_pinctrl_desc)return -ENOMEM ;
drivers/platform/x86/intel/speed_select_if/isst_if_mmio.c +2 -2
@@ -106,11 +106,11 @@ static int isst_if_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ret =pci_read_config_dword (pdev,0xD0 , &mmio_base);if (ret) -return ret; +return pcibios_err_to_errno (ret); ret =pci_read_config_dword (pdev,0xFC , &pcu_base);if (ret) -return ret; +return pcibios_err_to_errno (ret); pcu_base &=GENMASK (10 ,0 ); base_addr = (u64 )mmio_base <<23 | (u64 ) pcu_base <<12 ;
drivers/pmdomain/imx/gpc.c +14 -8
@@ -512,7 +512,7 @@ static int imx_gpc_probe(struct platform_device *pdev)return 0 ; } -static int imx_gpc_remove (struct platform_device *pdev) +static void imx_gpc_remove (struct platform_device *pdev) {struct device_node *pgc_node;int ret;
@@ -522,7 +522,7 @@ static int imx_gpc_remove(struct platform_device *pdev)/* bail out if DT too old and doesn't provide the necessary info */ if (!of_property_read_bool (pdev->dev.of_node,"#power-domain-cells" ) && !pgc_node) -return 0 ; +return ;/* * If the old DT binding is used the toplevel driver needs to
@@ -532,16 +532,22 @@ static int imx_gpc_remove(struct platform_device *pdev)of_genpd_del_provider (pdev->dev.of_node); ret =pm_genpd_remove (&imx_gpc_domains[GPC_PGC_DOMAIN_PU ].base); -if (ret) -return ret; +if (ret) { +dev_err (&pdev->dev,"Failed to remove PU power domain (%pe)\n" , +ERR_PTR (ret)); +return ; + }imx_pgc_put_clocks (&imx_gpc_domains[GPC_PGC_DOMAIN_PU ]); ret =pm_genpd_remove (&imx_gpc_domains[GPC_PGC_DOMAIN_ARM ].base); -if (ret) -return ret; +if (ret) { +dev_err (&pdev->dev,"Failed to remove ARM power domain (%pe)\n" , +ERR_PTR (ret)); +return ; + } } -return 0 ; +of_node_put (pgc_node); }static struct platform_driver imx_gpc_driver = {
@@ -550,6 +556,6 @@ static struct platform_driver imx_gpc_driver = { .of_match_table = imx_gpc_dt_ids, }, .probe = imx_gpc_probe, - .remove = imx_gpc_remove, + .remove_new = imx_gpc_remove, };builtin_platform_driver (imx_gpc_driver)
drivers/s390/net/ctcm_mpc.c +0 -1
@@ -700,7 +700,6 @@ static void mpc_rcvd_sweep_req(struct mpcg_info *mpcginfo) grp->sweep_req_pend_num--;ctcmpc_send_sweep_resp (ch); -kfree (mpcginfo);return ; }
drivers/scsi/hosts.c +3 -2
@@ -602,8 +602,9 @@ int scsi_host_busy(struct Scsi_Host *shost) {int cnt =0 ; -blk_mq_tagset_busy_iter (&shost->tag_set, - scsi_host_check_in_flight, &cnt); +if (shost->tag_set.ops) +blk_mq_tagset_busy_iter (&shost->tag_set, + scsi_host_check_in_flight, &cnt);return cnt; }EXPORT_SYMBOL (scsi_host_busy);
drivers/scsi/sg.c +9 -1
@@ -2212,9 +2212,17 @@ sg_remove_sfp_usercontext(struct work_struct *work)write_lock_irqsave (&sfp->rq_list_lock, iflags);while (!list_empty (&sfp->rq_list)) { srp =list_first_entry (&sfp->rq_list, Sg_request, entry); -sg_finish_rem_req (srp);list_del (&srp->entry); +write_unlock_irqrestore (&sfp->rq_list_lock, iflags); + +sg_finish_rem_req (srp); +/* +* sg_rq_end_io() uses srp->parentfp. Hence, only clear +* srp->parentfp after blk_mq_free_request() has been called. +*/ srp->parentfp =NULL ; + +write_lock_irqsave (&sfp->rq_list_lock, iflags); }write_unlock_irqrestore (&sfp->rq_list_lock, iflags);
drivers/soc/ti/knav_dma.c +7 -7
@@ -402,7 +402,7 @@ static int of_channel_match_helper(struct device_node *np, const char *name,* @name: slave channel name * @config: dma configuration parameters * -* Returns pointer to appropriate DMA channel on success or error. +* Return: Pointer to appropriate DMA channel on success or NULL on error. */ void *knav_dma_open_channel (struct device *dev,const char *name,struct knav_dma_cfg *config)
@@ -414,13 +414,13 @@ void *knav_dma_open_channel(struct device *dev, const char *name,if (!kdev) {pr_err ("keystone-navigator-dma driver not registered\n" ); -return (void *)-EINVAL ; +return NULL ; } chan_num =of_channel_match_helper (dev->of_node, name, &instance);if (chan_num <0 ) {dev_err (kdev->dev,"No DMA instance with name %s\n" , name); -return (void *)-EINVAL ; +return NULL ; } dev_dbg(kdev->dev, "initializing %s channel %d from DMA %s\n",
@@ -431,7 +431,7 @@ void *knav_dma_open_channel(struct device *dev, const char *name,if (config->direction !=DMA_MEM_TO_DEV && config->direction !=DMA_DEV_TO_MEM ) {dev_err (kdev->dev,"bad direction\n" ); -return (void *)-EINVAL ; +return NULL ; }/* Look for correct dma instance */
@@ -443,7 +443,7 @@ void *knav_dma_open_channel(struct device *dev, const char *name, }if (!dma) {dev_err (kdev->dev,"No DMA instance with name %s\n" , instance); -return (void *)-EINVAL ; +return NULL ; }/* Look for correct dma channel from dma instance */
@@ -463,14 +463,14 @@ void *knav_dma_open_channel(struct device *dev, const char *name,if (!chan) {dev_err (kdev->dev,"channel %d is not in DMA %s\n" , chan_num, instance); -return (void *)-EINVAL ; +return NULL ; }if (atomic_read (&chan->ref_count) >=1 ) {if (!check_config (chan, config)) {dev_err (kdev->dev,"channel %d config miss-match\n" , chan_num); -return (void *)-EINVAL ; +return NULL ; } }
drivers/target/loopback/tcm_loop.c +3 -0
@@ -893,6 +893,9 @@ static ssize_t tcm_loop_tpg_address_show(struct config_item *item, struct tcm_loop_tpg, tl_se_tpg);struct tcm_loop_hba *tl_hba = tl_tpg->tl_hba; +if (!tl_hba->sh) +return -ENODEV ; +return snprintf (page,PAGE_SIZE ,"%d:0:%d\n" , tl_hba->sh->host_no, tl_tpg->tl_tpgt); }
drivers/uio/uio_hv_generic.c +17 -4
@@ -80,9 +80,15 @@ hv_uio_irqcontrol(struct uio_info *info, s32 irq_state) {struct hv_uio_private_data *pdata = info->priv;struct hv_device *dev = pdata->device; +struct vmbus_channel *primary, *sc; - dev->channel->inbound.ring_buffer->interrupt_mask = !irq_state; -virt_mb (); + primary = dev->channel; + primary->inbound.ring_buffer->interrupt_mask = !irq_state; + +mutex_lock (&vmbus_connection.channel_mutex); +list_for_each_entry (sc, &primary->sc_list, sc_list) + sc->inbound.ring_buffer->interrupt_mask = !irq_state; +mutex_unlock (&vmbus_connection.channel_mutex);return 0 ; }
@@ -93,11 +99,18 @@ hv_uio_irqcontrol(struct uio_info *info, s32 irq_state)static void hv_uio_channel_cb (void *context) {struct vmbus_channel *chan = context; -struct hv_device *hv_dev = chan->device_obj; -struct hv_uio_private_data *pdata =hv_get_drvdata (hv_dev); +struct hv_device *hv_dev; +struct hv_uio_private_data *pdata;virt_mb (); +/* +* The callback may come from a subchannel, in which case look +* for the hv device in the primary channel +*/ + hv_dev = chan->primary_channel ? + chan->primary_channel->device_obj : chan->device_obj; + pdata =hv_get_drvdata (hv_dev);uio_event_notify (&pdata->info); }
fs/exfat/super.c +4 -1
@@ -411,7 +411,10 @@ static int exfat_read_boot_sector(struct super_block *sb)struct exfat_sb_info *sbi =EXFAT_SB (sb);/* set block size to read super block */ -sb_min_blocksize (sb,512 ); +if (!sb_min_blocksize (sb,512 )) { +exfat_err (sb,"unable to set blocksize" ); +return -EINVAL ; + }/* read boot sector */ sbi->boot_bh =sb_bread (sb,0 );
fs/f2fs/compress.c +37 -37
260 lines not on this page · raw message
fs/f2fs/f2fs.h +2 -0
@@ -1493,6 +1493,7 @@ struct compress_io_ctx {struct decompress_io_ctx {u32 magic;/* magic number to indicate page is compressed */ struct inode *inode;/* inode the context belong to */ +struct f2fs_sb_info *sbi;/* f2fs_sb_info pointer */ pgoff_t cluster_idx;/* cluster index number */ unsigned int cluster_size;/* page count in cluster */ unsigned int log_cluster_size;/* log of cluster size */
@@ -1533,6 +1534,7 @@ struct decompress_io_ctx {bool failed;/* IO error occurred before decompression? */ bool need_verity;/* need fs-verity verification after decompression? */ +unsigned char compress_algorithm;/* backup algorithm type */ void *private;/* payload buffer for specified decompression algorithm */ void *private2;/* extra payload buffer */ struct work_struct verity_work;/* work to verify the decompressed pages */
fs/smb/client/cached_dir.c +39 -4
77 lines not on this page · raw message
fs/smb/client/cifsfs.c +1 -1
@@ -133,7 +133,7 @@ module_param(enable_oplocks, bool, 0644);MODULE_PARM_DESC (enable_oplocks,"Enable or disable oplocks. Default: y/Y/1" );module_param (enable_gcm_256, bool,0644 ); -MODULE_PARM_DESC (enable_gcm_256,"Enable requesting strongest (256 bit) GCM encryption. Default: y/Y/0" ); +MODULE_PARM_DESC (enable_gcm_256,"Enable requesting strongest (256 bit) GCM encryption. Default: y/Y/1" );module_param (require_gcm_256, bool,0644 );MODULE_PARM_DESC (require_gcm_256,"Require strongest (256 bit) GCM encryption. Default: n/N/0" );
fs/smb/client/fs_context.c +4 -0
@@ -1726,6 +1726,10 @@ static int smb3_fs_context_parse_param(struct fs_context *fc, ctx->password =NULL ;kfree_sensitive (ctx->password2); ctx->password2 =NULL ; +kfree (ctx->source); + ctx->source =NULL ; +kfree (fc->source); + fc->source =NULL ;return -EINVAL ; }
include/linux/array_size.h new file +13 -0
@@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_ARRAY_SIZE_H +#define _LINUX_ARRAY_SIZE_H + +#include <linux/compiler.h> + +/** +* ARRAY_SIZE - get the number of elements in array @arr +* @arr: array to be sized +*/ +#define ARRAY_SIZE (arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) + +#endif /* _LINUX_ARRAY_SIZE_H */
include/linux/ata.h +1 -0
@@ -566,6 +566,7 @@ struct ata_bmdma_prd {#define ata_id_has_ncq (id) ((id)[ATA_ID_SATA_CAPABILITY] & (1 << 8))#define ata_id_queue_depth (id) (((id)[ATA_ID_QUEUE_DEPTH] & 0x1f) + 1)#define ata_id_removable (id) ((id)[ATA_ID_CONFIG] & (1 << 7)) +#define ata_id_is_locked (id) (((id)[ATA_ID_DLF] & 0x7) == 0x7)#define ata_id_has_atapi_AN (id) \ ((((id)[ATA_ID_SATA_CAPABILITY] != 0x0000) && \ ((id)[ATA_ID_SATA_CAPABILITY] != 0xffff)) && \
include/linux/kernel.h +1 -6
@@ -13,6 +13,7 @@#include <linux/stdarg.h> #include <linux/align.h> +#include <linux/array_size.h> #include <linux/limits.h> #include <linux/linkage.h> #include <linux/stddef.h>
@@ -50,12 +51,6 @@#define READ 0#define WRITE 1 -/** -* ARRAY_SIZE - get the number of elements in array @arr -* @arr: array to be sized -*/ -#define ARRAY_SIZE (arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) -#define PTR_IF (cond, ptr) ((cond) ? (ptr) : NULL)#define u64_to_user_ptr (x) ( \
include/linux/string.h +1 -0
@@ -2,6 +2,7 @@#ifndef _LINUX_STRING_H_#define _LINUX_STRING_H_ +#include <linux/array_size.h> #include <linux/compiler.h> /* for inline */ #include <linux/types.h> /* for size_t */ #include <linux/stddef.h> /* for NULL */
include/net/tls.h +6 -0
@@ -474,6 +474,12 @@ tls_offload_rx_resync_async_request_end(struct sock *sk, __be32 seq) ((u64)ntohl(seq) << 32) | RESYNC_REQ); } +static inline void +tls_offload_rx_resync_async_request_cancel (struct tls_offload_resync_async *resync_async) +{ +atomic64_set (&resync_async->req,0 ); +} +static inline void tls_offload_rx_resync_set_type (struct sock *sk,enum tls_offload_sync_type type) {
include/net/xfrm.h +2 -1
@@ -462,7 +462,8 @@ static inline int xfrm_af2proto(unsigned int family)static inline const struct xfrm_mode *xfrm_ip2inner_mode (struct xfrm_state *x,int ipproto) { -if ((ipproto ==IPPROTO_IPIP && x->props.family ==AF_INET ) || +if ((x->sel.family !=AF_UNSPEC ) || + (ipproto ==IPPROTO_IPIP && x->props.family ==AF_INET ) || (ipproto ==IPPROTO_IPV6 && x->props.family ==AF_INET6 ))return &x->inner_mode;else
kernel/bpf/trampoline.c +0 -4
@@ -460,10 +460,6 @@ static int bpf_trampoline_update(struct bpf_trampoline *tr, bool lock_direct_mut* BPF_TRAMP_F_SHARE_IPMODIFY is set, we can generate the * trampoline again, and retry register. */ -/* reset fops->func and fops->trampoline for re-register */ - tr->fops->func =NULL ; - tr->fops->trampoline =0 ; -/* reset im->image memory attr for arch_prepare_bpf_trampoline */ set_memory_nx ((long )im->image,1 );set_memory_rw ((long )im->image,1 );
kernel/kexec_core.c +1 -1
@@ -1132,7 +1132,7 @@ static int __crash_shrink_memory(struct resource *old_res, old_res->start =0 ; old_res->end =0 ; }else { - crashk_res.end = ram_res->start -1 ; + old_res->end = ram_res->start -1 ; }crash_free_reserved_phys_range (ram_res->start, ram_res->end);
kernel/time/timer.c +4 -3
@@ -1413,10 +1413,11 @@ static int __try_to_del_timer_sync(struct timer_list *timer, bool shutdown) base =lock_timer_base (timer, &flags); -if (base->running_timer != timer) +if (base->running_timer != timer) { ret =detach_if_pending (timer, base, true); -if (shutdown) - timer->function =NULL ; +if (shutdown) + timer->function =NULL ; + }raw_spin_unlock_irqrestore (&base->lock, flags);
kernel/trace/ftrace.c +14 -6
@@ -5370,6 +5370,17 @@ static void remove_direct_functions_hash(struct ftrace_hash *hash, unsigned long } } +static void reset_direct (struct ftrace_ops *ops,unsigned long addr) +{ +struct ftrace_hash *hash = ops->func_hash->filter_hash; + +remove_direct_functions_hash (hash, addr); + +/* cleanup for possible another register call */ + ops->func =NULL ; + ops->trampoline =0 ; +} +/** * register_ftrace_direct - Call a custom trampoline directly * for multiple functions registered in @ops
@@ -5465,6 +5476,8 @@ int register_ftrace_direct(struct ftrace_ops *ops, unsigned long addr) ops->direct_call = addr; err =register_ftrace_function_nolock (ops); +if (err) +reset_direct (ops, addr); out_unlock:mutex_unlock (&direct_mutex);
@@ -5497,7 +5510,6 @@ EXPORT_SYMBOL_GPL(register_ftrace_direct);int unregister_ftrace_direct (struct ftrace_ops *ops,unsigned long addr,bool free_filters) { -struct ftrace_hash *hash = ops->func_hash->filter_hash;int err;if (check_direct_multi (ops))
@@ -5507,13 +5519,9 @@ int unregister_ftrace_direct(struct ftrace_ops *ops, unsigned long addr,mutex_lock (&direct_mutex); err =unregister_ftrace_function (ops); -remove_direct_functions_hash (hash, addr); +reset_direct (ops, addr);mutex_unlock (&direct_mutex); -/* cleanup for possible another register call */ - ops->func =NULL ; - ops->trampoline =0 ; -if (free_filters)ftrace_free_filter (ops);return err;
lib/maple_tree.c +17 -15
@@ -62,6 +62,8 @@#define CREATE_TRACE_POINTS #include <trace/events/maple_tree.h> +#define TP_FCT tracepoint_string(__func__) +#define MA_ROOT_PARENT 1/*
@@ -2990,7 +2992,7 @@ static inline int mas_rebalance(struct ma_state *mas,MA_STATE (l_mas, mas->tree, mas->index, mas->last);MA_STATE (r_mas, mas->tree, mas->index, mas->last); -trace_ma_op (__func__, mas); +trace_ma_op (TP_FCT , mas);/* * Rebalancing occurs if a node is insufficient. Data is rebalanced
@@ -3365,7 +3367,7 @@ static int mas_split(struct ma_state *mas, struct maple_big_node *b_node)MA_STATE (prev_l_mas, mas->tree, mas->index, mas->last);MA_STATE (prev_r_mas, mas->tree, mas->index, mas->last); -trace_ma_op (__func__, mas); +trace_ma_op (TP_FCT , mas); mas->depth =mas_mt_height (mas);/* Allocation failures will happen early. */ mas_node_count (mas,1 + mas->depth *2 );
@@ -3598,7 +3600,7 @@ static bool mas_is_span_wr(struct ma_wr_state *wr_mas)return false; } -trace_ma_write (__func__, wr_mas->mas, wr_mas->r_max, entry); +trace_ma_write (TP_FCT , wr_mas->mas, wr_mas->r_max, entry);return true; }
@@ -3845,7 +3847,7 @@ static inline int mas_wr_spanning_store(struct ma_wr_state *wr_mas)* of data may happen. */ mas = wr_mas->mas; -trace_ma_op (__func__, mas); +trace_ma_op (TP_FCT , mas);if (unlikely (!mas->index && mas->last ==ULONG_MAX ))return mas_new_root (mas, wr_mas->entry);
@@ -3996,7 +3998,7 @@ static inline bool mas_wr_node_store(struct ma_wr_state *wr_mas, }else {memcpy (wr_mas->node, newnode,sizeof (struct maple_node )); } -trace_ma_write (__func__, mas,0 , wr_mas->entry); +trace_ma_write (TP_FCT , mas,0 , wr_mas->entry);mas_update_gap (mas);return true; }
@@ -4042,7 +4044,7 @@ static inline bool mas_wr_slot_store(struct ma_wr_state *wr_mas)return false; } -trace_ma_write (__func__, mas,0 , wr_mas->entry); +trace_ma_write (TP_FCT , mas,0 , wr_mas->entry);/* * Only update gap when the new entry is empty or there is an empty * entry in the original two ranges.
@@ -4178,7 +4180,7 @@ static inline bool mas_wr_append(struct ma_wr_state *wr_mas,if (!wr_mas->content || !wr_mas->entry)mas_update_gap (mas); -trace_ma_write (__func__, mas, new_end, wr_mas->entry); +trace_ma_write (TP_FCT , mas, new_end, wr_mas->entry);return true; }
@@ -4192,7 +4194,7 @@ static void mas_wr_bnode(struct ma_wr_state *wr_mas) {struct maple_big_node b_node; -trace_ma_write (__func__, wr_mas->mas,0 , wr_mas->entry); +trace_ma_write (TP_FCT , wr_mas->mas,0 , wr_mas->entry);memset (&b_node,0 ,sizeof (struct maple_big_node ));mas_store_b_node (wr_mas, &b_node, wr_mas->offset_end);mas_commit_b_node (wr_mas, &b_node, wr_mas->node_end);
@@ -5395,7 +5397,7 @@ void *mas_store(struct ma_state *mas, void *entry) {MA_WR_STATE (wr_mas, mas, entry); -trace_ma_write (__func__, mas,0 , entry); +trace_ma_write (TP_FCT , mas,0 , entry);#ifdef CONFIG_DEBUG_MAPLE_TREE if (MAS_WARN_ON (mas, mas->index > mas->last))pr_err ("Error %lX > %lX %p\n" , mas->index, mas->last, entry);
@@ -5433,7 +5435,7 @@ int mas_store_gfp(struct ma_state *mas, void *entry, gfp_t gfp)MA_WR_STATE (wr_mas, mas, entry);mas_wr_store_setup (&wr_mas); -trace_ma_write (__func__, mas,0 , entry); +trace_ma_write (TP_FCT , mas,0 , entry); retry:mas_wr_store_entry (&wr_mas);if (unlikely (mas_nomem (mas, gfp)))
@@ -5457,7 +5459,7 @@ void mas_store_prealloc(struct ma_state *mas, void *entry)MA_WR_STATE (wr_mas, mas, entry);mas_wr_store_setup (&wr_mas); -trace_ma_write (__func__, mas,0 , entry); +trace_ma_write (TP_FCT , mas,0 , entry);mas_wr_store_entry (&wr_mas);MAS_WR_BUG_ON (&wr_mas,mas_is_err (mas));mas_destroy (mas);
@@ -6245,7 +6247,7 @@ void *mtree_load(struct maple_tree *mt, unsigned long index)MA_STATE (mas, mt, index, index);void *entry; -trace_ma_read (__func__, &mas); +trace_ma_read (TP_FCT , &mas);rcu_read_lock (); retry: entry =mas_start (&mas);
@@ -6288,7 +6290,7 @@ int mtree_store_range(struct maple_tree *mt, unsigned long index,MA_STATE (mas, mt, index, last);MA_WR_STATE (wr_mas, &mas, entry); -trace_ma_write (__func__, &mas,0 , entry); +trace_ma_write (TP_FCT , &mas,0 , entry);if (WARN_ON_ONCE (xa_is_advanced (entry)))return -EINVAL ;
@@ -6470,7 +6472,7 @@ void *mtree_erase(struct maple_tree *mt, unsigned long index)void *entry =NULL ;MA_STATE (mas, mt, index, index); -trace_ma_op (__func__, &mas); +trace_ma_op (TP_FCT , &mas);mtree_lock (mt); entry =mas_erase (&mas);
@@ -6536,7 +6538,7 @@ void *mt_find(struct maple_tree *mt, unsigned long *index, unsigned long max)unsigned long copy = *index;#endif -trace_ma_read (__func__, &mas); +trace_ma_read (TP_FCT , &mas);if ((*index) > max)return NULL ;
mm/mempool.c +26 -6
@@ -64,10 +64,20 @@ static void check_element(mempool_t *pool, void *element) }else if (pool->free == mempool_free_pages) {/* Mempools backed by page allocator */ int order = (int )(long )pool->pool_data; -void *addr =kmap_atomic ((struct page *)element); -__check_element (pool, addr,1UL << (PAGE_SHIFT + order)); -kunmap_atomic (addr); +#ifdef CONFIG_HIGHMEM +for (int i =0 ; i < (1 << order); i++) { +struct page *page = (struct page *)element; +void *addr =kmap_local_page (page + i); + +__check_element (pool, addr,PAGE_SIZE ); +kunmap_local (addr); + } +#else +void *addr =page_address ((struct page *)element); + +__check_element (pool, addr,PAGE_SIZE << order); +#endif } }
@@ -89,10 +99,20 @@ static void poison_element(mempool_t *pool, void *element) } else if (pool->alloc == mempool_alloc_pages) {/* Mempools backed by page allocator */ int order = (int )(long )pool->pool_data; -void *addr =kmap_atomic ((struct page *)element); -__poison_element (addr,1UL << (PAGE_SHIFT + order)); -kunmap_atomic (addr); +#ifdef CONFIG_HIGHMEM +for (int i =0 ; i < (1 << order); i++) { +struct page *page = (struct page *)element; +void *addr =kmap_local_page (page + i); + +__poison_element (addr,PAGE_SIZE ); +kunmap_local (addr); + } +#else +void *addr =page_address ((struct page *)element); + +__poison_element (addr,PAGE_SIZE << order); +#endif } }#else /* CONFIG_DEBUG_SLAB || CONFIG_SLUB_DEBUG_ON */
mm/shmem.c +7 -8
@@ -126,8 +126,7 @@ struct shmem_options {#define SHMEM_SEEN_INODES 2#define SHMEM_SEEN_HUGE 4#define SHMEM_SEEN_INUMS 8 -#define SHMEM_SEEN_NOSWAP 16 -#define SHMEM_SEEN_QUOTA 32 +#define SHMEM_SEEN_QUOTA 16 };#ifdef CONFIG_TMPFS
@@ -4004,7 +4003,6 @@ static int shmem_parse_one(struct fs_context *fc, struct fs_parameter *param) "Turning off swap in unprivileged tmpfs mounts unsupported"); } ctx->noswap = true; - ctx->seen |=SHMEM_SEEN_NOSWAP ;break ;case Opt_quota:if (fc->user_ns != &init_user_ns)
@@ -4154,14 +4152,15 @@ static int shmem_reconfigure(struct fs_context *fc) err ="Current inum too high to switch to 32-bit inums" ; goto out; } -if ((ctx->seen &SHMEM_SEEN_NOSWAP ) && ctx->noswap && !sbinfo->noswap) { + +/* +* "noswap" doesn't use fsparam_flag_no, i.e. there's no "swap" +* counterpart for (re-)enabling swap. +*/ +if (ctx->noswap && !sbinfo->noswap) { err ="Cannot disable swap on remount" ; goto out; } -if (!(ctx->seen &SHMEM_SEEN_NOSWAP ) && !ctx->noswap && sbinfo->noswap) { - err ="Cannot enable swap on remount if it was disabled on first mount" ; - goto out; - }if (ctx->seen &SHMEM_SEEN_QUOTA && !sb_any_quota_loaded (fc->root->d_sb)) {
net/devlink/rate.c +3 -1
@@ -702,13 +702,15 @@ void devl_rate_nodes_destroy(struct devlink *devlink)if (!devlink_rate->parent)continue ; -refcount_dec (&devlink_rate->parent->refcnt);if (devlink_rate_is_leaf (devlink_rate)) ops->rate_leaf_parent_set (devlink_rate,NULL , devlink_rate->priv,NULL ,NULL );else if (devlink_rate_is_node (devlink_rate)) ops->rate_node_parent_set (devlink_rate,NULL , devlink_rate->priv,NULL ,NULL ); + +refcount_dec (&devlink_rate->parent->refcnt); + devlink_rate->parent =NULL ; }list_for_each_entry_safe (devlink_rate, tmp, &devlink->rate_list, list) {if (devlink_rate_is_node (devlink_rate)) {
net/ipv4/esp4_offload.c +4 -2
@@ -111,8 +111,10 @@ static struct sk_buff *xfrm4_tunnel_gso_segment(struct xfrm_state *x, struct sk_buff *skb, netdev_features_t features) { -__be16 type = x->inner_mode.family ==AF_INET6 ?htons (ETH_P_IPV6 ) - :htons (ETH_P_IP ); +const struct xfrm_mode *inner_mode =xfrm_ip2inner_mode (x, +XFRM_MODE_SKB_CB (skb)->protocol); +__be16 type = inner_mode->family ==AF_INET6 ?htons (ETH_P_IPV6 ) + :htons (ETH_P_IP );return skb_eth_gso_segment (skb, features, type); }
net/ipv6/esp6_offload.c +4 -2
@@ -145,8 +145,10 @@ static struct sk_buff *xfrm6_tunnel_gso_segment(struct xfrm_state *x, struct sk_buff *skb, netdev_features_t features) { -__be16 type = x->inner_mode.family ==AF_INET ?htons (ETH_P_IP ) - :htons (ETH_P_IPV6 ); +const struct xfrm_mode *inner_mode =xfrm_ip2inner_mode (x, +XFRM_MODE_SKB_CB (skb)->protocol); +__be16 type = inner_mode->family ==AF_INET ?htons (ETH_P_IP ) + :htons (ETH_P_IPV6 );return skb_eth_gso_segment (skb, features, type); }
net/mptcp/options.c +53 -1
91 lines not on this page · raw message
net/mptcp/pm_netlink.c +13 -7
@@ -29,6 +29,7 @@ struct mptcp_pm_add_entry {u8 retrans_times;struct timer_list add_timer;struct mptcp_sock *sock; +struct rcu_head rcu; };struct pm_nl_pernet {
@@ -344,22 +345,27 @@ mptcp_pm_del_add_timer(struct mptcp_sock *msk, {struct mptcp_pm_add_entry *entry;struct sock *sk = (struct sock *)msk; -struct timer_list *add_timer =NULL ; +bool stop_timer = false; + +rcu_read_lock ();spin_lock_bh (&msk->pm.lock); entry =mptcp_lookup_anno_list_by_saddr (msk, addr);if (entry && (!check_id || entry->addr.id == addr->id)) { entry->retrans_times =ADD_ADDR_RETRANS_MAX ; - add_timer = &entry->add_timer; + stop_timer = true; }if (!check_id && entry)list_del (&entry->list);spin_unlock_bh (&msk->pm.lock); -/* no lock, because sk_stop_timer_sync() is calling del_timer_sync() */ -if (add_timer) -sk_stop_timer_sync (sk, add_timer); +/* Note: entry might have been removed by another thread. +* We hold rcu_read_lock() to ensure it is not freed under us. +*/ +if (stop_timer) +sk_stop_timer_sync (sk, &entry->add_timer); +rcu_read_unlock ();return entry; }
@@ -415,7 +421,7 @@ void mptcp_pm_free_anno_list(struct mptcp_sock *msk)list_for_each_entry_safe (entry, tmp, &free_list, list) {sk_stop_timer_sync (sk, &entry->add_timer); -kfree (entry); +kfree_rcu (entry, rcu); } }
@@ -1573,7 +1579,7 @@ static bool remove_anno_list_by_saddr(struct mptcp_sock *msk, entry =mptcp_pm_del_add_timer (msk, addr, false);if (entry) { -kfree (entry); +kfree_rcu (entry, rcu);return true; }
net/mptcp/protocol.c +34 -14
107 lines not on this page · raw message
net/mptcp/protocol.h +2 -1
@@ -478,6 +478,7 @@ struct mptcp_subflow_context {u64 remote_key;u64 idsn;u64 map_seq; +u64 rcv_wnd_sent;u32 snd_isn;u32 token;u32 rel_write_seq;
@@ -870,7 +871,7 @@ static inline void mptcp_propagate_sndbuf(struct sock *sk, struct sock *ssk)local_bh_enable (); } -void mptcp_destroy_common (struct mptcp_sock *msk,unsigned int flags); +void mptcp_destroy_common (struct mptcp_sock *msk);#define MPTCP_TOKEN_MAX_RETRIES 4
net/mptcp/subflow.c +8 -0
@@ -2095,6 +2095,10 @@ void __init mptcp_subflow_init(void) tcp_prot_override = tcp_prot; tcp_prot_override.release_cb = tcp_release_cb_override; tcp_prot_override.diag_destroy = tcp_abort_override; +#ifdef CONFIG_BPF_SYSCALL +/* Disable sockmap processing for subflows */ + tcp_prot_override.psock_update_sk_prot =NULL ; +#endif #if IS_ENABLED (CONFIG_MPTCP_IPV6 )/* In struct mptcp_subflow_request_sock, we assume the TCP request sock
@@ -2132,6 +2136,10 @@ void __init mptcp_subflow_init(void) tcpv6_prot_override = tcpv6_prot; tcpv6_prot_override.release_cb = tcp_release_cb_override; tcpv6_prot_override.diag_destroy = tcp_abort_override; +#ifdef CONFIG_BPF_SYSCALL +/* Disable sockmap processing for subflows */ + tcpv6_prot_override.psock_update_sk_prot =NULL ; +#endif #endif mptcp_diag_subflow_init (&subflow_ulp_ops);
net/openvswitch/actions.c +1 -67
86 lines not on this page · raw message
net/openvswitch/flow_netlink.c +8 -56
105 lines not on this page · raw message
net/openvswitch/flow_netlink.h +0 -2
@@ -65,8 +65,6 @@ int ovs_nla_put_actions(const struct nlattr *attr,void ovs_nla_free_flow_actions (struct sw_flow_actions *);void ovs_nla_free_flow_actions_rcu (struct sw_flow_actions *); -int nsh_key_from_nlattr (const struct nlattr *attr,struct ovs_key_nsh *nsh, -struct ovs_key_nsh *nsh_mask);int nsh_hdr_from_nlattr (const struct nlattr *attr,struct nshhdr *nh,size_t size);
net/tls/tls_device.c +3 -1
@@ -727,8 +727,10 @@ tls_device_rx_resync_async(struct tls_offload_resync_async *resync_async,/* shouldn't get to wraparound: * too long in async stage, something bad happened */ -if (WARN_ON_ONCE (resync_async->rcd_delta ==USHRT_MAX )) +if (WARN_ON_ONCE (resync_async->rcd_delta ==USHRT_MAX )) { +tls_offload_rx_resync_async_request_cancel (resync_async);return false; + }/* asynchronous stage: log all headers seq such that * req_seq <= seq <= end_seq, and wait for real resync request
net/vmw_vsock/af_vsock.c +31 -9
@@ -1550,18 +1550,40 @@ static int vsock_connect(struct socket *sock, struct sockaddr *addr, timeout =schedule_timeout (timeout);lock_sock (sk); -if (signal_pending (current)) { - err =sock_intr_errno (timeout); - sk->sk_state = sk->sk_state ==TCP_ESTABLISHED ?TCP_CLOSING :TCP_CLOSE ; - sock->state =SS_UNCONNECTED ; -vsock_transport_cancel_pkt (vsk); -vsock_remove_connected (vsk); - goto out_wait; - }else if ((sk->sk_state !=TCP_ESTABLISHED ) && (timeout ==0 )) { - err = -ETIMEDOUT ; +/* Connection established. Whatever happens to socket once we +* release it, that's not connect()'s concern. No need to go +* into signal and timeout handling. Call it a day. +* +* Note that allowing to "reset" an already established socket +* here is racy and insecure. +*/ +if (sk->sk_state ==TCP_ESTABLISHED ) +break ; + +/* If connection was _not_ established and a signal/timeout came +* to be, we want the socket's state reset. User space may want +* to retry. +* +* sk_state != TCP_ESTABLISHED implies that socket is not on +* vsock_connected_table. We keep the binding and the transport +* assigned. +*/ +if (signal_pending (current) || timeout ==0 ) { + err = timeout ==0 ? -ETIMEDOUT :sock_intr_errno (timeout); + +/* Listener might have already responded with +* VIRTIO_VSOCK_OP_RESPONSE. Its handling expects our +* sk_state == TCP_SYN_SENT, which hereby we break. +* In such case VIRTIO_VSOCK_OP_RST will follow. +*/ sk->sk_state =TCP_CLOSE ; sock->state =SS_UNCONNECTED ; + +/* Try to cancel VIRTIO_VSOCK_OP_REQUEST skb sent out by +* transport->connect(). +*/ vsock_transport_cancel_pkt (vsk); + goto out_wait; }
net/wireless/reg.c +5 -0
@@ -4208,6 +4208,9 @@ EXPORT_SYMBOL(regulatory_pre_cac_allowed);static void cfg80211_check_and_end_cac (struct cfg80211_registered_device *rdev) {struct wireless_dev *wdev; + +wiphy_lock (&rdev->wiphy); +/* If we finished CAC or received radar, we should end any * CAC running on the same channels. * the check !cfg80211_chandef_dfs_usable contain 2 options:
@@ -4231,6 +4234,8 @@ static void cfg80211_check_and_end_cac(struct cfg80211_registered_device *rdev)if (!cfg80211_chandef_dfs_usable (&rdev->wiphy, chandef))rdev_end_cac (rdev, wdev->netdev); } + +wiphy_unlock (&rdev->wiphy); } void regulatory_propagate_dfs_state(struct wiphy *wiphy,
net/xfrm/xfrm_output.c +5 -1
@@ -766,8 +766,12 @@ int xfrm_output(struct sock *sk, struct sk_buff *skb)/* Exclusive direct xmit for tunnel mode, as * some filtering or matching rules may apply * in transport mode. +* Locally generated packets also require +* the normal XFRM path for L2 header setup, +* as the hardware needs the L2 header to match +* for encryption, so skip direct output as well. */ -if (x->props.mode ==XFRM_MODE_TUNNEL ) +if (x->props.mode ==XFRM_MODE_TUNNEL && !skb->sk)return xfrm_dev_direct_output (sk, x, skb);return xfrm_output_resume (sk, skb,0 );
scripts/kconfig/mconf.c +3 -0
@@ -12,6 +12,7 @@#include <errno.h> #include <fcntl.h> #include <limits.h> +#include <locale.h> #include <stdarg.h> #include <stdlib.h> #include <string.h>
@@ -1015,6 +1016,8 @@ int main(int ac, char **av)signal (SIGINT , sig_handler); +setlocale (LC_ALL ,"" ); +if (ac >1 &&strcmp (av[1 ],"-s" ) ==0 ) { silent =1 ;/* Silence conf_read() until the real callback is set up */
scripts/kconfig/nconf.c +3 -0
@@ -7,6 +7,7 @@#ifndef _GNU_SOURCE#define _GNU_SOURCE#endif +#include <locale.h> #include <string.h> #include <strings.h> #include <stdlib.h>
@@ -1569,6 +1570,8 @@ int main(int ac, char **av)int lines, columns;char *mode; +setlocale (LC_ALL ,"" ); +if (ac >1 &&strcmp (av[1 ],"-s" ) ==0 ) {/* Silence conf_read() until the real callback is set up */ conf_set_message_callback (NULL );
sound/usb/mixer.c +1 -1
@@ -930,7 +930,7 @@ static int parse_term_uac2_clock_source(struct mixer_build *state, {struct uac_clock_source_descriptor *d = p1; - term->type =UAC3_CLOCK_SOURCE <<16 ;/* virtual type */ + term->type =UAC2_CLOCK_SOURCE <<16 ;/* virtual type */ term->id = id; term->name = d->iClockSource;return 0 ;
tools/testing/selftests/net/bareudp.sh +1 -1
@@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # SPDX-License-Identifier: GPL-2.0 # Test various bareudp tunnel configurations.
tools/testing/selftests/net/mptcp/mptcp_join.sh +4 -4
@@ -3741,7 +3741,7 @@ endpoint_tests() pm_nl_set_limits $ns1 2 2 pm_nl_set_limits $ns2 2 2 pm_nl_add_endpoint $ns1 10.0.2.1 flags signal - speed=slow \ + test_linkfail=128 speed=slow \ run_tests $ns1 $ns2 10.0.1.1 & local tests_pid=$!
@@ -3768,7 +3768,7 @@ endpoint_tests() pm_nl_set_limits $ns2 0 3 pm_nl_add_endpoint $ns2 10.0.1.2 id 1 dev ns2eth1 flags subflow pm_nl_add_endpoint $ns2 10.0.2.2 id 2 dev ns2eth2 flags subflow - test_linkfail=4 speed=5 \ + test_linkfail=128 speed=5 \ run_tests $ns1 $ns2 10.0.1.1 & local tests_pid=$!
@@ -3845,7 +3845,7 @@ endpoint_tests() # broadcast IP: no packet for this address will be received on ns1 pm_nl_add_endpoint $ns1 224.0.0.1 id 2 flags signal pm_nl_add_endpoint $ns1 10.0.1.1 id 42 flags signal - test_linkfail=4 speed=5 \ + test_linkfail=128 speed=5 \ run_tests $ns1 $ns2 10.0.1.1 & local tests_pid=$!
@@ -3917,7 +3917,7 @@ endpoint_tests() # broadcast IP: no packet for this address will be received on ns1 pm_nl_add_endpoint $ns1 224.0.0.1 id 2 flags signal pm_nl_add_endpoint $ns2 10.0.3.2 id 3 flags subflow - test_linkfail=4 speed=20 \ + test_linkfail=128 speed=20 \ run_tests $ns1 $ns2 10.0.1.1 & local tests_pid=$!
tools/tracing/latency/latency-collector.c +1 -1
@@ -1725,7 +1725,7 @@ static void show_usage(void)"-n, --notrace\t\tIf latency is detected, do not print out the content of\n" "\t\t\tthe trace file to standard output\n\n" -"-t, --threads NRTHR\tRun NRTHR threads for printing. Default is %d.\n\n" +"-e, --threads NRTHR\tRun NRTHR threads for printing. Default is %d.\n\n" "-r, --random\t\tArbitrarily sleep a certain amount of time, default\n" "\t\t\t%ld ms, before reading the trace file. The\n"