Commit Graph

1163880 Commits

Author SHA1 Message Date
Greg Kroah-Hartman
38dfa1feed Revert "sched/fair: set_load_weight() must also call reweight_task() for SCHED_IDLE tasks"
This reverts commit e63c0422d2 which is
commit d329605287020c3d1c3b0dadc63d8208e7251382 upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: I53506770d54046f8b8c62edf1342aed9797f33f8
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-09-11 14:48:41 +00:00
Greg Kroah-Hartman
fd3054898d Merge 6.1.103 into android14-6.1-lts
Changes in 6.1.103
	powerpc/configs: Update defconfig with now user-visible CONFIG_FSL_IFC
	spi: spi-microchip-core: Fix the number of chip selects supported
	spi: atmel-quadspi: Add missing check for clk_prepare
	EDAC, i10nm: make skx_common.o a separate module
	rcu/tasks: Fix stale task snaphot for Tasks Trace
	md: fix deadlock between mddev_suspend and flush bio
	platform/chrome: cros_ec_debugfs: fix wrong EC message version
	ubd: refactor the interrupt handler
	ubd: untagle discard vs write zeroes not support handling
	block: refactor to use helper
	block: cleanup bio_integrity_prep
	block: initialize integrity buffer to zero before writing it to media
	hfsplus: fix to avoid false alarm of circular locking
	x86/of: Return consistent error type from x86_of_pci_irq_enable()
	x86/pci/intel_mid_pci: Fix PCIBIOS_* return code handling
	x86/pci/xen: Fix PCIBIOS_* return code handling
	x86/platform/iosf_mbi: Convert PCIBIOS_* return codes to errnos
	kernfs: fix all kernel-doc warnings and multiple typos
	kernfs: Convert kernfs_path_from_node_locked() from strlcpy() to strscpy()
	cgroup/cpuset: Prevent UAF in proc_cpuset_show()
	hwmon: (adt7475) Fix default duty on fan is disabled
	pwm: stm32: Always do lazy disabling
	nvmet-auth: fix nvmet_auth hash error handling
	drm/meson: fix canvas release in bind function
	pwm: atmel-tcb: Put per-channel data into driver data
	pwm: atmel-tcb: Unroll atmel_tcb_pwm_set_polarity() into only caller
	pwm: atmel-tcb: Don't track polarity in driver data
	pwm: atmel-tcb: Fix race condition and convert to guards
	hwmon: (max6697) Fix underflow when writing limit attributes
	hwmon: (max6697) Fix swapped temp{1,8} critical alarms
	arm64: dts: qcom: sdm845: add power-domain to UFS PHY
	arm64: dts: qcom: sm6350: add power-domain to UFS PHY
	arm64: dts: qcom: sm8250: switch UFS QMP PHY to new style of bindings
	arm64: dts: qcom: sm8250: add power-domain to UFS PHY
	arm64: dts: qcom: sm8450: add power-domain to UFS PHY
	arm64: dts: qcom: msm8996-xiaomi-common: drop excton from the USB PHY
	arm64: dts: qcom: msm8998: enable adreno_smmu by default
	soc: qcom: rpmh-rsc: Ensure irqs aren't disabled by rpmh_rsc_send_data() callers
	arm64: dts: rockchip: Add sdmmc related properties on rk3308-rock-pi-s
	arm64: dts: rockchip: Add pinctrl for UART0 to rk3308-rock-pi-s
	arm64: dts: rockchip: Add mdio and ethernet-phy nodes to rk3308-rock-pi-s
	arm64: dts: rockchip: Update WIFi/BT related nodes on rk3308-rock-pi-s
	arm64: dts: qcom: msm8996: specify UFS core_clk frequencies
	soc: xilinx: rename cpu_number1 to dummy_cpu_number
	cpufreq: ti-cpufreq: Handle deferred probe with dev_err_probe()
	OPP: ti: Fix ti_opp_supply_probe wrong return values
	memory: fsl_ifc: Make FSL_IFC config visible and selectable
	soc: qcom: pdr: protect locator_addr with the main mutex
	soc: qcom: pdr: fix parsing of domains lists
	arm64: dts: rockchip: Increase VOP clk rate on RK3328
	arm64: dts: amlogic: sm1: fix spdif compatibles
	ARM: dts: imx6qdl-kontron-samx6i: fix phy-mode
	ARM: dts: imx6qdl-kontron-samx6i: fix PHY reset
	ARM: dts: imx6qdl-kontron-samx6i: fix board reset
	ARM: dts: imx6qdl-kontron-samx6i: fix SPI0 chip selects
	ARM: dts: imx6qdl-kontron-samx6i: fix PCIe reset polarity
	arm64: dts: mediatek: mt8183-kukui: Drop bogus output-enable property
	arm64: dts: mediatek: mt7622: fix "emmc" pinctrl mux
	arm64: dts: mediatek: mt8183-kukui-jacuzzi: Add ports node for anx7625
	arm64: dts: amlogic: gx: correct hdmi clocks
	arm64: dts: rockchip: Drop invalid mic-in-differential on rk3568-rock-3a
	arm64: dts: rockchip: Fix mic-in-differential usage on rk3568-evb1-v10
	arm64: dts: renesas: r8a779g0: Add L3 cache controller
	arm64: dts: renesas: r8a779g0: Add secondary CA76 CPU cores
	arm64: dts: renesas: Drop specifying the GIC_CPU_MASK_SIMPLE() for GICv3 systems
	arm64: dts: renesas: r8a779a0: Add missing hypervisor virtual timer IRQ
	arm64: dts: renesas: r8a779f0: Add missing hypervisor virtual timer IRQ
	arm64: dts: renesas: r8a779g0: Add missing hypervisor virtual timer IRQ
	arm64: dts: renesas: r9a07g043u: Add missing hypervisor virtual timer IRQ
	arm64: dts: renesas: r9a07g044: Add missing hypervisor virtual timer IRQ
	arm64: dts: renesas: r9a07g054: Add missing hypervisor virtual timer IRQ
	m68k: atari: Fix TT bootup freeze / unexpected (SCU) interrupt messages
	x86/xen: Convert comma to semicolon
	arm64: dts: rockchip: Add missing power-domains for rk356x vop_mmu
	arm64: dts: qcom: sm6350: Add missing qcom,non-secure-domain property
	m68k: cmpxchg: Fix return value for default case in __arch_xchg()
	ARM: spitz: fix GPIO assignment for backlight
	vmlinux.lds.h: catch .bss..L* sections into BSS")
	firmware: turris-mox-rwtm: Do not complete if there are no waiters
	firmware: turris-mox-rwtm: Fix checking return value of wait_for_completion_timeout()
	firmware: turris-mox-rwtm: Initialize completion before mailbox
	wifi: brcmsmac: LCN PHY code is used for BCM4313 2G-only device
	bpftool: Un-const bpf_func_info to fix it for llvm 17 and newer
	selftests/bpf: Fix prog numbers in test_sockmap
	net: esp: cleanup esp_output_tail_tcp() in case of unsupported ESPINTCP
	tcp: annotate lockless accesses to sk->sk_err_soft
	tcp: annotate lockless access to sk->sk_err
	tcp: add tcp_done_with_error() helper
	tcp: fix race in tcp_write_err()
	tcp: fix races in tcp_v[46]_err()
	net/smc: set rmb's SG_MAX_SINGLE_ALLOC limitation only when CONFIG_ARCH_NO_SG_CHAIN is defined
	selftests/bpf: Check length of recv in test_sockmap
	lib: objagg: Fix general protection fault
	mlxsw: spectrum_acl_erp: Fix object nesting warning
	mlxsw: spectrum_acl: Fix ACL scale regression and firmware errors
	perf/x86: Serialize set_attr_rdpmc()
	jump_label: Use atomic_try_cmpxchg() in static_key_slow_inc_cpuslocked()
	jump_label: Prevent key->enabled int overflow
	jump_label: Fix concurrency issues in static_key_slow_dec()
	wifi: ath11k: fix wrong handling of CCMP256 and GCMP ciphers
	wifi: cfg80211: fix typo in cfg80211_calculate_bitrate_he()
	wifi: cfg80211: handle 2x996 RU allocation in cfg80211_calculate_bitrate_he()
	net: fec: Refactor: #define magic constants
	net: fec: Fix FEC_ECR_EN1588 being cleared on link-down
	libbpf: Checking the btf_type kind when fixing variable offsets
	ipvs: Avoid unnecessary calls to skb_is_gso_sctp
	netfilter: nf_tables: rise cap on SELinux secmark context
	bpftool: Mount bpffs when pinmaps path not under the bpffs
	perf/x86/intel/pt: Fix pt_topa_entry_for_page() address calculation
	perf: Fix perf_aux_size() for greater-than 32-bit size
	perf: Prevent passing zero nr_pages to rb_alloc_aux()
	perf: Fix default aux_watermark calculation
	perf/x86/intel/cstate: Fix Alderlake/Raptorlake/Meteorlake
	wifi: rtw89: Fix array index mistake in rtw89_sta_info_get_iter()
	wifi: virt_wifi: avoid reporting connection success with wrong SSID
	gss_krb5: Fix the error handling path for crypto_sync_skcipher_setkey
	wifi: virt_wifi: don't use strlen() in const context
	locking/rwsem: Add __always_inline annotation to __down_write_common() and inlined callers
	selftests/bpf: Close fd in error path in drop_on_reuseport
	selftests/bpf: Close obj in error path in xdp_adjust_tail
	bpf: annotate BTF show functions with __printf
	bna: adjust 'name' buf size of bna_tcb and bna_ccb structures
	bpf: Eliminate remaining "make W=1" warnings in kernel/bpf/btf.o
	bpf: Fix null pointer dereference in resolve_prog_type() for BPF_PROG_TYPE_EXT
	selftests: forwarding: devlink_lib: Wait for udev events after reloading
	xdp: fix invalid wait context of page_pool_destroy()
	net: bridge: mst: Check vlan state for egress decision
	drm/rockchip: vop2: Fix the port mux of VP2
	drm/mipi-dsi: Fix mipi_dsi_dcs_write_seq() macro definition format
	drm/mipi-dsi: Fix theoretical int overflow in mipi_dsi_dcs_write_seq()
	drm/amd/pm: Fix aldebaran pcie speed reporting
	drm/amdgpu: Check if NBIO funcs are NULL in amdgpu_device_baco_exit
	drm/amdgpu: Remove GC HW IP 9.3.0 from noretry=1
	drm/panel: boe-tv101wum-nl6: If prepare fails, disable GPIO before regulators
	drm/panel: boe-tv101wum-nl6: Check for errors on the NOP in prepare()
	media: pci: ivtv: Add check for DMA map result
	media: dvb-usb: Fix unexpected infinite loop in dvb_usb_read_remote_control()
	media: imon: Fix race getting ictx->lock
	media: i2c: Fix imx412 exposure control
	media: v4l: async: Fix NULL pointer dereference in adding ancillary links
	s390/mm: Convert make_page_secure to use a folio
	s390/mm: Convert gmap_make_secure to use a folio
	s390/uv: Don't call folio_wait_writeback() without a folio reference
	saa7134: Unchecked i2c_transfer function result fixed
	media: uvcvideo: Override default flags
	media: rcar-vin: Fix YUYV8_1X16 handling for CSI-2
	media: rcar-csi2: Disable runtime_pm in probe error
	media: rcar-csi2: Cleanup subdevice in remove()
	media: renesas: vsp1: Fix _irqsave and _irq mix
	media: renesas: vsp1: Store RPF partition configuration per RPF instance
	drm/mediatek: Add missing plane settings when async update
	drm/mediatek: Add OVL compatible name for MT8195
	leds: trigger: Unregister sysfs attributes before calling deactivate()
	drm/msm/dsi: set VIDEO_COMPRESSION_MODE_CTRL_WC
	drm/msm/dpu: drop validity checks for clear_pending_flush() ctl op
	perf test: Replace arm callgraph fp test workload with leafloop
	perf tests arm_callgraph_fp: Address shellcheck warnings about signal names and adding double quotes for expression
	perf tests: Fix test_arm_callgraph_fp variable expansion
	perf test: Make test_arm_callgraph_fp.sh more robust
	perf report: Fix condition in sort__sym_cmp()
	drm/etnaviv: fix DMA direction handling for cached RW buffers
	drm/qxl: Add check for drm_cvt_mode
	Revert "leds: led-core: Fix refcount leak in of_led_get()"
	ext4: fix infinite loop when replaying fast_commit
	media: venus: flush all buffers in output plane streamoff
	perf intel-pt: Fix aux_watermark calculation for 64-bit size
	perf intel-pt: Fix exclude_guest setting
	mfd: rsmu: Split core code into separate module
	mfd: omap-usb-tll: Use struct_size to allocate tll
	xprtrdma: Fix rpcrdma_reqs_reset()
	SUNRPC: avoid soft lockup when transmitting UDP to reachable server.
	NFSv4.1 another fix for EXCHGID4_FLAG_USE_PNFS_DS for DS server
	ext4: don't track ranges in fast_commit if inode has inlined data
	ext4: avoid writing unitialized memory to disk in EA inodes
	sparc64: Fix incorrect function signature and add prototype for prom_cif_init
	SUNRPC: Fixup gss_status tracepoint error output
	PCI: Fix resource double counting on remove & rescan
	PCI: keystone: Relocate ks_pcie_set/clear_dbi_mode()
	PCI: keystone: Don't enable BAR 0 for AM654x
	PCI: keystone: Fix NULL pointer dereference in case of DT error in ks_pcie_setup_rc_app_regs()
	PCI: rcar: Demote WARN() to dev_warn_ratelimited() in rcar_pcie_wakeup()
	clk: qcom: branch: Add helper functions for setting retain bits
	clk: qcom: gcc-sc7280: Update force mem core bit for UFS ICE clock
	clk: qcom: camcc-sc7280: Add parent dependency to all camera GDSCs
	iio: frequency: adrf6780: rm clk provider include
	coresight: Fix ref leak when of_coresight_parse_endpoint() fails
	RDMA/mlx5: Set mkeys for dmabuf at PAGE_SIZE
	powerpc/pseries: Fix alignment of PLPKS structures and buffers
	powerpc/pseries: Move plpks.h to include directory
	powerpc/pseries: Expose PLPKS config values, support additional fields
	powerpc/pseries: Add helper to get PLPKS password length
	powerpc/kexec: make the update_cpus_node() function public
	powerpc/kexec_file: fix cpus node update to FDT
	RDMA/cache: Release GID table even if leak is detected
	clk: qcom: gpucc-sm8350: Park RCG's clk source at XO during disable
	interconnect: qcom: qcm2290: Fix mas_snoc_bimc RPM master ID
	Input: qt1050 - handle CHIP_ID reading error
	RDMA/mlx4: Fix truncated output warning in mad.c
	RDMA/mlx4: Fix truncated output warning in alias_GUID.c
	RDMA/mlx5: Use sq timestamp as QP timestamp when RoCE is disabled
	RDMA/rxe: Don't set BTH_ACK_MASK for UC or UD QPs
	ASoC: qcom: Adjust issues in case of DT error in asoc_qcom_lpass_cpu_platform_probe()
	powerpc/prom: Add CPU info to hardware description string later
	ASoC: max98088: Check for clk_prepare_enable() error
	mtd: make mtd_test.c a separate module
	RDMA/device: Return error earlier if port in not valid
	Input: elan_i2c - do not leave interrupt disabled on suspend failure
	ASoC: amd: Adjust error handling in case of absent codec device
	PCI: endpoint: Clean up error handling in vpci_scan_bus()
	PCI: endpoint: Fix error handling in epf_ntb_epc_cleanup()
	vhost/vsock: always initialize seqpacket_allow
	net: missing check virtio
	crypto: qat - extend scope of lock in adf_cfg_add_key_value_param()
	clk: qcom: Park shared RCGs upon registration
	clk: en7523: fix rate divider for slic and spi clocks
	MIPS: Octeron: remove source file executable bit
	PCI: qcom-ep: Disable resources unconditionally during PERST# assert
	PCI: dwc: Fix index 0 incorrectly being interpreted as a free ATU slot
	powerpc/xmon: Fix disassembly CPU feature checks
	macintosh/therm_windtunnel: fix module unload.
	RDMA/hns: Check atomic wr length
	RDMA/hns: Fix unmatch exception handling when init eq table fails
	RDMA/hns: Fix missing pagesize and alignment check in FRMR
	RDMA/hns: Fix shift-out-bounds when max_inline_data is 0
	RDMA/hns: Fix undifined behavior caused by invalid max_sge
	RDMA/hns: Fix insufficient extend DB for VFs.
	iommu/vt-d: Fix to convert mm pfn to dma pfn
	iommu/vt-d: Fix identity map bounds in si_domain_init()
	bnxt_re: Fix imm_data endianness
	netfilter: ctnetlink: use helper function to calculate expect ID
	netfilter: nft_set_pipapo: constify lookup fn args where possible
	netfilter: nf_set_pipapo: fix initial map fill
	net: flow_dissector: use DEBUG_NET_WARN_ON_ONCE
	ipv4: Fix incorrect TOS in route get reply
	ipv4: Fix incorrect TOS in fibmatch route get reply
	net: dsa: mv88e6xxx: Limit chip-wide frame size config to CPU ports
	net: dsa: b53: Limit chip-wide jumbo frame config to CPU ports
	fs/ntfs3: Use ALIGN kernel macro
	fs/ntfs3: Merge synonym COMPRESSION_UNIT and NTFS_LZNT_CUNIT
	fs/ntfs3: Fix transform resident to nonresident for compressed files
	fs/ntfs3: Missed NI_FLAG_UPDATE_PARENT setting
	fs/ntfs3: Fix getting file type
	fs/ntfs3: Add missing .dirty_folio in address_space_operations
	pinctrl: rockchip: update rk3308 iomux routes
	pinctrl: core: fix possible memory leak when pinctrl_enable() fails
	pinctrl: single: fix possible memory leak when pinctrl_enable() fails
	pinctrl: ti: ti-iodelay: Drop if block with always false condition
	pinctrl: ti: ti-iodelay: fix possible memory leak when pinctrl_enable() fails
	pinctrl: freescale: mxs: Fix refcount of child
	fs/ntfs3: Replace inode_trylock with inode_lock
	fs/ntfs3: Fix field-spanning write in INDEX_HDR
	pinctrl: renesas: r8a779g0: Fix CANFD5 suffix
	pinctrl: renesas: r8a779g0: Fix FXR_TXEN[AB] suffixes
	pinctrl: renesas: r8a779g0: Fix (H)SCIF1 suffixes
	pinctrl: renesas: r8a779g0: Fix (H)SCIF3 suffixes
	pinctrl: renesas: r8a779g0: Fix IRQ suffixes
	pinctrl: renesas: r8a779g0: FIX PWM suffixes
	pinctrl: renesas: r8a779g0: Fix TCLK suffixes
	pinctrl: renesas: r8a779g0: Fix TPU suffixes
	fs/proc/task_mmu: indicate PM_FILE for PMD-mapped file THP
	nilfs2: avoid undefined behavior in nilfs_cnt32_ge macro
	rtc: interface: Add RTC offset to alarm after fix-up
	fs/ntfs3: Missed error return
	fs/ntfs3: Keep runs for $MFT::$ATTR_DATA and $MFT::$ATTR_BITMAP
	s390/dasd: fix error checks in dasd_copy_pair_store()
	sbitmap: remove unnecessary calculation of alloc_hint in __sbitmap_get_shallow
	sbitmap: rewrite sbitmap_find_bit_in_index to reduce repeat code
	sbitmap: use READ_ONCE to access map->word
	sbitmap: fix io hung due to race on sbitmap_word::cleared
	landlock: Don't lose track of restrictions on cred_transfer
	mm/hugetlb: fix possible recursive locking detected warning
	mm/mglru: fix div-by-zero in vmpressure_calc_level()
	mm: mmap_lock: replace get_memcg_path_buf() with on-stack buffer
	x86/efistub: Avoid returning EFI_SUCCESS on error
	x86/efistub: Revert to heap allocated boot_params for PE entrypoint
	dt-bindings: thermal: correct thermal zone node name limit
	tick/broadcast: Make takeover of broadcast hrtimer reliable
	net: netconsole: Disable target before netpoll cleanup
	af_packet: Handle outgoing VLAN packets without hardware offloading
	kernel: rerun task_work while freezing in get_signal()
	ipv4: fix source address selection with route leak
	ipv6: take care of scope when choosing the src addr
	sched/fair: set_load_weight() must also call reweight_task() for SCHED_IDLE tasks
	fuse: verify {g,u}id mount options correctly
	char: tpm: Fix possible memory leak in tpm_bios_measurements_open()
	media: venus: fix use after free in vdec_close
	ata: libata-scsi: Honor the D_SENSE bit for CK_COND=1 and no error
	hfs: fix to initialize fields of hfs_inode_info after hfs_alloc_inode()
	ext2: Verify bitmap and itable block numbers before using them
	drm/gma500: fix null pointer dereference in cdv_intel_lvds_get_modes
	drm/gma500: fix null pointer dereference in psb_intel_lvds_get_modes
	scsi: qla2xxx: Fix optrom version displayed in FDMI
	drm/amd/display: Check for NULL pointer
	sched/fair: Use all little CPUs for CPU-bound workloads
	apparmor: use kvfree_sensitive to free data->data
	cifs: fix potential null pointer use in destroy_workqueue in init_cifs error path
	cifs: fix reconnect with SMB1 UNIX Extensions
	cifs: mount with "unix" mount option for SMB1 incorrectly handled
	task_work: s/task_work_cancel()/task_work_cancel_func()/
	task_work: Introduce task_work_cancel() again
	udf: Avoid using corrupted block bitmap buffer
	m68k: amiga: Turn off Warp1260 interrupts during boot
	ext4: check dot and dotdot of dx_root before making dir indexed
	ext4: make sure the first directory block is not a hole
	io_uring: tighten task exit cancellations
	trace/pid_list: Change gfp flags in pid_list_fill_irq()
	selftests/landlock: Add cred_transfer test
	wifi: mwifiex: Fix interface type change
	drivers: soc: xilinx: check return status of get_api_version()
	leds: ss4200: Convert PCIBIOS_* return codes to errnos
	leds: mt6360: Fix memory leak in mt6360_init_isnk_properties()
	jbd2: make jbd2_journal_get_max_txn_bufs() internal
	media: uvcvideo: Fix integer overflow calculating timestamp
	KVM: VMX: Split out the non-virtualization part of vmx_interrupt_blocked()
	KVM: nVMX: Request immediate exit iff pending nested event needs injection
	ALSA: usb-audio: Fix microphone sound on HD webcam.
	ALSA: usb-audio: Move HD Webcam quirk to the right place
	ALSA: usb-audio: Add a quirk for Sonix HD USB Camera
	tools/memory-model: Fix bug in lock.cat
	hwrng: amd - Convert PCIBIOS_* return codes to errnos
	parisc: Fix warning at drivers/pci/msi/msi.h:121
	PCI: hv: Return zero, not garbage, when reading PCI_INTERRUPT_PIN
	PCI: dw-rockchip: Fix initial PERST# GPIO value
	PCI: rockchip: Use GPIOD_OUT_LOW flag while requesting ep_gpio
	PCI: loongson: Enable MSI in LS7A Root Complex
	binder: fix hang of unregistered readers
	dev/parport: fix the array out-of-bounds risk
	fs/ntfs3: Update log->page_{mask,bits} if log->page_size changed
	scsi: qla2xxx: Return ENOBUFS if sg_cnt is more than one for ELS cmds
	f2fs: fix to force buffered IO on inline_data inode
	f2fs: fix to don't dirty inode for readonly filesystem
	f2fs: fix return value of f2fs_convert_inline_inode()
	clk: davinci: da8xx-cfgchip: Initialize clk_init_data before use
	ubi: eba: properly rollback inside self_check_eba
	decompress_bunzip2: fix rare decompression failure
	kbuild: Fix '-S -c' in x86 stack protector scripts
	ASoC: amd: yc: Support mic on Lenovo Thinkpad E16 Gen 2
	kobject_uevent: Fix OOB access within zap_modalias_env()
	gve: Fix an edge case for TSO skb validity check
	ice: Add a per-VF limit on number of FDIR filters
	devres: Fix devm_krealloc() wasting memory
	devres: Fix memory leakage caused by driver API devm_free_percpu()
	irqchip/imx-irqsteer: Handle runtime power management correctly
	mm/numa_balancing: teach mpol_to_str about the balancing mode
	rtc: cmos: Fix return value of nvmem callbacks
	scsi: qla2xxx: During vport delete send async logout explicitly
	scsi: qla2xxx: Unable to act on RSCN for port online
	scsi: qla2xxx: Fix for possible memory corruption
	scsi: qla2xxx: Use QP lock to search for bsg
	scsi: qla2xxx: Fix flash read failure
	scsi: qla2xxx: Complete command early within lock
	scsi: qla2xxx: validate nvme_local_port correctly
	perf: Fix event leak upon exit
	perf: Fix event leak upon exec and file release
	perf/x86/intel/uncore: Fix the bits of the CHA extended umask for SPR
	perf/x86/intel/pt: Fix topa_entry base length
	perf/x86/intel/pt: Fix a topa_entry base address calculation
	drm/i915/gt: Do not consider preemption during execlists_dequeue for gen8
	drm/amdgpu/sdma5.2: Update wptr registers as well as doorbell
	drm/dp_mst: Fix all mstb marked as not probed after suspend/resume
	drm/i915/dp: Reset intel_dp->link_trained before retraining the link
	rtc: isl1208: Fix return value of nvmem callbacks
	watchdog/perf: properly initialize the turbo mode timestamp and rearm counter
	platform: mips: cpu_hwmon: Disable driver on unsupported hardware
	RDMA/iwcm: Fix a use-after-free related to destroying CM IDs
	selftests/sigaltstack: Fix ppc64 GCC build
	dm-verity: fix dm_is_verity_target() when dm-verity is builtin
	rbd: don't assume rbd_is_lock_owner() for exclusive mappings
	remoteproc: stm32_rproc: Fix mailbox interrupts queuing
	remoteproc: imx_rproc: Skip over memory region when node value is NULL
	remoteproc: imx_rproc: Fix refcount mistake in imx_rproc_addr_init
	MIPS: dts: loongson: Add ISA node
	MIPS: ip30: ip30-console: Add missing include
	MIPS: dts: loongson: Fix GMAC phy node
	MIPS: Loongson64: env: Hook up Loongsson-2K
	MIPS: Loongson64: Remove memory node for builtin-dtb
	MIPS: Loongson64: reset: Prioritise firmware service
	MIPS: Loongson64: Test register availability before use
	drm/etnaviv: don't block scheduler when GPU is still active
	drm/panfrost: Mark simple_ondemand governor as softdep
	rbd: rename RBD_LOCK_STATE_RELEASING and releasing_wait
	rbd: don't assume RBD_LOCK_STATE_LOCKED for exclusive mappings
	bpf: Synchronize dispatcher update with bpf_dispatcher_xdp_func
	Bluetooth: btusb: Add RTL8852BE device 0489:e125 to device tables
	Bluetooth: btusb: Add Realtek RTL8852BE support ID 0x13d3:0x3591
	nilfs2: handle inconsistent state in nilfs_btnode_create_block()
	PCI: Introduce cleanup helpers for device reference counts and locks
	PCI/DPC: Fix use-after-free on concurrent DPC and hot-removal
	io_uring/io-wq: limit retrying worker initialisation
	wifi: mac80211: Allow NSS change only up to capability
	wifi: mac80211: track capability/opmode NSS separately
	wifi: mac80211: check basic rates validity
	kdb: address -Wformat-security warnings
	kdb: Use the passed prompt in kdb_position_cursor()
	jfs: Fix array-index-out-of-bounds in diFree
	dmaengine: ti: k3-udma: Fix BCHAN count with UHC and HC channels
	phy: cadence-torrent: Check return value on register read
	um: time-travel: fix time-travel-start option
	um: time-travel: fix signal blocking race/hang
	f2fs: fix start segno of large section
	watchdog: rzg2l_wdt: Use pm_runtime_resume_and_get()
	watchdog: rzg2l_wdt: Check return status of pm_runtime_put()
	f2fs: fix to update user block counts in block_operations()
	kbuild: avoid build error when single DTB is turned into composite DTB
	libbpf: Fix no-args func prototype BTF dumping syntax
	af_unix: Disable MSG_OOB handling for sockets in sockmap/sockhash
	dma: fix call order in dmam_free_coherent
	bpf, events: Use prog to emit ksymbol event for main program
	tools/resolve_btfids: Fix comparison of distinct pointer types warning in resolve_btfids
	MIPS: SMP-CPS: Fix address for GCR_ACCESS register for CM3 and later
	ipv4: Fix incorrect source address in Record Route option
	net: bonding: correctly annotate RCU in bond_should_notify_peers()
	netfilter: nft_set_pipapo_avx2: disable softinterrupts
	tipc: Return non-zero value from tipc_udp_addr2str() on error
	net: stmmac: Correct byte order of perfect_match
	net: nexthop: Initialize all fields in dumped nexthops
	bpf: Fix a segment issue when downgrading gso_size
	mISDN: Fix a use after free in hfcmulti_tx()
	apparmor: Fix null pointer deref when receiving skb during sock creation
	powerpc: fix a file leak in kvm_vcpu_ioctl_enable_cap()
	lirc: rc_dev_get_from_fd(): fix file leak
	auxdisplay: ht16k33: Drop reference after LED registration
	ASoC: SOF: imx8m: Fix DSP control regmap retrieval
	spi: microchip-core: fix the issues in the isr
	spi: microchip-core: only disable SPI controller when register value change requires it
	spi: microchip-core: switch to use modern name
	spi: microchip-core: fix init function not setting the master and motorola modes
	nvme-pci: Fix the instructions for disabling power management
	spidev: Add Silicon Labs EM3581 device compatible
	spi: spidev: order compatibles alphabetically
	spi: spidev: add correct compatible for Rohm BH2228FV
	ASoC: Intel: use soc_intel_is_byt_cr() only when IOSF_MBI is reachable
	ceph: fix incorrect kmalloc size of pagevec mempool
	s390/pci: Refactor arch_setup_msi_irqs()
	s390/pci: Allow allocation of more than 1 MSI interrupt
	iommu: sprd: Avoid NULL deref in sprd_iommu_hw_en
	io_uring: fix io_match_task must_hold
	nvme-pci: add missing condition check for existence of mapped data
	fs: don't allow non-init s_user_ns for filesystems without FS_USERNS_MOUNT
	powerpc/pseries: Avoid hcall in plpks_is_available() on non-pseries
	Linux 6.1.103

Change-Id: Ic2520396d4b27c298d5bf5a42a5b099228f9bbee
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-09-11 11:12:13 +00:00
Greg Kroah-Hartman
4267216b80 Merge 6.1.102 into android14-6.1-lts
Changes in 6.1.102
	drm/amdgpu: Fix signedness bug in sdma_v4_0_process_trap_irq()
	f2fs: avoid dead loop in f2fs_issue_checkpoint()
	ocfs2: add bounds checking to ocfs2_check_dir_entry()
	jfs: don't walk off the end of ealist
	fs/ntfs3: Validate ff offset
	ALSA: hda/realtek: Enable headset mic on Positivo SU C1400
	ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book Pro 360
	arm64: dts: qcom: msm8996: Disable SS instance in Parkmode for USB
	arm64: dts: qcom: ipq6018: Disable SS instance in Parkmode for USB
	arm64: dts: qcom: sdm630: Disable SS instance in Parkmode for USB
	ALSA: pcm_dmaengine: Don't synchronize DMA channel when DMA is paused
	filelock: Fix fcntl/close race recovery compat path
	btrfs: do not BUG_ON on failure to get dir index for new snapshot
	tun: add missing verification for short frame
	tap: add missing verification for short frame
	Linux 6.1.102

Change-Id: I04d415693004d988ad48f793a36a8bfd01c4f8b3
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-09-11 11:10:55 +00:00
Greg Kroah-Hartman
5e0a4639af Merge 6.1.101 into android14-6.1-lts
Changes in 6.1.101
	minmax: sanity check constant bounds when clamping
	minmax: clamp more efficiently by avoiding extra comparison
	minmax: fix header inclusions
	minmax: allow min()/max()/clamp() if the arguments have the same signedness.
	minmax: allow comparisons of 'int' against 'unsigned char/short'
	minmax: relax check to allow comparison between unsigned arguments and signed constants
	mm/damon/core: merge regions aggressively when max_nr_regions is unmet
	gcc-plugins: Rename last_stmt() for GCC 14+
	filelock: Remove locks reliably when fcntl/close race is detected
	scsi: core: alua: I/O errors for ALUA state transitions
	scsi: qedf: Don't process stag work during unload and recovery
	scsi: qedf: Wait for stag work during unload
	scsi: qedf: Set qed_slowpath_params to zero before use
	efi/libstub: zboot.lds: Discard .discard sections
	ACPI: EC: Abort address space access upon error
	ACPI: EC: Avoid returning AE_OK on errors in address space handler
	tools/power/cpupower: Fix Pstate frequency reporting on AMD Family 1Ah CPUs
	wifi: mac80211: mesh: init nonpeer_pm to active by default in mesh sdata
	wifi: mac80211: apply mcast rate only if interface is up
	wifi: mac80211: handle tasklet frames before stopping
	wifi: cfg80211: fix 6 GHz scan request building
	wifi: iwlwifi: mvm: d3: fix WoWLAN command version lookup
	wifi: iwlwifi: mvm: Handle BIGTK cipher in kek_kck cmd
	wifi: iwlwifi: mvm: properly set 6 GHz channel direct probe option
	wifi: iwlwifi: mvm: Fix scan abort handling with HW rfkill
	wifi: mac80211: fix UBSAN noise in ieee80211_prep_hw_scan()
	selftests/openat2: Fix build warnings on ppc64
	selftests/futex: pass _GNU_SOURCE without a value to the compiler
	of/irq: Factor out parsing of interrupt-map parent phandle+args from of_irq_parse_raw()
	Input: silead - Always support 10 fingers
	net: ipv6: rpl_iptunnel: block BH in rpl_output() and rpl_input()
	ila: block BH in ila_output()
	null_blk: fix validation of block size
	kconfig: gconf: give a proper initial state to the Save button
	kconfig: remove wrong expr_trans_bool()
	HID: Ignore battery for ELAN touchscreens 2F2C and 4116
	NFSv4: Fix memory leak in nfs4_set_security_label
	nfs: propagate readlink errors in nfs_symlink_filler
	nfs: don't invalidate dentries on transient errors
	cachefiles: add consistency check for copen/cread
	cachefiles: Set object to close if ondemand_id < 0 in copen
	cachefiles: make on-demand read killable
	fs/file: fix the check in find_next_fd()
	mei: demote client disconnect warning on suspend to debug
	iomap: Fix iomap_adjust_read_range for plen calculation
	drm: panel-orientation-quirks: Add quirk for Aya Neo KUN
	nvme: avoid double free special payload
	nvmet: always initialize cqe.result
	wifi: cfg80211: wext: add extra SIOCSIWSCAN data check
	KVM: PPC: Book3S HV: Prevent UAF in kvm_spapr_tce_attach_iommu_group()
	drm/vmwgfx: Fix missing HYPERVISOR_GUEST dependency
	ALSA: hda/realtek: Add more codec ID to no shutup pins list
	mips: fix compat_sys_lseek syscall
	Input: elantech - fix touchpad state on resume for Lenovo N24
	Input: i8042 - add Ayaneo Kun to i8042 quirk table
	ASoC: topology: Fix references to freed memory
	ASoC: topology: Do not assign fields that are already set
	bytcr_rt5640 : inverse jack detect for Archos 101 cesium
	ALSA: dmaengine: Synchronize dma channel after drop()
	ASoC: ti: davinci-mcasp: Set min period size using FIFO config
	ASoC: ti: omap-hdmi: Fix too long driver name
	ASoC: SOF: sof-audio: Skip unprepare for in-use widgets on error rollback
	can: kvaser_usb: fix return value for hif_usb_send_regout
	gpio: pca953x: fix pca953x_irq_bus_sync_unlock race
	s390/sclp: Fix sclp_init() cleanup on failure
	platform/mellanox: nvsw-sn2201: Add check for platform_device_add_resources
	platform/x86: wireless-hotkey: Add support for LG Airplane Button
	platform/x86: lg-laptop: Remove LGEX0815 hotkey handling
	platform/x86: lg-laptop: Change ACPI device id
	platform/x86: lg-laptop: Use ACPI device handle when evaluating WMAB/WMBB
	btrfs: qgroup: fix quota root leak after quota disable failure
	ibmvnic: Add tx check to prevent skb leak
	ALSA: PCM: Allow resume only for suspended streams
	ALSA: hda/relatek: Enable Mute LED on HP Laptop 15-gw0xxx
	ALSA: dmaengine_pcm: terminate dmaengine before synchronize
	ASoC: amd: yc: Fix non-functional mic on ASUS M5602RA
	net: usb: qmi_wwan: add Telit FN912 compositions
	net: mac802154: Fix racy device stats updates by DEV_STATS_INC() and DEV_STATS_ADD()
	powerpc/pseries: Whitelist dtl slub object for copying to userspace
	powerpc/eeh: avoid possible crash when edev->pdev changes
	scsi: libsas: Fix exp-attached device scan after probe failure scanned in again after probe failed
	tee: optee: ffa: Fix missing-field-initializers warning
	Bluetooth: hci_core: cancel all works upon hci_unregister_dev()
	bluetooth/l2cap: sync sock recv cb and release
	erofs: ensure m_llen is reset to 0 if metadata is invalid
	drm/amd/display: Account for cursor prefetch BW in DML1 mode support
	drm/radeon: check bo_va->bo is non-NULL before using it
	fs: better handle deep ancestor chains in is_subdir()
	wifi: iwlwifi: properly set WIPHY_FLAG_SUPPORTS_EXT_KEK_KCK
	drivers/perf: riscv: Reset the counter to hpmevent mapping while starting cpus
	riscv: stacktrace: fix usage of ftrace_graph_ret_addr()
	spi: imx: Don't expect DMA for i.MX{25,35,50,51,53} cspi devices
	ksmbd: return FILE_DEVICE_DISK instead of super magic
	selftests/vDSO: fix clang build errors and warnings
	hfsplus: fix uninit-value in copy_name
	spi: mux: set ctlr->bits_per_word_mask
	cifs: fix noisy message on copy_file_range
	ARM: 9324/1: fix get_user() broken with veneer
	Bluetooth: L2CAP: Fix deadlock
	of/irq: Disable "interrupt-map" parsing for PASEMI Nemo
	wifi: cfg80211: wext: set ssids=NULL for passive scans
	wifi: mac80211: disable softirqs for queued frame handling
	netfs, fscache: export fscache_put_volume() and add fscache_try_get_volume()
	cachefiles: fix slab-use-after-free in fscache_withdraw_volume()
	cachefiles: fix slab-use-after-free in cachefiles_withdraw_cookie()
	Linux 6.1.101

Change-Id: I6526fc29c0cfb314b6d36952d38fb781a82f4aa9
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-09-10 17:54:51 +00:00
Greg Kroah-Hartman
d62f061809 Revert "sched: Move psi_account_irqtime() out of update_rq_clock_task() hotpath"
This reverts commit bfaf0990f1 which is
commit ddae0ca2a8fe12d0e24ab10ba759c3fbd755ada8 upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: I8853ca9becfb9c32a846a41d5866dc4070a15b90
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-09-10 16:49:57 +00:00
Greg Kroah-Hartman
879c789a5f Merge 6.1.100 into android14-6.1-lts
Commits that modify files used by the GKI arm64 build:
	b30679daf9 i2c: mark HostNotify target address as used
	bfaf0990f1 sched: Move psi_account_irqtime() out of update_rq_clock_task() hotpath
	bbac91d57a bpf: Allow reads from uninit stack
	a8ba8f3468 wireguard: send: annotate intentional data race in checking empty queue
	217978a29c wireguard: allowedips: avoid unaligned 64-bit memory accesses
	14875fd5f9 Fix userfaultfd_api to return EINVAL as expected
	513789f255 nvmem: core: only change name to fram for current attribute
	85ec2ee3bc xhci: always resume roothubs if xHC was reset during resume
	9edcf31762 USB: core: Fix duplicate endpoint bug by clearing reserved bits in the descriptor
	2d16f63d80 usb: gadget: configfs: Prevent OOB read/write in usb_string_copy()
	eb41091e24 USB: Add USB_QUIRK_NO_SET_INTF quirk for START BP-850k
	e113cddefa tcp: avoid too many retransmit packets
	6665b3d7ab tcp: use signed arithmetic in tcp_rtx_probe0_timed_out()
	d467194018 Revert "sched/fair: Make sure to try to detach at least one movable task"
	a6db0d3ea6 udp: Set SOCK_RCU_FREE earlier in udp_lib_get_port().
	284f2f288f ethtool: netlink: do not return SQI value if link is down
	3134bdf735 ppp: reject claimed-as-LCP but actually malformed packets
	6c4fca7864 bpf: fix order of args in call to bpf_map_kvcalloc
	d71bed34bc bpf: Remove __bpf_local_storage_map_alloc
	902219ed3f bpf: use bpf_map_kvcalloc in bpf_local_storage
	56161b324b bpf: Reduce smap->elem_size
	3dbcc6f053 bpf: Refactor some inode/task/sk storage functions for reuse
	7382fc5dd1 net: fix rc7's __skb_datagram_iter()
	fb61d7b9fb skmsg: Skip zero length skb in sk_msg_recvmsg
	72d39b8879 tcp: fix incorrect undo caused by DSACK of TLP retransmit
	f6f6fdcc31 vfs: don't mod negative dentry count when on shrinker list
	4e910c6620 fs/dcache: Re-use value stored to dentry->d_flags instead of re-reading
	5cb36e35bc filelock: fix potential use-after-free in posix_lock_inode
	941e816185 mm: prevent derefencing NULL ptr in pfn_section_valid()
	6ac66ef653 Compiler Attributes: Add __uninitialized macro

Changes in 6.1.100
	Compiler Attributes: Add __uninitialized macro
	mm: prevent derefencing NULL ptr in pfn_section_valid()
	cachefiles: propagate errors from vfs_getxattr() to avoid infinite loop
	cachefiles: narrow the scope of triggering EPOLLIN events in ondemand mode
	cachefiles: stop sending new request when dropping object
	cachefiles: cancel all requests for the object that is being dropped
	cachefiles: wait for ondemand_object_worker to finish when dropping object
	cachefiles: cyclic allocation of msg_id to avoid reuse
	cachefiles: add missing lock protection when polling
	filelock: fix potential use-after-free in posix_lock_inode
	fs/dcache: Re-use value stored to dentry->d_flags instead of re-reading
	vfs: don't mod negative dentry count when on shrinker list
	tcp: fix incorrect undo caused by DSACK of TLP retransmit
	net: phy: microchip: lan87xx: reinit PHY after cable test
	skmsg: Skip zero length skb in sk_msg_recvmsg
	octeontx2-af: Fix incorrect value output on error path in rvu_check_rsrc_availability()
	net: fix rc7's __skb_datagram_iter()
	i40e: Fix XDP program unloading while removing the driver
	net: ethernet: lantiq_etop: fix double free in detach
	bpf: Refactor some inode/task/sk storage functions for reuse
	bpf: Reduce smap->elem_size
	bpf: use bpf_map_kvcalloc in bpf_local_storage
	bpf: Remove __bpf_local_storage_map_alloc
	bpf: fix order of args in call to bpf_map_kvcalloc
	net: ethernet: mtk-star-emac: set mac_managed_pm when probing
	ppp: reject claimed-as-LCP but actually malformed packets
	ethtool: netlink: do not return SQI value if link is down
	udp: Set SOCK_RCU_FREE earlier in udp_lib_get_port().
	net/sched: Fix UAF when resolving a clash
	net, sunrpc: Remap EPERM in case of connection failure in xs_tcp_setup_socket
	s390: Mark psw in __load_psw_mask() as __unitialized
	firmware: cs_dsp: Fix overflow checking of wmfw header
	firmware: cs_dsp: Return error if block header overflows file
	firmware: cs_dsp: Validate payload length before processing block
	firmware: cs_dsp: Prevent buffer overrun when processing V2 alg headers
	firmware: cs_dsp: Use strnlen() on name fields in V1 wmfw files
	ARM: davinci: Convert comma to semicolon
	octeontx2-af: replace cpt slot with lf id on reg write
	octeontx2-af: update cpt lf alloc mailbox
	octeontx2-af: fix a issue with cpt_lf_alloc mailbox
	octeontx2-af: fix detection of IP layer
	octeontx2-af: extend RSS supported offload types
	octeontx2-af: fix issue with IPv6 ext match for RSS
	octeontx2-af: fix issue with IPv4 match for RSS
	cifs: fix setting SecurityFlags to true
	Revert "sched/fair: Make sure to try to detach at least one movable task"
	tcp: use signed arithmetic in tcp_rtx_probe0_timed_out()
	tcp: avoid too many retransmit packets
	net: ks8851: Fix deadlock with the SPI chip variant
	net: ks8851: Fix potential TX stall after interface reopen
	USB: serial: option: add Telit generic core-dump composition
	USB: serial: option: add Telit FN912 rmnet compositions
	USB: serial: option: add Fibocom FM350-GL
	USB: serial: option: add support for Foxconn T99W651
	USB: serial: option: add Netprisma LCUK54 series modules
	USB: serial: option: add Rolling RW350-GL variants
	USB: serial: mos7840: fix crash on resume
	USB: Add USB_QUIRK_NO_SET_INTF quirk for START BP-850k
	usb: gadget: configfs: Prevent OOB read/write in usb_string_copy()
	USB: core: Fix duplicate endpoint bug by clearing reserved bits in the descriptor
	hpet: Support 32-bit userspace
	xhci: always resume roothubs if xHC was reset during resume
	ksmbd: discard write access to the directory open
	nvmem: rmem: Fix return value of rmem_read()
	nvmem: meson-efuse: Fix return value of nvmem callbacks
	nvmem: core: only change name to fram for current attribute
	platform/x86: toshiba_acpi: Fix array out-of-bounds access
	ALSA: hda/realtek: add quirk for Clevo V5[46]0TU
	ALSA: hda/realtek: Enable Mute LED on HP 250 G7
	ALSA: hda/realtek: Limit mic boost on VAIO PRO PX
	Fix userfaultfd_api to return EINVAL as expected
	libceph: fix race between delayed_work() and ceph_monc_stop()
	ACPI: processor_idle: Fix invalid comparison with insertion sort for latency
	wireguard: selftests: use acpi=off instead of -no-acpi for recent QEMU
	wireguard: allowedips: avoid unaligned 64-bit memory accesses
	wireguard: queueing: annotate intentional data race in cpu round robin
	wireguard: send: annotate intentional data race in checking empty queue
	misc: fastrpc: Fix DSP capabilities request
	misc: fastrpc: Avoid updating PD type for capability request
	misc: fastrpc: Copy the complete capability structure to user
	x86/retpoline: Move a NOENDBR annotation to the SRSO dummy return thunk
	bpf: Allow reads from uninit stack
	nilfs2: fix kernel bug on rename operation of broken directory
	sched: Move psi_account_irqtime() out of update_rq_clock_task() hotpath
	i2c: rcar: bring hardware to known state when probing
	i2c: mark HostNotify target address as used
	i2c: rcar: reset controller is mandatory for Gen3+
	i2c: rcar: introduce Gen4 devices
	i2c: rcar: ensure Gen3+ reset does not disturb local targets
	i2c: testunit: avoid re-issued work after read message
	i2c: rcar: clear NO_RXDMA flag after resetting
	x86/entry/64: Remove obsolete comment on tracing vs. SYSRET
	x86/bhi: Avoid warning in #DB handler due to BHI mitigation
	kbuild: Make ld-version.sh more robust against version string changes
	i2c: rcar: fix error code in probe()
	Linux 6.1.100

Change-Id: I069ae851a3a4d2a511512551f39e1cd07291f3d1
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-09-10 16:49:39 +00:00
Greg Kroah-Hartman
12f9bcc034 Merge 6.1.99 into android14-6.1-lts
Changes in 6.1.99
	Revert "usb: xhci: prevent potential failure in handle_tx_event() for Transfer events without TRB"
	Linux 6.1.99

Change-Id: I330d0af3322ee885eea719688b8d260cd7cec39c
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-09-10 10:18:09 +00:00
Greg Kroah-Hartman
e6e7b1084c Merge 6.1.98 into android14-6.1-lts
Changes in 6.1.98
	locking/mutex: Introduce devm_mutex_init()
	crypto: hisilicon/debugfs - Fix debugfs uninit process issue
	drm/lima: fix shared irq handling on driver remove
	powerpc: Avoid nmi_enter/nmi_exit in real mode interrupt.
	media: dvb: as102-fe: Fix as10x_register_addr packing
	media: dvb-usb: dib0700_devices: Add missing release_firmware()
	IB/core: Implement a limit on UMAD receive List
	scsi: qedf: Make qedf_execute_tmf() non-preemptible
	crypto: aead,cipher - zeroize key buffer after use
	drm/amdgpu: Fix uninitialized variable warnings
	drm/amdgpu: Initialize timestamp for some legacy SOCs
	drm/amd/display: Check index msg_id before read or write
	drm/amd/display: Check pipe offset before setting vblank
	drm/amd/display: Skip finding free audio for unknown engine_id
	drm/amdgpu: fix uninitialized scalar variable warning
	media: dw2102: Don't translate i2c read into write
	sctp: prefer struct_size over open coded arithmetic
	firmware: dmi: Stop decoding on broken entry
	Input: ff-core - prefer struct_size over open coded arithmetic
	usb: xhci: prevent potential failure in handle_tx_event() for Transfer events without TRB
	wifi: mt76: replace skb_put with skb_put_zero
	net: dsa: mv88e6xxx: Correct check for empty list
	media: dvb-frontends: tda18271c2dd: Remove casting during div
	media: s2255: Use refcount_t instead of atomic_t for num_channels
	media: dvb-frontends: tda10048: Fix integer overflow
	i2c: i801: Annotate apanel_addr as __ro_after_init
	powerpc/64: Set _IO_BASE to POISON_POINTER_DELTA not 0 for CONFIG_PCI=n
	orangefs: fix out-of-bounds fsid access
	kunit: Fix timeout message
	powerpc/xmon: Check cpu id in commands "c#", "dp#" and "dx#"
	igc: fix a log entry using uninitialized netdev
	bpf: Avoid uninitialized value in BPF_CORE_READ_BITFIELD
	f2fs: check validation of fault attrs in f2fs_build_fault_attr()
	scsi: mpi3mr: Sanitise num_phys
	serial: imx: Raise TX trigger level to 8
	jffs2: Fix potential illegal address access in jffs2_free_inode
	s390/pkey: Wipe sensitive data on failure
	btrfs: scrub: initialize ret in scrub_simple_mirror() to fix compilation warning
	cdrom: rearrange last_media_change check to avoid unintentional overflow
	tools/power turbostat: Remember global max_die_id
	mac802154: fix time calculation in ieee802154_configure_durations()
	UPSTREAM: tcp: fix DSACK undo in fast recovery to call tcp_try_to_open()
	net/mlx5: E-switch, Create ingress ACL when needed
	net/mlx5e: Add mqprio_rl cleanup and free in mlx5e_priv_cleanup()
	tcp_metrics: validate source addr length
	KVM: s390: fix LPSWEY handling
	e1000e: Fix S0ix residency on corporate systems
	net: allow skb_datagram_iter to be called from any context
	net: ntb_netdev: Move ntb_netdev_rx_handler() to call netif_rx() from __netif_rx()
	wifi: wilc1000: fix ies_len type in connect path
	riscv: kexec: Avoid deadlock in kexec crash path
	netfilter: nf_tables: unconditionally flush pending work before notifier
	bonding: Fix out-of-bounds read in bond_option_arp_ip_targets_set()
	selftests: fix OOM in msg_zerocopy selftest
	selftests: make order checking verbose in msg_zerocopy selftest
	inet_diag: Initialize pad field in struct inet_diag_req_v2
	mlxsw: core_linecards: Fix double memory deallocation in case of invalid INI file
	platform/x86: toshiba_acpi: Fix quickstart quirk handling
	Revert "igc: fix a log entry using uninitialized netdev"
	nilfs2: fix inode number range checks
	nilfs2: add missing check for inode numbers on directory entries
	mm: optimize the redundant loop of mm_update_owner_next()
	mm: avoid overflows in dirty throttling logic
	btrfs: fix adding block group to a reclaim list and the unused list during reclaim
	f2fs: Add inline to f2fs_build_fault_attr() stub
	scsi: mpi3mr: Use proper format specifier in mpi3mr_sas_port_add()
	Bluetooth: qca: Fix BT enable failure again for QCA6390 after warm reboot
	can: kvaser_usb: Explicitly initialize family in leafimx driver_info struct
	fsnotify: Do not generate events for O_PATH file descriptors
	Revert "mm/writeback: fix possible divide-by-zero in wb_dirty_limits(), again"
	drm/nouveau: fix null pointer dereference in nouveau_connector_get_modes
	drm/amdgpu/atomfirmware: silence UBSAN warning
	drm: panel-orientation-quirks: Add quirk for Valve Galileo
	powerpc/pseries: Fix scv instruction crash with kexec
	mtd: rawnand: Ensure ECC configuration is propagated to upper layers
	mtd: rawnand: Bypass a couple of sanity checks during NAND identification
	mtd: rawnand: rockchip: ensure NVDDR timings are rejected
	bnx2x: Fix multiple UBSAN array-index-out-of-bounds
	arm64: dts: rockchip: Fix the DCDC_REG2 minimum voltage on Quartz64 Model B
	ima: Avoid blocking in RCU read-side critical section
	media: dw2102: fix a potential buffer overflow
	clk: qcom: gcc-sm6350: Fix gpll6* & gpll7 parents
	clk: mediatek: clk-mtk: Register MFG notifier in mtk_clk_simple_probe()
	clk: mediatek: mt8183: Only enable runtime PM on mt8183-mfgcfg
	i2c: pnx: Fix potential deadlock warning from del_timer_sync() call in isr
	fs/ntfs3: Mark volume as dirty if xattr is broken
	ALSA: hda/realtek: Enable headset mic of JP-IK LEAP W502 with ALC897
	nvme-multipath: find NUMA path only for online numa-node
	dma-mapping: benchmark: avoid needless copy_to_user if benchmark fails
	nvme: adjust multiples of NVME_CTRL_PAGE_SIZE in offset
	regmap-i2c: Subtract reg size from max_write
	platform/x86: touchscreen_dmi: Add info for GlobalSpace SolT IVW 11.6" tablet
	platform/x86: touchscreen_dmi: Add info for the EZpad 6s Pro
	nvmet: fix a possible leak when destroy a ctrl during qp establishment
	kbuild: fix short log for AS in link-vmlinux.sh
	nfc/nci: Add the inconsistency check between the input data length and count
	spi: cadence: Ensure data lines set to low during dummy-cycle period
	null_blk: Do not allow runt zone with zone capacity smaller then zone size
	nilfs2: fix incorrect inode allocation from reserved inodes
	Linux 6.1.98

Change-Id: Ief3f201b2322bc9c300d53d11006c446c7f209d6
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-09-10 10:14:27 +00:00
Greg Kroah-Hartman
e44db5756e ANDROID: db845c symbol list additions
In commit f926c022eb ("can: mcp251xfd: fix infinite loop when xmit
fails"), the mcp251xfd driver ends up calling some new functions, which
are not exported for the db845c target, so add them to the symbol list
to allow the build to work properly.

Fixes: f926c022eb ("can: mcp251xfd: fix infinite loop when xmit fails")
Change-Id: Iee35f0a1b868fad9b2d11cabf8aa38af56f2fce7
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-09-10 05:00:09 +00:00
Greg Kroah-Hartman
ab63f81b3a Revert "mm/page_alloc: Separate THP PCP into movable and non-movable categories"
This reverts commit 447434eaaf which is
commit bf14ed81f571f8dba31cd72ab2e50fbcc877cc31 upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: Iaa26387f63a15f47d85e04a1317c08e2d0137768
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-09-09 15:42:14 +00:00
Greg Kroah-Hartman
9a2454ec58 Merge 6.1.97 into android14-6.1-lts
Changes in 6.1.97
	usb: typec: ucsi: Never send a lone connector change ack
	usb: typec: ucsi: Ack also failed Get Error commands
	ACPI: x86: utils: Add Picasso to the list for forcing StorageD3Enable
	ACPI: x86: Force StorageD3Enable on more products
	Input: ili210x - fix ili251x_read_touch_data() return value
	pinctrl: fix deadlock in create_pinctrl() when handling -EPROBE_DEFER
	pinctrl: rockchip: fix pinmux bits for RK3328 GPIO2-B pins
	pinctrl: rockchip: fix pinmux bits for RK3328 GPIO3-B pins
	pinctrl: rockchip: use dedicated pinctrl type for RK3328
	pinctrl: rockchip: fix pinmux reset in rockchip_pmx_set
	MIPS: pci: lantiq: restore reset gpio polarity
	dt-bindings: i2c: Drop unneeded quotes
	dt-bindings: i2c: atmel,at91sam: correct path to i2c-controller schema
	netfilter: nf_tables: use timestamp to check for set element timeout
	ASoC: rockchip: i2s-tdm: Fix trcm mode by setting clock on right mclk
	s390/pci: Add missing virt_to_phys() for directed DIBV
	ASoC: amd: acp: remove i2s configuration check in acp_i2s_probe()
	ASoC: fsl-asoc-card: set priv->pdev before using it
	net: dsa: microchip: fix initial port flush problem
	mlxsw: spectrum_buffers: Fix memory corruptions on Spectrum-4 systems
	bpf: Fix overrunning reservations in ringbuf
	ibmvnic: Free any outstanding tx skbs during scrq reset
	net: phy: micrel: add Microchip KSZ 9477 to the device table
	net: dsa: microchip: use collision based back pressure mode
	xdp: Remove WARN() from __xdp_reg_mem_model()
	Fix race for duplicate reqsk on identical SYN
	net: dsa: microchip: fix wrong register write when masking interrupt
	sparc: fix old compat_sys_select()
	sparc: fix compat recv/recvfrom syscalls
	parisc: use correct compat recv/recvfrom syscalls
	powerpc: restore some missing spu syscalls
	tcp: fix tcp_rcv_fastopen_synack() to enter TCP_CA_Loss for failed TFO
	netfilter: nf_tables: fully validate NFT_DATA_VALUE on store to data registers
	bpf: Take return from set_memory_ro() into account with bpf_prog_lock_ro()
	drm/panel: ilitek-ili9881c: Fix warning with GPIO controllers that sleep
	vduse: validate block features only with block devices
	vduse: Temporarily fail if control queue feature requested
	x86/fpu: Fix AMD X86_BUG_FXSAVE_LEAK fixup
	mtd: partitions: redboot: Added conversion of operands to a larger type
	wifi: ieee80211: check for NULL in ieee80211_mle_size_ok()
	bpf: Add a check for struct bpf_fib_lookup size
	bpf: Mark bpf prog stack with kmsan_unposion_memory in interpreter mode
	RDMA/restrack: Fix potential invalid address access
	net/iucv: Avoid explicit cpumask var allocation on stack
	net/dpaa2: Avoid explicit cpumask var allocation on stack
	crypto: ecdh - explicitly zeroize private_key
	ALSA: emux: improve patch ioctl data validation
	media: dvbdev: Initialize sbuf
	soc: ti: wkup_m3_ipc: Send NULL dummy message instead of pointer message
	drm/radeon/radeon_display: Decrease the size of allocated memory
	nvme: fixup comment for nvme RDMA Provider Type
	drm/panel: simple: Add missing display timing flags for KOE TX26D202VM0BWA
	gpio: davinci: Validate the obtained number of IRQs
	drm/amd/amdgpu: Fix style errors in amdgpu_drv.c & amdgpu_device.c
	drm/amdgpu: Fix pci state save during mode-1 reset
	riscv: stacktrace: convert arch_stack_walk() to noinstr
	gpiolib: cdev: Disallow reconfiguration without direction (uAPI v1)
	randomize_kstack: Remove non-functional per-arch entropy filtering
	ima: Fix use-after-free on a dentry's dname.name
	x86: stop playing stack games in profile_pc()
	parisc: use generic sys_fanotify_mark implementation
	Revert "MIPS: pci: lantiq: restore reset gpio polarity"
	pinctrl: qcom: spmi-gpio: drop broken pm8008 support
	ocfs2: fix DIO failure due to insufficient transaction credits
	nfs: drop the incorrect assertion in nfs_swap_rw()
	mmc: sdhci-brcmstb: check R1_STATUS for erase/trim/discard
	mmc: sdhci-pci: Convert PCIBIOS_* return codes to errnos
	mmc: sdhci: Do not invert write-protect twice
	mmc: sdhci: Do not lock spinlock around mmc_gpio_get_ro()
	iio: xilinx-ams: Don't include ams_ctrl_channels in scan_mask
	counter: ti-eqep: enable clock at probe
	i2c: testunit: don't erase registers after STOP
	i2c: testunit: discard write requests while old command is running
	iio: adc: ad7266: Fix variable checking bug
	iio: accel: fxls8962af: select IIO_BUFFER & IIO_KFIFO_BUF
	iio: chemical: bme680: Fix pressure value output
	iio: chemical: bme680: Fix calibration data variable
	iio: chemical: bme680: Fix overflows in compensate() functions
	iio: chemical: bme680: Fix sensor data read operation
	net: usb: ax88179_178a: improve link status logs
	usb: gadget: printer: SS+ support
	usb: gadget: printer: fix races against disable
	usb: musb: da8xx: fix a resource leak in probe()
	usb: atm: cxacru: fix endpoint checking in cxacru_bind()
	usb: dwc3: core: remove lock of otg mode during gadget suspend/resume to avoid deadlock
	usb: gadget: aspeed_udc: fix device address configuration
	usb: ucsi: stm32: fix command completion handling
	serial: 8250_omap: Implementation of Errata i2310
	serial: imx: set receiver level before starting uart
	ALSA: hda/realtek: fix mute/micmute LEDs don't work for EliteBook 645/665 G11.
	tty: mcf: MCF54418 has 10 UARTS
	net: can: j1939: Initialize unused data in j1939_send_one()
	net: can: j1939: recover socket queue on CAN bus error during BAM transmission
	net: can: j1939: enhanced error handling for tightly received RTS messages in xtp_rx_rts_session_new
	cpufreq: intel_pstate: Use HWP to initialize ITMT if CPPC is missing
	cpu/hotplug: Fix dynstate assignment in __cpuhp_setup_state_cpuslocked()
	irqchip/loongson-liointc: Set different ISRs for different cores
	kbuild: Install dtb files as 0644 in Makefile.dtbinst
	sh: rework sync_file_range ABI
	btrfs: zoned: fix initial free space detection
	csky, hexagon: fix broken sys_sync_file_range
	hexagon: fix fadvise64_64 calling conventions
	drm/nouveau/dispnv04: fix null pointer dereference in nv17_tv_get_ld_modes
	drm/amdgpu: avoid using null object of framebuffer
	drm/i915/gt: Fix potential UAF by revoke of fence registers
	drm/nouveau/dispnv04: fix null pointer dereference in nv17_tv_get_hd_modes
	drm/amdgpu/atomfirmware: fix parsing of vram_info
	batman-adv: Don't accept TT entries for out-of-spec VIDs
	can: mcp251xfd: fix infinite loop when xmit fails
	ata: ahci: Clean up sysfs file on error
	ata: libata-core: Fix double free on error
	ftruncate: pass a signed offset
	syscalls: fix compat_sys_io_pgetevents_time64 usage
	syscalls: fix sys_fanotify_mark prototype
	pwm: stm32: Refuse too small period requests
	Revert "cpufreq: amd-pstate: Fix the inconsistency in max frequency units"
	mm/page_alloc: Separate THP PCP into movable and non-movable categories
	gfs2: Fix slab-use-after-free in gfs2_qd_dealloc
	efi: memmap: Move manipulation routines into x86 arch tree
	efi: xen: Set EFI_PARAVIRT for Xen dom0 boot on all architectures
	efi/x86: Free EFI memory map only when installing a new one.
	arm64: dts: rockchip: Fix SD NAND and eMMC init on rk3308-rock-pi-s
	arm64: dts: rockchip: Rename LED related pinctrl nodes on rk3308-rock-pi-s
	ARM: dts: rockchip: rk3066a: add #sound-dai-cells to hdmi node
	arm64: dts: rockchip: fix PMIC interrupt pin on ROCK Pi E
	arm64: dts: rockchip: Add sound-dai-cells for RK3368
	serial: imx: only set receiver level if it is zero
	serial: 8250_omap: Fix Errata i2310 with RX FIFO level check
	tracing/net_sched: NULL pointer dereference in perf_trace_qdisc_reset()
	Linux 6.1.97

Change-Id: I8ae3429d5ddec709f2ef8e96895fa111ee31d004
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-09-06 11:23:41 +00:00
Greg Kroah-Hartman
47b24bf8ea Revert "net/sched: fix false lockdep warning on qdisc root lock"
This reverts commit 048b33817a which is
commit af0cb3fa3f9ed258d14abab0152e28a0f9593084 upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: I1a0434ee7eb3b2ff625e5eba9a7d9547452f0bb3
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-08-28 07:54:10 +00:00
Greg Kroah-Hartman
0a6ad70f07 Revert "net/sched: unregister lockdep keys in qdisc_create/qdisc_alloc error path"
This reverts commit 48d3f91d83 which is
commit 86735b57c905e775f05de995df35379366b72168 upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: Icdc66b3ac841d0fb5e94250153a3dc02b14ea750
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-08-28 07:54:10 +00:00
Greg Kroah-Hartman
325f5b8ed9 Revert "tty: add the option to have a tty reject a new ldisc"
This reverts commit 3c6332f3bb which is
commit 6bd23e0c2bb6c65d4f5754d1456bc9a4427fc59b upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: Ia8d68d62f97da2536404bfb439f2db596033260f
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-08-28 07:54:10 +00:00
Greg Kroah-Hartman
7455bf543f Merge 6.1.96 into android14-6.1-lts
Changes in 6.1.96
	padata: Disable BH when taking works lock on MT path
	crypto: hisilicon/sec - Fix memory leak for sec resource release
	io_uring/sqpoll: work around a potential audit memory leak
	rcutorture: Fix rcu_torture_one_read() pipe_count overflow comment
	rcutorture: Make stall-tasks directly exit when rcutorture tests end
	rcutorture: Fix invalid context warning when enable srcu barrier testing
	block/ioctl: prefer different overflow check
	selftests/bpf: Prevent client connect before server bind in test_tc_tunnel.sh
	selftests/bpf: Fix flaky test btf_map_in_map/lookup_update
	batman-adv: bypass empty buckets in batadv_purge_orig_ref()
	wifi: ath9k: work around memset overflow warning
	af_packet: avoid a false positive warning in packet_setsockopt()
	drop_monitor: replace spin_lock by raw_spin_lock
	scsi: qedi: Fix crash while reading debugfs attribute
	net/sched: fix false lockdep warning on qdisc root lock
	kselftest: arm64: Add a null pointer check
	net: dsa: realtek: keep default LED state in rtl8366rb
	netpoll: Fix race condition in netpoll_owner_active
	wifi: mt76: mt7921s: fix potential hung tasks during chip recovery
	HID: Add quirk for Logitech Casa touchpad
	HID: asus: fix more n-key report descriptors if n-key quirked
	Bluetooth: ath3k: Fix multiple issues reported by checkpatch.pl
	drm/amd/display: Exit idle optimizations before HDCP execution
	platform/x86: toshiba_acpi: Add quirk for buttons on Z830
	ASoC: Intel: sof_sdw: add JD2 quirk for HP Omen 14
	drm/lima: add mask irq callback to gp and pp
	drm/lima: mask irqs in timeout path before hard reset
	ALSA: hda/realtek: Add quirks for Lenovo 13X
	powerpc/pseries: Enforce hcall result buffer validity and size
	powerpc/io: Avoid clang null pointer arithmetic warnings
	platform/x86: p2sb: Don't init until unassigned resources have been assigned
	power: supply: cros_usbpd: provide ID table for avoiding fallback match
	iommu/arm-smmu-v3: Free MSIs in case of ENOMEM
	f2fs: remove clear SB_INLINECRYPT flag in default_options
	usb: misc: uss720: check for incompatible versions of the Belkin F5U002
	Avoid hw_desc array overrun in dw-axi-dmac
	usb: dwc3: pci: Don't set "linux,phy_charger_detect" property on Lenovo Yoga Tab2 1380
	udf: udftime: prevent overflow in udf_disk_stamp_to_time()
	PCI/PM: Avoid D3cold for HP Pavilion 17 PC/1972 PCIe Ports
	MIPS: Octeon: Add PCIe link status check
	serial: imx: Introduce timeout when waiting on transmitter empty
	serial: exar: adding missing CTI and Exar PCI ids
	usb: gadget: function: Remove usage of the deprecated ida_simple_xx() API
	tty: add the option to have a tty reject a new ldisc
	MIPS: Routerboard 532: Fix vendor retry check code
	mips: bmips: BCM6358: make sure CBR is correctly set
	tracing: Build event generation tests only as modules
	ALSA: hda/realtek: Remove Framework Laptop 16 from quirks
	ALSA/hda: intel-dsp-config: Document AVS as dsp_driver option
	ice: move RDMA init to ice_idc.c
	ice: avoid IRQ collision to fix init failure on ACPI S3 resume
	cipso: fix total option length computation
	bpf: Avoid splat in pskb_pull_reason
	ALSA: hda/realtek: Enable headset mic on IdeaPad 330-17IKB 81DM
	netrom: Fix a memory leak in nr_heartbeat_expiry()
	ipv6: prevent possible NULL deref in fib6_nh_init()
	ipv6: prevent possible NULL dereference in rt6_probe()
	xfrm6: check ip6_dst_idev() return value in xfrm6_get_saddr()
	netns: Make get_net_ns() handle zero refcount net
	qca_spi: Make interrupt remembering atomic
	net: lan743x: disable WOL upon resume to restore full data path operation
	net: lan743x: Support WOL at both the PHY and MAC appropriately
	net: phy: mxl-gpy: enhance delay time required by loopback disable function
	net: phy: mxl-gpy: Remove interrupt mask clearing from config_init
	net/sched: act_api: rely on rcu in tcf_idr_check_alloc
	net/sched: act_api: fix possible infinite loop in tcf_idr_check_alloc()
	tipc: force a dst refcount before doing decryption
	sched: act_ct: add netns into the key of tcf_ct_flow_table
	ptp: fix integer overflow in max_vclocks_store
	net: stmmac: No need to calculate speed divider when offload is disabled
	virtio_net: checksum offloading handling fix
	octeontx2-pf: Add error handling to VLAN unoffload handling
	netfilter: ipset: Fix suspicious rcu_dereference_protected()
	seg6: fix parameter passing when calling NF_HOOK() in End.DX4 and End.DX6 behaviors
	ice: Fix VSI list rule with ICE_SW_LKUP_LAST type
	bnxt_en: Restore PTP tx_avail count in case of skb_pad() error
	net: usb: rtl8150 fix unintiatilzed variables in rtl8150_get_link_ksettings
	regulator: core: Fix modpost error "regulator_get_regmap" undefined
	dmaengine: idxd: Fix possible Use-After-Free in irq_process_work_list
	dmaengine: ioat: Drop redundant pci_enable_pcie_error_reporting()
	dmaengine: ioatdma: Fix leaking on version mismatch
	dmaengine: ioat: use PCI core macros for PCIe Capability
	dmaengine: ioatdma: Fix error path in ioat3_dma_probe()
	dmaengine: ioatdma: Fix kmemleak in ioat_pci_probe()
	dmaengine: ioatdma: Fix missing kmem_cache_destroy()
	regulator: bd71815: fix ramp values
	arm64: dts: imx93-11x11-evk: Remove the 'no-sdio' property
	arm64: dts: freescale: imx8mm-verdin: enable hysteresis on slow input pin
	ACPICA: Revert "ACPICA: avoid Info: mapping multiple BARs. Your kernel is fine."
	firmware: psci: Fix return value from psci_system_suspend()
	RDMA/mlx5: Add check for srq max_sge attribute
	kbuild: Remove support for Clang's ThinLTO caching
	MIPS: dts: bcm63268: Add missing properties to the TWD node
	net: stmmac: Assign configured channel value to EXTTS event
	net: usb: ax88179_178a: improve reset check
	net: do not leave a dangling sk pointer, when socket creation fails
	btrfs: retry block group reclaim without infinite loop
	cifs: fix typo in module parameter enable_gcm_256
	KVM: Fix a data race on last_boosted_vcpu in kvm_vcpu_on_spin()
	KVM: arm64: Disassociate vcpus from redistributor region on teardown
	KVM: x86: Always sync PIR to IRR prior to scanning I/O APIC routes
	ALSA: hda/realtek: fix mute/micmute LEDs don't work for ProBook 445/465 G11.
	ALSA: hda/realtek: Limit mic boost on N14AP7
	drm/i915/mso: using joiner is not possible with eDP MSO
	drm/radeon: fix UBSAN warning in kv_dpm.c
	drm/amdgpu: fix UBSAN warning in kv_dpm.c
	gcov: add support for GCC 14
	kcov: don't lose track of remote references during softirqs
	mm: mmap: allow for the maximum number of bits for randomizing mmap_base by default
	tcp: clear tp->retrans_stamp in tcp_rcv_fastopen_synack()
	mm/page_table_check: fix crash on ZONE_DEVICE
	i2c: ocores: set IACK bit after core is enabled
	dt-bindings: i2c: google,cros-ec-i2c-tunnel: correct path to i2c-controller schema
	spi: stm32: qspi: Fix dual flash mode sanity test in stm32_qspi_setup()
	arm64: dts: imx8qm-mek: fix gpio number for reg_usdhc2_vmmc
	spi: stm32: qspi: Clamp stm32_qspi_get_mode() output to CCR_BUSWIDTH_4
	perf: script: add raw|disasm arguments to --insn-trace option
	perf script: Show also errors for --insn-trace option
	ARM: dts: samsung: smdkv310: fix keypad no-autorepeat
	ARM: dts: samsung: exynos4412-origen: fix keypad no-autorepeat
	ARM: dts: samsung: smdk4412: fix keypad no-autorepeat
	pmdomain: ti-sci: Fix duplicate PD referrals
	tracing: Add MODULE_DESCRIPTION() to preemptirq_delay_test
	x86/cpu/vfm: Add new macros to work with (vendor/family/model) values
	x86/cpu: Fix x86_match_cpu() to match just X86_VENDOR_INTEL
	Revert "kheaders: substituting --sort in archive creation"
	kheaders: explicitly define file modes for archived headers
	drm/amd/display: revert Exit idle optimizations before HDCP execution
	net/sched: unregister lockdep keys in qdisc_create/qdisc_alloc error path
	hid: asus: asus_report_fixup: fix potential read out of bounds
	Revert "mm: mmap: allow for the maximum number of bits for randomizing mmap_base by default"
	Linux 6.1.96

Change-Id: I55dfcaa259f72fd6c57ec6efca60bed3e3abbd43
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-08-28 07:54:10 +00:00
Will McVicker
cb7d32c26d Merge aosp/android14-6.1 to aosp/android14-6.1-lts
* aosp/android14-6.1:
  BACKPORT: genirq/cpuhotplug, x86/vector: Prevent vector leak during CPU offline
  UPSTREAM: genirq/cpuhotplug: Retry with cpu_online_mask when migration fails
  UPSTREAM: genirq/cpuhotplug: Skip suspended interrupts when restoring affinity
  UPSTREAM: scsi: ufs: core: Perform read back after writing UTP_TASK_REQ_LIST_BASE_H
  UPSTREAM: mm/userfaultfd: UFFDIO_MOVE implementation should use ptep_get()
  UPSTREAM: f2fs: fix NULL pointer dereference in f2fs_submit_page_write()
  UPSTREAM: f2fs: zone: fix to wait completion of last bio in zone correctly
  UPSTREAM: iommu: Don't reserve 0-length IOVA region
  UPSTREAM: iommu: Fix printk arg in of_iommu_get_resv_regions()
  UPSTREAM: iommu: Map reserved memory as cacheable if device is coherent
  BACKPORT: io_uring/fdinfo: remove need for sqpoll lock for thread/pid retrieval
  UPSTREAM: wifi: cfg80211: fix assoc response warning on failed links
  UPSTREAM: usb: typec: tcpm: Add additional checks for contaminant
  UPSTREAM: mm: remove duplicated vma->vm_flags check when expanding stack
  ANDROID: Update the ABI symbol list
  ANDROID: add vendor hook for mapping_shrinkable
  FROMLIST: sd: Retry START STOP UNIT commands
  FROMLIST: scsi: core: Retry passthrough commands if SCMD_RETRY_PASSTHROUGH is set
  ANDROID: GKI: Update symbol list for mtk
  ANDROID: Update the ABI symbol list
  ANDROID: GKI: add symbol list for telechips
  UPSTREAM: ufs: core: bypass quick recovery if need force reset
  ANDROID: Update the ABI symbol list
  UPSTREAM: ring-buffer: Fix a race between readers and resize checks
  UPSTREAM: lib/build_OID_registry: avoid non-destructive substitution for Perl < 5.13.2 compat
  UPSTREAM: lib/build_OID_registry: don't mention the full path of the script in output
  ANDROID: GKI: Add symbol list for exynosauto
  UPSTREAM: erofs: fix race in z_erofs_get_gbuf()
  ANDROID: fuse: Skip canonical path logic if ENOSYS
  ANDROID: fsnotify: Do not notify lower fs of open when ENOSYS
  ANDROID: mm: madvise: Avoid counting swap entry references for migration entries
  UPSTREAM: scsi: ufs: core: Changing the status to check inflight
  ANDROID: Update the ABI symbol list
  ANDROID: power: add vendor hook to handle hibernate failures
  ANDROID: GKI: remove export of tracing control functions
  ANDROID: fix kernelci build-break for !CONFIG_ANDROID_VENDOR_OEM_DATA
  ANDROID: GKI: update symbol list file for xiaomi
  ANDROID: vendor_hooks: vendor hooks for optimizing the blocking problem caused by rwsem lock contention of reverse mapping during memory recycling.
  UPSTREAM: of: reserved_mem: Use proper binary prefix
  BACKPORT: gpio: of: support gpio-ranges for multiple gpiochip devices
  UPSTREAM: dt-bindings: gpio: brcmstb: add gpio-ranges
  ANDROID: Incremental fs: Retry page faults on non-fatal errors
  ANDROID: GKI: Update symbol list for BCMSTB
  ANDROID: GKI: Update rockchip symbols for dw_hdmi_qp.
  UPSTREAM: net: usb: ax88179_178a: improve reset check
  UPSTREAM: net: usb: ax88179_178a: fix link status when link is set to down/up
  UPSTREAM: usb: gadget: configfs: Prevent OOB read/write in usb_string_copy()
  UPSTREAM: usb: typec: tcpm: fix use-after-free case in tcpm_register_source_caps
  UPSTREAM: usb: typec: tcpm: unregister existing source caps before re-registration
  ANDROID: GKI: Update symbol list for mtk

Change-Id: I1b7876def61c1f0a09ec7599aeb64fd2de911619
Signed-off-by: Will McVicker <willmcvicker@google.com>
2024-08-20 10:20:58 -07:00
Dongli Zhang
edca080b95 BACKPORT: genirq/cpuhotplug, x86/vector: Prevent vector leak during CPU offline
The absence of IRQD_MOVE_PCNTXT prevents immediate effectiveness of
interrupt affinity reconfiguration via procfs. Instead, the change is
deferred until the next instance of the interrupt being triggered on the
original CPU.

When the interrupt next triggers on the original CPU, the new affinity is
enforced within __irq_move_irq(). A vector is allocated from the new CPU,
but the old vector on the original CPU remains and is not immediately
reclaimed. Instead, apicd->move_in_progress is flagged, and the reclaiming
process is delayed until the next trigger of the interrupt on the new CPU.

Upon the subsequent triggering of the interrupt on the new CPU,
irq_complete_move() adds a task to the old CPU's vector_cleanup list if it
remains online. Subsequently, the timer on the old CPU iterates over its
vector_cleanup list, reclaiming old vectors.

However, a rare scenario arises if the old CPU is outgoing before the
interrupt triggers again on the new CPU.

In that case irq_force_complete_move() is not invoked on the outgoing CPU
to reclaim the old apicd->prev_vector because the interrupt isn't currently
affine to the outgoing CPU, and irq_needs_fixup() returns false. Even
though __vector_schedule_cleanup() is later called on the new CPU, it
doesn't reclaim apicd->prev_vector; instead, it simply resets both
apicd->move_in_progress and apicd->prev_vector to 0.

As a result, the vector remains unreclaimed in vector_matrix, leading to a
CPU vector leak.

To address this issue, move the invocation of irq_force_complete_move()
before the irq_needs_fixup() call to reclaim apicd->prev_vector, if the
interrupt is currently or used to be affine to the outgoing CPU.

Additionally, reclaim the vector in __vector_schedule_cleanup() as well,
following a warning message, although theoretically it should never see
apicd->move_in_progress with apicd->prev_cpu pointing to an offline CPU.

Fixes: f0383c24b4 ("genirq/cpuhotplug: Add support for cleaning up move in progress")
Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20240522220218.162423-1-dongli.zhang@oracle.com
Bug: 359158960
Change-Id: Ib9a564add4cd1c90ec725ab7f0bdc0db505ae29f
(cherry picked from commit a6c11c0a5235fb144a65e0cb2ffd360ddc1f6c32)
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2024-08-19 10:46:46 -07:00
Dongli Zhang
a339e02cde UPSTREAM: genirq/cpuhotplug: Retry with cpu_online_mask when migration fails
When a CPU goes offline, the interrupts affine to that CPU are
re-configured.

Managed interrupts undergo either migration to other CPUs or shutdown if
all CPUs listed in the affinity are offline. The migration of managed
interrupts is guaranteed on x86 because there are interrupt vectors
reserved.

Regular interrupts are migrated to a still online CPU in the affinity mask
or if there is no online CPU to any online CPU.

This works as long as the still online CPUs in the affinity mask have
interrupt vectors available, but in case that none of those CPUs has a
vector available the migration fails and the device interrupt becomes
stale.

This is not any different from the case where the affinity mask does not
contain any online CPU, but there is no fallback operation for this.

Instead of giving up, retry the migration attempt with the online CPU mask
if the interrupt is not managed, as managed interrupts cannot be affected
by this problem.

Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240423073413.79625-1-dongli.zhang@oracle.com
Bug: 359158960
Change-Id: I3e8acfe0598b0cb94389115d680d2216833d6a0c
(cherry picked from commit 88d724e2301a69c1ab805cd74fc27aa36ae529e0)
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2024-08-19 10:32:18 -07:00
David Stevens
bd59305571 UPSTREAM: genirq/cpuhotplug: Skip suspended interrupts when restoring affinity
irq_restore_affinity_of_irq() restarts managed interrupts unconditionally
when the first CPU in the affinity mask comes online. That's correct during
normal hotplug operations, but not when resuming from S3 because the
drivers are not resumed yet and interrupt delivery is not expected by them.

Skip the startup of suspended interrupts and let resume_device_irqs() deal
with restoring them. This ensures that irqs are not delivered to drivers
during the noirq phase of resuming from S3, after non-boot CPUs are brought
back online.

Signed-off-by: David Stevens <stevensd@chromium.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240424090341.72236-1-stevensd@chromium.org
Bug: 359158960
Change-Id: Ie5610f7dffe05a141e6db1a8b6b067845c910b4a
(cherry picked from commit a60dd06af674d3bb76b40da5d722e4a0ecefe650)
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2024-08-19 10:32:12 -07:00
Greg Kroah-Hartman
6f4a686ac9 Revert "i2c: add fwnode APIs"
This reverts commit ef1e9b624d which is
commit 373c612d72 upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: I005a81bf79fefbb0a037a77c2d248d4790b9a94e
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-08-16 14:17:51 +00:00
Greg Kroah-Hartman
efbc7c7549 Revert "i2c: acpi: Unbind mux adapters before delete"
This reverts commit b1574c8c0a which is
commit 3f858bbf04dbac934ac279aaee05d49eb9910051 upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: Idee931998e80ee3ce1c11fa19a49daeea6388fbb
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-08-16 14:16:39 +00:00
Greg Kroah-Hartman
ced5058778 Merge 6.1.95 into android14-6.1-lts
Changes in 6.1.95
	wifi: mac80211: mesh: Fix leak of mesh_preq_queue objects
	wifi: mac80211: Fix deadlock in ieee80211_sta_ps_deliver_wakeup()
	wifi: cfg80211: fully move wiphy work to unbound workqueue
	wifi: cfg80211: Lock wiphy in cfg80211_get_station
	wifi: cfg80211: pmsr: use correct nla_get_uX functions
	wifi: iwlwifi: mvm: revert gen2 TX A-MPDU size to 64
	wifi: iwlwifi: dbg_ini: move iwl_dbg_tlv_free outside of debugfs ifdef
	wifi: iwlwifi: mvm: check n_ssids before accessing the ssids
	wifi: iwlwifi: mvm: don't read past the mfuart notifcation
	wifi: mac80211: correctly parse Spatial Reuse Parameter Set element
	ax25: Fix refcount imbalance on inbound connections
	ax25: Replace kfree() in ax25_dev_free() with ax25_dev_put()
	net/ncsi: Simplify Kconfig/dts control flow
	net/ncsi: Fix the multi thread manner of NCSI driver
	ipv6: ioam: block BH from ioam6_output()
	ipv6: sr: block BH in seg6_output_core() and seg6_input_core()
	bpf: Set run context for rawtp test_run callback
	octeontx2-af: Always allocate PF entries from low prioriy zone
	net/smc: avoid overwriting when adjusting sock bufsizes
	net: sched: sch_multiq: fix possible OOB write in multiq_tune()
	vxlan: Fix regression when dropping packets due to invalid src addresses
	tcp: count CLOSE-WAIT sockets for TCP_MIB_CURRESTAB
	net/mlx5: Stop waiting for PCI up if teardown was triggered
	net/mlx5: Stop waiting for PCI if pci channel is offline
	net/mlx5: Split function_setup() to enable and open functions
	net/mlx5: Always stop health timer during driver removal
	net/mlx5: Fix tainted pointer delete is case of flow rules creation fail
	net/sched: taprio: always validate TCA_TAPRIO_ATTR_PRIOMAP
	ptp: Fix error message on failed pin verification
	ice: fix iteration of TLVs in Preserved Fields Area
	ice: Introduce new parameters in ice_sched_node
	ice: remove null checks before devm_kfree() calls
	ice: remove af_xdp_zc_qps bitmap
	net: wwan: iosm: Fix tainted pointer delete is case of region creation fail
	af_unix: Set sk->sk_state under unix_state_lock() for truly disconencted peer.
	af_unix: Annodate data-races around sk->sk_state for writers.
	af_unix: Annotate data-race of sk->sk_state in unix_inq_len().
	af_unix: Annotate data-races around sk->sk_state in unix_write_space() and poll().
	af_unix: Annotate data-race of sk->sk_state in unix_stream_connect().
	af_unix: Annotate data-races around sk->sk_state in sendmsg() and recvmsg().
	af_unix: Annotate data-race of sk->sk_state in unix_stream_read_skb().
	af_unix: Annotate data-races around sk->sk_state in UNIX_DIAG.
	af_unix: Annotate data-race of net->unx.sysctl_max_dgram_qlen.
	af_unix: Use unix_recvq_full_lockless() in unix_stream_connect().
	af_unix: annotate lockless accesses to sk->sk_err
	af_unix: Use skb_queue_empty_lockless() in unix_release_sock().
	af_unix: Use skb_queue_len_lockless() in sk_diag_show_rqlen().
	af_unix: Annotate data-race of sk->sk_shutdown in sk_diag_fill().
	ipv6: fix possible race in __fib6_drop_pcpu_from()
	Bluetooth: qca: fix invalid device address check
	btrfs: fix wrong block_start calculation for btrfs_drop_extent_map_range()
	usb: gadget: f_fs: use io_data->status consistently
	usb: gadget: f_fs: Fix race between aio_cancel() and AIO request complete
	iio: accel: mxc4005: allow module autoloading via OF compatible
	iio: accel: mxc4005: Reset chip on probe() and resume()
	xtensa: stacktrace: include <asm/ftrace.h> for prototype
	xtensa: fix MAKE_PC_FROM_RA second argument
	drm/amd/display: drop unnecessary NULL checks in debugfs
	drm/amd/display: Fix incorrect DSC instance for MST
	arm64: dts: qcom: sm8150: align TLMM pin configuration with DT schema
	arm64: dts: qcom: sa8155p-adp: fix SDHC2 CD pin configuration
	misc/pvpanic: deduplicate common code
	misc/pvpanic-pci: register attributes via pci_driver
	serial: sc16is7xx: replace hardcoded divisor value with BIT() macro
	serial: sc16is7xx: fix bug in sc16is7xx_set_baud() when using prescaler
	mmc: davinci: Don't strip remove function when driver is builtin
	firmware: qcom_scm: disable clocks if qcom_scm_bw_enable() fails
	HID: i2c-hid: elan: Add ili9882t timing
	HID: i2c-hid: elan: fix reset suspend current leakage
	i2c: add fwnode APIs
	i2c: acpi: Unbind mux adapters before delete
	mm, vmalloc: fix high order __GFP_NOFAIL allocations
	mm/vmalloc: fix vmalloc which may return null if called with __GFP_NOFAIL
	selftests/mm: compaction_test: fix incorrect write of zero to nr_hugepages
	selftests/mm: conform test to TAP format output
	selftests/mm: log a consistent test name for check_compaction
	selftests/mm: compaction_test: fix bogus test success on Aarch64
	wifi: ath10k: fix QCOM_RPROC_COMMON dependency
	btrfs: remove unnecessary prototype declarations at disk-io.c
	btrfs: make btrfs_destroy_delayed_refs() return void
	btrfs: fix leak of qgroup extent records after transaction abort
	nilfs2: return the mapped address from nilfs_get_page()
	nilfs2: fix nilfs_empty_dir() misjudgment and long loop on I/O errors
	io_uring: check for non-NULL file pointer in io_file_can_poll()
	USB: class: cdc-wdm: Fix CPU lockup caused by excessive log messages
	USB: xen-hcd: Traverse host/ when CONFIG_USB_XEN_HCD is selected
	usb: typec: tcpm: fix use-after-free case in tcpm_register_source_caps
	usb: typec: tcpm: Ignore received Hard Reset in TOGGLING state
	mei: me: release irq in mei_me_pci_resume error path
	tty: n_tty: Fix buffer offsets when lookahead is used
	landlock: Fix d_parent walk
	jfs: xattr: fix buffer overflow for invalid xattr
	xhci: Set correct transferred length for cancelled bulk transfers
	xhci: Apply reset resume quirk to Etron EJ188 xHCI host
	xhci: Handle TD clearing for multiple streams case
	xhci: Apply broken streams quirk to Etron EJ188 xHCI host
	thunderbolt: debugfs: Fix margin debugfs node creation condition
	scsi: mpi3mr: Fix ATA NCQ priority support
	scsi: mpt3sas: Avoid test/set_bit() operating in non-allocated memory
	scsi: sd: Use READ(16) when reading block zero on large capacity disks
	gve: Clear napi->skb before dev_kfree_skb_any()
	powerpc/uaccess: Fix build errors seen with GCC 13/14
	Input: try trimming too long modalias strings
	cxl/test: Add missing vmalloc.h for tools/testing/cxl/test/mem.c
	cachefiles: add output string to cachefiles_obj_[get|put]_ondemand_fd
	cachefiles: remove requests from xarray during flushing requests
	cachefiles: introduce object ondemand state
	cachefiles: extract ondemand info field from cachefiles_object
	cachefiles: resend an open request if the read request's object is closed
	cachefiles: add spin_lock for cachefiles_ondemand_info
	cachefiles: add restore command to recover inflight ondemand read requests
	cachefiles: fix slab-use-after-free in cachefiles_ondemand_get_fd()
	cachefiles: fix slab-use-after-free in cachefiles_ondemand_daemon_read()
	cachefiles: remove err_put_fd label in cachefiles_ondemand_daemon_read()
	cachefiles: never get a new anonymous fd if ondemand_id is valid
	cachefiles: defer exposing anon_fd until after copy_to_user() succeeds
	cachefiles: flush all requests after setting CACHEFILES_DEAD
	selftests/ftrace: Fix to check required event file
	clk: sifive: Do not register clkdevs for PRCI clocks
	NFSv4.1 enforce rootpath check in fs_location query
	SUNRPC: return proper error from gss_wrap_req_priv
	NFS: add barriers when testing for NFS_FSDATA_BLOCKED
	platform/x86: dell-smbios: Fix wrong token data in sysfs
	gpio: tqmx86: fix typo in Kconfig label
	gpio: tqmx86: remove unneeded call to platform_set_drvdata()
	gpio: tqmx86: introduce shadow register for GPIO output value
	gpio: tqmx86: Convert to immutable irq_chip
	gpio: tqmx86: store IRQ trigger type and unmask status separately
	gpio: tqmx86: fix broken IRQ_TYPE_EDGE_BOTH interrupt type
	HID: core: remove unnecessary WARN_ON() in implement()
	iommu/amd: Fix sysfs leak in iommu init
	HID: logitech-dj: Fix memory leak in logi_dj_recv_switch_to_dj_mode()
	drm/vmwgfx: Port the framebuffer code to drm fb helpers
	drm/vmwgfx: Refactor drm connector probing for display modes
	drm/vmwgfx: Filter modes which exceed graphics memory
	drm/vmwgfx: 3D disabled should not effect STDU memory limits
	drm/vmwgfx: Remove STDU logic from generic mode_valid function
	net: sfp: Always call `sfp_sm_mod_remove()` on remove
	net: hns3: fix kernel crash problem in concurrent scenario
	net: hns3: add cond_resched() to hns3 ring buffer init process
	liquidio: Adjust a NULL pointer handling path in lio_vf_rep_copy_packet
	drm/komeda: check for error-valued pointer
	drm/bridge/panel: Fix runtime warning on panel bridge release
	tcp: fix race in tcp_v6_syn_recv_sock()
	geneve: Fix incorrect inner network header offset when innerprotoinherit is set
	net/mlx5e: Fix features validation check for tunneled UDP (non-VXLAN) packets
	Bluetooth: L2CAP: Fix rejecting L2CAP_CONN_PARAM_UPDATE_REQ
	netfilter: ipset: Fix race between namespace cleanup and gc in the list:set type
	net: pse-pd: Use EOPNOTSUPP error code instead of ENOTSUPP
	gve: ignore nonrelevant GSO type bits when processing TSO headers
	net: stmmac: replace priv->speed with the portTransmitRate from the tc-cbs parameters
	nvmet-passthru: propagate status from id override functions
	net/ipv6: Fix the RT cache flush via sysctl using a previous delay
	net: bridge: mst: pass vlan group directly to br_mst_vlan_set_state
	net: bridge: mst: fix suspicious rcu usage in br_mst_set_state
	ionic: fix use after netif_napi_del()
	af_unix: Read with MSG_PEEK loops if the first unread byte is OOB
	bnxt_en: Adjust logging of firmware messages in case of released token in __hwrm_send()
	misc: microchip: pci1xxxx: fix double free in the error handling of gp_aux_bus_probe()
	x86/boot: Don't add the EFI stub to targets, again
	iio: adc: ad9467: fix scan type sign
	iio: dac: ad5592r: fix temperature channel scaling value
	iio: imu: inv_icm42600: delete unneeded update watermark call
	drivers: core: synchronize really_probe() and dev_uevent()
	drm/exynos/vidi: fix memory leak in .get_modes()
	drm/exynos: hdmi: report safe 640x480 mode as a fallback when no EDID found
	mptcp: ensure snd_una is properly initialized on connect
	mptcp: pm: inc RmAddr MIB counter once per RM_ADDR ID
	irqchip/gic-v3-its: Fix potential race condition in its_vlpi_prop_update()
	x86/amd_nb: Check for invalid SMN reads
	perf/core: Fix missing wakeup when waiting for context reference
	riscv: fix overlap of allocated page and PTR_ERR
	tracing/selftests: Fix kprobe event name test for .isra. functions
	null_blk: Print correct max open zones limit in null_init_zoned_dev()
	sock_map: avoid race between sock_map_close and sk_psock_put
	vmci: prevent speculation leaks by sanitizing event in event_deliver()
	spmi: hisi-spmi-controller: Do not override device identifier
	knfsd: LOOKUP can return an illegal error value
	fs/proc: fix softlockup in __read_vmcore
	ocfs2: use coarse time for new created files
	ocfs2: fix races between hole punching and AIO+DIO
	PCI: rockchip-ep: Remove wrong mask on subsys_vendor_id
	dmaengine: axi-dmac: fix possible race in remove()
	remoteproc: k3-r5: Wait for core0 power-up before powering up core1
	remoteproc: k3-r5: Do not allow core1 to power up before core0 via sysfs
	riscv: rewrite __kernel_map_pages() to fix sleeping in invalid context
	drm/i915/gt: Disarm breadcrumbs if engines are already idle
	drm/i915/dpt: Make DPT object unshrinkable
	intel_th: pci: Add Granite Rapids support
	intel_th: pci: Add Granite Rapids SOC support
	intel_th: pci: Add Sapphire Rapids SOC support
	intel_th: pci: Add Meteor Lake-S support
	intel_th: pci: Add Lunar Lake support
	btrfs: zoned: introduce a zone_info struct in btrfs_load_block_group_zone_info
	btrfs: zoned: factor out per-zone logic from btrfs_load_block_group_zone_info
	btrfs: zoned: factor out single bg handling from btrfs_load_block_group_zone_info
	btrfs: zoned: factor out DUP bg handling from btrfs_load_block_group_zone_info
	btrfs: zoned: fix use-after-free due to race with dev replace
	nilfs2: fix potential kernel bug due to lack of writeback flag waiting
	tick/nohz_full: Don't abuse smp_call_function_single() in tick_setup_device()
	mm/huge_memory: don't unpoison huge_zero_folio
	mm/memory-failure: fix handling of dissolved but not taken off from buddy pages
	serial: 8250_pxa: Configure tx_loadsz to match FIFO IRQ level
	mptcp: pm: update add_addr counters after connect
	Revert "fork: defer linking file vma until vma is fully initialized"
	remoteproc: k3-r5: Jump to error handling labels in start/stop errors
	cachefiles, erofs: Fix NULL deref in when cachefiles is not doing ondemand-mode
	Bluetooth: qca: fix wcn3991 device address check
	Bluetooth: qca: generalise device address check
	greybus: Fix use-after-free bug in gb_interface_release due to race condition.
	serial: 8250_dw: fall back to poll if there's no interrupt
	serial: core: Add UPIO_UNKNOWN constant for unknown port type
	usb-storage: alauda: Check whether the media is initialized
	misc: microchip: pci1xxxx: Fix a memory leak in the error handling of gp_aux_bus_probe()
	i2c: at91: Fix the functionality flags of the slave-only interface
	i2c: designware: Fix the functionality flags of the slave-only interface
	zap_pid_ns_processes: clear TIF_NOTIFY_SIGNAL along with TIF_SIGPENDING
	Linux 6.1.95

Change-Id: I73161b2d10f7fd687ca753f1780ccdf53eeccb0e
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-08-16 11:53:54 +00:00
Andrew Halaney
d6a513a784 UPSTREAM: scsi: ufs: core: Perform read back after writing UTP_TASK_REQ_LIST_BASE_H
Currently, the UTP_TASK_REQ_LIST_BASE_L/UTP_TASK_REQ_LIST_BASE_H regs are
written to and then completed with an mb().

mb() ensures that the write completes, but completion doesn't mean that it
isn't stored in a buffer somewhere. The recommendation for ensuring these
bits have taken effect on the device is to perform a read back to force it
to make it all the way to the device. This is documented in device-io.rst
and a talk by Will Deacon on this can be seen over here:

    https://youtu.be/i6DayghhA8Q?si=MiyxB5cKJXSaoc01&t=1678

Let's do that to ensure the bits hit the device. Because the mb()'s purpose
wasn't to add extra ordering (on top of the ordering guaranteed by
writel()/readl()), it can safely be removed.

Bug: 254441685
Fixes: 88441a8d35 ("scsi: ufs: core: Add hibernation callbacks")
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Can Guo <quic_cang@quicinc.com>
Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
Link: https://lore.kernel.org/r/20240329-ufs-reset-ensure-effect-before-delay-v5-7-181252004586@redhat.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 408e28086f1c7a6423efc79926a43d7001902fae)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: Iadf1f45aebea54393365a5387d35440aa5df3e00
2024-08-15 13:50:18 +00:00
Ryan Roberts
64b0e0b285 UPSTREAM: mm/userfaultfd: UFFDIO_MOVE implementation should use ptep_get()
Commit c33c794828 ("mm: ptep_get() conversion") converted all (non-arch)
call sites to use ptep_get() instead of doing a direct dereference of the
pte.  Full rationale can be found in that commit's log.

Since then, UFFDIO_MOVE has been implemented which does 7 direct pte
dereferences.  Let's fix those up to use ptep_get().

I've asserted in the past that there is no reliable automated mechanism to
catch these; I'm relying on a combination of Coccinelle (which throws up a
lot of false positives) and some compiler magic to force a compiler error
on dereference.  But given the frequency with which new issues are coming
up, I'll add it to my todo list to try to find an automated solution.

Bug: 254441685
Link: https://lkml.kernel.org/r/20240123141755.3836179-1-ryan.roberts@arm.com
Fixes: adef440691ba ("userfaultfd: UFFDIO_MOVE uABI")
Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 56ae10cf628b02279980d17439c6241a643959c2)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I0573208f1c7ad5085e0f7e82d484199074a5f6ef
2024-08-14 18:12:47 +00:00
Wenjie Qi
5fc3f5b48a UPSTREAM: f2fs: fix NULL pointer dereference in f2fs_submit_page_write()
BUG: kernel NULL pointer dereference, address: 0000000000000014
RIP: 0010:f2fs_submit_page_write+0x6cf/0x780 [f2fs]
Call Trace:
<TASK>
? show_regs+0x6e/0x80
? __die+0x29/0x70
? page_fault_oops+0x154/0x4a0
? prb_read_valid+0x20/0x30
? __irq_work_queue_local+0x39/0xd0
? irq_work_queue+0x36/0x70
? do_user_addr_fault+0x314/0x6c0
? exc_page_fault+0x7d/0x190
? asm_exc_page_fault+0x2b/0x30
? f2fs_submit_page_write+0x6cf/0x780 [f2fs]
? f2fs_submit_page_write+0x736/0x780 [f2fs]
do_write_page+0x50/0x170 [f2fs]
f2fs_outplace_write_data+0x61/0xb0 [f2fs]
f2fs_do_write_data_page+0x3f8/0x660 [f2fs]
f2fs_write_single_data_page+0x5bb/0x7a0 [f2fs]
f2fs_write_cache_pages+0x3da/0xbe0 [f2fs]
...
It is possible that other threads have added this fio to io->bio
and submitted the io->bio before entering f2fs_submit_page_write().
At this point io->bio = NULL.
If is_end_zone_blkaddr(sbi, fio->new_blkaddr) of this fio is true,
then an NULL pointer dereference error occurs at bio_get(io->bio).
The original code for determining zone end was after "out:",
which would have missed some fio who is zone end. I've moved
 this code before "skip:" to make sure it's done for each fio.

Bug: 254441685
Fixes: e067dc3c6b ("f2fs: maintain six open zones for zoned devices")
Signed-off-by: Wenjie Qi <qwjhust@gmail.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
(cherry picked from commit c2034ef6192a65a986a45c2aa2ed05824fdc0e9f)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I98714afbda136a8932eaa417fff129bd4db61b26
2024-08-14 18:12:47 +00:00
Chao Yu
a8e77a7072 UPSTREAM: f2fs: zone: fix to wait completion of last bio in zone correctly
It needs to check last zone_pending_bio and wait IO completion before
traverse next fio in io->io_list, otherwise, bio in next zone may be
submitted before all IO completion in current zone.

Bug: 254441685
Fixes: e067dc3c6b ("f2fs: maintain six open zones for zoned devices")
Cc: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Chao Yu <chao@kernel.org>
Reviewed-by: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
(cherry picked from commit 536af8211586af09c5bea1c15ad28ddec5f66a97)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: Ifefc2c6fbda3aae00cef3650cafe48b496da65ca
2024-08-14 18:12:47 +00:00
Ashish Mhetre
66e0c14580 UPSTREAM: iommu: Don't reserve 0-length IOVA region
When the bootloader/firmware doesn't setup the framebuffers, their
address and size are 0 in "iommu-addresses" property. If IOVA region is
reserved with 0 length, then it ends up corrupting the IOVA rbtree with
an entry which has pfn_hi < pfn_lo.
If we intend to use display driver in kernel without framebuffer then
it's causing the display IOMMU mappings to fail as entire valid IOVA
space is reserved when address and length are passed as 0.
An ideal solution would be firmware removing the "iommu-addresses"
property and corresponding "memory-region" if display is not present.
But the kernel should be able to handle this by checking for size of
IOVA region and skipping the IOVA reservation if size is 0. Also, add
a warning if firmware is requesting 0-length IOVA region reservation.

Bug: 254441685
Fixes: a5bf3cfce8 ("iommu: Implement of_iommu_get_resv_regions()")
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Acked-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/20231205065656.9544-1-amhetre@nvidia.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
(cherry picked from commit bb57f6705960bebeb832142ce9abf43220c3eab1)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I2484452356e69ecafc006246313d5c92fe9f1509
2024-08-14 18:09:08 +00:00
Daniel Mentz
793280fe93 UPSTREAM: iommu: Fix printk arg in of_iommu_get_resv_regions()
The variable phys is defined as (struct resource *) which aligns with
the printk format specifier %pr. Taking the address of it results in a
value of type (struct resource **) which is incompatible with the format
specifier %pr. Therefore, remove the address of operator (&).

Bug: 254441685
Fixes: a5bf3cfce8 ("iommu: Implement of_iommu_get_resv_regions()")
Signed-off-by: Daniel Mentz <danielmentz@google.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20231108062226.928985-1-danielmentz@google.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
(cherry picked from commit c2183b3dcc9dd41b768569ea88bededa58cceebb)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I36e8878d09f8cb3ff12280fbb535bfb8df682055
2024-08-14 18:09:08 +00:00
Laurentiu Tudor
f3d71968c1 UPSTREAM: iommu: Map reserved memory as cacheable if device is coherent
Check if the device is marked as DMA coherent in the DT and if so,
map its reserved memory as cacheable in the IOMMU.
This fixes the recently added IOMMU reserved memory support which
uses IOMMU_RESV_DIRECT without properly building the PROT for the
mapping.

Bug: 254441685
Fixes: a5bf3cfce8 ("iommu: Implement of_iommu_get_resv_regions()")
Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20230926152600.8749-1-laurentiu.tudor@nxp.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
(cherry picked from commit f1aad9df93f39267e890836a28d22511f23474e1)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: Ic6738822da32e134af9dd3ed5737e611dffe85c9
2024-08-14 18:09:08 +00:00
Jens Axboe
7d59065aa4 BACKPORT: io_uring/fdinfo: remove need for sqpoll lock for thread/pid retrieval
A previous commit added a trylock for getting the SQPOLL thread info via
fdinfo, but this introduced a regression where we often fail to get it if
the thread is busy. For that case, we end up not printing the current CPU
and PID info.

Rather than rely on this lock, just print the pid we already stored in
the io_sq_data struct, and ensure we update the current CPU every time
we've slept or potentially rescheduled. The latter won't potentially be
100% accurate, but that wasn't the case before either as the task can
get migrated at any time unless it has been pinned at creation time.

We retain keeping the io_sq_data dereference inside the ctx->uring_lock,
as it has always been, as destruction of the thread and data happen below
that. We could make this RCU safe, but there's little point in doing that.

With this, we always print the last valid information we had, rather than
have spurious outputs with missing information.

Bug: 254441685
Fixes: 7644b1a1c9 ("io_uring/fdinfo: lock SQ thread while retrieving thread cpu/pid")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
(cherry picked from commit a0d45c3f596be53c1bd8822a1984532d14fdcea9)
[Lee: PF_NO_SETAFFINITY has been removed upstream causing surrounding diff to change]
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: Iab4aeffb443ed5140b33dd7274fee57c36f40f9e
2024-08-14 18:09:08 +00:00
Johannes Berg
30c4764908 UPSTREAM: wifi: cfg80211: fix assoc response warning on failed links
The warning here shouldn't be done before we even set the
bss field (or should've used the input data). Move the
assignment before the warning to fix it.

We noticed this now because of Wen's bugfix, where the bug
fixed there had previously hidden this other bug.

Bug: 254441685
Fixes: 53ad07e982 ("wifi: cfg80211: support reporting failed links")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
(cherry picked from commit c434b2be2d)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: Ibc3b59e9c61b74a9dbc25ddb2ee75f220bd0f5ae
2024-08-14 18:09:08 +00:00
Badhri Jagan Sridharan
7f2d1a477c UPSTREAM: usb: typec: tcpm: Add additional checks for contaminant
When transitioning from SNK_DEBOUNCED to unattached, its worthwhile to
check for contaminant to mitigate wakeups.

```
[81334.219571] Start toggling
[81334.228220] CC1: 0 -> 0, CC2: 0 -> 0 [state TOGGLING, polarity 0, disconnected]
[81334.305147] CC1: 0 -> 0, CC2: 0 -> 3 [state TOGGLING, polarity 0, connected]
[81334.305162] state change TOGGLING -> SNK_ATTACH_WAIT [rev3 NONE_AMS]
[81334.305187] pending state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED @ 170 ms [rev3 NONE_AMS]
[81334.475515] state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED [delayed 170 ms]
[81334.486480] CC1: 0 -> 0, CC2: 3 -> 0 [state SNK_DEBOUNCED, polarity 0, disconnected]
[81334.486495] state change SNK_DEBOUNCED -> SNK_DEBOUNCED [rev3 NONE_AMS]
[81334.486515] pending state change SNK_DEBOUNCED -> SNK_UNATTACHED @ 20 ms [rev3 NONE_AMS]
[81334.506621] state change SNK_DEBOUNCED -> SNK_UNATTACHED [delayed 20 ms]
[81334.506640] Start toggling
[81334.516972] CC1: 0 -> 0, CC2: 0 -> 0 [state TOGGLING, polarity 0, disconnected]
[81334.592759] CC1: 0 -> 0, CC2: 0 -> 3 [state TOGGLING, polarity 0, connected]
[81334.592773] state change TOGGLING -> SNK_ATTACH_WAIT [rev3 NONE_AMS]
[81334.592792] pending state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED @ 170 ms [rev3 NONE_AMS]
[81334.762940] state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED [delayed 170 ms]
[81334.773557] CC1: 0 -> 0, CC2: 3 -> 0 [state SNK_DEBOUNCED, polarity 0, disconnected]
[81334.773570] state change SNK_DEBOUNCED -> SNK_DEBOUNCED [rev3 NONE_AMS]
[81334.773588] pending state change SNK_DEBOUNCED -> SNK_UNATTACHED @ 20 ms [rev3 NONE_AMS]
[81334.793672] state change SNK_DEBOUNCED -> SNK_UNATTACHED [delayed 20 ms]
[81334.793681] Start toggling
[81334.801840] CC1: 0 -> 0, CC2: 0 -> 0 [state TOGGLING, polarity 0, disconnected]
[81334.878655] CC1: 0 -> 0, CC2: 0 -> 3 [state TOGGLING, polarity 0, connected]
[81334.878672] state change TOGGLING -> SNK_ATTACH_WAIT [rev3 NONE_AMS]
[81334.878696] pending state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED @ 170 ms [rev3 NONE_AMS]
[81335.048968] state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED [delayed 170 ms]
[81335.060684] CC1: 0 -> 0, CC2: 3 -> 0 [state SNK_DEBOUNCED, polarity 0, disconnected]
[81335.060754] state change SNK_DEBOUNCED -> SNK_DEBOUNCED [rev3 NONE_AMS]
[81335.060775] pending state change SNK_DEBOUNCED -> SNK_UNATTACHED @ 20 ms [rev3 NONE_AMS]
[81335.080884] state change SNK_DEBOUNCED -> SNK_UNATTACHED [delayed 20 ms]
[81335.080900] Start toggling
```

Bug: 254441685
Cc: stable@vger.kernel.org
Fixes: 599f008c25 ("usb: typec: tcpm: Add callbacks to mitigate wakeups due to contaminant")
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20231015053108.2349570-1-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 1a4a2df07c1f087704c24282cebe882268e38146)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I6251bd1c032515d96385744a751f792af54b2a31
2024-08-14 18:09:08 +00:00
Xiu Jianfeng
8dabbe8363 UPSTREAM: mm: remove duplicated vma->vm_flags check when expanding stack
expand_upwards() and expand_downwards() will return -EFAULT if VM_GROWSUP
or VM_GROWSDOWN is not correctly set in vma->vm_flags, however in
!CONFIG_STACK_GROWSUP case, expand_stack_locked() returns -EINVAL first if
!(vma->vm_flags & VM_GROWSDOWN) before calling expand_downwards(), to keep
the consistency with CONFIG_STACK_GROWSUP case, remove this check.

The usages of this function are as below:

A:fs/exec.c
ret = expand_stack_locked(vma, stack_base);
if (ret)
	ret = -EFAULT;

or

B:mm/memory.c mm/mmap.c
if (expand_stack_locked(vma, addr))
	return NULL;

which means the return value will not propagate to other places, so I
believe there is no user-visible effects of this change, and it's
unnecessary to backport to earlier versions.

Bug: 254441685
Link: https://lkml.kernel.org/r/20230906103312.645712-1-xiujianfeng@huaweicloud.com
Fixes: f440fa1ac9 ("mm: make find_extend_vma() fail if write lock not held")
Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
Cc: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 7fa38d0ea00ffe2cd3c95c96c85221b8ae221875)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: Ibb98909a9f9f07b64e339a55cb583b357f9d964b
2024-08-14 18:09:08 +00:00
Minchan Kim
ab384f79d4 ANDROID: Update the ABI symbol list
Adding the following symbols:
  - bitmap_find_free_region
  - bitmap_release_region
  - of_graph_get_endpoint_by_regs
  - __traceiter_android_rvh_mapping_shrinkable
  - __traceiter_android_rvh_util_est_update
  - __tracepoint_android_rvh_mapping_shrinkable
  - __tracepoint_android_rvh_util_est_update

Bug: 347958166
Change-Id: I4feadf95bf24da1a1554a828e181d4ec65cc9a32
Signed-off-by: Minchan Kim <minchan@google.com>
2024-08-13 20:24:01 +00:00
Minchan Kim
bbf690e531 ANDROID: add vendor hook for mapping_shrinkable
To control inode memory reclaim, add restricted vendor hook.

Bug: 347958166
Change-Id: Iefb9ef66c9fd5abae99adb1200263e4642f991cc
Signed-off-by: Minchan Kim <minchan@google.com>
2024-08-13 20:23:47 +00:00
Bart Van Assche
660e1a2695 FROMLIST: sd: Retry START STOP UNIT commands
During system resume, sd_start_stop_device() submits a START STOP UNIT
command to the SCSI device that is being resumed. That command is not
retried in case of a unit attention and hence may fail. An example:

[16575.983359] sd 0:0:0:3: [sdd] Starting disk
[16575.983693] sd 0:0:0:3: [sdd] Start/Stop Unit failed: Result: hostbyte=0x00 driverbyte=DRIVER_OK
[16575.983712] sd 0:0:0:3: [sdd] Sense Key : 0x6
[16575.983730] sd 0:0:0:3: [sdd] ASC=0x29 ASCQ=0x0
[16575.983738] sd 0:0:0:3: PM: dpm_run_callback(): scsi_bus_resume+0x0/0xa0 returns -5
[16575.983783] sd 0:0:0:3: PM: failed to resume async: error -5

Make the SCSI core retry the START STOP UNIT command if a retryable
error is encountered.

Cc: Damien Le Moal <dlemoal@kernel.org>
Cc: Mike Christie <michael.christie@oracle.com>
Change-Id: Ic8e0859c4455d93fcabee42f1598858571f5f3d1
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Bug: 348341595
Link: https://lore.kernel.org/linux-scsi/yq17ccp1i4b.fsf@ca-mkp.ca.oracle.com/T/#m52a26a50649b1d537cb129e5653f723509d6bde7
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2024-08-13 19:10:55 +00:00
Bart Van Assche
4ab8dafa79 FROMLIST: scsi: core: Retry passthrough commands if SCMD_RETRY_PASSTHROUGH is set
The SCSI core does not retry passthrough commands even if the SCSI device
reports a retryable unit attention condition. Support retrying in this case
by introducing the SCMD_RETRY_PASSTHROUGH flag.

Cc: Damien Le Moal <dlemoal@kernel.org>
Cc: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Bart Van Assche <bvanassche@google.com>
Bug: 348341595
Link: https://lore.kernel.org/linux-scsi/yq17ccp1i4b.fsf@ca-mkp.ca.oracle.com/T/#mfdb1a3a0d6d4803afe1098bdafc12fd4168e30e0
Change-Id: I44092a0d8853fd61bf619e5bae6d65eaaddad780
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2024-08-13 19:10:55 +00:00
Greg Kroah-Hartman
c6bbb760e9 ANDROID: ABI fixup for abi break in struct dst_ops
In commit 81dd3c82a4 ("net: fix __dst_negative_advice() race") the
struct dst_ops callback negative_advice is callback changes function
parameters.  But as this pointer is part of a structure that is tracked
in the ABI checker, the tool triggers when this is changed.

However, the callback pointer is internal to the networking stack, so
changing the function type is safe, so needing to preserve this is not
required.  To do so, switch the function pointer type back to the old
one so that the checking tools pass, AND then do a hard cast of the
function pointer to the new type when assigning and calling the
function.

[6.1.y backport note, work around --Werror=cast-function-type issue by
 abusing void * for function pointer types, despite its best effort, C
 still let's us shoot our foot off if we really want to!]

Bug: 343727534
Fixes: 81dd3c82a4 ("net: fix __dst_negative_advice() race")
Change-Id: I48d4ab4bbd29f8edc8fbd7923828b7f78a23e12e
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-08-13 17:05:31 +00:00
Greg Kroah-Hartman
079775fd35 Merge 6.1.94 into android14-6.1-lts
Changes in 6.1.94
	drm: Check output polling initialized before disabling
	drm: Check polling initialized before enabling in drm_helper_probe_single_connector_modes
	Bluetooth: btrtl: Add missing MODULE_FIRMWARE declarations
	maple_tree: fix allocation in mas_sparse_area()
	maple_tree: fix mas_empty_area_rev() null pointer dereference
	mmc: core: Do not force a retune before RPMB switch
	afs: Don't cross .backup mountpoint from backup volume
	riscv: signal: handle syscall restart before get_signal
	nilfs2: fix use-after-free of timer for log writer thread
	drm/i915/audio: Fix audio time stamp programming for DP
	mptcp: avoid some duplicate code in socket option handling
	mptcp: cleanup SOL_TCP handling
	mptcp: fix full TCP keep-alive support
	vxlan: Fix regression when dropping packets due to invalid src addresses
	scripts/gdb: fix SB_* constants parsing
	f2fs: fix to do sanity check on i_xattr_nid in sanity_check_inode()
	media: lgdt3306a: Add a check against null-pointer-def
	drm/amdgpu: add error handle to avoid out-of-bounds
	bcache: fix variable length array abuse in btree_iter
	wifi: rtw89: correct aSIFSTime for 6GHz band
	ata: pata_legacy: make legacy_exit() work again
	thermal/drivers/qcom/lmh: Check for SCM availability at probe
	soc: qcom: rpmh-rsc: Enhance check for VRM in-flight request
	ACPI: resource: Do IRQ override on TongFang GXxHRXx and GMxHGxx
	arm64: tegra: Correct Tegra132 I2C alias
	arm64: dts: qcom: qcs404: fix bluetooth device address
	md/raid5: fix deadlock that raid5d() wait for itself to clear MD_SB_CHANGE_PENDING
	wifi: rtw89: pci: correct TX resource checking for PCI DMA channel of firmware command
	wifi: rtl8xxxu: Fix the TX power of RTL8192CU, RTL8723AU
	wifi: rtlwifi: rtl8192de: Fix 5 GHz TX power
	wifi: rtlwifi: rtl8192de: Fix low speed with WPA3-SAE
	wifi: rtlwifi: rtl8192de: Fix endianness issue in RX path
	arm64: dts: hi3798cv200: fix the size of GICR
	media: mc: Fix graph walk in media_pipeline_start
	media: mc: mark the media devnode as registered from the, start
	media: mxl5xx: Move xpt structures off stack
	media: v4l2-core: hold videodev_lock until dev reg, finishes
	mmc: core: Add mmc_gpiod_set_cd_config() function
	mmc: sdhci: Add support for "Tuning Error" interrupts
	mmc: sdhci-acpi: Sort DMI quirks alphabetically
	mmc: sdhci-acpi: Fix Lenovo Yoga Tablet 2 Pro 1380 sdcard slot not working
	mmc: sdhci-acpi: Disable write protect detection on Toshiba WT10-A
	mmc: sdhci-acpi: Add quirk to enable pull-up on the card-detect GPIO on Asus T100TA
	fbdev: savage: Handle err return when savagefb_check_var failed
	drm/amdgpu/atomfirmware: add intergrated info v2.3 table
	9p: add missing locking around taking dentry fid list
	drm/amd: Fix shutdown (again) on some SMU v13.0.4/11 platforms
	KVM: arm64: Fix AArch32 register narrowing on userspace write
	KVM: arm64: Allow AArch32 PSTATE.M to be restored as System mode
	KVM: arm64: AArch32: Fix spurious trapping of conditional instructions
	crypto: ecdsa - Fix module auto-load on add-key
	crypto: ecrdsa - Fix module auto-load on add_key
	crypto: qat - Fix ADF_DEV_RESET_SYNC memory leak
	mm: fix race between __split_huge_pmd_locked() and GUP-fast
	scsi: core: Handle devices which return an unusually large VPD page count
	net/ipv6: Fix route deleting failure when metric equals 0
	net/9p: fix uninit-value in p9_client_rpc()
	kmsan: do not wipe out origin when doing partial unpoisoning
	cpufreq: amd-pstate: Fix the inconsistency in max frequency units
	intel_th: pci: Add Meteor Lake-S CPU support
	sparc64: Fix number of online CPUs
	mm/cma: drop incorrect alignment check in cma_init_reserved_mem
	mm/hugetlb: pass correct order_per_bit to cma_declare_contiguous_nid
	watchdog: rti_wdt: Set min_hw_heartbeat_ms to accommodate a safety margin
	kdb: Fix buffer overflow during tab-complete
	kdb: Use format-strings rather than '\0' injection in kdb_read()
	kdb: Fix console handling when editing and tab-completing commands
	kdb: Merge identical case statements in kdb_read()
	kdb: Use format-specifiers rather than memset() for padding in kdb_read()
	net: fix __dst_negative_advice() race
	sparc: move struct termio to asm/termios.h
	ext4: set type of ac_groups_linear_remaining to __u32 to avoid overflow
	ext4: fix mb_cache_entry's e_refcnt leak in ext4_xattr_block_cache_find()
	parisc: Define HAVE_ARCH_HUGETLB_UNMAPPED_AREA
	parisc: Define sigset_t in parisc uapi header
	s390/ap: Fix crash in AP internal function modify_bitmap()
	s390/cpacf: Split and rework cpacf query functions
	s390/cpacf: Make use of invalid opcode produce a link error
	i3c: master: svc: fix invalidate IBI type and miss call client IBI handler
	EDAC/igen6: Convert PCIBIOS_* return codes to errnos
	nfs: fix undefined behavior in nfs_block_bits()
	NFS: Fix READ_PLUS when server doesn't support OP_READ_PLUS
	btrfs: fix crash on racing fsync and size-extending write into prealloc
	powerpc/bpf: enforce full ordering for ATOMIC operations with BPF_FETCH
	smb: client: fix deadlock in smb2_find_smb_tcon()
	smp: Provide 'setup_max_cpus' definition on UP too
	Linux 6.1.94

Change-Id: I0663c36ce2abdcc2ad77b5f86838c727d6b7cc12
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-08-13 12:02:36 +00:00
Seiya Wang
8288de8306 ANDROID: GKI: Update symbol list for mtk
1 function symbol(s) added
  'struct snd_kcontrol* snd_soc_cnew(const struct snd_kcontrol_new*, void*, const char*, const char*)'

Bug: 359437271
Signed-off-by: Seiya Wang <seiya.wang@mediatek.com>
Change-Id: I53d2771c95cabfc6931a83eb43e1499b9de8bc8b
2024-08-13 09:48:27 +00:00
Greg Kroah-Hartman
9d37e2aae7 ANDROID: add __module_get to db854c symbol list.
In commit e448d1bad7 ("net: qrtr: ns: Fix module refcnt"), a bug was
fixed with regards to reference counting, so now this build target needs
acces to the __module_get symbol (it's already part of the normal
supported list, just not for this target.)

Fixes: e448d1bad7 ("net: qrtr: ns: Fix module refcnt")
Change-Id: Iba1a30ba306340318e88120bd87f7e318554f095
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-08-12 16:32:49 +00:00
Greg Kroah-Hartman
5ccfb1bf19 Revert "drm/mipi-dsi: use correct return type for the DSC functions"
This reverts commit 26f73934ee which is
commit de1c705c50326acaceaf1f02bc5bf6f267c572bd upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: Ib7f794ccd2b16db0b8958640ad7bd8f4e5c7296a
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-08-12 15:34:33 +00:00
Greg Kroah-Hartman
d201efdaa4 Revert "media: cec: core: avoid recursive cec_claim_log_addrs"
This reverts commit 302077d270 which is
commit 47c82aac10a6954d68f29f10d9758d016e8e5af1 upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: I8c6b68d3db780285be19b84004758f46be37048b
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-08-12 13:28:28 +00:00
Greg Kroah-Hartman
dcb51feb27 Revert "Bluetooth: compute LE flow credits based on recvbuf space"
This reverts commit 632b63f127 which is
commit ce60b9231b66710b6ee24042ded26efee120ecfc upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: I6685f67d86c6def437924a4e4bc2bdb88d55024c
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-08-12 13:26:37 +00:00
Greg Kroah-Hartman
a4d90a8f3c Merge 6.1.93 into android14-6.1-lts
Changes in 6.1.93
	SUNRPC: Fix loop termination condition in gss_free_in_token_pages()
	x86/tsc: Trust initial offset in architectural TSC-adjust MSRs
	ftrace: Fix possible use-after-free issue in ftrace_location()
	tty: n_gsm: fix possible out-of-bounds in gsm0_receive()
	tty: n_gsm: fix missing receive state reset after mode switch
	speakup: Fix sizeof() vs ARRAY_SIZE() bug
	serial: 8250_bcm7271: use default_mux_rate if possible
	serial: 8520_mtk: Set RTS on shutdown for Rx in-band wakeup
	io_uring: fail NOP if non-zero op flags is passed in
	Revert "r8169: don't try to disable interrupts if NAPI is, scheduled already"
	r8169: Fix possible ring buffer corruption on fragmented Tx packets.
	ring-buffer: Fix a race between readers and resize checks
	tools/latency-collector: Fix -Wformat-security compile warns
	tools/nolibc/stdlib: fix memory error in realloc()
	net: smc91x: Fix m68k kernel compilation for ColdFire CPU
	nilfs2: fix unexpected freezing of nilfs_segctor_sync()
	nilfs2: fix potential hang in nilfs_detach_log_writer()
	fs/ntfs3: Remove max link count info display during driver init
	fs/ntfs3: Taking DOS names into account during link counting
	fs/ntfs3: Fix case when index is reused during tree transformation
	fs/ntfs3: Break dir enumeration if directory contents error
	ksmbd: avoid to send duplicate oplock break notifications
	ksmbd: ignore trailing slashes in share paths
	ALSA: hda/realtek: fix mute/micmute LEDs don't work for ProBook 440/460 G11.
	ALSA: core: Fix NULL module pointer assignment at card init
	ALSA: Fix deadlocks with kctl removals at disconnection
	KEYS: asymmetric: Add missing dependencies of FIPS_SIGNATURE_SELFTEST
	wifi: mac80211: don't use rate mask for scanning
	wifi: mac80211: ensure beacon is non-S1G prior to extracting the beacon timestamp field
	wifi: cfg80211: fix the order of arguments for trace events of the tx_rx_evt class
	dt-bindings: rockchip: grf: Add missing type to 'pcie-phy' node
	net: usb: qmi_wwan: add Telit FN920C04 compositions
	drm/amd/display: Set color_mgmt_changed to true on unsuspend
	drm/amdgpu: Update BO eviction priorities
	drm/amdgpu: Fix the ring buffer size for queue VM flush
	drm/amdgpu/mes: fix use-after-free issue
	LoongArch: Lately init pmu after smp is online
	selftests: sud_test: return correct emulated syscall value on RISC-V
	sched/isolation: Fix boot crash when maxcpus < first housekeeping CPU
	ASoC: Intel: bytcr_rt5640: Apply Asus T100TA quirk to Asus T100TAM too
	regulator: irq_helpers: duplicate IRQ name
	ASoC: rt5645: Fix the electric noise due to the CBJ contacts floating
	ASoC: dt-bindings: rt5645: add cbj sleeve gpio property
	regulator: vqmmc-ipq4019: fix module autoloading
	ASoC: rt715: add vendor clear control register
	ASoC: rt715-sdca: volume step modification
	KVM: selftests: Add test for uaccesses to non-existent vgic-v2 CPUIF
	x86/efistub: Omit physical KASLR when memory reservations exist
	efi: libstub: only free priv.runtime_map when allocated
	KVM: x86: Don't advertise guest.MAXPHYADDR as host.MAXPHYADDR in CPUID
	genirq/cpuhotplug, x86/vector: Prevent vector leak during CPU offline
	fpga: dfl-pci: add PCI subdevice ID for Intel D5005 card
	softirq: Fix suspicious RCU usage in __do_softirq()
	ASoC: da7219-aad: fix usage of device_get_named_child_node()
	ALSA: hda: intel-dsp-config: harden I2C/I2S codec detection
	drm/amd/display: Add dtbclk access to dcn315
	drm/amd/display: Add VCO speed parameter for DCN31 FPU
	drm/amdkfd: Flush the process wq before creating a kfd_process
	x86/mm: Remove broken vsyscall emulation code from the page fault code
	nvme: find numa distance only if controller has valid numa id
	nvmet-auth: return the error code to the nvmet_auth_host_hash() callers
	nvmet-auth: replace pr_debug() with pr_err() to report an error.
	nvmet-tcp: fix possible memory leak when tearing down a controller
	nvmet: fix nvme status code when namespace is disabled
	epoll: be better about file lifetimes
	nvmet: prevent sprintf() overflow in nvmet_subsys_nsid_exists()
	openpromfs: finish conversion to the new mount API
	crypto: bcm - Fix pointer arithmetic
	mm/slub, kunit: Use inverted data to corrupt kmem cache
	firmware: raspberrypi: Use correct device for DMA mappings
	ecryptfs: Fix buffer size for tag 66 packet
	nilfs2: fix out-of-range warning
	parisc: add missing export of __cmpxchg_u8()
	crypto: ccp - drop platform ifdef checks
	crypto: x86/nh-avx2 - add missing vzeroupper
	crypto: x86/sha256-avx2 - add missing vzeroupper
	crypto: x86/sha512-avx2 - add missing vzeroupper
	s390/cio: fix tracepoint subchannel type field
	io_uring: don't use TIF_NOTIFY_SIGNAL to test for availability of task_work
	io_uring: use the right type for work_llist empty check
	rcu-tasks: Fix show_rcu_tasks_trace_gp_kthread buffer overflow
	rcu: Fix buffer overflow in print_cpu_stall_info()
	ARM: configs: sunxi: Enable DRM_DW_HDMI
	jffs2: prevent xattr node from overflowing the eraseblock
	soc: mediatek: cmdq: Fix typo of CMDQ_JUMP_RELATIVE
	null_blk: Fix missing mutex_destroy() at module removal
	md: fix resync softlockup when bitmap size is less than array size
	block: open code __blk_account_io_start()
	block: open code __blk_account_io_done()
	block: support to account io_ticks precisely
	wifi: ath10k: poll service ready message before failing
	wifi: brcmfmac: pcie: handle randbuf allocation failure
	wifi: ath11k: don't force enable power save on non-running vdevs
	bpftool: Fix missing pids during link show
	x86/boot: Ignore relocations in .notes sections in walk_relocs() too
	sched/fair: Add EAS checks before updating root_domain::overutilized
	ACPI: Fix Generic Initiator Affinity _OSC bit
	qed: avoid truncating work queue length
	net/mlx5e: Fail with messages when params are not valid for XSK
	mlx5: stop warning for 64KB pages
	bitops: add missing prototype check
	wifi: carl9170: re-fix fortified-memset warning
	bpf: Pack struct bpf_fib_lookup
	scsi: ufs: qcom: Perform read back after writing reset bit
	scsi: ufs: qcom: Perform read back after writing REG_UFS_SYS1CLK_1US
	scsi: ufs: ufs-qcom: Fix the Qcom register name for offset 0xD0
	scsi: ufs: ufs-qcom: Clear qunipro_g4_sel for HW version major 5
	scsi: ufs: qcom: Perform read back after writing unipro mode
	scsi: ufs: qcom: Perform read back after writing CGC enable
	scsi: ufs: cdns-pltfrm: Perform read back after writing HCLKDIV
	scsi: ufs: core: Perform read back after disabling interrupts
	scsi: ufs: core: Perform read back after disabling UIC_COMMAND_COMPL
	ACPI: LPSS: Advertise number of chip selects via property
	irqchip/alpine-msi: Fix off-by-one in allocation error path
	irqchip/loongson-pch-msi: Fix off-by-one on allocation error path
	ACPI: disable -Wstringop-truncation
	gfs2: Don't forget to complete delayed withdraw
	gfs2: Fix "ignore unlock failures after withdraw"
	x86/boot/64: Clear most of CR4 in startup_64(), except PAE, MCE and LA57
	selftests/bpf: Fix umount cgroup2 error in test_sockmap
	cpufreq: exit() callback is optional
	x86/pat: Introduce lookup_address_in_pgd_attr()
	x86/pat: Restructure _lookup_address_cpa()
	x86/pat: Fix W^X violation false-positives when running as Xen PV guest
	net: export inet_lookup_reuseport and inet6_lookup_reuseport
	net: remove duplicate reuseport_lookup functions
	udp: Avoid call to compute_score on multiple sites
	cppc_cpufreq: Fix possible null pointer dereference
	scsi: libsas: Fix the failure of adding phy with zero-address to port
	scsi: hpsa: Fix allocation size for Scsi_Host private data
	x86/purgatory: Switch to the position-independent small code model
	thermal/drivers/tsens: Fix null pointer dereference
	wifi: ath10k: Fix an error code problem in ath10k_dbg_sta_write_peer_debug_trigger()
	selftests/bpf: Fix a fd leak in error paths in open_netns
	wifi: ath10k: populate board data for WCN3990
	net: dsa: mv88e6xxx: Add support for model-specific pre- and post-reset handlers
	net: dsa: mv88e6xxx: Avoid EEPROM timeout without EEPROM on 88E6250-family switches
	tcp: avoid premature drops in tcp_add_backlog()
	pwm: sti: Convert to platform remove callback returning void
	pwm: sti: Prepare removing pwm_chip from driver data
	pwm: sti: Simplify probe function using devm functions
	drivers/perf: hisi_pcie: Fix out-of-bound access when valid event group
	drivers/perf: hisi: hns3: Fix out-of-bound access when valid event group
	drivers/perf: hisi: hns3: Actually use devm_add_action_or_reset()
	net: give more chances to rcu in netdev_wait_allrefs_any()
	macintosh/via-macii: Fix "BUG: sleeping function called from invalid context"
	wifi: carl9170: add a proper sanity check for endpoints
	wifi: ar5523: enable proper endpoint verification
	sh: kprobes: Merge arch_copy_kprobe() into arch_prepare_kprobe()
	Revert "sh: Handle calling csum_partial with misaligned data"
	wifi: mt76: mt7603: add wpdma tx eof flag for PSE client reset
	libbpf: Fix error message in attach_kprobe_multi
	selftests/binderfs: use the Makefile's rules, not Make's implicit rules
	selftests/resctrl: fix clang build failure: use LOCAL_HDRS
	selftests: default to host arch for LLVM builds
	kunit: Fix kthread reference
	HID: intel-ish-hid: ipc: Add check for pci_alloc_irq_vectors
	scsi: bfa: Ensure the copied buf is NUL terminated
	scsi: qedf: Ensure the copied buf is NUL terminated
	scsi: qla2xxx: Fix debugfs output for fw_resource_count
	kernel/numa.c: Move logging out of numa.h
	x86/numa: Fix SRAT lookup of CFMWS ranges with numa_fill_memblks()
	wifi: mwl8k: initialize cmd->addr[] properly
	HID: amd_sfh: Handle "no sensors" in PM operations
	usb: aqc111: stop lying about skb->truesize
	net: usb: sr9700: stop lying about skb->truesize
	m68k: Fix spinlock race in kernel thread creation
	m68k: mac: Fix reboot hang on Mac IIci
	net: ipv6: fix wrong start position when receive hop-by-hop fragment
	eth: sungem: remove .ndo_poll_controller to avoid deadlocks
	selftests: net: move amt to socat for better compatibility
	net: ethernet: cortina: Locking fixes
	af_unix: Fix data races in unix_release_sock/unix_stream_sendmsg
	net: usb: smsc95xx: stop lying about skb->truesize
	net: openvswitch: fix overwriting ct original tuple for ICMPv6
	ipv6: sr: add missing seg6_local_exit
	ipv6: sr: fix incorrect unregister order
	ipv6: sr: fix invalid unregister error path
	net/mlx5: Add a timeout to acquire the command queue semaphore
	net/mlx5: Discard command completions in internal error
	s390/bpf: Emit a barrier for BPF_FETCH instructions
	riscv, bpf: make some atomic operations fully ordered
	ax25: Use kernel universal linked list to implement ax25_dev_list
	ax25: Fix reference count leak issues of ax25_dev
	ax25: Fix reference count leak issue of net_device
	mptcp: SO_KEEPALIVE: fix getsockopt support
	Bluetooth: Consolidate code around sk_alloc into a helper function
	Bluetooth: compute LE flow credits based on recvbuf space
	Bluetooth: qca: Fix error code in qca_read_fw_build_info()
	drm/bridge: Fix improper bridge init order with pre_enable_prev_first
	printk: Let no_printk() use _printk()
	dev_printk: Add and use dev_no_printk()
	drm/lcdif: Do not disable clocks on already suspended hardware
	drm/panel-samsung-atna33xc20: Use ktime_get_boottime for delays
	drm/dp: Don't attempt AUX transfers when eDP panels are not powered
	drm/panel: atna33xc20: Fix unbalanced regulator in the case HPD doesn't assert
	drm/amd/display: Fix potential index out of bounds in color transformation function
	ASoC: Intel: Disable route checks for Skylake boards
	ASoC: Intel: avs: ssm4567: Do not ignore route checks
	mtd: core: Report error if first mtd_otp_size() call fails in mtd_otp_nvmem_add()
	mtd: rawnand: hynix: fixed typo
	fbdev: shmobile: fix snprintf truncation
	ASoC: kirkwood: Fix potential NULL dereference
	drm/meson: vclk: fix calculation of 59.94 fractional rates
	drm/mediatek: Add 0 size check to mtk_drm_gem_obj
	powerpc/fsl-soc: hide unused const variable
	fbdev: sisfb: hide unused variables
	ASoC: Intel: avs: Fix ASRC module initialization
	ASoC: Intel: avs: Fix potential integer overflow
	media: ngene: Add dvb_ca_en50221_init return value check
	media: rcar-vin: work around -Wenum-compare-conditional warning
	media: radio-shark2: Avoid led_names truncations
	drm: bridge: cdns-mhdp8546: Fix possible null pointer dereference
	drm/msm/dp: allow voltage swing / pre emphasis of 3
	drm/msm/dp: Return IRQ_NONE for unhandled interrupts
	drm/msm/dp: Avoid a long timeout for AUX transfer if nothing connected
	media: ipu3-cio2: Request IRQ earlier
	media: dt-bindings: ovti,ov2680: Fix the power supply names
	fbdev: sh7760fb: allow modular build
	media: atomisp: ssh_css: Fix a null-pointer dereference in load_video_binaries
	drm/arm/malidp: fix a possible null pointer dereference
	drm: vc4: Fix possible null pointer dereference
	ASoC: tracing: Export SND_SOC_DAPM_DIR_OUT to its value
	drm/bridge: anx7625: Don't log an error when DSI host can't be found
	drm/bridge: icn6211: Don't log an error when DSI host can't be found
	drm/bridge: lt8912b: Don't log an error when DSI host can't be found
	drm/bridge: lt9611: Don't log an error when DSI host can't be found
	drm/bridge: lt9611uxc: Don't log an error when DSI host can't be found
	drm/bridge: tc358775: Don't log an error when DSI host can't be found
	drm/bridge: dpc3433: Don't log an error when DSI host can't be found
	drm/panel: novatek-nt35950: Don't log an error when DSI host can't be found
	drm/panel: simple: Add missing Innolux G121X1-L03 format, flags, connector
	drm/mipi-dsi: use correct return type for the DSC functions
	drm/rockchip: vop2: Do not divide height twice for YUV
	clk: samsung: exynosautov9: fix wrong pll clock id value
	RDMA/mlx5: Adding remote atomic access flag to updatable flags
	RDMA/hns: Fix return value in hns_roce_map_mr_sg
	RDMA/hns: Fix deadlock on SRQ async events.
	RDMA/hns: Fix UAF for cq async event
	RDMA/hns: Fix GMV table pagesize
	RDMA/hns: Use complete parentheses in macros
	RDMA/hns: Modify the print level of CQE error
	clk: mediatek: mt8365-mm: fix DPI0 parent
	clk: rs9: fix wrong default value for clock amplitude
	RDMA/rxe: Fix seg fault in rxe_comp_queue_pkt
	RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_net.c
	RDMA/rxe: Fix incorrect rxe_put in error path
	IB/mlx5: Use __iowrite64_copy() for write combining stores
	clk: renesas: r8a779a0: Fix CANFD parent clock
	clk: renesas: r9a07g043: Add clock and reset entry for PLIC
	lib/test_hmm.c: handle src_pfns and dst_pfns allocation failure
	clk: qcom: dispcc-sm8450: fix DisplayPort clocks
	clk: qcom: dispcc-sm6350: fix DisplayPort clocks
	clk: qcom: mmcc-msm8998: fix venus clock issue
	x86/insn: Fix PUSH instruction in x86 instruction decoder opcode map
	x86/insn: Add VEX versions of VPDPBUSD, VPDPBUSDS, VPDPWSSD and VPDPWSSDS
	ext4: avoid excessive credit estimate in ext4_tmpfile()
	virt: acrn: stop using follow_pfn
	drivers/virt/acrn: fix PFNMAP PTE checks in acrn_vm_ram_map()
	sunrpc: removed redundant procp check
	ext4: simplify calculation of blkoff in ext4_mb_new_blocks_simple
	ext4: fix unit mismatch in ext4_mb_new_blocks_simple
	ext4: try all groups in ext4_mb_new_blocks_simple
	ext4: remove unused parameter from ext4_mb_new_blocks_simple()
	ext4: fix potential unnitialized variable
	SUNRPC: Fix gss_free_in_token_pages()
	selftests/kcmp: remove unused open mode
	RDMA/IPoIB: Fix format truncation compilation errors
	net: add pskb_may_pull_reason() helper
	net: bridge: xmit: make sure we have at least eth header len bytes
	selftests: net: bridge: increase IGMP/MLD exclude timeout membership interval
	net: bridge: mst: fix vlan use-after-free
	net: qrtr: ns: Fix module refcnt
	netrom: fix possible dead-lock in nr_rt_ioctl()
	af_packet: do not call packet_read_pending() from tpacket_destruct_skb()
	sched/fair: Allow disabling sched_balance_newidle with sched_relax_domain_level
	sched/core: Fix incorrect initialization of the 'burst' parameter in cpu_max_write()
	scsi: ufs: ufs-qcom: Clear qunipro_g4_sel for HW major version > 5
	perf record: Delete session after stopping sideband thread
	perf probe: Add missing libgen.h header needed for using basename()
	iio: core: Leave private pointer NULL when no private data supplied
	greybus: lights: check return of get_channel_from_mode
	f2fs: multidev: fix to recognize valid zero block address
	f2fs: fix to wait on page writeback in __clone_blkaddrs()
	counter: linux/counter.h: fix Excess kernel-doc description warning
	perf annotate: Get rid of duplicate --group option item
	soundwire: cadence: fix invalid PDI offset
	dmaengine: idma64: Add check for dma_set_max_seg_size
	firmware: dmi-id: add a release callback function
	serial: max3100: Lock port->lock when calling uart_handle_cts_change()
	serial: max3100: Update uart_driver_registered on driver removal
	serial: max3100: Fix bitwise types
	greybus: arche-ctrl: move device table to its right location
	PCI: tegra194: Fix probe path for Endpoint mode
	serial: sc16is7xx: add proper sched.h include for sched_set_fifo()
	interconnect: qcom: qcm2290: Fix mas_snoc_bimc QoS port assignment
	arm64: dts: meson: fix S4 power-controller node
	perf test: Add -w/--workload option
	perf test: Add 'thloop' test workload
	perf test: Add 'leafloop' test workload
	perf test: Add 'sqrtloop' test workload
	perf test: Add 'brstack' test workload
	perf test: Add 'datasym' test workload
	perf tests: Make "test data symbol" more robust on Neoverse N1
	dt-bindings: PCI: rcar-pci-host: Add optional regulators
	dt-bindings: PCI: rcar-pci-host: Add missing IOMMU properties
	f2fs: compress: fix to relocate check condition in f2fs_{release,reserve}_compress_blocks()
	f2fs: compress: fix to relocate check condition in f2fs_ioc_{,de}compress_file()
	f2fs: fix typos in comments
	f2fs: fix to relocate check condition in f2fs_fallocate()
	f2fs: fix to check pinfile flag in f2fs_move_file_range()
	iio: adc: stm32: Fixing err code to not indicate success
	coresight: etm4x: Fix unbalanced pm_runtime_enable()
	perf docs: Document bpf event modifier
	iio: pressure: dps310: support negative temperature values
	coresight: etm4x: Do not hardcode IOMEM access for register restore
	coresight: etm4x: Do not save/restore Data trace control registers
	coresight: etm4x: Safe access for TRCQCLTR
	coresight: etm4x: Fix access to resource selector registers
	fpga: region: add owner module and take its refcount
	microblaze: Remove gcc flag for non existing early_printk.c file
	microblaze: Remove early printk call from cpuinfo-static.c
	perf intel-pt: Fix unassigned instruction op (discovered by MemorySanitizer)
	ovl: remove upper umask handling from ovl_create_upper()
	VMCI: Fix an error handling path in vmci_guest_probe_device()
	dt-bindings: pinctrl: mediatek: mt7622: fix array properties
	watchdog: bd9576: Drop "always-running" property
	watchdog: sa1100: Fix PTR_ERR_OR_ZERO() vs NULL check in sa1100dog_probe()
	usb: gadget: u_audio: Fix race condition use of controls after free during gadget unbind.
	usb: gadget: u_audio: Clear uac pointer when freed.
	stm class: Fix a double free in stm_register_device()
	ppdev: Remove usage of the deprecated ida_simple_xx() API
	ppdev: Add an error check in register_device
	perf bench internals inject-build-id: Fix trap divide when collecting just one DSO
	perf ui browser: Don't save pointer to stack memory
	extcon: max8997: select IRQ_DOMAIN instead of depending on it
	PCI/EDR: Align EDR_PORT_DPC_ENABLE_DSM with PCI Firmware r3.3
	PCI/EDR: Align EDR_PORT_LOCATE_DSM with PCI Firmware r3.3
	perf ui browser: Avoid SEGV on title
	perf report: Avoid SEGV in report__setup_sample_type()
	f2fs: compress: fix to update i_compr_blocks correctly
	f2fs: compress: fix to cover {reserve,release}_compress_blocks() w/ cp_rwsem lock
	f2fs: fix to release node block count in error path of f2fs_new_node_page()
	f2fs: compress: don't allow unaligned truncation on released compress inode
	serial: sh-sci: protect invalidating RXDMA on shutdown
	libsubcmd: Fix parse-options memory leak
	perf daemon: Fix file leak in daemon_session__control
	f2fs: fix to add missing iput() in gc_data_segment()
	perf stat: Don't display metric header for non-leader uncore events
	LoongArch: Fix callchain parse error with kernel tracepoint events again
	s390/vdso: filter out mno-pic-data-is-text-relative cflag
	s390/vdso64: filter out munaligned-symbols flag for vdso
	s390/vdso: Generate unwind information for C modules
	s390/vdso: Use standard stack frame layout
	s390/ipl: Fix incorrect initialization of len fields in nvme reipl block
	s390/ipl: Fix incorrect initialization of nvme dump block
	s390/boot: Remove alt_stfle_fac_list from decompressor
	Input: ims-pcu - fix printf string overflow
	Input: ioc3kbd - convert to platform remove callback returning void
	Input: ioc3kbd - add device table
	mmc: sdhci_am654: Add tuning algorithm for delay chain
	mmc: sdhci_am654: Write ITAPDLY for DDR52 timing
	mmc: sdhci_am654: Drop lookup for deprecated ti,otap-del-sel
	mmc: sdhci_am654: Add OTAP/ITAP delay enable
	mmc: sdhci_am654: Add ITAPDLYSEL in sdhci_j721e_4bit_set_clock
	mmc: sdhci_am654: Fix ITAPDLY for HS400 timing
	Input: pm8xxx-vibrator - correct VIB_MAX_LEVELS calculation
	drm/msm/dsi: Print dual-DSI-adjusted pclk instead of original mode pclk
	drm/msm/dpu: Always flush the slave INTF on the CTL
	drm/mediatek: dp: Move PHY registration to new function
	drm/mediatek: dp: Add support for embedded DisplayPort aux-bus
	drm/mediatek: dp: Fix mtk_dp_aux_transfer return value
	um: Fix return value in ubd_init()
	um: Add winch to winch_handlers before registering winch IRQ
	um: vector: fix bpfflash parameter evaluation
	fs/ntfs3: Use 64 bit variable to avoid 32 bit overflow
	fs/ntfs3: Use variable length array instead of fixed size
	drm/bridge: tc358775: fix support for jeida-18 and jeida-24
	media: stk1160: fix bounds checking in stk1160_copy_video()
	scsi: qla2xxx: Replace all non-returning strlcpy() with strscpy()
	Input: cyapa - add missing input core locking to suspend/resume functions
	media: flexcop-usb: fix sanity check of bNumEndpoints
	powerpc/pseries: Add failure related checks for h_get_mpp and h_get_ppp
	um: Fix the -Wmissing-prototypes warning for __switch_mm
	um: Fix the -Wmissing-prototypes warning for get_thread_reg
	um: Fix the declaration of kasan_map_memory
	media: sunxi: a83-mips-csi2: also select GENERIC_PHY
	media: cec: cec-adap: always cancel work in cec_transmit_msg_fh
	media: cec: cec-api: add locking in cec_release()
	media: cec: core: avoid recursive cec_claim_log_addrs
	media: cec: core: avoid confusing "transmit timed out" message
	Revert "drm/bridge: ti-sn65dsi83: Fix enable error path"
	drm/msm: Enable clamp_to_idle for 7c3
	drm/msm/a6xx: Avoid a nullptr dereference when speedbin setting fails
	null_blk: Fix the WARNING: modpost: missing MODULE_DESCRIPTION()
	ALSA: hda/cs_dsp_ctl: Use private_free for control cleanup
	ASoC: mediatek: mt8192: fix register configuration for tdm
	regulator: bd71828: Don't overwrite runtime voltages
	perf/arm-dmc620: Fix lockdep assert in ->event_init()
	x86/kconfig: Select ARCH_WANT_FRAME_POINTERS again when UNWINDER_FRAME_POINTER=y
	net: Always descend into dsa/ folder with CONFIG_NET_DSA enabled
	ipv6: sr: fix missing sk_buff release in seg6_input_core
	selftests: net: kill smcrouted in the cleanup logic in amt.sh
	nfc: nci: Fix uninit-value in nci_rx_work
	ASoC: tas2552: Add TX path for capturing AUDIO-OUT data
	NFSv4: Fixup smatch warning for ambiguous return
	nfs: keep server info for remounts
	sunrpc: fix NFSACL RPC retry on soft mount
	rpcrdma: fix handling for RDMA_CM_EVENT_DEVICE_REMOVAL
	af_unix: Update unix_sk(sk)->oob_skb under sk_receive_queue lock.
	ipv6: sr: fix memleak in seg6_hmac_init_algo
	tcp: Fix shift-out-of-bounds in dctcp_update_alpha().
	pNFS/filelayout: fixup pNfs allocation modes
	openvswitch: Set the skbuff pkt_type for proper pmtud support.
	arm64: asm-bug: Add .align 2 to the end of __BUG_ENTRY
	rv: Update rv_en(dis)able_monitor doc to match kernel-doc
	virtio: delete vq in vp_find_vqs_msix() when request_irq() fails
	riscv: stacktrace: Make walk_stackframe cross pt_regs frame
	riscv: stacktrace: fixed walk_stackframe()
	Revert "ixgbe: Manual AN-37 for troublesome link partners for X550 SFI"
	net: fec: avoid lock evasion when reading pps_enable
	tls: fix missing memory barrier in tls_init
	inet: factor out locked section of inet_accept() in a new helper
	net: relax socket state check at accept time.
	nfc: nci: Fix kcov check in nci_rx_work()
	nfc: nci: Fix handling of zero-length payload packets in nci_rx_work()
	drivers/xen: Improve the late XenStore init protocol
	ice: Interpret .set_channels() input differently
	netfilter: nfnetlink_queue: acquire rcu_read_lock() in instance_destroy_rcu()
	netfilter: nft_payload: restore vlan q-in-q match support
	spi: Don't mark message DMA mapped when no transfer in it is
	dma-mapping: benchmark: fix node id validation
	dma-mapping: benchmark: handle NUMA_NO_NODE correctly
	nvmet: fix ns enable/disable possible hang
	net: phy: micrel: set soft_reset callback to genphy_soft_reset for KSZ8061
	net/mlx5: Lag, do bond only if slaves agree on roce state
	net/mlx5e: Fix IPsec tunnel mode offload feature check
	net/mlx5e: Use rx_missed_errors instead of rx_dropped for reporting buffer exhaustion
	net/mlx5e: Fix UDP GSO for encapsulated packets
	dma-buf/sw-sync: don't enable IRQ from sync_print_obj()
	bpf: Fix potential integer overflow in resolve_btfids
	ALSA: jack: Use guard() for locking
	ALSA: core: Remove debugfs at disconnection
	ALSA: hda/realtek: Add quirk for ASUS ROG G634Z
	ALSA: hda/realtek: Amend G634 quirk to enable rear speakers
	ALSA: hda/realtek: Adjust G814JZR to use SPI init for amp
	enic: Validate length of nl attributes in enic_set_vf_port
	af_unix: Read sk->sk_hash under bindlock during bind().
	net: usb: smsc95xx: fix changing LED_SEL bit value updated from EEPROM
	bpf: Allow delete from sockmap/sockhash only if update is allowed
	net:fec: Add fec_enet_deinit()
	ice: fix accounting if a VLAN already exists
	netfilter: nft_payload: move struct nft_payload_set definition where it belongs
	netfilter: nft_payload: rebuild vlan header when needed
	netfilter: nft_payload: rebuild vlan header on h_proto access
	netfilter: nft_payload: skbuff vlan metadata mangle support
	netfilter: tproxy: bail out if IP has been disabled on the device
	netfilter: nft_fib: allow from forward/input without iif selector
	kconfig: fix comparison to constant symbols, 'm', 'n'
	drm/i915/guc: avoid FIELD_PREP warning
	spi: stm32: Don't warn about spurious interrupts
	net: dsa: microchip: fix RGMII error in KSZ DSA driver
	net: ena: Add dynamic recycling mechanism for rx buffers
	net: ena: Reduce lines with longer column width boundary
	net: ena: Fix redundant device NUMA node override
	ipvlan: Dont Use skb->sk in ipvlan_process_v{4,6}_outbound
	powerpc/pseries/lparcfg: drop error message from guest name lookup
	hwmon: (shtc1) Fix property misspelling
	riscv: prevent pt_regs corruption for secondary idle threads
	ALSA: timer: Set lower bound of start tick time
	net: ena: Fix DMA syncing in XDP path when SWIOTLB is on
	Linux 6.1.93

Change-Id: I15fdbacdaee5a6d68347a7fd5218929488d594af
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-08-12 08:40:51 +00:00
Vamsidhar reddy Gaddam
79436849ef ANDROID: Update the ABI symbol list
Adding the following symbols:
  - vm_unmapped_area

Bug: 344489121
Change-Id: I1798b662e81283e1f8e8f2091e5e4b6d2d4fe2c0
Signed-off-by: Vamsidhar reddy Gaddam <gvamsi@google.com>
2024-08-09 17:37:44 +00:00
Sukjin Kong
be8ff39d2e ANDROID: GKI: add symbol list for telechips
Add symbol list file abi_gki_aarch64_telechips

INFO: 18 function symbol(s) added
  'int devm_clk_hw_register_clkdev(struct device*, struct clk_hw*, const char*, const char*)'
  'struct fwnode_handle* fwnode_get_next_parent(struct fwnode_handle*)'
  'struct fwnode_handle* fwnode_get_parent(const struct fwnode_handle*)'
  'int linear_range_get_value_array(const struct linear_range*, int, unsigned int, unsigned int*)'
  'int media_device_register_entity(struct media_device*, struct media_entity*)'
  'struct media_link* media_entity_find_link(struct media_pad*, struct media_pad*)'
  'void* of_fdt_unflatten_tree(const unsigned long*, struct device_node*, struct device_node**)'
  'int regmap_irq_chip_get_base(struct regmap_irq_chip_data*)'
  'int regulator_mode_to_status(unsigned int)'
  'int regulator_set_soft_start_regmap(struct regulator_dev*)'
  'int snd_pcm_hw_constraint_pow2(struct snd_pcm_runtime*, unsigned int, snd_pcm_hw_param_t)'
  'int snd_soc_dai_set_clkdiv(struct snd_soc_dai*, int, int)'
  'void symbol_put_addr(void*)'
  'int trace_define_field(struct trace_event_call*, const char*, const char*, int, int, int, int)'
  'int uart_parse_earlycon(char*, unsigned char*, resource_size_t*, char**)'
  'int v4l2_fill_pixfmt_mp(struct v4l2_pix_format_mplane*, u32, u32, u32)'
  'int vfs_fsync(struct file*, int)'
  'int vsscanf(const char*, const char*, va_list)'

1 variable symbol(s) added
  'const struct kernel_param_ops param_ops_short'

Bug: 358151308
Signed-off-by: Sukjin Kong <sj.kong@telechips.com>
Change-Id: I13cefc3999f4e8a0b748c126cb179ac5f6c61e22
2024-08-08 17:19:37 +00:00
Peter Wang
7003f6b36a UPSTREAM: ufs: core: bypass quick recovery if need force reset
If force_reset is true, bypass quick recovery.
This will shorten error recovery time.

Bug: 356536706

Change-Id: I86ce0e8ac79b61e203a8fdad5369d540ae873cc0
Signed-off-by: Peter Wang <peter.wang@mediatek.com>
Link: https://lore.kernel.org/r/20240712094506.11284-1-peter.wang@mediatek.com
Reviewed-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 022587d8aec3da1d1698ddae9fb8cfe35f3ad49c)
2024-08-08 16:53:10 +00:00
nischaljain
99d09135c4 ANDROID: Update the ABI symbol list
Adding the `devfreq_get_devfreq_by_phandle` symbol.

Bug: 336947817
Change-Id: I5db1e6c7ba5a845f2116aa0e5438e7f8fece4a65
Signed-off-by: nischaljain <nischaljain@google.com>
2024-08-08 05:09:57 +00:00
Petr Pavlu
1bb38f7865 UPSTREAM: ring-buffer: Fix a race between readers and resize checks
The reader code in rb_get_reader_page() swaps a new reader page into the
ring buffer by doing cmpxchg on old->list.prev->next to point it to the
new page. Following that, if the operation is successful,
old->list.next->prev gets updated too. This means the underlying
doubly-linked list is temporarily inconsistent, page->prev->next or
page->next->prev might not be equal back to page for some page in the
ring buffer.

The resize operation in ring_buffer_resize() can be invoked in parallel.
It calls rb_check_pages() which can detect the described inconsistency
and stop further tracing:

[  190.271762] ------------[ cut here ]------------
[  190.271771] WARNING: CPU: 1 PID: 6186 at kernel/trace/ring_buffer.c:1467 rb_check_pages.isra.0+0x6a/0xa0
[  190.271789] Modules linked in: [...]
[  190.271991] Unloaded tainted modules: intel_uncore_frequency(E):1 skx_edac(E):1
[  190.272002] CPU: 1 PID: 6186 Comm: cmd.sh Kdump: loaded Tainted: G            E      6.9.0-rc6-default #5 158d3e1e6d0b091c34c3b96bfd99a1c58306d79f
[  190.272011] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.0-0-gd239552c-rebuilt.opensuse.org 04/01/2014
[  190.272015] RIP: 0010:rb_check_pages.isra.0+0x6a/0xa0
[  190.272023] Code: [...]
[  190.272028] RSP: 0018:ffff9c37463abb70 EFLAGS: 00010206
[  190.272034] RAX: ffff8eba04b6cb80 RBX: 0000000000000007 RCX: ffff8eba01f13d80
[  190.272038] RDX: ffff8eba01f130c0 RSI: ffff8eba04b6cd00 RDI: ffff8eba0004c700
[  190.272042] RBP: ffff8eba0004c700 R08: 0000000000010002 R09: 0000000000000000
[  190.272045] R10: 00000000ffff7f52 R11: ffff8eba7f600000 R12: ffff8eba0004c720
[  190.272049] R13: ffff8eba00223a00 R14: 0000000000000008 R15: ffff8eba067a8000
[  190.272053] FS:  00007f1bd64752c0(0000) GS:ffff8eba7f680000(0000) knlGS:0000000000000000
[  190.272057] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  190.272061] CR2: 00007f1bd6662590 CR3: 000000010291e001 CR4: 0000000000370ef0
[  190.272070] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  190.272073] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  190.272077] Call Trace:
[  190.272098]  <TASK>
[  190.272189]  ring_buffer_resize+0x2ab/0x460
[  190.272199]  __tracing_resize_ring_buffer.part.0+0x23/0xa0
[  190.272206]  tracing_resize_ring_buffer+0x65/0x90
[  190.272216]  tracing_entries_write+0x74/0xc0
[  190.272225]  vfs_write+0xf5/0x420
[  190.272248]  ksys_write+0x67/0xe0
[  190.272256]  do_syscall_64+0x82/0x170
[  190.272363]  entry_SYSCALL_64_after_hwframe+0x76/0x7e
[  190.272373] RIP: 0033:0x7f1bd657d263
[  190.272381] Code: [...]
[  190.272385] RSP: 002b:00007ffe72b643f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[  190.272391] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f1bd657d263
[  190.272395] RDX: 0000000000000002 RSI: 0000555a6eb538e0 RDI: 0000000000000001
[  190.272398] RBP: 0000555a6eb538e0 R08: 000000000000000a R09: 0000000000000000
[  190.272401] R10: 0000555a6eb55190 R11: 0000000000000246 R12: 00007f1bd6662500
[  190.272404] R13: 0000000000000002 R14: 00007f1bd6667c00 R15: 0000000000000002
[  190.272412]  </TASK>
[  190.272414] ---[ end trace 0000000000000000 ]---

Note that ring_buffer_resize() calls rb_check_pages() only if the parent
trace_buffer has recording disabled. Recent commit d78ab792705c
("tracing: Stop current tracer when resizing buffer") causes that it is
now always the case which makes it more likely to experience this issue.

The window to hit this race is nonetheless very small. To help
reproducing it, one can add a delay loop in rb_get_reader_page():

 ret = rb_head_page_replace(reader, cpu_buffer->reader_page);
 if (!ret)
 	goto spin;
 for (unsigned i = 0; i < 1U << 26; i++)  /* inserted delay loop */
 	__asm__ __volatile__ ("" : : : "memory");
 rb_list_head(reader->list.next)->prev = &cpu_buffer->reader_page->list;

.. and then run the following commands on the target system:

 echo 1 > /sys/kernel/tracing/events/sched/sched_switch/enable
 while true; do
 	echo 16 > /sys/kernel/tracing/buffer_size_kb; sleep 0.1
 	echo 8 > /sys/kernel/tracing/buffer_size_kb; sleep 0.1
 done &
 while true; do
 	for i in /sys/kernel/tracing/per_cpu/*; do
 		timeout 0.1 cat $i/trace_pipe; sleep 0.2
 	done
 done

To fix the problem, make sure ring_buffer_resize() doesn't invoke
rb_check_pages() concurrently with a reader operating on the same
ring_buffer_per_cpu by taking its cpu_buffer->reader_lock.

Link: https://lore.kernel.org/linux-trace-kernel/20240517134008.24529-3-petr.pavlu@suse.com

Cc: stable@vger.kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fixes: 659f451ff2 ("ring-buffer: Add integrity check at end of iter read")
Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
[ Fixed whitespace ]
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Bug: 357487733
Change-Id: Ieed52c111e4f4f969a88be1221118eee6e3b4837
(cherry picked from commit c2274b908db05529980ec056359fae916939fdaa)
Signed-off-by: Youngmin Nam <youngmin.nam@samsung.com>
2024-08-06 11:32:05 +09:00