5.18.3-rc1 review
Subsystems (3)
Greg Kroah-Hartman
maintainercover 5.18.3-rc1 review
This is the start of the stable review cycle for the 5.18.3 release. There are 879 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 09 Jun 2022 16:48:02 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.18.3-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.18.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 5.18.3-rc1
Tony Lindgren <[email protected]>
tty: n_gsm: Fix packet data hex dump output
Ziyang Xuan <[email protected]>
macsec: fix UAF bug for real_dev
Jia-Ju Bai <[email protected]>
md: bcache: check the return value of kzalloc() in detached_dev_do_request()
Xiao Ni <[email protected]>
md: fix double free of io_acct_set bioset
Xiao Ni <[email protected]>
md: Don't set mddev private to NULL in raid0 pers->free
Namjae Jeon <[email protected]>
fs/ntfs3: Fix invalid free in log_replay
Christian Brauner <[email protected]>
exportfs: support idmapped mounts
Christian Brauner <[email protected]>
fs: add two trivial lookup helpers
Eric Biggers <[email protected]>
ext4: only allow test_dummy_encryption when supported
Xiao Yang <[email protected]>
RDMA/rxe: Generate a completion for unsupported/invalid opcode
Yixing Liu <[email protected]>
RDMA/hns: Remove the num_cqc_timer variable
Carlos Llamas <[email protected]>
binder: fix sender_euid type in uapi header
Dan Carpenter <[email protected]>
staging: r8188eu: delete rtw_wx_read/write32()
Jason A. Donenfeld <[email protected]>
Revert "random: use static branch for crng_ready()"
Zhengjun Xing <[email protected]>
perf evlist: Extend arch_evsel__must_be_in_group to support hybrid systems
Waiman Long <[email protected]>
kseltest/cgroup: Make test_stress.sh work if run interactively
Sean Young <[email protected]>
media: lirc: add missing exceptions for lirc uapi header file
Alex Elder <[email protected]>
net: ipa: fix page free in ipa_endpoint_replenish_one()
Alex Elder <[email protected]>
net: ipa: fix page free in ipa_endpoint_trans_release()
Johan Hovold <[email protected]>
phy: qcom-qmp: fix reset-controller leak on probe errors
Mao Jinlong <[email protected]>
coresight: core: Fix coresight device probe failure issue
Tejun Heo <[email protected]>
blk-iolatency: Fix inflight count imbalances and IO hangs on offline
Eugenio Pérez <[email protected]>
vdpasim: allow to enable a vq repeatedly
Dinh Nguyen <[email protected]>
dt-bindings: gpio: altera: correct interrupt-cells
Akira Yokosawa <[email protected]>
docs/conf.py: Cope with removal of language=None in Sphinx 5.0.0
Steve French <[email protected]>
SMB3: EBADF/EIO errors in rename/open caused by race condition in smb2_compound_op
Srinivas Kandagatla <[email protected]>
misc: fastrpc: fix list iterator in fastrpc_req_mem_unmap_impl
Luís Henriques <[email protected]>
ceph: fix decoding of client session messages flags
Arnd Bergmann <[email protected]>
ARM: pxa: maybe fix gpio lookup tables
Jonathan Bakker <[email protected]>
ARM: dts: s5pv210: Remove spi-cs-high on panel in Aries
Johan Hovold <[email protected]>
phy: qcom-qmp: fix struct clk leak on probe errors
Diogo Ivo <[email protected]>
clk: tegra: Add missing reset deassertion
Diogo Ivo <[email protected]>
arm64: tegra: Add missing DFLL reset on Tegra210
Kathiravan T <[email protected]>
arm64: dts: qcom: ipq8074: fix the sleep clock frequency
Xiaomeng Tong <[email protected]>
gma500: fix an incorrect NULL check on list iterator
Xiaomeng Tong <[email protected]>
tilcdc: tilcdc_external: fix an incorrect NULL check on list iterator
Jiri Slaby <[email protected]>
serial: pch: don't overwrite xmit->buf[0] by x_char
Coly Li <[email protected]>
bcache: avoid journal no-space deadlock by reserving 1 journal bucket
Coly Li <[email protected]>
bcache: remove incremental dirty sector counting for bch_sectors_dirty_init()
Coly Li <[email protected]>
bcache: improve multithreaded bch_sectors_dirty_init()
Coly Li <[email protected]>
bcache: improve multithreaded bch_btree_check()
Xiaomeng Tong <[email protected]>
stm: ltdc: fix two incorrect NULL checks on list iterator
Xiaomeng Tong <[email protected]>
carl9170: tx: fix an incorrect use of list iterator
Mark Brown <[email protected]>
ASoC: rt5514: Fix event generation for "DSP Voice Wake Up" control
Alexander Wetzel <[email protected]>
rtl818x: Prevent using not initialized queues
Yi Yang <[email protected]>
xtensa/simdisk: fix proc_read_simdisk()
Miaohe Lin <[email protected]>
mm/memremap: fix missing call to untrack_pfn() in pagemap_range()
Mike Kravetz <[email protected]>
hugetlb: fix huge_pmd_unshare address update
Christophe de Dinechin <[email protected]>
nodemask.h: fix compilation error with GCC12
Mel Gorman <[email protected]>
mm/page_alloc: always attempt to allocate at least one page during bulk allocation
Eric Dumazet <[email protected]>
mm/page_owner: use strscpy() instead of strlcpy()
Dong Aisheng <[email protected]>
Revert "mm/cma.c: remove redundant cma_mutex lock"
Masami Hiramatsu <[email protected]>
kprobes: Fix build errors with CONFIG_KRETPROBES=n
Yunfei Wang <[email protected]>
iommu/dma: Fix iova map result check bug
Xiaomeng Tong <[email protected]>
iommu/msm: Fix an incorrect NULL check on list iterator
Hyunchul Lee <[email protected]>
ksmbd: fix outstanding credits related bugs
Song Liu <[email protected]>
ftrace: Clean up hash direct_functions on register failures
Naveen N. Rao <[email protected]>
kexec_file: drop weak attribute from arch_kexec_apply_relocations[_add]
Maciej W. Rozycki <[email protected]>
MIPS: IP30: Remove incorrect `cpu_has_fpu' override
Maciej W. Rozycki <[email protected]>
MIPS: IP27: Remove incorrect `cpu_has_fpu' override
Vincent Whitchurch <[email protected]>
um: Fix out-of-bounds read in LDT setup
Johannes Berg <[email protected]>
um: chan_user: Fix winch_tramp() return value
Johannes Berg <[email protected]>
um: Use asm-generic/dma-mapping.h
Johannes Berg <[email protected]>
um: virtio_uml: Fix broken device handling in time-travel
Felix Fietkau <[email protected]>
mac80211: upgrade passive scan to active scan on DFS channels after beacon rx
Dimitri John Ledkov <[email protected]>
cfg80211: declare MODULE_FIRMWARE for regulatory.db
Felix Fietkau <[email protected]>
mt76: fix use-after-free by removing a non-RCU wcid pointer
Kant Fan <[email protected]>
thermal: devfreq_cooling: use local ops instead of global ops
Max Filippov <[email protected]>
irqchip: irq-xtensa-mx: fix initial IRQ affinity
Pali Rohár <[email protected]>
irqchip/armada-370-xp: Do not touch Performance Counter Overflow on A375, A38x, A39x
Guo Ren <[email protected]>
csky: patch_text: Fixup last cpu should be master
Bean Huo <[email protected]>
mmc: core: Allows to override the timeout value for ioctl() path
Dennis Dalessandro <[email protected]>
RDMA/hfi1: Fix potential integer multiplication overflow errors
Puyou Lu <[email protected]>
lib/string_helpers: fix not adding strarray to device's resource list
Sean Christopherson <[email protected]>
Kconfig: Add option for asm goto w/ tied outputs to workaround clang-13 bug
GUO Zihua <[email protected]>
ima: remove the IMA_TEMPLATE Kconfig option
Nicolas Dufresne <[email protected]>
media: coda: Add more H264 levels for CODA960
Nicolas Dufresne <[email protected]>
media: coda: Fix reported H264 profile
Tokunori Ikegami <[email protected]>
mtd: cfi_cmdset_0002: Use chip_ready() for write on S29GL064N
Tokunori Ikegami <[email protected]>
mtd: cfi_cmdset_0002: Move and rename chip_check/chip_ready/chip_good_for_write
Xiaomeng Tong <[email protected]>
md: fix an incorrect NULL check in md_reload_sb
Xiaomeng Tong <[email protected]>
md: fix an incorrect NULL check in does_sb_need_changing
Jani Nikula <[email protected]>
drm/i915/dsi: fix VBT send packet port selection for ICL+
Brian Norris <[email protected]>
drm/bridge: analogix_dp: Grab runtime PM reference for DP-AUX
Xiaomeng Tong <[email protected]>
drm/nouveau/kms/nv50-: atom: fix an incorrect NULL check on list iterator
Xiaomeng Tong <[email protected]>
drm/nouveau/clk: Fix an incorrect NULL check on list iterator
Lucas Stach <[email protected]>
drm/etnaviv: check for reaped mapping in etnaviv_iommu_unmap_gem
Lyude Paul <[email protected]>
drm/nouveau/subdev/bus: Ratelimit logging for fault errors
Dave Airlie <[email protected]>
drm/amdgpu/cs: make commands with 0 chunks illegal behaviour.
Mickaël Salaün <[email protected]>
landlock: Fix same-layer rule unions
Mickaël Salaün <[email protected]>
landlock: Create find_rule() from unmask_layers()
Mickaël Salaün <[email protected]>
landlock: Reduce the maximum number of layers to 16
Mickaël Salaün <[email protected]>
landlock: Define access_mask_t to enforce a consistent access mask size
Mickaël Salaün <[email protected]>
selftests/landlock: Test landlock_create_ruleset(2) argument check ordering
Mickaël Salaün <[email protected]>
landlock: Change landlock_restrict_self(2) check ordering
Mickaël Salaün <[email protected]>
landlock: Change landlock_add_rule(2) argument check ordering
Mickaël Salaün <[email protected]>
selftests/landlock: Add tests for O_PATH
Mickaël Salaün <[email protected]>
selftests/landlock: Fully test file rename with "remove" access
Mickaël Salaün <[email protected]>
selftests/landlock: Extend access right tests to directories
Mickaël Salaün <[email protected]>
selftests/landlock: Add tests for unknown access rights
Mickaël Salaün <[email protected]>
selftests/landlock: Extend tests for minimal valid attribute size
Mickaël Salaün <[email protected]>
selftests/landlock: Make tests build with old libc
Mickaël Salaün <[email protected]>
landlock: Fix landlock_add_rule(2) documentation
Mickaël Salaün <[email protected]>
samples/landlock: Format with clang-format
Mickaël Salaün <[email protected]>
samples/landlock: Add clang-format exceptions
Mickaël Salaün <[email protected]>
selftests/landlock: Format with clang-format
Mickaël Salaün <[email protected]>
selftests/landlock: Normalize array assignment
Mickaël Salaün <[email protected]>
selftests/landlock: Add clang-format exceptions
Mickaël Salaün <[email protected]>
landlock: Format with clang-format
Mickaël Salaün <[email protected]>
landlock: Add clang-format exceptions
Manivannan Sadhasivam <[email protected]>
scsi: ufs: qcom: Add a readl() to make sure ref_clk gets enabled
Xiaomeng Tong <[email protected]>
scsi: dc395x: Fix a missing check on list iterator
Junxiao Bi via Ocfs2-devel <[email protected]>
ocfs2: dlmfs: fix error handling of user_dlm_destroy_lock
Alexander Aring <[email protected]>
dlm: fix missing lkb refcount handling
Alexander Aring <[email protected]>
dlm: fix wake_up() calls for pending remove
Dan Carpenter <[email protected]>
dlm: uninitialized variable on error in dlm_listen_for_all()
Alexander Aring <[email protected]>
dlm: fix plock invalid read
Sven Schnelle <[email protected]>
s390/stp: clock_delta should be signed
Nico Boehr <[email protected]>
s390/perf: obtain sie_block from the right address
Rei Yamamoto <[email protected]>
mm, compaction: fast_find_migrateblock() should return pfn in the target zone
Damien Le Moal <[email protected]>
block: Fix potential deadlock in blk_ia_range_sysfs_show()
Denis Efremov <[email protected]>
staging: r8188eu: prevent ->Ssid overflow in rtw_wx_set_scan()
Johan Hovold <[email protected]>
PCI: qcom: Fix unbalanced PHY init on probe errors
Johan Hovold <[email protected]>
PCI: qcom: Fix runtime PM imbalance on probe errors
Johan Hovold <[email protected]>
PCI: qcom: Fix pipe clock imbalance
Bjorn Helgaas <[email protected]>
PCI/PM: Fix bridge_d3_blacklist[] Elo i2 overwrite of Gigabyte X299
Alex Deucher <[email protected]>
drm/amdgpu: add beige goby PCI ID
Gautam Menghani <[email protected]>
tracing: Initialize integer variable to prevent garbage return value
Wonhyuk Yang <[email protected]>
tracing: Fix return value of trace_pid_write()
Keita Suzuki <[email protected]>
tracing: Fix potential double free in create_var_ref()
Steven Rostedt (Google) <[email protected]>
tracing: Have event format check not flag %p* on __get_dynamic_array()
Laurent Vivier <[email protected]>
tty: goldfish: Introduce gf_ioread32()/gf_iowrite32()
Sakari Ailus <[email protected]>
ACPI: property: Release subnode properties with data nodes
Jan Kara <[email protected]>
ext4: avoid cycles in directory h-tree
Jan Kara <[email protected]>
ext4: verify dir block before splitting it
Baokun Li <[email protected]>
ext4: fix bug_on in __es_tree_search
Theodore Ts'o <[email protected]>
ext4: filter out EXT4_FC_REPLAY from on-disk superblock field s_state
Ye Bin <[email protected]>
ext4: fix bug_on in ext4_writepages
Eric Biggers <[email protected]>
ext4: fix memory leak in parse_apply_sb_mount_options()
Ye Bin <[email protected]>
ext4: fix warning in ext4_handle_inode_extension
Baokun Li <[email protected]>
ext4: fix race condition between ext4_write and ext4_convert_inline_data
Ojaswin Mujoo <[email protected]>
ext4: fix journal_ioprio mount option handling
Ye Bin <[email protected]>
ext4: fix use-after-free in ext4_rename_dir_prepare
Dmitry Monakhov <[email protected]>
ext4: mark group as trimmed only if it was fully scanned
Jan Kara <[email protected]>
bfq: Make sure bfqg for which we are queueing requests is online
Jan Kara <[email protected]>
bfq: Get rid of __bio_blkcg() usage
Jan Kara <[email protected]>
bfq: Track whether bfq_group is still online
Jan Kara <[email protected]>
bfq: Remove pointless bfq_init_rq() calls
Jan Kara <[email protected]>
bfq: Drop pointless unlock-lock pair
Jan Kara <[email protected]>
bfq: Update cgroup information before merging bio
Jan Kara <[email protected]>
bfq: Split shared queues on move between cgroups
Jan Kara <[email protected]>
bfq: Avoid merging queues with different parents
Jan Kara <[email protected]>
bfq: Avoid false marking of bic as stably merged
Aditya Garg <[email protected]>
efi: Do not import certificates from UEFI Secure Boot for T2 Macs
Zhihao Cheng <[email protected]>
fs-writeback: writeback_sb_inodes:Recalculate 'wrote' according skipped pages
Miaoqian Lin <[email protected]>
ipmi:ipmb: Fix refcount leak in ipmi_ipmb_probe
Johannes Berg <[email protected]>
iwlwifi: mei: fix potential NULL-ptr deref
Avraham Stern <[email protected]>
iwlwifi: mei: clear the sap data header before sending
Emmanuel Grumbach <[email protected]>
iwlwifi: mvm: fix assert 1F04 upon reconfig
Johannes Berg <[email protected]>
iwlwifi: fw: init SAR GEO table only if data is present
Johannes Berg <[email protected]>
wifi: mac80211: fix use-after-free in chanctx code
Peter Zijlstra <[email protected]>
objtool: Fix symbol creation
Mikulas Patocka <[email protected]>
objtool: Fix objtool regression on x32 systems
Chao Yu <[email protected]>
f2fs: fix to do sanity check for inline inode
Chao Yu <[email protected]>
f2fs: fix fallocate to use file_modified to update permissions consistently
Eric Biggers <[email protected]>
f2fs: don't use casefolded comparison for "." and ".."
Chao Yu <[email protected]>
f2fs: fix to do sanity check on total_data_blocks
Jaegeuk Kim <[email protected]>
f2fs: don't need inode lock for system hidden quota
Chao Yu <[email protected]>
f2fs: fix deadloop in foreground GC
Chao Yu <[email protected]>
f2fs: fix to clear dirty inode in f2fs_evict_inode()
Chao Yu <[email protected]>
f2fs: fix to do sanity check on block address in f2fs_do_zero_range()
Chao Yu <[email protected]>
f2fs: fix to avoid f2fs_bug_on() in dec_valid_node_count()
Olga Kornievskaia <[email protected]>
NFSv4.1 mark qualified async operations as MOVEABLE tasks
Benjamin Coddington <[email protected]>
NFSv4: Fix free of uninitialized nfs4_label on referral lookup.
Javier Martinez Canillas <[email protected]>
video: fbdev: vesafb: Fix a use-after-free due early fb_info cleanup
Zhengjun Xing <[email protected]>
perf jevents: Fix event syntax error caused by ExtSel
Daniel Bristot de Oliveira <[email protected]>
tracing/timerlat: Notify IRQ new max latency only if stop tracing is set
Daniel Bristot de Oliveira <[email protected]>
rtla: Remove procps-ng dependency
Daniel Bristot de Oliveira <[email protected]>
rtla: Fix __set_sched_attr error message
John Kacur <[email protected]>
rtla: Minor grammar fix for rtla README
John Kacur <[email protected]>
rtla: Don't overwrite existing directory mode
Wan Jiabing <[email protected]>
rtla: Avoid record NULL pointer dereference
Leo Yan <[email protected]>
perf c2c: Use stdio interface if slang is not supported
Jiri Olsa <[email protected]>
perf build: Fix btf__load_from_kernel_by_id() feature check
Tiezhu Yang <[email protected]>
MIPS: RALINK: Define pci_remap_iospace under CONFIG_PCI_DRIVERS_GENERIC
Palmer Dabbelt <[email protected]>
RISC-V: Fix the XIP build
Palmer Dabbelt <[email protected]>
RISC-V: Split out the XIP fixups into their own file
Li Huafei <[email protected]>
tracing: Reset the function filter after completing trampoline/graph selftest
Kuninori Morimoto <[email protected]>
i2c: rcar: fix PM ref counts in probe error paths
Tali Perry <[email protected]>
i2c: npcm: Handle spurious interrupts
Tyrone Ting <[email protected]>
i2c: npcm: Correct register access width
Tali Perry <[email protected]>
i2c: npcm: Fix timeout calculation
Joerg Roedel <[email protected]>
iommu/amd: Increase timeout waiting for GA log enablement
Amelie Delaunay <[email protected]>
dmaengine: stm32-mdma: fix chan initialization in stm32_mdma_irq_handler()
Amelie Delaunay <[email protected]>
dmaengine: stm32-mdma: remove GISR1 register
Miaoqian Lin <[email protected]>
video: fbdev: clcdfb: Fix refcount leak in clcdfb_of_vram_setup
Dave Wysochanski <[email protected]>
NFS: Pass i_size to fscache_unuse_cookie() when a file is released
Trond Myklebust <[email protected]>
NFS: Further fixes to the writeback error handling
Trond Myklebust <[email protected]>
NFSv4/pNFS: Do not fail I/O when we fail to allocate the pNFS layout
Trond Myklebust <[email protected]>
NFS: Don't report errors from nfs_pageio_complete() more than once
Trond Myklebust <[email protected]>
NFS: Do not report flush errors in nfs_write_end()
Trond Myklebust <[email protected]>
NFS: Don't report ENOSPC write errors twice
Trond Myklebust <[email protected]>
NFS: fsync() should report filesystem errors over EINTR/ERESTARTSYS
Trond Myklebust <[email protected]>
NFS: Do not report EINTR/ERESTARTSYS as mapping errors
Christophe JAILLET <[email protected]>
dmaengine: idxd: Fix the error handling path in idxd_cdev_register()
Nathan Chancellor <[email protected]>
i2c: at91: Initialize dma_buf in at91_twi_xfer()
Miles Chen <[email protected]>
iommu/mediatek: Fix NULL pointer dereference when printing dev_name
Guenter Roeck <[email protected]>
MIPS: Loongson: Use hwmon_device_register_with_groups() to register hwmon
Jean-Philippe Brucker <[email protected]>
iommu/arm-smmu-v3-sva: Fix mm use-after-free
Rex-BC Chen <[email protected]>
cpufreq: mediatek: Unregister platform device on exit
Jia-Wei Chang <[email protected]>
cpufreq: mediatek: Use module_init and add module_exit
Michael Walle <[email protected]>
i2c: at91: use dma safe buffers
Yong Wu <[email protected]>
iommu/mediatek: Add mutex for m4u_group and m4u_dom in data
Yong Wu <[email protected]>
iommu/mediatek: Remove clk_disable in mtk_iommu_remove
Yong Wu <[email protected]>
iommu/mediatek: Add list_del in mtk_iommu_remove
Yong Wu <[email protected]>
iommu/mediatek: Fix 2 HW sharing pgtable issue
Suravee Suthikulpanit <[email protected]>
iommu/amd: Do not call sleep while holding spinlock
Mario Limonciello <[email protected]>
iommu/amd: Enable swiotlb in all cases
Guo Ren <[email protected]>
riscv: Fixup difference with defconfig
Jakob Koschel <[email protected]>
f2fs: fix dereference of stale list iterator after loop body
Chao Yu <[email protected]>
f2fs: fix to do sanity check on inline_dots inode
Jayesh Choudhary <[email protected]>
dmaengine: ti: k3-psil-am62: Update PSIL thread for saul.
Dan Carpenter <[email protected]>
OPP: call of_node_put() on error path in _bandwidth_supported()
Dmitry Torokhov <[email protected]>
Input: stmfts - do not leave device disabled in stmfts_input_open
Wanpeng Li <[email protected]>
KVM: LAPIC: Drop pending LAPIC timer injection when canceling the timer
Hector Martin <[email protected]>
pinctrl: apple: Use a raw spinlock for the regmap
Douglas Miller <[email protected]>
RDMA/hfi1: Prevent use of lock before it is initialized
Christophe JAILLET <[email protected]>
RDMA/rxe: Fix an error handling path in rxe_get_mcg()
Björn Ardö <[email protected]>
mailbox: forward the hrtimer if not queued and under a lock
Julian Schroeder <[email protected]>
nfsd: destroy percpu stats counters after reply cache shutdown
Yang Yingliang <[email protected]>
mfd: davinci_voicecodec: Fix possible null-ptr-deref davinci_vc_probe()
Christophe JAILLET <[email protected]>
gpio: sim: Use correct order for the parameters of devm_kcalloc()
Christophe Leroy <[email protected]>
powerpc/fsl_book3e: Don't set rodata RO too early
Vaibhav Jain <[email protected]>
powerpc/papr_scm: Fix leaking nvdimm_events_map elements
Miaoqian Lin <[email protected]>
powerpc/fsl_rio: Fix refcount leak in fsl_rio_setup
Miaoqian Lin <[email protected]>
powerpc/xive: Fix refcount leak in xive_spapr_init
Randy Dunlap <[email protected]>
macintosh: via-pmu and via-cuda need RTC_LIB
Kajol Jain <[email protected]>
powerpc/perf: Fix the threshold compare group constraint for power9
Kajol Jain <[email protected]>
powerpc/perf: Fix the threshold compare group constraint for power10
Russell Currey <[email protected]>
powerpc/powernv: Get STF barrier requirements from device-tree
Russell Currey <[email protected]>
powerpc/powernv: Get L1D flush requirements from device-tree
Michael Ellerman <[email protected]>
powerpc/64: Only WARN if __pa()/__va() called with bad addresses
Mario Limonciello <[email protected]>
mailbox: pcc: Fix an invalid-load caught by the address sanitizer
Kan Liang <[email protected]>
perf stat: Always keep perf metrics topdown events in a group
Ian Rogers <[email protected]>
perf evlist: Keep topdown counters in weak group
Yang Yingliang <[email protected]>
hwrng: omap3-rom - fix using wrong clk_disable() in omap_rom_rng_runtime_resume()
Dan Williams <[email protected]>
cxl/mem: Drop mem_enabled check from wait_for_media()
Daire McNamara <[email protected]>
PCI: microchip: Fix potential race in interrupt handling
Fabiano Rosas <[email protected]>
KVM: PPC: Book3S HV: Fix vcore_blocked tracepoint
Kuppuswamy Sathyanarayanan <[email protected]>
PCI/AER: Clear MULTI_ERR_COR/UNCOR_RCV bits
Miaoqian Lin <[email protected]>
Input: sparcspkr - fix refcount leak in bbc_beep_probe
Jane Chu <[email protected]>
mce: fix set_mce_nospec to always unmap the whole page
Jane Chu <[email protected]>
x86/mce: relocate set{clear}_mce_nospec() functions
Mina Almasry <[email protected]>
hugetlbfs: fix hugetlbfs_statfs() locking
Michael Walle <[email protected]>
ARM: dts: lan966x: swap dma channels for crypto node
Eugen Hristev <[email protected]>
ARM: dts: at91: sama7g5: remove interrupt-parent from gic node
Sebastian Andrzej Siewior <[email protected]>
crypto: cryptd - Protect per-CPU resource by disabling BH.
Corentin Labbe <[email protected]>
crypto: sun8i-ss - handle zero sized sg
Corentin Labbe <[email protected]>
crypto: sun8i-ss - rework handling of IV
Qi Zheng <[email protected]>
tty: fix deadlock caused by calling printk() under tty_port->lock
Alexey Dobriyan <[email protected]>
module: fix [e_shstrndx].sh_size=0 OOB access
Greg Kroah-Hartman <[email protected]>
module.h: simplify MODULE_IMPORT_NS
AngeloGioacchino Del Regno <[email protected]>
PCI: mediatek-gen3: Assert resets to ensure expected init state
Francesco Dolcini <[email protected]>
PCI: imx6: Fix PERST# start-up sequence
Waiman Long <[email protected]>
ipc/mqueue: use get_tree_nodev() in mqueue_get_tree()
Alexey Dobriyan <[email protected]>
proc: fix dentry/inode overinstantiating under /proc/${pid}/netCharles Keepax <[email protected]>
ASoC: atmel-classd: Remove endianness flag on class d component
Charles Keepax <[email protected]>
ASoC: atmel-pdmic: Remove endianness flag on pdmic component
Robert Marko <[email protected]>
arm64: dts: marvell: espressobin-ultra: enable front USB3 port
Robert Marko <[email protected]>
arm64: dts: marvell: espressobin-ultra: fix SPI-NOR config
Yangyang Li <[email protected]>
RDMA/hns: Add the detection for CMDQ status in the device initialization process
Randy Dunlap <[email protected]>
powerpc/4xx/cpm: Fix return value of __setup() handler
Randy Dunlap <[email protected]>
powerpc/idle: Fix return value of __setup() handler
Yang Yingliang <[email protected]>
pinctrl: renesas: core: Fix possible null-ptr-deref in sh_pfc_map_resources()
Geert Uytterhoeven <[email protected]>
pinctrl: renesas: r8a779f0: Fix GPIO function on I2C-capable pins
Geert Uytterhoeven <[email protected]>
pinctrl: renesas: r8a779a0: Fix GPIO function on I2C-capable pins
Randy Dunlap <[email protected]>
powerpc/8xx: export 'cpm_setbrg' for modules
Lv Ruyi <[email protected]>
drm/msm/dpu: fix error check return value of irq_of_parse_and_map()
Kuniyuki Iwashima <[email protected]>
list: fix a data-race around ep->rdllist
Heming Zhao via Ocfs2-devel <[email protected]>
ocfs2: fix mounting crash if journal is not alloced
Sudeep Holla <[email protected]>
firmware: arm_ffa: Remove incorrect assignment of driver_data
Sudeep Holla <[email protected]>
firmware: arm_ffa: Fix uuid parameter to ffa_partition_probe
Christophe JAILLET <[email protected]>
drivers/base/memory: fix an unlikely reference counting issue in __add_memory_block()
Muchun Song <[email protected]>
dax: fix cache flush on PMD-mapped pages
Miaohe Lin <[email protected]>
drivers/base/node.c: fix compaction sysfs file leak
Jacky Li <[email protected]>
crypto: ccp - Fix the INIT_EX data file open failure
Krzysztof Kozlowski <[email protected]>
pinctrl: mvebu: Fix irq_of_parse_and_map() return value
Dan Williams <[email protected]>
nvdimm: Allow overwrite in the presence of disabled dimms
Dan Williams <[email protected]>
nvdimm: Fix firmware activation deadlock scenarios
Cristian Marussi <[email protected]>
firmware: arm_scmi: Fix list protocols enumeration in the base protocol
Lad Prabhakar <[email protected]>
ASoC: sh: rz-ssi: Release the DMA channels in rz_ssi_probe() error path
Lad Prabhakar <[email protected]>
ASoC: sh: rz-ssi: Propagate error codes returned from platform_get_irq_byname()
Matthias Schiffer <[email protected]>
arm64: dts: ti: k3-am64-mcu: remove incorrect UART base clock rates
QintaoShen <[email protected]>
soc: bcm: Check for NULL return of devm_kzalloc()
Gustavo A. R. Silva <[email protected]>
scsi: fcoe: Fix Wstringop-overflow warnings in fcoe_wwn_from_mac()
Lv Ruyi <[email protected]>
mfd: ipaq-micro: Fix error check return value of platform_get_irq()
Hari Bathini <[email protected]>
powerpc/fadump: fix PT_LOAD segment for boot memory area
Andrea Parri (Microsoft) <[email protected]>
Drivers: hv: vmbus: Fix handling of messages with transaction ID of zero
Vinod Koul <[email protected]>
arm64: dts: qcom: qrb5165-rb5: Fix can-clock node name
Fabien Parent <[email protected]>
pinctrl: mediatek: mt8195: enable driver on mtk platforms
Caleb Connolly <[email protected]>
pinctrl/rockchip: support deferring other gpio params
Chuanhong Guo <[email protected]>
arm: mediatek: select arch timer for mt7629
Chia-I Wu <[email protected]>
drm/msm: return the average load over the polling period
Chia-I Wu <[email protected]>
drm/msm: simplify gpu_busy callback
Stefan Wahren <[email protected]>
pinctrl: bcm2835: implement hook for missing gpio-ranges
Stefan Wahren <[email protected]>
gpiolib: of: Introduce hook for missing gpio-ranges
Corentin Labbe <[email protected]>
crypto: marvell/cesa - ECB does not IV
Vladis Dronov <[email protected]>
hwrng: cn10k - Make check_rng_health() return an error code
Vladis Dronov <[email protected]>
hwrng: cn10k - Optimize cn10k_rng_read()
Hangyu Hua <[email protected]>
misc: ocxl: fix possible double free in ocxl_file_register_afu
Stefan Wahren <[email protected]>
ARM: dts: bcm2835-rpi-b: Fix GPIO line names
Phil Elwell <[email protected]>
ARM: dts: bcm2837-rpi-3-b-plus: Fix GPIO line name of power LED
Phil Elwell <[email protected]>
ARM: dts: bcm2837-rpi-cm3-io3: Fix GPIO line names for SMPS I2C
Phil Elwell <[email protected]>
ARM: dts: bcm2835-rpi-zero-w: Fix GPIO line name for Wifi/BT
Vinod Koul <[email protected]>
arm64: dts: qcom: sm8450: Fix missing iommus for qup1
Vinod Koul <[email protected]>
arm64: dts: qcom: sm8450: Fix missing iommus for qup
Krzysztof Kozlowski <[email protected]>
ARM: dts: qcom: sdx55: remove wrong unit address from RPMH RSC clocks
Bryan O'Donoghue <[email protected]>
dt-bindings: soc: qcom: smd-rpm: Fix missing MSM8936 compatible
Marek Vasut <[email protected]>
ARM: dts: stm32: Fix PHY post-reset delay on Avenger96
Marc Kleine-Budde <[email protected]>
can: xilinx_can: mark bit timing constants as const
Guenter Roeck <[email protected]>
platform/chrome: Re-introduce cros_ec_cmd_xfer and use it for ioctls
Max Krummenacher <[email protected]>
ARM: dts: imx6dl-colibri: Fix I2C pinmuxing
Tzung-Bi Shih <[email protected]>
platform/chrome: cros_ec: fix error handling in cros_ec_register()
Giovanni Cabiddu <[email protected]>
crypto: qat - set COMPRESSION capability for DH895XCC
Giovanni Cabiddu <[email protected]>
crypto: qat - set CIPHER capability for DH895XCC
Sudeep Holla <[email protected]>
arm64: dts: juno: Fix SCMI power domain IDs for ETF and CS funnel
Sean Christopherson <[email protected]>
KVM: nVMX: Clear IDT vectoring on nested VM-Exit for double/triple fault
Sean Christopherson <[email protected]>
KVM: nVMX: Leave most VM-Exit info fields unmodified on failed VM-Entry
Dan Williams <[email protected]>
cxl/pci: Make cxl_dvsec_ranges() failure not fatal to cxl_pci
Dan Williams <[email protected]>
cxl/pci: Add debug for DVSEC range init failures
Bjorn Andersson <[email protected]>
soc: qcom: llcc: Add MODULE_DEVICE_TABLE()
Stephen Boyd <[email protected]>
arm64: dts: qcom: sc7280-herobrine: Drop outputs on fpmcu pins
Stephen Boyd <[email protected]>
arm64: dts: qcom: sc7280: Fix sar1_irq_odl node name
Thorsten Scherer <[email protected]>
ARM: dts: ci4x10: Adapt to changes in imx6qdl.dtsi regarding fec clocks
Jiantao Zhang <[email protected]>
PCI: dwc: Fix setting error return on MSI DMA mapping failure
Miaoqian Lin <[email protected]>
PCI: mediatek: Fix refcount leak in mtk_pcie_subsys_powerup()
Dan Carpenter <[email protected]>
PCI: rockchip: Fix find_first_zero_bit() limit
Dan Carpenter <[email protected]>
PCI: cadence: Fix find_first_zero_bit() limit
Dmitry Baryshkov <[email protected]>
arm64: defconfig: reenable SM_DISPCC_8250
Miaoqian Lin <[email protected]>
soc: qcom: smsm: Fix missing of_node_put() in smsm_parse_ipc
Miaoqian Lin <[email protected]>
soc: qcom: smp2p: Fix missing of_node_put() in smp2p_parse_ipc
Andre Przywara <[email protected]>
ARM: dts: suniv: F1C100: fix watchdog compatible
Rafał Miłecki <[email protected]>
ARM: dts: BCM5301X: Update pin controller node name
Christophe JAILLET <[email protected]>
memory: samsung: exynos5422-dmc: Avoid some over memory allocation
Mario Limonciello <[email protected]>
PCI/ACPI: Allow D3 only if Root Port can signal and wake from D3
Allen-KH Cheng <[email protected]>
arm64: dts: mt8192: Fix nor_flash status disable typo
Shawn Lin <[email protected]>
arm64: dts: rockchip: Move drive-impedance-ohm to emmc phy on rk3399
Sean Young <[email protected]>
media: lirc: revert removal of unused feature flags
liuyacan <[email protected]>
Revert "net/smc: fix listen processing for SMC-Rv2"
Luiz Augusto von Dentz <[email protected]>
Bluetooth: hci_conn: Fix hci_connect_le_sync
Robin Murphy <[email protected]>
dma-direct: don't over-decrypt memory
liuyacan <[email protected]>
net/smc: fix listen processing for SMC-Rv2
liuyacan <[email protected]>
net/smc: postpone sk_refcnt increment in connect()
Randy Dunlap <[email protected]>
net: dsa: restrict SMSC_LAN9303_I2C kconfig
Ioana Ciornei <[email protected]>
dpaa2-eth: unmap the SGT buffer before accessing its contents
Ioana Ciornei <[email protected]>
dpaa2-eth: use the correct software annotation field
Ioana Ciornei <[email protected]>
dpaa2-eth: retrieve the virtual address before dma_unmap
Christophe JAILLET <[email protected]>
hinic: Avoid some over memory allocation
David Howells <[email protected]>
rxrpc: Fix decision on when to generate an IDLE ACK
David Howells <[email protected]>
rxrpc: Don't let ack.previousPacket regress
David Howells <[email protected]>
rxrpc: Fix overlapping ACK accounting
David Howells <[email protected]>
rxrpc: Don't try to resend the request if we're receiving the reply
David Howells <[email protected]>
rxrpc: Fix listen() setting the bar too high for the prealloc rings
David Howells <[email protected]>
rxrpc: Fix locking issue
Adam Wujek <[email protected]>
hwmon: (pmbus) Check PEC support before reading other registers
Guenter Roeck <[email protected]>
hwmon: (dimmtemp) Fix bitmap handling
Yongzhi Liu <[email protected]>
hv_netvsc: Fix potential dereference of NULL pointer
Taehee Yoo <[email protected]>
amt: fix memory leak for advertisement message
Taehee Yoo <[email protected]>
amt: fix gateway mode stuck
Jakub Kicinski <[email protected]>
net: stmmac: fix out-of-bounds access in a selftest
Kan Liang <[email protected]>
perf parse-events: Support different format of the topdown event name
Alexey Khoroshilov <[email protected]>
ASoC: max98090: Move check for invalid values before casting in max98090_put_enab_tlv()
Hangbin Liu <[email protected]>
bonding: fix missed rcu protection
Duoming Zhou <[email protected]>
NFC: hci: fix sleep in atomic context bugs in nfc_hci_hcp_message_tx
John Garry <[email protected]>
scsi: hisi_sas: Fix memory ordering in hisi_sas_task_deliver()
John Garry <[email protected]>
scsi: hisi_sas: Fix rescan after deleting a disk
Harini Katakam <[email protected]>
net: macb: Fix PTP one step sync support
Ulf Hansson <[email protected]>
PM: domains: Fix initialization of genpd's next_wakeup
Heikki Krogerus <[email protected]>
platform/x86: intel_cht_int33fe: Set driver data
Ulf Hansson <[email protected]>
cpuidle: riscv-sbi: Fix code to allow a genpd governor to be used
Ulf Hansson <[email protected]>
cpuidle: psci: Fix regression leading to no genpd governor
Yang Yingliang <[email protected]>
ASoC: wm2000: fix missing clk_disable_unprepare() on error in wm2000_anc_transition()
YueHaibing <[email protected]>
ASoC: codecs: lpass: Fix passing zero to 'PTR_ERR'
Jan Kara <[email protected]>
bfq: Allow current waker to defend against a tentative one
Jan Kara <[email protected]>
bfq: Relax waker detection for shared queues
Miaoqian Lin <[email protected]>
thermal/drivers/imx_sc_thermal: Fix refcount leak in imx_sc_thermal_probe
Yang Yingliang <[email protected]>
thermal/core: Fix memory leak in __thermal_cooling_device_register()
Zheng Yongjun <[email protected]>
thermal/drivers/broadcom: Fix potential NULL dereference in sr_thermal_probe
Stefan Wahren <[email protected]>
thermal/drivers/bcm2711: Don't clamp temperature at zero
Nathan Chancellor <[email protected]>
drm/i915: Fix CFI violation with show_dynamic_id()
Abhinav Kumar <[email protected]>
drm/msm/dpu: handle pm_runtime_get_sync() errors in bind path
Hangbin Liu <[email protected]>
selftests/bpf: Add missed ima_setup.sh in Makefile
Dmitry Baryshkov <[email protected]>
drm/msm: don't free the IRQ if it was not requested
Lai Jiangshan <[email protected]>
x86/sev: Annotate stack change in the #VC handler
Hangyu Hua <[email protected]>
drm: msm: fix possible memory leak in mdp5_crtc_cursor_set()
Miaoqian Lin <[email protected]>
drm/msm/a6xx: Fix refcount leak in a6xx_gpu_init
Douglas Anderson <[email protected]>
drm/msm/dsi: don't powerup at modeset time for parade-ps8640
Eric Biggers <[email protected]>
ext4: reject the 'commit' option on ext2 filesystems
Moshe Tal <[email protected]>
net/mlx5e: Correct the calculation of max channels for rep
Gao Xiang <[email protected]>
erofs: fix buffer copy overflow of ztailpacking feature
Wolfgang Bumiller <[email protected]>
blk-cgroup: always terminate io.stat lines
Miaoqian Lin <[email protected]>
regulator: scmi: Fix refcount leak in scmi_regulator_probe
Jonas Karlman <[email protected]>
media: rkvdec: h264: Fix bit depth wrap in pps packet
Nicolas Dufresne <[email protected]>
media: rkvdec: h264: Fix dpb_valid implementation
Nicolas Dufresne <[email protected]>
media: rkvdec: Stop overclocking the decoder
Yang Yingliang <[email protected]>
media: i2c: ov5648: fix wrong pointer passed to IS_ERR() and PTR_ERR()
Mike Pagano <[email protected]>
media: i2c: ov2640: Depend on V4L2_ASYNC
Dongliang Mu <[email protected]>
media: ov7670: remove ov7670_power_off from ov7670_remove
Andre Przywara <[email protected]>
kselftest/arm64: bti: force static linking
Miaoqian Lin <[email protected]>
ASoC: ti: j721e-evm: Fix refcount leak in j721e_soc_probe_*
Zheng Bin <[email protected]>
net: hinic: add missing destroy_workqueue in hinic_pf_to_mgmt_init
Eric Dumazet <[email protected]>
sctp: read sk->sk_bound_dev_if once in sctp_rcv()
Eric Dumazet <[email protected]>
net: annotate races around sk->sk_bound_dev_if
Geert Uytterhoeven <[email protected]>
m68k: math-emu: Fix dependencies of math emulation support
Keith Busch <[email protected]>
nvme: set dma alignment to dword
Mark Rutland <[email protected]>
irqchip/gic-v3: Fix priority mask handling
Mark Rutland <[email protected]>
irqchip/gic-v3: Refactor ISB + EOIR at ack time
Mark Rutland <[email protected]>
irqchip/gic-v3: Ensure pseudo-NMIs have an ISB between ack and handling
Dylan Yudaken <[email protected]>
io_uring: only wake when the correct events are set
Pavel Begunkov <[email protected]>
io_uring: avoid io-wq -EAGAIN looping for !IOPOLL
Yunfei Dong <[email protected]>
media: mediatek: vcodec: Fix v4l2 compliance decoder cmd test fail
Sean Wang <[email protected]>
Bluetooth: btmtksdio: fix the reset takes too long
Sean Wang <[email protected]>
Bluetooth: btmtksdio: fix possible FW initialization failure
Sean Wang <[email protected]>
Bluetooth: btmtksdio: fix use-after-free at btmtksdio_recv_event
Niels Dossche <[email protected]>
Bluetooth: protect le accept and resolv lists with hdev->lock
Niels Dossche <[email protected]>
Bluetooth: use hdev lock for accept_list and reject_list in conn req
Niels Dossche <[email protected]>
Bluetooth: use hdev lock in activate_scan for hci_is_adv_monitoring
Ying Hsu <[email protected]>
Bluetooth: fix dangling sco_conn and use-after-free in sco_sock_timeout
Sean Wang <[email protected]>
Bluetooth: mt7921s: Fix the incorrect pointer check
Benjamin Gaignard <[email protected]>
media: hantro: HEVC: Fix tile info buffer value computation
Eugen Hristev <[email protected]>
media: atmel: atmel-sama5d2-isc: fix wrong mask in YUYV format check
Michael Rodin <[email protected]>
media: vsp1: Fix offset calculation for plane cropping
Randy Dunlap <[email protected]>
media: make RADIO_ADAPTERS tristate
Pavel Skripkin <[email protected]>
media: pvrusb2: fix array-index-out-of-bounds in pvr2_i2c_core_init
Miaoqian Lin <[email protected]>
media: exynos4-is: Change clk_disable to clk_disable_unprepare
Laurentiu Palcu <[email protected]>
media: i2c: rdacm2x: properly set subdev entity function
Miaoqian Lin <[email protected]>
media: atmel: atmel-isc: Fix PM disable depth imbalance in atmel_isc_probe
Miaoqian Lin <[email protected]>
media: st-delta: Fix PM disable depth imbalance in delta_probe
Peter Chiu <[email protected]>
mt76: mt7915: fix twt table_mask to u16 in mt7915_dev
Felix Fietkau <[email protected]>
mt76: fix tx status related use-after-free race on station removal
Felix Fietkau <[email protected]>
mt76: do not attempt to reorder received 802.3 packets without agg session
Sean Wang <[email protected]>
mt76: mt7921: fix kernel crash at mt7921_pci_remove
Deren Wu <[email protected]>
mt76: fix antenna config missing in 6G cap
Lorenzo Bianconi <[email protected]>
mt76: mt7915: report rx mode value in mt7915_mac_fill_rx_rate
Lorenzo Bianconi <[email protected]>
mt76: mt7915: do not pass data pointer to mt7915_mcu_muru_debug_set
Lorenzo Bianconi <[email protected]>
mt76: mt7915: fix possible NULL pointer dereference in mt7915_mac_fill_rx_vector
Lorenzo Bianconi <[email protected]>
mt76: mt7915: fix possible uninitialized pointer dereference in mt7986_wmac_gpio_setup
Christophe JAILLET <[email protected]>
mt76: mt7921: Fix the error handling path of mt7921_pci_probe()
Lorenzo Bianconi <[email protected]>
mt76: mt7915: fix unbounded shift in mt7915_mcu_beacon_mbss
Lorenzo Bianconi <[email protected]>
mt76: mt7921: honor pm user configuration in mt7921_sniffer_interface_iter
Felix Fietkau <[email protected]>
mt76: mt7915: fix DBDC default band selection on MT7915D
Miaoqian Lin <[email protected]>
media: exynos4-is: Fix PM disable depth imbalance in fimc_is_probe
Christophe JAILLET <[email protected]>
media: aspeed: Fix an error handling path in aspeed_video_probe()
Josh Poimboeuf <[email protected]>
scripts/faddr2line: Fix overlapping text section failures
Phil Auld <[email protected]>
kselftest/cgroup: fix test_stress.sh to use OUTPUT dir
Bart Van Assche <[email protected]>
block: Fix the bio.bi_opf comment
Miaoqian Lin <[email protected]>
ASoC: samsung: Fix refcount leak in aries_audio_probe
Christoph Hellwig <[email protected]>
dma-direct: don't fail on highmem CMA pages in dma_direct_alloc_pages
Pierre Gondois <[email protected]>
PM: EM: Decrement policy counter
Miaoqian Lin <[email protected]>
regulator: pfuze100: Fix refcount leak in pfuze_parse_regulators_dt
Miaoqian Lin <[email protected]>
ASoC: mxs-saif: Fix refcount leak in mxs_saif_probe
Miaoqian Lin <[email protected]>
ASoC: imx-hdmi: Fix refcount leak in imx_hdmi_probe
Miaoqian Lin <[email protected]>
ASoC: fsl: Fix refcount leak in imx_sgtl5000_probe
Basavaraj Natikar <[email protected]>
HID: amd_sfh: Modify the hid name
Basavaraj Natikar <[email protected]>
HID: amd_sfh: Modify the bus name
Ajay Singh <[email protected]>
wilc1000: fix crash observed in AP mode with cfg80211_register_netdevice()
James Smart <[email protected]>
scsi: lpfc: Fix dmabuf ptr assignment in lpfc_ct_reject_event()
James Smart <[email protected]>
scsi: lpfc: Fix element offset in __lpfc_sli_release_iocbq_s4()
Baochen Qiang <[email protected]>
ath11k: Don't check arvif->is_started before sending management frames
Ravi Bangoria <[email protected]>
perf/amd/ibs: Use interrupt regs ip for stack unwinding
Jerome Marchand <[email protected]>
samples: bpf: Don't fail for a missing VMLINUX_BTF when VMLINUX_H is provided
Konrad Dybcio <[email protected]>
regulator: qcom_smd: Fix up PM8950 regulator configuration
Viresh Kumar <[email protected]>
Revert "cpufreq: Fix possible race in cpufreq online error path"
Andrii Nakryiko <[email protected]>
selftests/bpf: Prevent skeleton generation race
Yang Yingliang <[email protected]>
spi: spi-fsl-qspi: check return value after calling platform_get_resource_byname()
Andreas Gruenbacher <[email protected]>
iomap: iomap_write_failed fix
Mark Rutland <[email protected]>
arm64: stackleak: fix current_top_of_stack()
Xiaomeng Tong <[email protected]>
media: uvcvideo: Fix missing check to determine if element is found in list
Dan Carpenter <[email protected]>
drm/msm: return an error pointer in msm_gem_prime_get_sg_table()
Jessica Zhang <[email protected]>
drm/msm/mdp5: Return error code in mdp5_mixer_release when deadlock is detected
Jessica Zhang <[email protected]>
drm/msm/mdp5: Return error code in mdp5_pipe_release when deadlock is detected
Kuogee Hsieh <[email protected]>
drm/msm/dp: fix event thread stuck in wait_event after kthread_stop()
Dmitry Baryshkov <[email protected]>
drm/msm/dsi: fix address for second DSI PHY on SDM660
Vinod Polimera <[email protected]>
drm/msm/disp/dpu1: avoid clearing hw interrupts if hw_intr is null during drm uninit
Ilkka Koskinen <[email protected]>
ACPI: AGDI: Fix missing prototype warning for acpi_agdi_init()
Peter Zijlstra <[email protected]>
linkage: Fix issue with missing symbol size
H. Nikolaus Schaller <[email protected]>
wl1251: dynamically allocate memory used for DMA
Zev Weiss <[email protected]>
regulator: core: Fix enable_count imbalance with EXCLUSIVE_GET
Tong Tiangen <[email protected]>
arm64: fix types in copy_highpage()
Randy Dunlap <[email protected]>
x86/mm: Cleanup the control_va_addr_alignment() __setup handler
Krzysztof Kozlowski <[email protected]>
irqchip/aspeed-scu-ic: Fix irq_of_parse_and_map() return value
Krzysztof Kozlowski <[email protected]>
irqchip/aspeed-i2c-ic: Fix irq_of_parse_and_map() return value
Daniel Thompson <[email protected]>
irqchip/exiu: Fix acknowledgment of edge triggered interrupts
Randy Dunlap <[email protected]>
x86: Fix return value of __setup handlers
Johannes Berg <[email protected]>
nl80211: don't hold RTNL in color change request
Christoph Hellwig <[email protected]>
virtio_blk: fix the discard_granularity and discard_alignment queue limits
James Clark <[email protected]>
perf tools: Use Python devtools for version autodetection rather than runtime
Ian Abbott <[email protected]>
spi: cadence-quadspi: fix Direct Access Mode disable for SoCFPGA
Yang Yingliang <[email protected]>
drm/rockchip: vop: fix possible null-ptr-deref in vop_bind()
Daniel Latypov <[email protected]>
kunit: fix debugfs code to use enum kunit_status, not bool
Luca Weiss <[email protected]>
drm/msm: Fix null pointer dereferences without iommu
Pin-Yen Lin <[email protected]>
drm/bridge: it6505: Send DPCD SET_POWER to downstream
Jagan Teki <[email protected]>
drm/panel: panel-simple: Fix proper bpc for AM-1280800N3TZQW-T00H
Dmitry Baryshkov <[email protected]>
drm/msm: add missing include to msm_drv.c
Lv Ruyi <[email protected]>
drm/msm/hdmi: fix error check return value of irq_of_parse_and_map()
Yang Yingliang <[email protected]>
drm/msm/hdmi: check return value after calling platform_get_resource_byname()
Dmitry Baryshkov <[email protected]>
drm/msm/dsi: fix error checks and return values for DSI xmit functions
Kuogee Hsieh <[email protected]>
drm/msm/dp: do not stop transmitting phy test pattern during DP phy compliance test
Kuogee Hsieh <[email protected]>
drm/msm/dp: reset DP controller before transmit phy test pattern
Lv Ruyi <[email protected]>
drm/msm/dp: fix error check return value of irq_of_parse_and_map()
Kuogee Hsieh <[email protected]>
drm/msm/dp: stop event kernel thread when DP unbind
Vinod Polimera <[email protected]>
drm/msm/disp/dpu1: set vbif hw config to NULL to avoid use after memory free during pm runtime resume
Yang Jihong <[email protected]>
perf tools: Add missing headers needed by util/data.h
Nicolas Frattaroli <[email protected]>
ASoC: rk3328: fix disabling mclk on pclk probe failure
Josh Poimboeuf <[email protected]>
x86/speculation: Add missing prototype for unpriv_ebpf_notify()
Yang Yingliang <[email protected]>
mtd: rawnand: intel: fix possible null-ptr-deref in ebu_nand_probe()
Yang Yingliang <[email protected]>
mtd: rawnand: cadence: fix possible null-ptr-deref in cadence_nand_dt_probe()
Matthieu Baerts <[email protected]>
x86/pm: Fix false positive kmemleak report in msr_build_context()
Chen-Tsung Hsieh <[email protected]>
mtd: spi-nor: core: Check written SR value in spi_nor_write_16bit_sr_and_check()
Andrii Nakryiko <[email protected]>
libbpf: Fix logic for finding matching program for CO-RE relocation
Colin Ian King <[email protected]>
selftests/resctrl: Fix null pointer dereference on open failed
Colin Ian King <[email protected]>
drm/v3d: Fix null pointer dereference of pointer perfmon
Kiwoong Kim <[email protected]>
scsi: ufs: core: Exclude UECxx from SFR dump list
Bart Van Assche <[email protected]>
scsi: ufs: qcom: Fix ufs_qcom_resume()
Dan Carpenter <[email protected]>
scsi: iscsi: Fix harmless double shift bug
Kuogee Hsieh <[email protected]>
drm/msm/dpu: adjust display_v_end for eDP and DP
Dmitry Baryshkov <[email protected]>
drm/msm: properly add and remove internal bridges
Yuanchu Xie <[email protected]>
selftests/damon: add damon to selftests root Makefile
Nuno Sá <[email protected]>
of: overlay: do not break notify on NOTIFY_{OK|STOP}Luca Ceresoli <[email protected]>
spi: rockchip: fix missing error on unsupported SPI_CS_HIGH
Amir Goldstein <[email protected]>
fsnotify: fix wrong lockdep annotations
Amir Goldstein <[email protected]>
inotify: show inotify mask flags in proc fdinfo
Bjørn Mork <[email protected]>
mtdblock: warn if opened on NAND
Colin Ian King <[email protected]>
ALSA: pcm: Check for null pointer of pointer substream before dereferencing it
Marek Vasut <[email protected]>
drm/panel: simple: Add missing bus flags for Innolux G070Y2-L01
Laurent Pinchart <[email protected]>
media: imx: imx-mipi-csis: Fix active format initialization on source pad
Laurent Pinchart <[email protected]>
media: imx: imx-mipi-csis: Rename csi_state to mipi_csis_device
Chen-Yu Tsai <[email protected]>
media: hantro: Empty encoder capture buffers by default
Chen-Yu Tsai <[email protected]>
media: hantro: Implement support for encoder commands
Ming Qian <[email protected]>
media: amphion: fix decoder's interlaced field
Laurentiu Palcu <[email protected]>
media: i2c: max9286: fix kernel oops when removing module
Dan Carpenter <[email protected]>
ath9k_htc: fix potential out of bounds access with invalid rxstatus->rs_keyix
John Ogness <[email protected]>
printk: wake waiters for safe and NMI contexts
John Ogness <[email protected]>
printk: add missing memory barrier to wake_up_klogd()
Schspa Shi <[email protected]>
cpufreq: Fix possible race in cpufreq online error path
Robert Foss <[email protected]>
drm/bridge: Fix it6505 Kconfig DRM_DP_AUX_BUS dependency
Zheng Yongjun <[email protected]>
spi: img-spfi: Fix pm_runtime_get_sync() error checking
Chengming Zhou <[email protected]>
sched/psi: report zeroes for CPU full at the system level
Chengming Zhou <[email protected]>
sched/fair: Fix cfs_rq_clock_pelt() for throttled cfs_rq
Marco Elver <[email protected]>
signal: Deliver SIGTRAP on perf event asynchronously if blocked
Nícolas F. R. A. Prado <[email protected]>
drm/mediatek: dpi: Use mt8183 output formats for mt8192
Wei Yongjun <[email protected]>
regulator: da9121: Fix uninit-value in da9121_assign_chip_model()
Miaoqian Lin <[email protected]>
drm/bridge: Fix error handling in analogix_dp_probe
Miaoqian Lin <[email protected]>
HID: elan: Fix potential double free in elan_input_configured
Jonathan Teh <[email protected]>
HID: hid-led: fix maximum brightness for Dream Cheeky
Zheyu Ma <[email protected]>
mtd: rawnand: denali: Use managed device resources
Nícolas F. R. A. Prado <[email protected]>
drm/bridge: anx7625: Use uint8 for lane-swing arrays
Stanislav Fomichev <[email protected]>
bpf: Move rcu lock management out of BPF_PROG_RUN routines
Tyler Hicks <[email protected]>
EDAC/dmc520: Don't print an error for each unconfigured interrupt line
Arnd Bergmann <[email protected]>
drbd: fix duplicate array initializer
Christoph Hellwig <[email protected]>
drbd: use bdev_alignment_offset instead of queue_alignment_offset
Christoph Hellwig <[email protected]>
drbd: use bdev based limit helpers in drbd_send_sizes
Christoph Hellwig <[email protected]>
drbd: remove assign_p_sizes_qlim
Christoph Hellwig <[email protected]>
target: remove an incorrect unmap zeroes data deduction
Ansuel Smith <[email protected]>
net: dsa: qca8k: correctly handle mdio read error
Gavin Wan <[email protected]>
drm/amd/amdgpu: Remove static from variable in RLCG Reg RW
Andy Shevchenko <[email protected]>
device property: Allow error pointer to be passed to fwnode APIs
Jan Kiszka <[email protected]>
efi: Add missing prototype for efi_capsule_setup_info
Javier Martinez Canillas <[email protected]>
efi: Allow to enable EFI runtime services by default on RT
Kevin Hao <[email protected]>
cpufreq: governor: Use kobject release() method to free dbs_data
Lin Ma <[email protected]>
NFC: NULL out the dev->rfkill to prevent UAF
Lv Ruyi <[email protected]>
ixp4xx_eth: fix error check return value of platform_get_irq()
Russell King (Oracle) <[email protected]>
net: dsa: mt7530: 1G can also support 1000BASE-X link mode
YueHaibing <[email protected]>
net: ethernet: ti: am65-cpsw: Fix build error without PHYLINK
Paul E. McKenney <[email protected]>
scftorture: Fix distribution of short handler delays
Miaoqian Lin <[email protected]>
spi: spi-ti-qspi: Fix return value handling of wait_for_completion_timeout
Yongqiang Sun <[email protected]>
drm/amd/amdgpu: Fix asm/hypervisor.h build error.
Jiasheng Jiang <[email protected]>
drm: mali-dp: potential dereference of null pointer
Zhou Qingyang <[email protected]>
drm/komeda: Fix an undefined behavior bug in komeda_plane_add()
Johannes Berg <[email protected]>
nl80211: show SSID for P2P_GO interfaces
Paolo Abeni <[email protected]>
mptcp: reset the packet scheduler on PRIO change
Paolo Abeni <[email protected]>
mptcp: reset the packet scheduler on incoming MP_PRIO
Paolo Abeni <[email protected]>
mptcp: optimize release_cb for the common case
Maciej W. Rozycki <[email protected]>
x86/PCI: Fix ALi M1487 (IBC) PIRQ router link value interpretation
Andrii Nakryiko <[email protected]>
libbpf: Don't error out on CO-RE relos for overriden weak subprogs
Maxime Ripard <[email protected]>
drm/vc4: txp: Force alpha to be 0xff if it's disabled
Maxime Ripard <[email protected]>
drm/vc4: txp: Don't set TXP_VSTART_AT_EOF
Maxime Ripard <[email protected]>
drm/vc4: hvs: Reset muxes at probe time
Yongqiang Sun <[email protected]>
drm/amd/amdgpu: Only reserve vram for firmware with vega9 MS_HYPERV host.
Miles Chen <[email protected]>
drm/mediatek: Fix mtk_cec_mask()
Maxime Ripard <[email protected]>
drm/vc4: hvs: Fix frame count register readout
Maxime Ripard <[email protected]>
drm/vc4: kms: Take old state core clock rate into account
Chen-Yu Tsai <[email protected]>
drm/mediatek: Fix DPI component detection for MT8192
Rex-BC Chen <[email protected]>
drm/mediatek: Add vblank register/unregister callback functions
Ammar Faizi <[email protected]>
x86/delay: Fix the wrong asm constraint in delay_loop()
Akira Yokosawa <[email protected]>
docs: driver-api/thermal/intel_dptf: Use copyright symbol
Miaoqian Lin <[email protected]>
ASoC: mediatek: Fix missing of_node_put in mt2701_wm8960_machine_probe
Miaoqian Lin <[email protected]>
ASoC: mediatek: Fix error handling in mt8173_max98090_dev_probe
Peter Ujfalusi <[email protected]>
ASoC: SOF: ipc3-topology: Set scontrol->priv to NULL after freeing it
Hui Wang <[email protected]>
ASoC: cs35l41: Fix an out-of-bounds access in otp_packed_element_t
Srinivasa Rao Mandadapu <[email protected]>
ASoC: codecs: Fix error handling in power domain init and exit handlers
Kuldeep Singh <[email protected]>
spi: qcom-qspi: Add minItems to interconnect-names
Chuanhong Guo <[email protected]>
mtd: spinand: gigadevice: fix Quad IO for GD5F1GQ5UExxG
Marek Vasut <[email protected]>
drm: bridge: icn6211: Fix HFP_HSW_HBP_HI and HFP_MIN handling
Marek Vasut <[email protected]>
drm: bridge: icn6211: Fix register layout
Lucas Stach <[email protected]>
drm/bridge: adv7511: clean up CEC adapter when probe fails
Yang Yingliang <[email protected]>
drm/bridge: anx7625: add missing destroy_workqueue() in anx7625_i2c_probe()
Jani Nikula <[email protected]>
drm/edid: fix invalid EDID extension block filtering
Wenli Looi <[email protected]>
ath9k: fix ar9003_get_eepmisc
YueHaibing <[email protected]>
drm/bridge: it6505: Fix build error
Nicolas Belin <[email protected]>
drm: bridge: it66121: Fix the register page length
Niels Dossche <[email protected]>
ath11k: acquire ab->base_lock in unassign when finding the peer by addr
Zack Rusin <[email protected]>
drm/vmwgfx: Fix an invalid read
Chuansheng Liu <[email protected]>
fbdev: defio: fix the pagelist corruption
Geert Uytterhoeven <[email protected]>
drm/ssd130x: Reduce temporary buffer sizes
Geert Uytterhoeven <[email protected]>
drm/ssd130x: Fix rectangle updates
Geert Uytterhoeven <[email protected]>
drm/format-helper: Fix XRGB888 to monochrome conversion
Geert Uytterhoeven <[email protected]>
drm/format-helper: Rename drm_fb_xrgb8888_to_mono_reversed()
YueHaibing <[email protected]>
drm/solomon: Make DRM_SSD130X depends on MMU
Chen-Yu Tsai <[email protected]>
drm: ssd130x: Always apply segment remap setting
Chen-Yu Tsai <[email protected]>
drm: ssd130x: Fix COM scan direction register mask
Tom Rix <[email protected]>
drm/bridge: anx7625: check the return on anx7625_aux_trans
Noralf Trønnes <[email protected]>
dt-bindings: display: sitronix, st7735r: Fix backlight in example
Wan Jiabing <[email protected]>
drm/omap: fix NULL but dereferenced coccicheck error
Dan Carpenter <[email protected]>
drm/selftests: missing error code in igt_buddy_alloc_smoke()
Nikita Yushchenko <[email protected]>
drm/bridge_connector: enable HPD by default if supported
Linus Torvalds <[email protected]>
drm: fix EDID struct for old ARM OABI format
Lad Prabhakar <[email protected]>
Input: gpio-keys - cancel delayed work only in case of GPIO
Shyam Prasad N <[email protected]>
cifs: do not use tcpStatus after negotiate completes
Douglas Miller <[email protected]>
RDMA/hfi1: Prevent panic when SDMA is disabled
Steve French <[email protected]>
smb3: check for null tcon
Vasily Averin <[email protected]>
fanotify: fix incorrect fmode_t casts
Peng Wu <[email protected]>
powerpc/iommu: Add missing of_node_put in iommu_init_early_dart
Finn Thain <[email protected]>
macintosh/via-pmu: Fix build failure when CONFIG_INPUT is disabled
Lv Ruyi <[email protected]>
powerpc/powernv: fix missing of_node_put in uv_init()
Lv Ruyi <[email protected]>
powerpc/xics: fix refcount leak in icp_opal_init()
Haren Myneni <[email protected]>
powerpc/powernv/vas: Assign real address to rx_fifo in vas_rx_win_attr
Enzo Matsumiya <[email protected]>
cifs: return ENOENT for DFS lookup_cache_entry()
Vasily Averin <[email protected]>
tracing: incorrect isolate_mote_t cast in mm_vmscan_lru_isolate
Matthew Wilcox (Oracle) <[email protected]>
alpha: fix alloc_zeroed_user_highpage_movable()
Nicholas Piggin <[email protected]>
KVM: PPC: Book3S HV Nested: L2 LPCR should inherit L1 LPES setting
Parshuram Thombare <[email protected]>
PCI: cadence: Clear FLR in device capabilities register
Yicong Yang <[email protected]>
PCI: Avoid pci_dev_lock() AB/BA deadlock with sriov_numvfs_store()
Laurent Dufour <[email protected]>
powerpc/rtas: Keep MSR[RI] set when calling RTAS
Conor Dooley <[email protected]>
PCI: microchip: Add missing chained_irq_enter()/exit() calls
Viresh Kumar <[email protected]>
cpufreq: Avoid unnecessary frequency updates due to mismatch
Peng Wu <[email protected]>
ARM: hisi: Add missing of_node_put after of_find_compatible_node
Vijaya Krishna Nivarthi <[email protected]>
arm64: dts: qcom: sc7280-qcard: Configure CTS pin to bias-bus-hold for bluetooth
Vijaya Krishna Nivarthi <[email protected]>
arm64: dts: qcom: sc7280-idp: Configure CTS pin to bias-bus-hold for bluetooth
Krzysztof Kozlowski <[email protected]>
ARM: dts: exynos: add atmel,24c128 fallback to Samsung EEPROM
Peng Wu <[email protected]>
ARM: versatile: Add missing of_node_put in dcscb_init
Yang Yingliang <[email protected]>
pinctrl: renesas: rzn1: Fix possible null-ptr-deref in sh_pfc_map_resources()
OGAWA Hirofumi <[email protected]>
fat: add ratelimit to fat*_ent_bread()
Hari Bathini <[email protected]>
powerpc/fadump: Fix fadump to work with a different endian capture kernel
Janusz Krzysztofik <[email protected]>
ARM: OMAP1: clock: Fix UART rate reporting algorithm
Takashi Iwai <[email protected]>
ALSA: usb-audio: Move generic implicit fb quirk entries into quirks.c
Takashi Iwai <[email protected]>
ALSA: usb-audio: Add quirk bits for enabling/disabling generic implicit fb
Joel Selvaraj <[email protected]>
arm64: dts: qcom: sdm845-xiaomi-beryllium: fix typo in panel's vddio-supply property
Zixuan Fu <[email protected]>
fs: jfs: fix possible NULL pointer dereference in dbFree()
QintaoShen <[email protected]>
soc: ti: ti_sci_pm_domains: Check for null return of devm_kcalloc
Marco Chiappero <[email protected]>
crypto: qat - fix off-by-one error in PFVF debug print
Gilad Ben-Yossef <[email protected]>
crypto: ccree - use fine grained DMA mapping dir
Brian Norris <[email protected]>
PM / devfreq: rk3399_dmc: Disable edev on remove()
Konrad Dybcio <[email protected]>
arm64: dts: qcom: msm8994: Fix BLSP[12]_DMA channels count
Konrad Dybcio <[email protected]>
arm64: dts: qcom: msm8994: Fix the cont_splash_mem address
Mario Limonciello <[email protected]>
ASoC: amd: Add driver data to acp6x machine driver
Krzysztof Kozlowski <[email protected]>
ARM: dts: s5pv210: align DMA channels with dtschema
Krzysztof Kozlowski <[email protected]>
ARM: dts: socfpga: align interrupt controller node name with dtschema
Krzysztof Kozlowski <[email protected]>
ARM: dts: ox820: align interrupt controller node name with dtschema
Mika Westerberg <[email protected]>
PCI/ASPM: Make Intel DG2 L1 acceptable latency unlimited
Niels Dossche <[email protected]>
IB/rdmavt: add missing locks in rvt_ruc_loopback
Daniel Latypov <[email protected]>
kunit: fix executor OOM error handling logic on non-UML
Bodo Stroesser <[email protected]>
scsi: target: tcmu: Avoid holding XArray lock when calling lock_page
Linus Torvalds <[email protected]>
linux/types.h: reinstate "__bitwise__" macro for user space use
Bob Peterson <[email protected]>
gfs2: use i_lock spin_lock for inode qadata
Yonghong Song <[email protected]>
selftests/bpf: fix btf_dump/btf_dump due to recent clang change
Uwe Kleine-König <[email protected]>
char: tpm: cr50_i2c: Suppress duplicated error message in .remove()
Jakub Kicinski <[email protected]>
eth: tg3: silence the GCC 12 array-bounds warning
David Howells <[email protected]>
afs: Adjust ACK interpretation to try and cope with NAT
David Howells <[email protected]>
rxrpc, afs: Fix selection of abort codes
David Howells <[email protected]>
rxrpc: Return an error to sendmsg if call failed
Mårten Lindahl <[email protected]>
hwmon: (pmbus) Add get_voltage/set_voltage ops
Geert Uytterhoeven <[email protected]>
m68k: atari: Make Atari ROM port I/O write macros return void
Yuntao Wang <[email protected]>
selftests/bpf: Add missing trampoline program type to trampoline_count test
Alex Elder <[email protected]>
net: ipa: ignore endianness if there is no header
Borislav Petkov <[email protected]>
x86/microcode: Add explicit CPU vendor dependency
Vincent Mailhol <[email protected]>
can: mcp251xfd: silence clang's -Wunaligned-access warning
Chaitanya Kulkarni <[email protected]>
nvme: set non-mdts limits in nvme_scan_work
Pierre Gondois <[email protected]>
ACPI: CPPC: Assume no transition latency if no PCCT
Pierre-Louis Bossart <[email protected]>
ASoC: rt1015p: remove dependency on GPIOLIB
Pierre-Louis Bossart <[email protected]>
ASoC: max98357a: remove dependency on GPIOLIB
Laibin Qiu <[email protected]>
blk-throttle: Set BIO_THROTTLED when bio has been throttled
Andre Przywara <[email protected]>
of/fdt: Ignore disabled memory nodes
Ping-Ke Shih <[email protected]>
rtw89: cfo: check mac_id to avoid out-of-bounds
Nicolas Dufresne <[email protected]>
media: hantro: Stop using H.264 parameter pic_num
Kwanghoon Son <[email protected]>
media: exynos4-is: Fix compile warning
Fabio Estevam <[email protected]>
net: phy: micrel: Allow probing without .driver_data
Daniel Latypov <[email protected]>
kunit: tool: make parser stop overwriting status of suites w/ no_tests
Omar Sandoval <[email protected]>
btrfs: fix anon_dev leak in create_subvol()
Hans de Goede <[email protected]>
drm/amdgpu: Move mutex_init(&smu->message_lock) to smu_early_init()
Sathishkumar S <[email protected]>
drm/amd/pm: update smartshift powerboost calc for smu13
Sathishkumar S <[email protected]>
drm/amd/pm: update smartshift powerboost calc for smu12
Xie Yongji <[email protected]>
nbd: Fix hung on disconnect request if socket is closed before
Lin Ma <[email protected]>
ASoC: rt5645: Fix errorenous cleanup order
Smith, Kyle Miller (Nimble Kernel) <[email protected]>
nvme-pci: fix a NULL pointer dereference in nvme_alloc_admin_tags
Jason A. Donenfeld <[email protected]>
openrisc: start CPU timer early in boot
Yunfei Dong <[email protected]>
media: mediatek: vcodec: prevent kernel crash when rmmod mtk-vcodec-dec.ko
Pavan Chebbi <[email protected]>
bnxt_en: Configure ptp filters during bnxt open
Zijun Hu <[email protected]>
Bluetooth: btusb: Set HCI_QUIRK_BROKEN_ERR_DATA_REPORTING for QCA
Luiz Augusto von Dentz <[email protected]>
Bluetooth: btusb: Set HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN for QCA
Luiz Augusto von Dentz <[email protected]>
Bluetooth: HCI: Add HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN quirk
Lukas Wunner <[email protected]>
usbnet: Run unregister_netdev() before unbind() again
Hans Verkuil <[email protected]>
media: cec-adap.c: fix is_configuring state
Tetsuo Handa <[email protected]>
media: imon: reorganize serialization
Hans Verkuil <[email protected]>
media: ccs-core.c: fix failure to call clk_disable_unprepare
Benjamin Gaignard <[email protected]>
media: hantro: HEVC: unconditionnaly set pps_{cb/cr}_qp_offset values
Philipp Zabel <[email protected]>
media: coda: limit frame interval enumeration to supported encoder frame sizes
Hangyu Hua <[email protected]>
media: rga: fix possible memory leak in rga_probe
Felix Fietkau <[email protected]>
mt76: fix encap offload ethernet type check
Felix Fietkau <[email protected]>
mt76: mt7921: accept rx frames with non-standard VHT MCS10-11
Felix Fietkau <[email protected]>
mt76: mt7915: accept rx frames with non-standard VHT MCS10-11
Dongliang Mu <[email protected]>
rtlwifi: Use pr_warn instead of WARN_ONCE
Daniel Latypov <[email protected]>
kunit: bail out of test filtering logic quicker if OOM
Corey Minyard <[email protected]>
ipmi: Fix pr_fmt to avoid compilation issues
Corey Minyard <[email protected]>
ipmi: Add an intializer for ipmi_smi_msg struct
Corey Minyard <[email protected]>
ipmi:ssif: Check for NULL msg when handling events and messages
Mario Limonciello <[email protected]>
ACPI: PM: Block ASUS B1400CEAE from suspend to idle by default
Zheng Bin <[email protected]>
ASoC: SOF: amd: add missing platform_device_unregister in acp_pci_rn_probe
Christian Brauner <[email protected]>
fs: hold writers when changing mount's idmapping
Mikulas Patocka <[email protected]>
dma-debug: change allocation mode from GFP_NOWAIT to GFP_ATIOMIC
Patrice Chotard <[email protected]>
spi: stm32-qspi: Fix wait_cmd timeout in APM mode
Hao Jia <[email protected]>
sched/core: Avoid obvious double update_rq_clock warning
Ravi Bangoria <[email protected]>
perf/amd/ibs: Cascade pmu init functions' return value
Heiko Carstens <[email protected]>
s390/preempt: disable __preempt_count_add() optimization for PROFILE_ALL_BRANCHES
Eric Dumazet <[email protected]>
net: remove two BUG() from skb_checksum_help()
James Smart <[email protected]>
scsi: lpfc: Alter FPIN stat accounting logic
James Smart <[email protected]>
scsi: lpfc: Inhibit aborts if external loopback plug is inserted
Xiang Chen <[email protected]>
scsi: hisi_sas: Undo RPM resume for failed notify phy event for v3 HW
Brent Lu <[email protected]>
ASoC: Intel: sof_ssp_amp: fix no DMIC BE Link on Chromebooks
Gavin Li <[email protected]>
net/mlx5: Increase FW pre-init timeout for health recovery
Charles Keepax <[email protected]>
ASoC: tscs454: Add endianness flag in snd_soc_component_driver
Zhen Lei <[email protected]>
of: Support more than one crash kernel regions for kexec -s
Thierry Reding <[email protected]>
drm/tegra: gem: Do not try to dereference ERR_PTR()
Dongliang Mu <[email protected]>
HID: bigben: fix slab-out-of-bounds Write in bigben_probe
Jacob Keller <[email protected]>
ice: always check VF VSI pointer values
Nícolas F. R. A. Prado <[email protected]>
regulator: mt6315: Enforce regulator-compatible, not name
Alice Wong <[email protected]>
drm/amdgpu/ucode: Remove firmware load type check in amdgpu_ucode_free_bo
Alex Deucher <[email protected]>
drm/amdgpu/psp: move PSP memory alloc from hw_init to sw_init
Petr Machata <[email protected]>
mlxsw: Treat LLDP packets as control
Petr Machata <[email protected]>
mlxsw: spectrum_dcb: Do not warn about priority changes
Peter Ujfalusi <[email protected]>
ASoC: SOF: ipc3-topology: Correct get_control_data for non bytes payload
Mark Brown <[email protected]>
ASoC: dapm: Don't fold register value changes into notifications
Mark Bloch <[email protected]>
net/mlx5: fs, delete the FTE when there are no rules attached to it
Ziyang Xuan <[email protected]>
net/mlx5: use kvfree() for kvzalloc() in mlx5_ct_fs_smfs_matcher_create
jianghaoran <[email protected]>
ipv6: Don't send rs packets to the interface of ARPHRD_TUNNEL
Xiaoguang Wang <[email protected]>
scsi: target: tcmu: Fix possible data corruption
Wen Gong <[email protected]>
ath11k: fix warning of not found station for bssid in message
Max Filippov <[email protected]>
xtensa: move trace_hardirqs_off call back to entry.S
Jessica Zhang <[email protected]>
drm/msm/dpu: Clean up CRC debug logs
Lv Ruyi <[email protected]>
drm: msm: fix error check return value of irq_of_parse_and_map()
Alexandru Elisei <[email protected]>
arm64: compat: Do not treat syscall number as ESR_ELx for a bad syscall
Abhishek Kumar <[email protected]>
ath10k: skip ath10k_halt during suspend for driver state RESTARTING
Evan Quan <[email protected]>
drm/amd/pm: fix the compile warning
Mukul Joshi <[email protected]>
drm/amdkfd: Fix circular lock dependency warning
Steven Price <[email protected]>
drm/plane: Move range check for format_count earlier
Hans de Goede <[email protected]>
ASoC: Intel: bytcr_rt5640: Add quirk for the HP Pro Tablet 408
Hari Chandrakanthan <[email protected]>
ath11k: disable spectral scan during spectral deinit
James Smart <[email protected]>
scsi: lpfc: Fix resource leak in lpfc_sli4_send_seq_to_ulp()
Minghao Chi <[email protected]>
scsi: ufs: Use pm_runtime_resume_and_get() instead of pm_runtime_get_sync()
Haohui Mai <[email protected]>
drm/amdgpu/sdma: Fix incorrect calculations of the wptr of the doorbells
Lv Ruyi <[email protected]>
scsi: megaraid: Fix error check return value of register_chrdev()
Vignesh Raghavendra <[email protected]>
drivers: mmc: sdhci_am654: Add the quirk to set TESTCD bit
Aidan MacDonald <[email protected]>
mmc: jz4740: Apply DMA engine limits to maximum segment size
Heming Zhao <[email protected]>
md/bitmap: don't set sb values if can't pass sanity check
Zheyu Ma <[email protected]>
media: cx25821: Fix the warning when removing the module
Zheyu Ma <[email protected]>
media: pci: cx23885: Fix the error handling in cx23885_initdev()
Vikash Garodia <[email protected]>
media: venus: do not queue internal buffers from previous sequence
Luca Weiss <[email protected]>
media: venus: hfi: avoid null dereference in deinit
Zheyu Ma <[email protected]>
media: i2c: dw9714: Disable the regulator when the driver fails to probe
Sakari Ailus <[email protected]>
media: Revert "media: dw9768: activate runtime PM and turn off device"
Thibaut VARÈNE <[email protected]>
ath9k: fix QCA9561 PA bias level
Radhey Shyam Pandey <[email protected]>
net: macb: In ZynqMP initialization make SGMII phy configuration optional
Kuninori Morimoto <[email protected]>
ASoC: rsnd: care return value from rsnd_node_fixed_index()
Kuninori Morimoto <[email protected]>
ASoC: rsnd: care default case on rsnd_ssiu_busif_err_status_clear()
Keita Suzuki <[email protected]>
drm/amd/pm: fix double free in si_parse_power_table()
Huang Rui <[email protected]>
drm/amdgpu/pm: fix the null pointer while the smu is disabled
Ulf Hansson <[email protected]>
cpuidle: PSCI: Improve support for suspend-to-RAM for PSCI OSI mode
James Smart <[email protected]>
scsi: lpfc: Fix call trace observed during I/O with CMF enabled
James Smart <[email protected]>
scsi: lpfc: Protect memory leak for NPIV ports sending PLOGI_RJT
James Smart <[email protected]>
scsi: lpfc: Fix null pointer dereference after failing to issue FLOGI and PLOGI
James Smart <[email protected]>
scsi: lpfc: Fix SCSI I/O completion and abort handler deadlock
James Smart <[email protected]>
scsi: lpfc: Move cfg_log_verbose check before calling lpfc_dmp_dbg()
Christoph Hellwig <[email protected]>
loop: implement ->free_disk
Eric Dumazet <[email protected]>
tcp: consume incoming skb leading to a reset
Len Brown <[email protected]>
tools/power turbostat: fix ICX DRAM power numbers
Biju Das <[email protected]>
spi: spi-rspi: Remove setting {src,dst}_{addr,addr_width} based on DMA direction
Po-Hao Huang <[email protected]>
rtw88: 8821c: fix debugfs rssi value
Po-Hao Huang <[email protected]>
rtw88: fix incorrect frequency reported
Amadeusz Sławiński <[email protected]>
ALSA: jack: Access input_dev under mutex
Haowen Bai <[email protected]>
sfc: ef10: Fix assigning negative value to unsigned variable
Paul E. McKenney <[email protected]>
rcu: Make TASKS_RUDE_RCU select IRQ_WORK
Paul E. McKenney <[email protected]>
rcu-tasks: Handle sparse cpu_possible_mask in rcu_tasks_invoke_cbs()
Padmanabha Srinivasaiah <[email protected]>
rcu-tasks: Fix race in schedule and flush work
Saaem Rizvi <[email protected]>
drm/amd/display: Disabling Z10 on DCN31
Liviu Dudau <[email protected]>
drm/komeda: return early if drm_universal_plane_init() fails.
Peter Seiderer <[email protected]>
mac80211: minstrel_ht: fix where rate stats are stored (fixes debugfs output)
Runqing Yang <[email protected]>
libbpf: Fix a bug with checking bpf_probe_read_kernel() support in old kernels
Kirill A. Shutemov <[email protected]>
ACPICA: Avoid cache flush inside virtual machines
Mike Travis <[email protected]>
x86/platform/uv: Update TSC sync state for UV5
Daniel Vetter <[email protected]>
fbcon: Consistently protect deferred_takeover with console_lock()
Niels Dossche <[email protected]>
ipv6: fix locking issues with loops over idev->addr_list
Haowen Bai <[email protected]>
ipw2x00: Fix potential NULL dereference in libipw_xmit()
Haowen Bai <[email protected]>
b43: Fix assigning negative value to unsigned variable
Haowen Bai <[email protected]>
b43legacy: Fix assigning negative value to unsigned variable
Niels Dossche <[email protected]>
mwifiex: add mutex lock for call in mwifiex_dfs_chan_sw_work_queue
Po Hao Huang <[email protected]>
rtw89: fix misconfiguration on hw_scan channel time
Zong-Zhe Yang <[email protected]>
rtw89: ser: fix CAM leaks occurring in L2 reset
Yuntao Wang <[email protected]>
selftests/bpf: Fix file descriptor leak in load_kallsyms()
Karthikeyan Kathirvel <[email protected]>
ath11k: Change max no of active probe SSID and BSSID to fw capability
Quentin Monnet <[email protected]>
selftests/bpf: Fix parsing of prog types in UAPI hdr for bpftool sync
Nikolay Borisov <[email protected]>
selftests/bpf: Fix vfs_link kprobe definition
Liu Zixian <[email protected]>
drm/virtio: fix NULL pointer dereference in virtio_gpu_conn_get_modes
Wen Gong <[email protected]>
ath11k: fix the warning of dev_wake in mhi_pm_disable_transition()
Zack Rusin <[email protected]>
drm/vmwgfx: validate the screen formats
Arunpravin <[email protected]>
drm/selftests: fix a shift-out-of-bounds bug
Tejas Upadhyay <[email protected]>
iommu/vt-d: Add RPLS to quirk list to skip TE disabling
Naohiro Aota <[email protected]>
btrfs: zoned: fix comparison of alloc_offset vs meta_write_pointer
Naohiro Aota <[email protected]>
btrfs: zoned: finish block group when there are no more allocatable bytes left
Naohiro Aota <[email protected]>
btrfs: zoned: zone finish unused block group
Naohiro Aota <[email protected]>
btrfs: zoned: properly finish block group on metadata write
Filipe Manana <[email protected]>
btrfs: fix deadlock between concurrent dio writes when low on free data space
Qu Wenruo <[email protected]>
btrfs: fix the error handling for submit_extent_page() for btrfs_do_readpage()
Qu Wenruo <[email protected]>
btrfs: repair super block num_devices automatically
Qu Wenruo <[email protected]>
btrfs: return correct error number for __extent_writepage_io()
Qu Wenruo <[email protected]>
btrfs: add "0x" prefix for unsupported optional features
Eric W. Biederman <[email protected]>
ptrace: Reimplement PTRACE_KILL by always sending SIGKILL
Eric W. Biederman <[email protected]>
ptrace/xtensa: Replace PT_SINGLESTEP with TIF_SINGLESTEP
Eric W. Biederman <[email protected]>
ptrace/um: Replace PT_DTRACE with TIF_SINGLESTEP
Eric W. Biederman <[email protected]>
kthread: Don't allocate kthread_struct for init and umh
Kristen Carlson Accardi <[email protected]>
x86/sgx: Set active memcg prior to shmem allocation
Baoquan He <[email protected]>
x86/kexec: fix memory leak of elf header buffer
Kan Liang <[email protected]>
perf/x86/intel: Fix event constraints for ICL
Ammar Faizi <[email protected]>
x86/MCE/AMD: Fix memory leak when threshold_create_bank() fails
Michael Niewöhner <[email protected]>
platform/x86: intel-hid: fix _DSM function index handling
Mathias Nyman <[email protected]>
xhci: Allow host runtime PM as default for Intel Alder Lake N xHCI
Kishon Vijay Abraham I <[email protected]>
xhci: Set HCD flag to defer primary roothub registration
Ronnie Sahlberg <[email protected]>
cifs: when extending a file with falloc we should make files not-sparse
Ronnie Sahlberg <[email protected]>
cifs: fix potential double free during failed mount
Paulo Alcantara <[email protected]>
cifs: fix ntlmssp on old servers
Enzo Matsumiya <[email protected]>
cifs: don't call cifs_dfs_query_info_nonascii_quirk() if nodfs was set
Konstantin Komarov <[email protected]>
fs/ntfs3: Restore ntfs_xattr_get_acl and ntfs_xattr_set_acl functions
Konstantin Komarov <[email protected]>
fs/ntfs3: Update i_ctime when xattr is added
Christophe JAILLET <[email protected]>
fs/ntfs3: Fix some memory leaks in an error handling path of 'log_replay()'
Konstantin Komarov <[email protected]>
fs/ntfs3: In function ntfs_set_acl_ex do not change inode->i_mode if called from function ntfs_init_acl
Konstantin Komarov <[email protected]>
fs/ntfs3: Check new size for limits
Konstantin Komarov <[email protected]>
fs/ntfs3: Keep preallocated only if option prealloc enabled
Konstantin Komarov <[email protected]>
fs/ntfs3: Fix fiemap + fix shrink file size (to remove preallocated space)
Konstantin Komarov <[email protected]>
fs/ntfs3: Update valid size if -EIOCBQUEUED
Mikulas Patocka <[email protected]>
fs/ntfs3: provide block_invalidate_folio to fix memory leak
Kishon Vijay Abraham I <[email protected]>
usb: core: hcd: Add support for deferring roothub registration
Albert Wang <[email protected]>
usb: dwc3: gadget: Move null pinter check to proper place
Linus Walleij <[email protected]>
usb: isp1760: Fix out-of-bounds array access
Monish Kumar R <[email protected]>
USB: new quirk for Dell Gen 2 devices
Carl Yin(殷张成) <[email protected]>
USB: serial: option: add Quectel BG95 modem
Johan Hovold <[email protected]>
USB: serial: pl2303: fix type detection for odd device
Takashi Iwai <[email protected]>
ALSA: usb-audio: Cancel pending work at closing a MIDI substream
Marios Levogiannis <[email protected]>
ALSA: hda/realtek - Fix microphone noise on ASUS TUF B550M-PLUS
Rik van der Kemp <[email protected]>
ALSA: hda/realtek: Enable 4-speaker output for Dell XPS 15 9520 laptop
Kailang Yang <[email protected]>
ALSA: hda/realtek - Add new type for ALC245
Nathan Chancellor <[email protected]>
riscv: Move alternative length validation into subsection
Tobias Klauser <[email protected]>
riscv: Wire up memfd_secret in UAPI header
Samuel Holland <[email protected]>
riscv: Fix irq_work when SMP is disabled
Alexandre Ghiti <[email protected]>
riscv: Initialize thread pointer before calling C functions
Xianting Tian <[email protected]>
RISC-V: Mark IORESOURCE_EXCLUSIVE for reserved mem instead of IORESOURCE_BUSY
Helge Deller <[email protected]>
parisc/stifb: Keep track of hardware path of graphics card
Helge Deller <[email protected]>
parisc/stifb: Implement fb_is_primary_device()
Mikulas Patocka <[email protected]>
parisc: fix a crash with multicore scheduler
Niklas Cassel <[email protected]>
binfmt_flat: do not stop relocating GOT entries prematurely on riscv
Stephen Boyd <[email protected]>
arm64: Initialize jump labels before setup_machine_fdt()
-------------
Diffstat:
Documentation/accounting/psi.rst | 9 +- Documentation/conf.py | 2 +- .../bindings/display/sitronix,st7735r.yaml | 1 + .../devicetree/bindings/gpio/gpio-altera.txt | 5 +- .../bindings/regulator/mt6315-regulator.yaml | 2 +- .../devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml | 1 + .../bindings/spi/qcom,spi-qcom-qspi.yaml | 1 + Documentation/driver-api/thermal/intel_dptf.rst | 2 +- Documentation/sound/alsa-configuration.rst | 4 +- Documentation/userspace-api/landlock.rst | 4 +- .../userspace-api/media/lirc.h.rst.exceptions | 2 + Makefile | 4 +- arch/alpha/include/asm/page.h | 2 +- arch/arm/boot/dts/bcm2835-rpi-b.dts | 13 +- arch/arm/boot/dts/bcm2835-rpi-zero-w.dts | 22 +- arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts | 2 +- arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts | 4 +- arch/arm/boot/dts/bcm5301x.dtsi | 2 +- arch/arm/boot/dts/exynos5250-smdk5250.dts | 4 +- arch/arm/boot/dts/imx6dl-eckelmann-ci4x10.dts | 6 +- arch/arm/boot/dts/imx6qdl-colibri.dtsi | 6 +- arch/arm/boot/dts/lan966x.dtsi | 6 +- arch/arm/boot/dts/ox820.dtsi | 2 +- arch/arm/boot/dts/qcom-sdx65.dtsi | 2 +- arch/arm/boot/dts/s5pv210-aries.dtsi | 3 +- arch/arm/boot/dts/s5pv210.dtsi | 12 +- arch/arm/boot/dts/sama7g5.dtsi | 1 - arch/arm/boot/dts/socfpga.dtsi | 2 +- arch/arm/boot/dts/socfpga_arria10.dtsi | 2 +- arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi | 1 + arch/arm/boot/dts/suniv-f1c100s.dtsi | 4 +- arch/arm/include/asm/arch_gicv3.h | 7 +- arch/arm/kernel/signal.c | 1 + arch/arm/mach-hisi/platsmp.c | 4 + arch/arm/mach-mediatek/Kconfig | 1 + arch/arm/mach-omap1/clock.c | 2 +- arch/arm/mach-pxa/cm-x300.c | 8 +- arch/arm/mach-pxa/magician.c | 2 +- arch/arm/mach-pxa/tosa.c | 4 +- arch/arm/mach-vexpress/dcscb.c | 1 + arch/arm64/Kconfig.platforms | 1 + arch/arm64/boot/dts/arm/juno-r1-scmi.dts | 4 +- arch/arm64/boot/dts/arm/juno-r2-scmi.dts | 4 +- .../dts/marvell/armada-3720-espressobin-ultra.dts | 5 - arch/arm64/boot/dts/mediatek/mt8192.dtsi | 2 +- arch/arm64/boot/dts/nvidia/tegra210.dtsi | 5 +- arch/arm64/boot/dts/qcom/ipq8074.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8994.dtsi | 8 +- arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 2 +- arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi | 4 +- arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 18 +- arch/arm64/boot/dts/qcom/sc7280-qcard.dtsi | 19 +- .../boot/dts/qcom/sdm845-xiaomi-beryllium.dts | 2 +- arch/arm64/boot/dts/qcom/sm8450.dtsi | 6 + arch/arm64/boot/dts/rockchip/rk3399.dtsi | 2 +- arch/arm64/boot/dts/ti/k3-am64-mcu.dtsi | 2 - arch/arm64/configs/defconfig | 1 + arch/arm64/include/asm/arch_gicv3.h | 6 - arch/arm64/include/asm/processor.h | 10 +- arch/arm64/kernel/setup.c | 7 +- arch/arm64/kernel/signal.c | 1 + arch/arm64/kernel/signal32.c | 1 + arch/arm64/kernel/sys_compat.c | 2 +- arch/arm64/mm/copypage.c | 4 +- arch/csky/kernel/probes/kprobes.c | 2 +- arch/m68k/Kconfig.cpu | 2 +- arch/m68k/include/asm/raw_io.h | 6 +- arch/m68k/kernel/signal.c | 1 + .../include/asm/mach-ip27/cpu-feature-overrides.h | 1 - .../include/asm/mach-ip30/cpu-feature-overrides.h | 1 - arch/mips/include/asm/mach-ralink/spaces.h | 2 + arch/openrisc/include/asm/timex.h | 1 + arch/openrisc/kernel/head.S | 9 + arch/parisc/include/asm/fb.h | 4 + arch/parisc/kernel/processor.c | 2 - arch/parisc/kernel/topology.c | 16 +- arch/powerpc/include/asm/page.h | 7 +- arch/powerpc/include/asm/vas.h | 2 +- arch/powerpc/kernel/entry_64.S | 24 +- arch/powerpc/kernel/fadump.c | 8 +- arch/powerpc/kernel/idle.c | 2 +- arch/powerpc/kernel/rtas.c | 9 + arch/powerpc/kvm/book3s_hv.c | 12 +- arch/powerpc/kvm/book3s_hv_nested.c | 3 +- arch/powerpc/kvm/trace_hv.h | 8 +- arch/powerpc/mm/nohash/fsl_book3e.c | 15 +- arch/powerpc/perf/isa207-common.c | 12 +- arch/powerpc/platforms/4xx/cpm.c | 2 +- arch/powerpc/platforms/8xx/cpm1.c | 1 + arch/powerpc/platforms/powernv/opal-fadump.c | 94 +-- arch/powerpc/platforms/powernv/opal-fadump.h | 10 +- arch/powerpc/platforms/powernv/setup.c | 9 + arch/powerpc/platforms/powernv/ultravisor.c | 1 + arch/powerpc/platforms/powernv/vas-fault.c | 2 +- arch/powerpc/platforms/powernv/vas-window.c | 4 +- arch/powerpc/platforms/powernv/vas.h | 2 +- arch/powerpc/platforms/pseries/papr_scm.c | 54 +- arch/powerpc/sysdev/dart_iommu.c | 6 +- arch/powerpc/sysdev/fsl_rio.c | 2 + arch/powerpc/sysdev/xics/icp-opal.c | 1 + arch/powerpc/sysdev/xive/spapr.c | 7 +- arch/riscv/Makefile | 4 + arch/riscv/include/asm/alternative-macros.h | 4 +- arch/riscv/include/asm/asm.h | 26 - arch/riscv/include/asm/irq_work.h | 2 +- arch/riscv/include/asm/unistd.h | 1 - arch/riscv/include/asm/xip_fixup.h | 31 + arch/riscv/include/uapi/asm/unistd.h | 1 + arch/riscv/kernel/head.S | 2 + arch/riscv/kernel/setup.c | 4 +- arch/riscv/kernel/suspend_entry.S | 1 + arch/riscv/mm/init.c | 2 +- arch/s390/include/asm/cio.h | 2 +- arch/s390/include/asm/kexec.h | 10 + arch/s390/include/asm/preempt.h | 15 +- arch/s390/kernel/perf_event.c | 2 +- arch/s390/kernel/time.c | 8 +- arch/sparc/kernel/signal32.c | 1 + arch/sparc/kernel/signal_64.c | 1 + arch/um/drivers/chan_user.c | 9 +- arch/um/drivers/virtio_uml.c | 33 +- arch/um/include/asm/Kbuild | 1 + arch/um/include/asm/thread_info.h | 2 + arch/um/kernel/exec.c | 2 +- arch/um/kernel/process.c | 2 +- arch/um/kernel/ptrace.c | 8 +- arch/um/kernel/signal.c | 4 +- arch/x86/Kconfig | 4 +- arch/x86/entry/entry_64.S | 1 + arch/x86/entry/vdso/vma.c | 2 +- arch/x86/events/amd/ibs.c | 55 +- arch/x86/events/intel/core.c | 2 +- arch/x86/include/asm/acenv.h | 14 +- arch/x86/include/asm/kexec.h | 8 + arch/x86/include/asm/set_memory.h | 52 -- arch/x86/include/asm/suspend_32.h | 2 +- arch/x86/include/asm/suspend_64.h | 12 +- arch/x86/kernel/apic/apic.c | 2 +- arch/x86/kernel/apic/x2apic_uv_x.c | 8 +- arch/x86/kernel/cpu/intel.c | 2 +- arch/x86/kernel/cpu/mce/amd.c | 32 +- arch/x86/kernel/cpu/mce/core.c | 6 +- arch/x86/kernel/cpu/sgx/encl.c | 105 ++- arch/x86/kernel/cpu/sgx/encl.h | 7 +- arch/x86/kernel/cpu/sgx/main.c | 9 +- arch/x86/kernel/machine_kexec_64.c | 12 +- arch/x86/kernel/signal_compat.c | 2 + arch/x86/kernel/step.c | 3 +- arch/x86/kernel/sys_x86_64.c | 7 +- arch/x86/kvm/lapic.c | 1 + arch/x86/kvm/vmx/nested.c | 45 +- arch/x86/kvm/vmx/vmcs.h | 5 + arch/x86/lib/delay.c | 4 +- arch/x86/mm/pat/memtype.c | 2 +- arch/x86/mm/pat/set_memory.c | 49 +- arch/x86/pci/irq.c | 19 +- arch/x86/um/ldt.c | 6 +- arch/xtensa/kernel/entry.S | 19 +- arch/xtensa/kernel/ptrace.c | 4 +- arch/xtensa/kernel/signal.c | 4 +- arch/xtensa/kernel/traps.c | 11 +- arch/xtensa/platforms/iss/simdisk.c | 18 +- block/bfq-cgroup.c | 111 +-- block/bfq-iosched.c | 64 +- block/bfq-iosched.h | 7 +- block/blk-cgroup.c | 9 +- block/blk-cgroup.h | 2 +- block/blk-ia-ranges.c | 7 +- block/blk-iocost.c | 5 +- block/blk-iolatency.c | 130 ++-- block/blk-throttle.c | 3 +- crypto/cryptd.c | 23 +- drivers/acpi/arm64/agdi.c | 1 + drivers/acpi/cppc_acpi.c | 17 +- drivers/acpi/property.c | 18 +- drivers/acpi/sleep.c | 12 + drivers/base/memory.c | 5 +- drivers/base/node.c | 1 + drivers/base/power/domain.c | 1 + drivers/base/property.c | 89 +-- drivers/block/drbd/drbd_main.c | 62 +- drivers/block/loop.c | 16 +- drivers/block/nbd.c | 13 +- drivers/block/virtio_blk.c | 7 +- drivers/bluetooth/btmtksdio.c | 26 +- drivers/bluetooth/btusb.c | 6 + drivers/char/hw_random/cn10k-rng.c | 31 +- drivers/char/hw_random/omap3-rom-rng.c | 2 +- drivers/char/ipmi/ipmi_ipmb.c | 1 + drivers/char/ipmi/ipmi_msghandler.c | 4 +- drivers/char/ipmi/ipmi_poweroff.c | 4 +- drivers/char/ipmi/ipmi_ssif.c | 23 + drivers/char/ipmi/ipmi_watchdog.c | 14 +- drivers/char/random.c | 12 +- drivers/char/tpm/tpm_tis_i2c_cr50.c | 4 +- drivers/clk/tegra/clk-dfll.c | 12 + drivers/cpufreq/cpufreq.c | 11 + drivers/cpufreq/cpufreq_governor.c | 20 +- drivers/cpufreq/cpufreq_governor.h | 1 + drivers/cpufreq/mediatek-cpufreq.c | 18 +- drivers/cpuidle/cpuidle-psci-domain.c | 4 +- drivers/cpuidle/cpuidle-psci.c | 46 ++ drivers/cpuidle/cpuidle-riscv-sbi.c | 4 +- .../crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c | 115 ++-- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 30 +- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c | 10 +- drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h | 14 +- drivers/crypto/ccp/sev-dev.c | 30 +- drivers/crypto/ccree/cc_buffer_mgr.c | 27 +- drivers/crypto/marvell/cesa/cipher.c | 1 - drivers/crypto/nx/nx-common-powernv.c | 2 +- drivers/crypto/qat/qat_common/adf_pfvf_pf_proto.c | 2 +- .../crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.c | 13 +- drivers/cxl/mem.c | 4 - drivers/cxl/pci.c | 40 +- drivers/devfreq/rk3399_dmc.c | 2 + drivers/dma/idxd/cdev.c | 8 +- drivers/dma/stm32-mdma.c | 23 +- drivers/dma/ti/k3-psil-am62.c | 8 +- drivers/edac/dmc520_edac.c | 2 +- drivers/firmware/arm_ffa/driver.c | 4 +- drivers/firmware/arm_scmi/base.c | 2 +- drivers/firmware/efi/Kconfig | 15 + drivers/firmware/efi/efi.c | 2 +- drivers/gpio/gpio-rockchip.c | 24 +- drivers/gpio/gpio-sim.c | 4 +- drivers/gpio/gpiolib-of.c | 5 + drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 13 +- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 95 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 10 +- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 8 +- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 8 +- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 7 +- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 2 + drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 1 + drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 7 +- .../gpu/drm/amd/display/dc/dcn31/dcn31_resource.c | 1 + drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 2 +- drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c | 14 +- drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 8 +- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 4 +- drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c | 60 +- .../gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c | 62 +- drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 10 +- drivers/gpu/drm/arm/malidp_crtc.c | 5 +- drivers/gpu/drm/bridge/Kconfig | 2 + drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 1 + drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 31 +- drivers/gpu/drm/bridge/analogix/anx7625.c | 21 +- drivers/gpu/drm/bridge/analogix/anx7625.h | 4 +- drivers/gpu/drm/bridge/chipone-icn6211.c | 155 ++++- drivers/gpu/drm/bridge/ite-it6505.c | 29 +- drivers/gpu/drm/bridge/ite-it66121.c | 2 +- drivers/gpu/drm/drm_bridge_connector.c | 4 +- drivers/gpu/drm/drm_edid.c | 6 +- drivers/gpu/drm/drm_format_helper.c | 74 +- drivers/gpu/drm/drm_plane.c | 14 +- drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 6 + drivers/gpu/drm/gma500/psb_intel_display.c | 7 +- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 33 +- drivers/gpu/drm/i915/i915_perf.c | 4 +- drivers/gpu/drm/i915/i915_perf_types.h | 2 +- drivers/gpu/drm/mediatek/mtk_cec.c | 2 +- drivers/gpu/drm/mediatek/mtk_disp_drv.h | 16 +- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 22 +- drivers/gpu/drm/mediatek/mtk_disp_rdma.c | 20 +- drivers/gpu/drm/mediatek/mtk_dpi.c | 4 +- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 14 +- drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 4 + drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h | 29 +- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 2 + drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 19 +- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 16 +- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 5 +- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 3 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c | 3 + drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c | 1 + drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 10 +- drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 14 +- drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 6 +- drivers/gpu/drm/msm/disp/mdp5/mdp5_mixer.c | 15 +- drivers/gpu/drm/msm/disp/mdp5/mdp5_mixer.h | 4 +- drivers/gpu/drm/msm/disp/mdp5/mdp5_pipe.c | 15 +- drivers/gpu/drm/msm/disp/mdp5/mdp5_pipe.h | 2 +- drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c | 20 +- drivers/gpu/drm/msm/dp/dp_ctrl.c | 16 +- drivers/gpu/drm/msm/dp/dp_display.c | 55 +- drivers/gpu/drm/msm/dp/dp_drm.c | 4 + drivers/gpu/drm/msm/dsi/dsi_host.c | 21 +- drivers/gpu/drm/msm/dsi/dsi_manager.c | 35 +- drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c | 2 +- drivers/gpu/drm/msm/hdmi/hdmi.c | 10 +- drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 3 + drivers/gpu/drm/msm/msm_drv.c | 11 +- drivers/gpu/drm/msm/msm_gem_prime.c | 2 +- drivers/gpu/drm/msm/msm_gpu.c | 3 +- drivers/gpu/drm/msm/msm_gpu.h | 12 +- drivers/gpu/drm/msm/msm_gpu_devfreq.c | 90 ++- drivers/gpu/drm/msm/msm_kms.h | 1 + drivers/gpu/drm/nouveau/dispnv50/atom.h | 6 +- drivers/gpu/drm/nouveau/dispnv50/crc.c | 27 +- drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/bus/gf100.c | 14 +- drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv31.c | 6 +- drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv50.c | 6 +- drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c | 6 +- drivers/gpu/drm/omapdrm/omap_overlay.c | 2 +- drivers/gpu/drm/panel/panel-simple.c | 3 +- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 2 +- drivers/gpu/drm/selftests/test-drm_buddy.c | 10 +- drivers/gpu/drm/solomon/Kconfig | 2 +- drivers/gpu/drm/solomon/ssd130x.c | 42 +- drivers/gpu/drm/stm/ltdc.c | 16 +- drivers/gpu/drm/tegra/gem.c | 1 + drivers/gpu/drm/tilcdc/tilcdc_external.c | 8 +- drivers/gpu/drm/tiny/repaper.c | 2 +- drivers/gpu/drm/v3d/v3d_perfmon.c | 3 +- drivers/gpu/drm/vc4/vc4_crtc.c | 2 +- drivers/gpu/drm/vc4/vc4_drv.h | 1 + drivers/gpu/drm/vc4/vc4_hvs.c | 49 +- drivers/gpu/drm/vc4/vc4_kms.c | 5 +- drivers/gpu/drm/vc4/vc4_regs.h | 12 +- drivers/gpu/drm/vc4/vc4_txp.c | 8 +- drivers/gpu/drm/virtio/virtgpu_display.c | 2 + drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 30 +- drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 1 - drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 14 +- drivers/hid/amd-sfh-hid/amd_sfh_hid.c | 4 +- drivers/hid/amd-sfh-hid/amd_sfh_hid.h | 2 +- drivers/hid/hid-bigbenff.c | 6 + drivers/hid/hid-elan.c | 2 - drivers/hid/hid-led.c | 2 +- drivers/hv/channel.c | 6 +- drivers/hwmon/peci/dimmtemp.c | 6 +- drivers/hwmon/pmbus/pmbus_core.c | 95 ++- drivers/hwtracing/coresight/coresight-core.c | 33 +- drivers/i2c/busses/i2c-at91-master.c | 11 + drivers/i2c/busses/i2c-npcm7xx.c | 103 ++- drivers/i2c/busses/i2c-rcar.c | 15 +- drivers/infiniband/hw/hfi1/file_ops.c | 2 + drivers/infiniband/hw/hfi1/init.c | 2 +- drivers/infiniband/hw/hfi1/sdma.c | 12 +- drivers/infiniband/hw/hns/hns_roce_device.h | 7 +- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 24 +- drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 2 +- drivers/infiniband/hw/hns/hns_roce_main.c | 2 +- drivers/infiniband/sw/rdmavt/qp.c | 6 +- drivers/infiniband/sw/rxe/rxe_mcast.c | 6 +- drivers/infiniband/sw/rxe/rxe_req.c | 2 +- drivers/input/keyboard/gpio_keys.c | 2 +- drivers/input/misc/sparcspkr.c | 1 + drivers/input/touchscreen/stmfts.c | 16 +- drivers/iommu/amd/init.c | 2 +- drivers/iommu/amd/iommu.c | 7 - drivers/iommu/amd/iommu_v2.c | 12 +- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c | 13 +- drivers/iommu/dma-iommu.c | 7 +- drivers/iommu/intel/iommu.c | 2 +- drivers/iommu/msm_iommu.c | 11 +- drivers/iommu/mtk_iommu.c | 30 +- drivers/iommu/mtk_iommu.h | 2 + drivers/iommu/mtk_iommu_v1.c | 7 + drivers/irqchip/irq-armada-370-xp.c | 11 +- drivers/irqchip/irq-aspeed-i2c-ic.c | 4 +- drivers/irqchip/irq-aspeed-scu-ic.c | 4 +- drivers/irqchip/irq-gic-v3.c | 183 +++-- drivers/irqchip/irq-sni-exiu.c | 25 +- drivers/irqchip/irq-xtensa-mx.c | 18 +- drivers/macintosh/Kconfig | 6 + drivers/macintosh/Makefile | 3 +- drivers/macintosh/via-pmu.c | 2 +- drivers/mailbox/mailbox.c | 19 +- drivers/mailbox/pcc.c | 2 +- drivers/md/bcache/btree.c | 58 +- drivers/md/bcache/btree.h | 2 +- drivers/md/bcache/journal.c | 31 +- drivers/md/bcache/journal.h | 2 + drivers/md/bcache/request.c | 6 + drivers/md/bcache/super.c | 1 + drivers/md/bcache/writeback.c | 101 +-- drivers/md/bcache/writeback.h | 2 +- drivers/md/md-bitmap.c | 44 +- drivers/md/md.c | 22 +- drivers/md/raid0.c | 1 - drivers/media/cec/core/cec-adap.c | 6 +- drivers/media/i2c/Kconfig | 1 + drivers/media/i2c/ccs/ccs-core.c | 7 +- drivers/media/i2c/dw9714.c | 1 + drivers/media/i2c/dw9768.c | 6 - drivers/media/i2c/max9286.c | 19 +- drivers/media/i2c/ov5648.c | 4 +- drivers/media/i2c/ov7670.c | 1 - drivers/media/i2c/rdacm20.c | 2 +- drivers/media/i2c/rdacm21.c | 2 +- drivers/media/pci/cx23885/cx23885-core.c | 6 +- drivers/media/pci/cx25821/cx25821-core.c | 2 +- drivers/media/platform/amphion/vdec.c | 2 +- drivers/media/platform/aspeed/aspeed-video.c | 4 +- drivers/media/platform/atmel/atmel-sama5d2-isc.c | 7 +- drivers/media/platform/chips-media/coda-common.c | 35 +- .../platform/mediatek/vcodec/mtk_vcodec_dec.c | 13 +- .../platform/mediatek/vcodec/mtk_vcodec_dec_drv.c | 6 +- drivers/media/platform/nxp/imx-mipi-csis.c | 561 ++++++++------- drivers/media/platform/qcom/venus/helpers.c | 34 +- drivers/media/platform/qcom/venus/hfi.c | 3 + drivers/media/platform/renesas/vsp1/vsp1_rpf.c | 6 +- drivers/media/platform/rockchip/rga/rga.c | 6 +- .../media/platform/samsung/exynos4-is/fimc-is.c | 6 +- .../platform/samsung/exynos4-is/fimc-isp-video.h | 2 +- drivers/media/platform/st/sti/delta/delta-v4l2.c | 6 +- drivers/media/radio/Kconfig | 4 +- drivers/media/rc/bpf-lirc.c | 8 +- drivers/media/rc/imon.c | 99 ++- drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 7 +- drivers/media/usb/uvc/uvc_v4l2.c | 20 +- drivers/memory/samsung/exynos5422-dmc.c | 5 +- drivers/mfd/davinci_voicecodec.c | 6 +- drivers/mfd/ipaq-micro.c | 2 +- drivers/misc/fastrpc.c | 9 +- drivers/misc/ocxl/file.c | 2 + drivers/mmc/core/block.c | 8 +- drivers/mmc/host/jz4740_mmc.c | 20 + drivers/mmc/host/sdhci_am654.c | 23 +- drivers/mtd/chips/cfi_cmdset_0002.c | 103 ++- drivers/mtd/mtdblock.c | 8 +- drivers/mtd/nand/raw/cadence-nand-controller.c | 5 +- drivers/mtd/nand/raw/denali_pci.c | 15 +- drivers/mtd/nand/raw/intel-nand-controller.c | 2 +- drivers/mtd/nand/spi/gigadevice.c | 10 +- drivers/mtd/spi-nor/core.c | 9 + drivers/net/amt.c | 11 +- drivers/net/bonding/bond_main.c | 15 +- drivers/net/can/spi/mcp251xfd/mcp251xfd.h | 2 +- drivers/net/can/xilinx_can.c | 4 +- drivers/net/dsa/Kconfig | 3 +- drivers/net/dsa/mt7530.c | 14 +- drivers/net/dsa/qca8k.c | 7 +- drivers/net/ethernet/broadcom/Makefile | 5 + drivers/net/ethernet/broadcom/bnxt/bnxt.c | 1 + drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c | 56 +- drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h | 2 + drivers/net/ethernet/cadence/macb_main.c | 42 +- drivers/net/ethernet/cadence/macb_ptp.c | 4 +- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 12 +- drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c | 2 + drivers/net/ethernet/huawei/hinic/hinic_hw_wq.c | 2 +- drivers/net/ethernet/intel/ice/ice_devlink.c | 5 +- drivers/net/ethernet/intel/ice/ice_repr.c | 7 +- drivers/net/ethernet/intel/ice/ice_sriov.c | 32 +- drivers/net/ethernet/intel/ice/ice_vf_lib.c | 28 +- drivers/net/ethernet/intel/ice/ice_virtchnl.c | 5 + drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c | 7 +- drivers/net/ethernet/mellanox/mlx5/core/devlink.c | 4 +- drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 + .../ethernet/mellanox/mlx5/core/en/tc/ct_fs_smfs.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 9 + drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 10 +- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 10 +- drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/lib/tout.c | 1 + drivers/net/ethernet/mellanox/mlx5/core/lib/tout.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/main.c | 23 +- .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c | 13 - .../net/ethernet/mellanox/mlxsw/spectrum_trap.c | 2 +- drivers/net/ethernet/sfc/ef10.c | 2 +- .../net/ethernet/stmicro/stmmac/stmmac_selftests.c | 13 +- drivers/net/ethernet/ti/Kconfig | 1 + drivers/net/ethernet/xscale/ptp_ixp46x.c | 2 +- drivers/net/hyperv/netvsc_drv.c | 5 +- drivers/net/ipa/ipa_endpoint.c | 41 +- drivers/net/macsec.c | 7 + drivers/net/phy/micrel.c | 11 +- drivers/net/usb/asix_devices.c | 6 +- drivers/net/usb/smsc95xx.c | 3 +- drivers/net/usb/usbnet.c | 6 +- drivers/net/wireless/ath/ath10k/mac.c | 20 +- drivers/net/wireless/ath/ath11k/mac.c | 16 +- drivers/net/wireless/ath/ath11k/pci.c | 12 +- drivers/net/wireless/ath/ath11k/spectral.c | 17 +- drivers/net/wireless/ath/ath11k/wmi.c | 11 +- drivers/net/wireless/ath/ath11k/wmi.h | 12 +- drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 2 +- drivers/net/wireless/ath/ath9k/ar9003_phy.h | 2 +- drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 8 + drivers/net/wireless/ath/carl9170/tx.c | 3 + drivers/net/wireless/broadcom/b43/phy_n.c | 2 +- drivers/net/wireless/broadcom/b43legacy/phy.c | 2 +- drivers/net/wireless/intel/ipw2x00/libipw_tx.c | 2 +- drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 3 + drivers/net/wireless/intel/iwlwifi/mei/main.c | 3 + drivers/net/wireless/intel/iwlwifi/mvm/power.c | 3 + drivers/net/wireless/marvell/mwifiex/11h.c | 2 + drivers/net/wireless/mediatek/mt76/agg-rx.c | 5 +- drivers/net/wireless/mediatek/mt76/mac80211.c | 8 +- drivers/net/wireless/mediatek/mt76/mt76.h | 2 +- drivers/net/wireless/mediatek/mt76/mt7603/main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7615/main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 4 +- .../net/wireless/mediatek/mt76/mt7915/debugfs.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c | 2 + drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 35 +- drivers/net/wireless/mediatek/mt76/mt7915/main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 20 +- drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/soc.c | 2 + drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 6 +- drivers/net/wireless/mediatek/mt76/mt7921/main.c | 6 +- drivers/net/wireless/mediatek/mt76/mt7921/pci.c | 10 +- drivers/net/wireless/mediatek/mt76/tx.c | 11 +- drivers/net/wireless/microchip/wilc1000/mon.c | 4 +- drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c | 8 +- drivers/net/wireless/realtek/rtlwifi/usb.c | 2 +- drivers/net/wireless/realtek/rtw88/rtw8821c.c | 4 + drivers/net/wireless/realtek/rtw88/rx.c | 3 +- drivers/net/wireless/realtek/rtw89/cam.c | 14 +- drivers/net/wireless/realtek/rtw89/fw.c | 2 +- drivers/net/wireless/realtek/rtw89/phy.c | 5 + drivers/net/wireless/realtek/rtw89/ser.c | 21 + drivers/net/wireless/ti/wl1251/event.c | 22 +- drivers/net/wireless/ti/wl1251/io.c | 20 +- drivers/net/wireless/ti/wl1251/tx.c | 15 +- drivers/nfc/st21nfca/se.c | 17 +- drivers/nfc/st21nfca/st21nfca.h | 1 + drivers/nvdimm/core.c | 9 - drivers/nvdimm/pmem.c | 30 +- drivers/nvdimm/security.c | 5 - drivers/nvme/host/core.c | 21 +- drivers/nvme/host/pci.c | 1 + drivers/of/fdt.c | 3 + drivers/of/kexec.c | 9 + drivers/of/overlay.c | 4 +- drivers/opp/of.c | 2 +- drivers/pci/controller/cadence/pci-j721e.c | 3 + drivers/pci/controller/cadence/pcie-cadence-ep.c | 21 +- drivers/pci/controller/cadence/pcie-cadence.h | 3 + drivers/pci/controller/dwc/pci-imx6.c | 23 +- drivers/pci/controller/dwc/pcie-designware-host.c | 3 +- drivers/pci/controller/dwc/pcie-qcom.c | 15 +- drivers/pci/controller/pcie-mediatek-gen3.c | 8 + drivers/pci/controller/pcie-mediatek.c | 1 + drivers/pci/controller/pcie-microchip-host.c | 16 +- drivers/pci/controller/pcie-rockchip-ep.c | 3 +- drivers/pci/pci-acpi.c | 41 +- drivers/pci/pci.c | 12 +- drivers/pci/pcie/aer.c | 7 +- drivers/pci/quirks.c | 47 ++ drivers/phy/qualcomm/phy-qcom-qmp.c | 11 +- drivers/pinctrl/bcm/pinctrl-bcm2835.c | 18 + drivers/pinctrl/mediatek/Kconfig | 1 + drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 2 +- drivers/pinctrl/pinctrl-apple-gpio.c | 1 + drivers/pinctrl/pinctrl-rockchip.c | 54 +- drivers/pinctrl/pinctrl-rockchip.h | 7 +- drivers/pinctrl/renesas/core.c | 7 +- drivers/pinctrl/renesas/pfc-r8a779a0.c | 29 + drivers/pinctrl/renesas/pfc-r8a779f0.c | 21 + drivers/pinctrl/renesas/pinctrl-rzn1.c | 10 +- drivers/platform/chrome/cros_ec.c | 16 +- drivers/platform/chrome/cros_ec_chardev.c | 2 +- drivers/platform/chrome/cros_ec_proto.c | 50 +- drivers/platform/mips/cpu_hwmon.c | 127 ++-- drivers/platform/x86/intel/chtwc_int33fe.c | 2 + drivers/platform/x86/intel/hid.c | 2 +- drivers/regulator/core.c | 7 +- drivers/regulator/da9121-regulator.c | 2 + drivers/regulator/pfuze100-regulator.c | 2 + drivers/regulator/qcom_smd-regulator.c | 35 +- drivers/regulator/scmi-regulator.c | 2 +- drivers/s390/cio/chsc.c | 4 +- drivers/scsi/dc395x.c | 15 +- drivers/scsi/fcoe/fcoe_ctlr.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_main.c | 49 +- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 10 +- drivers/scsi/lpfc/lpfc.h | 1 + drivers/scsi/lpfc/lpfc_els.c | 112 +-- drivers/scsi/lpfc/lpfc_hbadisc.c | 3 + drivers/scsi/lpfc/lpfc_init.c | 51 +- drivers/scsi/lpfc/lpfc_logmsg.h | 6 +- drivers/scsi/lpfc/lpfc_nportdisc.c | 10 +- drivers/scsi/lpfc/lpfc_scsi.c | 37 +- drivers/scsi/lpfc/lpfc_sli.c | 48 +- drivers/scsi/megaraid.c | 2 +- drivers/scsi/ufs/ti-j721e-ufs.c | 6 +- drivers/scsi/ufs/ufs-qcom.c | 14 +- drivers/scsi/ufs/ufshcd.c | 7 +- drivers/soc/bcm/bcm63xx/bcm-pmb.c | 3 + drivers/soc/qcom/llcc-qcom.c | 1 + drivers/soc/qcom/smp2p.c | 1 + drivers/soc/qcom/smsm.c | 1 + drivers/soc/ti/ti_sci_pm_domains.c | 2 + drivers/spi/spi-cadence-quadspi.c | 2 +- drivers/spi/spi-fsl-qspi.c | 4 + drivers/spi/spi-img-spfi.c | 2 +- drivers/spi/spi-rockchip.c | 8 + drivers/spi/spi-rspi.c | 15 +- drivers/spi/spi-stm32-qspi.c | 3 +- drivers/spi/spi-ti-qspi.c | 5 +- drivers/staging/media/hantro/hantro_drv.c | 17 +- drivers/staging/media/hantro/hantro_g2_hevc_dec.c | 11 +- drivers/staging/media/hantro/hantro_h264.c | 2 - drivers/staging/media/hantro/hantro_v4l2.c | 67 +- drivers/staging/media/rkvdec/rkvdec-h264.c | 37 +- drivers/staging/media/rkvdec/rkvdec.c | 6 - drivers/staging/r8188eu/os_dep/ioctl_linux.c | 92 +-- drivers/target/target_core_device.c | 1 - drivers/target/target_core_user.c | 50 +- drivers/thermal/broadcom/bcm2711_thermal.c | 5 +- drivers/thermal/broadcom/sr-thermal.c | 3 + drivers/thermal/devfreq_cooling.c | 25 +- drivers/thermal/imx_sc_thermal.c | 6 +- drivers/thermal/thermal_core.c | 1 + drivers/tty/goldfish.c | 20 +- drivers/tty/n_gsm.c | 31 +- drivers/tty/serial/pch_uart.c | 27 +- drivers/tty/tty_buffer.c | 3 +- drivers/usb/core/hcd.c | 29 +- drivers/usb/core/quirks.c | 3 + drivers/usb/dwc3/gadget.c | 6 +- drivers/usb/host/xhci-pci.c | 2 + drivers/usb/host/xhci.c | 2 + drivers/usb/isp1760/isp1760-core.c | 8 + drivers/usb/serial/option.c | 2 + drivers/usb/serial/pl2303.c | 3 + drivers/vdpa/vdpa_sim/vdpa_sim.c | 5 +- drivers/video/console/sticon.c | 5 +- drivers/video/console/sticore.c | 32 +- drivers/video/fbdev/amba-clcd.c | 5 +- drivers/video/fbdev/core/fb_defio.c | 9 +- drivers/video/fbdev/core/fbcon.c | 5 +- drivers/video/fbdev/sticore.h | 3 + drivers/video/fbdev/stifb.c | 4 +- drivers/video/fbdev/vesafb.c | 5 +- fs/afs/misc.c | 5 +- fs/afs/rotate.c | 4 + fs/afs/rxrpc.c | 8 +- fs/afs/write.c | 1 + fs/binfmt_flat.c | 27 +- fs/btrfs/block-group.c | 8 + fs/btrfs/block-group.h | 2 + fs/btrfs/disk-io.c | 4 +- fs/btrfs/extent_io.c | 27 +- fs/btrfs/extent_io.h | 1 - fs/btrfs/inode.c | 81 ++- fs/btrfs/ioctl.c | 49 +- fs/btrfs/volumes.c | 8 +- fs/btrfs/zoned.c | 44 +- fs/btrfs/zoned.h | 5 + fs/ceph/mds_client.c | 14 +- fs/cifs/cifsfs.c | 10 +- fs/cifs/cifsglob.h | 15 +- fs/cifs/connect.c | 67 +- fs/cifs/dfs_cache.c | 6 +- fs/cifs/fs_context.c | 29 +- fs/cifs/fs_context.h | 2 +- fs/cifs/misc.c | 7 +- fs/cifs/sess.c | 6 +- fs/cifs/smb2inode.c | 2 - fs/cifs/smb2ops.c | 9 +- fs/cifs/smb2pdu.c | 3 +- fs/cifs/smb2transport.c | 3 +- fs/dax.c | 3 +- fs/dlm/lock.c | 15 +- fs/dlm/lowcomms.c | 2 +- fs/dlm/plock.c | 12 +- fs/erofs/decompressor.c | 5 +- fs/exec.c | 6 +- fs/exportfs/expfs.c | 5 +- fs/ext4/ext4.h | 6 - fs/ext4/extents.c | 20 +- fs/ext4/inline.c | 12 + fs/ext4/inode.c | 13 +- fs/ext4/mballoc.c | 18 +- fs/ext4/namei.c | 84 ++- fs/ext4/super.c | 87 ++- fs/f2fs/dir.c | 3 +- fs/f2fs/f2fs.h | 29 +- fs/f2fs/file.c | 20 +- fs/f2fs/hash.c | 11 +- fs/f2fs/inline.c | 29 +- fs/f2fs/inode.c | 19 +- fs/f2fs/namei.c | 7 + fs/f2fs/segment.c | 42 +- fs/f2fs/segment.h | 33 +- fs/f2fs/super.c | 6 +- fs/fat/fatent.c | 7 +- fs/fs-writeback.c | 13 +- fs/gfs2/quota.c | 32 +- fs/hugetlbfs/inode.c | 4 +- fs/io_uring.c | 7 +- fs/iomap/buffered-io.c | 3 +- fs/jfs/jfs_dmap.c | 3 +- fs/ksmbd/connection.c | 2 +- fs/ksmbd/smb2misc.c | 2 +- fs/ksmbd/smb_common.c | 4 +- fs/namei.c | 70 +- fs/namespace.c | 5 +- fs/nfs/file.c | 50 +- fs/nfs/fscache.c | 7 +- fs/nfs/nfs4namespace.c | 9 +- fs/nfs/nfs4proc.c | 41 +- fs/nfs/nfs4state.c | 9 +- fs/nfs/nfs4xdr.c | 4 +- fs/nfs/pagelist.c | 3 + fs/nfs/pnfs.c | 2 + fs/nfs/unlink.c | 8 + fs/nfs/write.c | 54 +- fs/nfsd/nfscache.c | 2 +- fs/notify/fanotify/fanotify_user.c | 4 +- fs/notify/fdinfo.c | 11 +- fs/notify/inotify/inotify.h | 12 + fs/notify/inotify/inotify_user.c | 2 +- fs/notify/mark.c | 6 +- fs/ntfs3/file.c | 12 +- fs/ntfs3/frecord.c | 10 +- fs/ntfs3/fslog.c | 12 +- fs/ntfs3/inode.c | 9 +- fs/ntfs3/xattr.c | 112 ++- fs/ocfs2/dlmfs/userdlm.c | 16 +- fs/ocfs2/inode.c | 4 +- fs/ocfs2/journal.c | 33 +- fs/ocfs2/journal.h | 2 + fs/ocfs2/super.c | 15 + fs/proc/generic.c | 3 + fs/proc/proc_net.c | 3 + fs/seq_file.c | 32 + include/drm/drm_edid.h | 6 +- include/drm/drm_format_helper.h | 5 +- include/linux/blk_types.h | 5 +- include/linux/bpf.h | 119 +--- include/linux/compat.h | 1 + include/linux/efi.h | 2 + include/linux/fwnode.h | 10 +- include/linux/goldfish.h | 15 +- include/linux/gpio/driver.h | 12 + include/linux/ipmi_smi.h | 6 + include/linux/kexec.h | 46 +- include/linux/kprobes.h | 2 +- include/linux/linkage.h | 15 +- include/linux/list.h | 16 +- include/linux/mailbox_controller.h | 1 + include/linux/module.h | 3 +- include/linux/mtd/cfi.h | 1 + include/linux/namei.h | 6 + include/linux/nfs_fs_sb.h | 1 + include/linux/nfs_xdr.h | 2 +- include/linux/nodemask.h | 13 +- include/linux/platform_data/cros_ec_proto.h | 3 + include/linux/ptp_classify.h | 3 + include/linux/ptrace.h | 7 - include/linux/sched/signal.h | 2 +- include/linux/sched/task.h | 2 + include/linux/seq_file.h | 4 + include/linux/set_memory.h | 10 +- include/linux/usb/hcd.h | 2 + include/net/bluetooth/hci.h | 9 + include/net/bluetooth/hci_core.h | 8 +- include/net/if_inet6.h | 8 + include/net/ip.h | 2 +- include/net/sock.h | 5 +- include/scsi/libfcoe.h | 3 +- include/scsi/libiscsi.h | 6 +- include/sound/cs35l41.h | 1 - include/sound/jack.h | 1 + include/trace/events/rxrpc.h | 2 +- include/trace/events/vmscan.h | 4 +- include/uapi/asm-generic/siginfo.h | 7 + include/uapi/linux/android/binder.h | 2 +- include/uapi/linux/landlock.h | 9 +- include/uapi/linux/lirc.h | 7 + include/uapi/linux/types.h | 3 + init/Kconfig | 5 + init/main.c | 2 +- ipc/mqueue.c | 14 + kernel/bpf/cgroup.c | 124 +++- kernel/dma/debug.c | 2 +- kernel/dma/direct.c | 31 +- kernel/events/core.c | 4 +- kernel/fork.c | 22 +- kernel/kexec_file.c | 34 - kernel/kprobes.c | 144 ++-- kernel/module.c | 4 + kernel/power/energy_model.c | 2 + kernel/printk/printk.c | 61 +- kernel/ptrace.c | 5 +- kernel/rcu/Kconfig | 1 + kernel/rcu/tasks.h | 5 +- kernel/scftorture.c | 5 +- kernel/sched/core.c | 6 +- kernel/sched/deadline.c | 5 +- kernel/sched/fair.c | 8 +- kernel/sched/pelt.h | 4 +- kernel/sched/psi.c | 15 +- kernel/sched/rt.c | 5 +- kernel/sched/sched.h | 32 +- kernel/signal.c | 18 +- kernel/trace/bpf_trace.c | 5 +- kernel/trace/ftrace.c | 5 +- kernel/trace/trace.c | 6 +- kernel/trace/trace_boot.c | 2 +- kernel/trace/trace_events.c | 13 +- kernel/trace/trace_events_hist.c | 3 + kernel/trace/trace_osnoise.c | 9 +- kernel/trace/trace_selftest.c | 3 + kernel/umh.c | 6 +- lib/kunit/debugfs.c | 2 +- lib/kunit/executor.c | 32 +- lib/kunit/executor_test.c | 4 +- lib/string_helpers.c | 3 + mm/cma.c | 4 +- mm/compaction.c | 2 + mm/hugetlb.c | 9 +- mm/memremap.c | 2 +- mm/page_alloc.c | 4 +- mm/page_owner.c | 2 +- net/bluetooth/hci_conn.c | 7 +- net/bluetooth/hci_event.c | 35 +- net/bluetooth/hci_request.c | 2 + net/bluetooth/sco.c | 23 +- net/core/dev.c | 8 +- net/ipv4/tcp_input.c | 28 +- net/ipv6/addrconf.c | 33 +- net/ipv6/datagram.c | 6 +- net/ipv6/udp.c | 11 +- net/mac80211/chan.c | 7 +- net/mac80211/ieee80211_i.h | 5 + net/mac80211/rc80211_minstrel_ht.c | 3 + net/mac80211/scan.c | 20 + net/mptcp/pm.c | 19 +- net/mptcp/pm_netlink.c | 2 + net/mptcp/protocol.c | 18 +- net/mptcp/protocol.h | 1 + net/nfc/core.c | 1 + net/rxrpc/ar-internal.h | 15 +- net/rxrpc/call_accept.c | 6 +- net/rxrpc/call_event.c | 7 +- net/rxrpc/call_object.c | 18 +- net/rxrpc/conn_object.c | 2 +- net/rxrpc/input.c | 58 +- net/rxrpc/net_ns.c | 2 +- net/rxrpc/output.c | 20 +- net/rxrpc/proc.c | 10 +- net/rxrpc/recvmsg.c | 8 +- net/rxrpc/sendmsg.c | 6 + net/rxrpc/sysctl.c | 4 +- net/sctp/input.c | 4 +- net/smc/af_smc.c | 2 +- net/wireless/nl80211.c | 4 +- net/wireless/reg.c | 4 + samples/bpf/Makefile | 9 +- samples/landlock/sandboxer.c | 104 +-- scripts/faddr2line | 150 ++-- security/integrity/ima/Kconfig | 14 +- .../integrity/platform_certs/keyring_handler.h | 8 + security/integrity/platform_certs/load_uefi.c | 33 + security/landlock/cred.c | 4 +- security/landlock/cred.h | 8 +- security/landlock/fs.c | 191 ++++-- security/landlock/fs.h | 11 +- security/landlock/limits.h | 8 +- security/landlock/object.c | 6 +- security/landlock/object.h | 6 +- security/landlock/ptrace.c | 10 +- security/landlock/ruleset.c | 84 +-- security/landlock/ruleset.h | 35 +- security/landlock/syscalls.c | 95 +-- sound/core/jack.c | 34 +- sound/core/pcm_memory.c | 3 +- sound/pci/hda/patch_realtek.c | 21 +- sound/soc/amd/yc/acp6x-mach.c | 29 +- sound/soc/atmel/atmel-classd.c | 1 - sound/soc/atmel/atmel-pdmic.c | 1 - sound/soc/codecs/Kconfig | 2 - sound/soc/codecs/cs35l41-lib.c | 14 +- sound/soc/codecs/lpass-macro-common.c | 35 +- sound/soc/codecs/max98090.c | 6 +- sound/soc/codecs/rk3328_codec.c | 2 +- sound/soc/codecs/rt5514.c | 2 +- sound/soc/codecs/rt5645.c | 7 +- sound/soc/codecs/tscs454.c | 12 +- sound/soc/codecs/wm2000.c | 6 +- sound/soc/fsl/imx-hdmi.c | 1 + sound/soc/fsl/imx-sgtl5000.c | 14 +- sound/soc/intel/boards/bytcr_rt5640.c | 12 + sound/soc/intel/boards/sof_ssp_amp.c | 16 +- sound/soc/mediatek/mt2701/mt2701-wm8960.c | 9 +- sound/soc/mediatek/mt8173/mt8173-max98090.c | 5 +- sound/soc/mxs/mxs-saif.c | 1 + sound/soc/samsung/aries_wm8994.c | 2 +- sound/soc/sh/rcar/core.c | 15 +- sound/soc/sh/rcar/dma.c | 9 +- sound/soc/sh/rcar/rsnd.h | 2 +- sound/soc/sh/rcar/src.c | 7 +- sound/soc/sh/rcar/ssi.c | 14 +- sound/soc/sh/rcar/ssiu.c | 11 +- sound/soc/sh/rz-ssi.c | 22 +- sound/soc/soc-dapm.c | 2 - sound/soc/sof/amd/pci-rn.c | 1 + sound/soc/sof/ipc3-topology.c | 40 +- sound/soc/ti/j721e-evm.c | 44 +- sound/usb/implicit.c | 10 +- sound/usb/midi.c | 3 + sound/usb/quirks.c | 6 + sound/usb/usbaudio.h | 6 + .../test-libbpf-btf__load_from_kernel_by_id.c | 5 +- tools/lib/bpf/libbpf.c | 22 +- tools/objtool/check.c | 9 +- tools/objtool/elf.c | 200 ++++-- tools/objtool/include/objtool/elf.h | 4 +- tools/perf/Makefile.config | 39 +- tools/perf/arch/x86/util/evlist.c | 2 +- tools/perf/arch/x86/util/evsel.c | 12 + tools/perf/builtin-c2c.c | 6 +- tools/perf/builtin-stat.c | 7 +- tools/perf/pmu-events/jevents.c | 2 +- tools/perf/util/data.h | 1 + tools/perf/util/evlist.c | 12 +- tools/perf/util/evsel.c | 19 + tools/perf/util/evsel.h | 3 + tools/power/x86/turbostat/turbostat.c | 1 + tools/testing/kunit/kunit_parser.py | 7 +- .../test_is_test_passed-no_tests_no_plan.log | 2 +- tools/testing/selftests/Makefile | 1 + tools/testing/selftests/arm64/bti/Makefile | 4 +- tools/testing/selftests/bpf/Makefile | 12 +- .../selftests/bpf/prog_tests/trampoline_count.c | 134 ++-- .../bpf/progs/btf_dump_test_case_syntax.c | 2 +- tools/testing/selftests/bpf/progs/profiler.inc.h | 5 +- .../selftests/bpf/progs/test_trampoline_count.c | 16 +- .../selftests/bpf/test_bpftool_synctypes.py | 2 +- tools/testing/selftests/bpf/trace_helpers.c | 9 +- tools/testing/selftests/cgroup/test_stress.sh | 2 +- tools/testing/selftests/landlock/base_test.c | 177 +++-- tools/testing/selftests/landlock/common.h | 66 +- tools/testing/selftests/landlock/fs_test.c | 753 ++++++++++++++------- tools/testing/selftests/landlock/ptrace_test.c | 40 +- tools/testing/selftests/resctrl/fill_buf.c | 4 +- tools/tracing/rtla/Makefile | 5 +- tools/tracing/rtla/README.txt | 13 +- tools/tracing/rtla/src/osnoise_hist.c | 5 +- tools/tracing/rtla/src/osnoise_top.c | 9 +- tools/tracing/rtla/src/timerlat_hist.c | 11 +- tools/tracing/rtla/src/timerlat_top.c | 11 +- tools/tracing/rtla/src/utils.c | 108 ++- tools/tracing/rtla/src/utils.h | 3 +- 951 files changed, 9396 insertions(+), 5279 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/879 arm64: Initialize jump labels before setup_machine_fdt()
From: Stephen Boyd <[email protected]>
commit 73e2d827a501d48dceeb5b9b267a4cd283d6b1ae upstream.
A static key warning splat appears during early boot on arm64 systems that credit randomness from devicetrees that contain an "rng-seed" property. This is because setup_machine_fdt() is called before jump_label_init() during setup_arch(). Let's swap the order of these two calls so that jump labels are initialized before the devicetree is unflattened and the rng seed is credited.
static_key_enable_cpuslocked(): static key '0xffffffe51c6fcfc0' used before call to jump_label_init()
WARNING: CPU: 0 PID: 0 at kernel/jump_label.c:166 static_key_enable_cpuslocked+0xb0/0xb8 Modules linked in: CPU: 0 PID: 0 Comm: swapper Not tainted 5.18.0+ #224 44b43e377bfc84bc99bb5ab885ff694984ee09ff pstate: 600001c9 (nZCv dAIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : static_key_enable_cpuslocked+0xb0/0xb8 lr : static_key_enable_cpuslocked+0xb0/0xb8 sp : ffffffe51c393cf0 x29: ffffffe51c393cf0 x28: 000000008185054c x27: 00000000f1042f10 x26: 0000000000000000 x25: 00000000f10302b2 x24: 0000002513200000 x23: 0000002513200000 x22: ffffffe51c1c9000 x21: fffffffdfdc00000 x20: ffffffe51c2f0831 x19: ffffffe51c6fcfc0 x18: 00000000ffff1020 x17: 00000000e1e2ac90 x16: 00000000000000e0 x15: ffffffe51b710708 x14: 0000000000000066 x13: 0000000000000018 x12: 0000000000000000 x11: 0000000000000000 x10: 00000000ffffffff x9 : 0000000000000000 x8 : 0000000000000000 x7 : 61632065726f6665 x6 : 6220646573752027 x5 : ffffffe51c641d25 x4 : ffffffe51c13142c x3 : ffff0a00ffffff05 x2 : 40000000ffffe003 x1 : 00000000000001c0 x0 : 0000000000000065 Call trace: static_key_enable_cpuslocked+0xb0/0xb8 static_key_enable+0x2c/0x40 crng_set_ready+0x24/0x30 execute_in_process_context+0x80/0x90 _credit_init_bits+0x100/0x154 add_bootloader_randomness+0x64/0x78 early_init_dt_scan_chosen+0x140/0x184 early_init_dt_scan_nodes+0x28/0x4c early_init_dt_scan+0x40/0x44 setup_machine_fdt+0x7c/0x120 setup_arch+0x74/0x1d8 start_kernel+0x84/0x44c __primary_switched+0xc0/0xc8 ---[ end trace 0000000000000000 ]--- random: crng init done Machine model: Google Lazor (rev1 - 2) with LTE
--- arch/arm64/kernel/setup.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
arch/arm64/kernel/setup.c +4 -3
@@ -314,13 +314,14 @@ void __init __no_sanitize_address setup_early_fixmap_init ();early_ioremap_init (); -setup_machine_fdt (__fdt_pointer); -/* * Initialise the static keys early as they may be enabled by the -* cpufeature code and early parameters. +* cpufeature code, early parameters, and DT setup. */ jump_label_init (); + +setup_machine_fdt (__fdt_pointer); +parse_early_param ();/*
Re: [PATCH 5.18 001/879] arm64: Initialize jump labels before setup_machine_fdt()
Quoted 47 lines · Greg Kroah-Hartman
From: Stephen Boyd <[email protected]>
commit
73e2d827a501d48dceeb5b9b267a4cd283d6b1aeupstream.A static key warning splat appears during early boot on arm64 systems that credit randomness from devicetrees that contain an "rng-seed" property. This is because
setup_machine_fdt()is called beforejump_label_init()duringsetup_arch(). Let's swap the order of these two calls so that jump labels are initialized before the devicetree is unflattened and the rng seed is credited.
static_key_enable_cpuslocked(): static key '0xffffffe51c6fcfc0' used before call tojump_label_init()WARNING: CPU: 0 PID: 0 at kernel/jump_label.c:166 static_key_enable_cpuslocked+0xb0/0xb8 Modules linked in: CPU: 0 PID: 0 Comm: swapper Not tainted 5.18.0+ #224 44b43e377bfc84bc99bb5ab885ff694984ee09ff pstate: 600001c9 (nZCv dAIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : static_key_enable_cpuslocked+0xb0/0xb8 lr : static_key_enable_cpuslocked+0xb0/0xb8 sp : ffffffe51c393cf0 x29: ffffffe51c393cf0 x28: 000000008185054c x27: 00000000f1042f10 x26: 0000000000000000 x25: 00000000f10302b2 x24: 0000002513200000 x23: 0000002513200000 x22: ffffffe51c1c9000 x21: fffffffdfdc00000 x20: ffffffe51c2f0831 x19: ffffffe51c6fcfc0 x18: 00000000ffff1020 x17: 00000000e1e2ac90 x16: 00000000000000e0 x15: ffffffe51b710708 x14: 0000000000000066 x13: 0000000000000018 x12: 0000000000000000 x11: 0000000000000000 x10: 00000000ffffffff x9 : 0000000000000000 x8 : 0000000000000000 x7 : 61632065726f6665 x6 : 6220646573752027 x5 : ffffffe51c641d25 x4 : ffffffe51c13142c x3 : ffff0a00ffffff05 x2 : 40000000ffffe003 x1 : 00000000000001c0 x0 : 0000000000000065 Call trace: static_key_enable_cpuslocked+0xb0/0xb8 static_key_enable+0x2c/0x40 crng_set_ready+0x24/0x30 execute_in_process_context+0x80/0x90 _credit_init_bits+0x100/0x154 add_bootloader_randomness+0x64/0x78 early_init_dt_scan_chosen+0x140/0x184 early_init_dt_scan_nodes+0x28/0x4c early_init_dt_scan+0x40/0x44 setup_machine_fdt+0x7c/0x120 setup_arch+0x74/0x1d8 start_kernel+0x84/0x44c __primary_switched+0xc0/0xc8 ---[ end trace 0000000000000000 ]--- random: crng init done Machine model: Google Lazor (rev1 - 2) with LTE
Quoted 13 lines
Cc Hsin-Yi Wang <[email protected]>Cc Douglas Anderson <[email protected]>Cc Ard Biesheuvel <[email protected]>Cc Steven Rostedt <[email protected]>Cc Jason A. Donenfeld <[email protected]>Cc Dominik Brodowski <[email protected]>Fixes f5bda35fba61 ("random: use static branch for crng_ready()")Signed-off-by Stephen Boyd <[email protected]>Reviewed-by Jason A. Donenfeld <[email protected]>Signed-off-by Catalin Marinas <[email protected]>Signed-off-by Jason A. Donenfeld <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>
Please drop this patch from 5.18 stable (I think I gave the details on the 5.10 reply).
Thanks.
Signature · 3 lines
Catalin -- Catalin
Greg Kroah-Hartman
maintainerRe: [PATCH 5.18 001/879] arm64: Initialize jump labels before setup_machine_fdt()
Quoted 62 lines · Catalin Marinas
Quoted 47 lines · Greg Kroah-Hartman
From: Stephen Boyd <[email protected]>
commit
73e2d827a501d48dceeb5b9b267a4cd283d6b1aeupstream.A static key warning splat appears during early boot on arm64 systems that credit randomness from devicetrees that contain an "rng-seed" property. This is because
setup_machine_fdt()is called beforejump_label_init()duringsetup_arch(). Let's swap the order of these two calls so that jump labels are initialized before the devicetree is unflattened and the rng seed is credited.
static_key_enable_cpuslocked(): static key '0xffffffe51c6fcfc0' used before call tojump_label_init()WARNING: CPU: 0 PID: 0 at kernel/jump_label.c:166 static_key_enable_cpuslocked+0xb0/0xb8 Modules linked in: CPU: 0 PID: 0 Comm: swapper Not tainted 5.18.0+ #224 44b43e377bfc84bc99bb5ab885ff694984ee09ff pstate: 600001c9 (nZCv dAIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : static_key_enable_cpuslocked+0xb0/0xb8 lr : static_key_enable_cpuslocked+0xb0/0xb8 sp : ffffffe51c393cf0 x29: ffffffe51c393cf0 x28: 000000008185054c x27: 00000000f1042f10 x26: 0000000000000000 x25: 00000000f10302b2 x24: 0000002513200000 x23: 0000002513200000 x22: ffffffe51c1c9000 x21: fffffffdfdc00000 x20: ffffffe51c2f0831 x19: ffffffe51c6fcfc0 x18: 00000000ffff1020 x17: 00000000e1e2ac90 x16: 00000000000000e0 x15: ffffffe51b710708 x14: 0000000000000066 x13: 0000000000000018 x12: 0000000000000000 x11: 0000000000000000 x10: 00000000ffffffff x9 : 0000000000000000 x8 : 0000000000000000 x7 : 61632065726f6665 x6 : 6220646573752027 x5 : ffffffe51c641d25 x4 : ffffffe51c13142c x3 : ffff0a00ffffff05 x2 : 40000000ffffe003 x1 : 00000000000001c0 x0 : 0000000000000065 Call trace: static_key_enable_cpuslocked+0xb0/0xb8 static_key_enable+0x2c/0x40 crng_set_ready+0x24/0x30 execute_in_process_context+0x80/0x90 _credit_init_bits+0x100/0x154 add_bootloader_randomness+0x64/0x78 early_init_dt_scan_chosen+0x140/0x184 early_init_dt_scan_nodes+0x28/0x4c early_init_dt_scan+0x40/0x44 setup_machine_fdt+0x7c/0x120 setup_arch+0x74/0x1d8 start_kernel+0x84/0x44c __primary_switched+0xc0/0xc8 ---[ end trace 0000000000000000 ]--- random: crng init done Machine model: Google Lazor (rev1 - 2) with LTEQuoted 13 lines
Cc Hsin-Yi Wang <[email protected]>Cc Douglas Anderson <[email protected]>Cc Ard Biesheuvel <[email protected]>Cc Steven Rostedt <[email protected]>Cc Jason A. Donenfeld <[email protected]>Cc Dominik Brodowski <[email protected]>Fixes f5bda35fba61 ("random: use static branch for crng_ready()")Signed-off-by Stephen Boyd <[email protected]>Reviewed-by Jason A. Donenfeld <[email protected]>Signed-off-by Catalin Marinas <[email protected]>Signed-off-by Jason A. Donenfeld <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>
Quoted 3 lines
Please drop this patch from 5.18 stable (I think I gave the details on the 5.10 reply).
Dropped from all stable queues now, thanks.
greg k-h
Greg Kroah-Hartman
maintainerPATCH 2/879 binfmt_flat: do not stop relocating GOT entries prematurely on riscv
In reply to Greg Kroah-HartmanFrom: Niklas Cassel <[email protected]>
commit 6045ab5fea4c849153ebeb0acb532da5f29d69c4 upstream.
bFLT binaries are usually created using elf2flt.
The linker script used by elf2flt has defined the .data section like the following for the last 19 years:
.data : {
_sdata = . ;
__data_start = . ;
data_start = . ;
*(.got.plt)
*(.got)
FILL(0) ;
. = ALIGN(0x20) ;
LONG(-1)
. = ALIGN(0x20) ;
...
}It places the .got.plt input section before the .got input section. The same is true for the default linker script (ld --verbose) on most architectures except x86/x86-64.
The binfmt_flat loader should relocate all GOT entries until it encounters a -1 (the LONG(-1) in the linker script).
The problem is that the .got.plt input section starts with a GOTPLT header (which has size 16 bytes on elf64-riscv and 8 bytes on elf32-riscv), where the first word is set to -1. See the binutils implementation for riscv [1].
This causes the binfmt_flat loader to stop relocating GOT entries prematurely and thus causes the application to crash when running.
Fix this by skipping the whole GOTPLT header, since the whole GOTPLT header is reserved for the dynamic linker.
The GOTPLT header will only be skipped for bFLT binaries with flag FLAT_FLAG_GOTPIC set. This flag is unconditionally set by elf2flt if the supplied ELF binary has the symbol _GLOBAL_OFFSET_TABLE_ defined. ELF binaries without a .got input section should thus remain unaffected.
Tested on RISC-V Canaan Kendryte K210 and RISC-V QEMU nommu_virt_defconfig.
[1] https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=bfd/elfnn-riscv.c;hb=binutils-2_38#l3275
--- fs/binfmt_flat.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-)
fs/binfmt_flat.c +26 -1
@@ -440,6 +440,30 @@ static void old_reloc(unsigned long rl)/****************************************************************************/ +static inline u32 __user *skip_got_header (u32 __user *rp) +{ +if (IS_ENABLED (CONFIG_RISCV )) { +/* +* RISC-V has a 16 byte GOT PLT header for elf64-riscv +* and 8 byte GOT PLT header for elf32-riscv. +* Skip the whole GOT PLT header, since it is reserved +* for the dynamic linker (ld.so). +*/ +u32 rp_val0, rp_val1; + +if (get_user (rp_val0, rp)) +return rp; +if (get_user (rp_val1, rp +1 )) +return rp; + +if (rp_val0 ==0xffffffff && rp_val1 ==0xffffffff ) + rp +=4 ; +else if (rp_val0 ==0xffffffff ) + rp +=2 ; + } +return rp; +} +static int load_flat_file (struct linux_binprm *bprm,struct lib_info *libinfo,int id,unsigned long *extra_stack) {
@@ -789,7 +813,8 @@ static int load_flat_file(struct linux_b* image. */ if (flags &FLAT_FLAG_GOTPIC ) { -for (rp = (u32 __user *)datapos; ; rp++) { + rp =skip_got_header ((u32 __user *) datapos); +for (; ; rp++) {u32 addr, rp_val;if (get_user (rp_val, rp))return -EFAULT ;
Greg Kroah-Hartman
maintainerPATCH 3/879 parisc: fix a crash with multicore scheduler
In reply to Greg Kroah-HartmanFrom: Mikulas Patocka <[email protected]>
commit 6ba688364856ad083be537f08e86ba97f433d405 upstream.
With the kernel 5.18, the system will hang on boot if it is compiled with CONFIG_SCHED_MC. The last printed message is "Brought up 1 node, 1 CPU".
The crash happens in sd_inittl->mask (which is cpu_coregroup_mask) returns an empty mask. This happens
because cpu_topology[0].core_sibling is empty.
Consequently, sd_span is set to an empty masksd_id = cpumask_first(sd_span) sets sd_id == NR_CPUS (because the mask is
empty)sd->shared = *per_cpu_ptr(sdd->sds, sd_id); sets sd->shared to NULL
because sd_id is out of rangeatomic_inc(&sd->shared->ref); crashes without printing anything
We can fix it by calling reset_cpu_topology() from init_cpu_topology() - this will initialize the sibling masks on CPUs, so that they're not empty.
This patch also removes the variable "dualcores_found", it is useless, because during boot, init_cpu_topology is called before store_cpu_topology. Thus, set_sched_topology(parisc_mc_topology) is never called. We don't need to call it at all because default_topology in kernel/sched/topology.c contains the same items as parisc_mc_topology.
Note that we should not call store_cpu_topology() from init_per_cpu() because it is called too early in the kernel initialization process and it results in the message "Failure to register CPU0 device". Before this patch, store_cpu_topology() would exit immediatelly because cpuid_topo->core id was uninitialized and it was 0.
--- arch/parisc/kernel/processor.c | 2 -- arch/parisc/kernel/topology.c | 16 +--------------- 2 files changed, 1 insertion(+), 17 deletions(-)
arch/parisc/kernel/processor.c +0 -2
@@ -327,8 +327,6 @@ int init_per_cpu(int cpunum)set_firmware_width (); ret =pdc_coproc_cfg (&coproc_cfg); -store_cpu_topology (cpunum); -if (ret >=0 && coproc_cfg.ccr_functional) {mtctl (coproc_cfg.ccr_functional,10 );/* 10 == Coprocessor Control Reg */
arch/parisc/kernel/topology.c +1 -15
@@ -20,8 +20,6 @@ static DEFINE_PER_CPU(struct cpu, cpu_devices); -static int dualcores_found; -/* * store_cpu_topology is called at boot when only one cpu is running * and with the mutex cpu_hotplug.lock locked, when several cpus have booted,
@@ -60,7 +58,6 @@ void store_cpu_topology(unsigned int cpuid)if (p->cpu_loc) { cpuid_topo->core_id++; cpuid_topo->package_id = cpu_topology[cpu].package_id; - dualcores_found =1 ;continue ; } }
@@ -80,22 +77,11 @@ void store_cpu_topology(unsigned int cpuid) cpu_topology[cpuid].package_id); } -static struct sched_domain_topology_level parisc_mc_topology[] = { -#ifdef CONFIG_SCHED_MC - { cpu_coregroup_mask, cpu_core_flags,SD_INIT_NAME (MC ) }, -#endif - - { cpu_cpu_mask,SD_INIT_NAME (DIE ) }, - {NULL , }, -}; -/* * init_cpu_topology is called at boot when only one cpu is running * which prevent simultaneous write access to cpu_topology array */ void __init init_cpu_topology (void ) { -/* Set scheduler topology descriptor */ -if (dualcores_found) -set_sched_topology (parisc_mc_topology); +reset_cpu_topology (); }
Signature · 1 line
2.36.1
Greg Kroah-Hartman
maintainerPATCH 4/879 parisc/stifb: Implement fb_is_primary_device()
In reply to Greg Kroah-HartmanFrom: Helge Deller <[email protected]>
commit cf936af790a3ef5f41ff687ec91bfbffee141278 upstream.
Implement fb_is_primary_device() function, so that fbcon detects if this framebuffer belongs to the default graphics card which was used to start the system.
--- arch/parisc/include/asm/fb.h | 4 ++++ drivers/video/console/sticore.c | 17 +++++++++++++++++ drivers/video/fbdev/stifb.c | 4 ++-- 3 files changed, 23 insertions(+), 2 deletions(-)
arch/parisc/include/asm/fb.h +4 -0
@@ -12,9 +12,13 @@ static inline void fb_pgprotect(struct f pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE; } +#if defined(CONFIG_STI_CONSOLE ) || defined(CONFIG_FB_STI ) +int fb_is_primary_device (struct fb_info *info); +#else static inline int fb_is_primary_device (struct fb_info *info) {return 0 ; } +#endif #endif /* _ASM_FB_H_ */
drivers/video/console/sticore.c +17 -0
@@ -30,6 +30,7 @@#include <asm/pdc.h> #include <asm/cacheflush.h> #include <asm/grfioctl.h> +#include <asm/fb.h> #include "../fbdev/sticore.h"
@@ -1127,6 +1128,22 @@ int sti_call(const struct sti_struct *streturn ret; } +/* check if given fb_info is the primary device */ +int fb_is_primary_device (struct fb_info *info) +{ +struct sti_struct *sti; + + sti =sti_get_rom (0 ); + +/* if no built-in graphics card found, allow any fb driver as default */ +if (!sti) +return true; + +/* return true if it's the default built-in framebuffer driver */ +return (sti->info == info); +} +EXPORT_SYMBOL (fb_is_primary_device); +MODULE_AUTHOR ("Philipp Rumpf, Helge Deller, Thomas Bogendoerfer" );MODULE_DESCRIPTION ("Core STI driver for HP's NGLE series graphics cards in HP PARISC machines" );MODULE_LICENSE ("GPL v2" );
drivers/video/fbdev/stifb.c +2 -2
@@ -1358,11 +1358,11 @@ static int __init stifb_init_fb(struct s goto out_err3; } +/* save for primary gfx device detection & unregister_framebuffer() */ + sti->info = info;if (register_framebuffer (&fb->info) <0 ) goto out_err4; - sti->info = info;/* save for unregister_framebuffer() */ - fb_info(&fb->info, "%s %dx%d-%d frame buffer device, %s, id: %04x, mmio: 0x%04lx\n", fix->id, var->xres,
Greg Kroah-Hartman
maintainerPATCH 5/879 parisc/stifb: Keep track of hardware path of graphics card
In reply to Greg Kroah-HartmanFrom: Helge Deller <[email protected]>
commit b046f984814af7985f444150ec28716d42d00d9a upstream.
Keep the pa_path (hardware path) of the graphics card in sti_struct and use this info to give more useful info which card is currently being used.
--- drivers/video/console/sticon.c | 5 ++++- drivers/video/console/sticore.c | 15 +++++++-------- drivers/video/fbdev/sticore.h | 3 +++ 3 files changed, 14 insertions(+), 9 deletions(-)
drivers/video/console/sticon.c +4 -1
@@ -46,6 +46,7 @@#include <linux/slab.h> #include <linux/font.h> #include <linux/crc32.h> +#include <linux/fb.h> #include <asm/io.h>
@@ -392,7 +393,9 @@ static int __init sticonsole_init(void)for (i =0 ; i <MAX_NR_CONSOLES ; i++) font_data[i] =STI_DEF_FONT ; -pr_info ("sticon: Initializing STI text console.\n" ); +pr_info ("sticon: Initializing STI text console on %s at [%s]\n" , + sticon_sti->sti_data->inq_outptr.dev_name, + sticon_sti->pa_path);console_lock (); err =do_take_over_console (&sti_con,0 ,MAX_NR_CONSOLES -1 ,PAGE0 ->mem_cons.cl_class !=CL_DUPLEX );
drivers/video/console/sticore.c +7 -8
@@ -34,7 +34,7 @@#include "../fbdev/sticore.h" -#define STI_DRIVERVERSION "Version 0.9b" +#define STI_DRIVERVERSION "Version 0.9c"static struct sti_struct *default_sti__read_mostly ;
@@ -503,7 +503,7 @@ sti_select_fbfont(struct sti_cooked_romif (!fbfont)return NULL ; -pr_info ("STI selected %ux%u framebuffer font %s for sticon\n" , +pr_info (" using %ux%u framebuffer font %s\n" , fbfont->width, fbfont->height, fbfont->name); bpc = ((fbfont->width+7 )/8 ) * fbfont->height;
@@ -947,6 +947,7 @@ out_err:static void sticore_check_for_default_sti (struct sti_struct *sti,char *path) { +pr_info (" located at [%s]\n" , sti->pa_path);if (strcmp (path, default_sti_path) ==0 ) default_sti = sti; }
@@ -958,7 +959,6 @@ static void sticore_check_for_default_st*/ static int __init sticore_pa_init (struct parisc_device *dev) { -char pa_path[21 ];struct sti_struct *sti =NULL ;int hpa = dev->hpa.start;
@@ -971,8 +971,8 @@ static int __init sticore_pa_init(structif (!sti)return 1 ; -print_pa_hwpath (dev, pa_path); -sticore_check_for_default_sti (sti, pa_path); +print_pa_hwpath (dev, sti->pa_path); +sticore_check_for_default_sti (sti, sti->pa_path);return 0 ; }
@@ -1008,9 +1008,8 @@ static int sticore_pci_init(struct pci_d sti =sti_try_rom_generic (rom_base, fb_base, pd);if (sti) { -char pa_path[30 ]; -print_pci_hwpath (pd, pa_path); -sticore_check_for_default_sti (sti, pa_path); +print_pci_hwpath (pd, sti->pa_path); +sticore_check_for_default_sti (sti, sti->pa_path); }if (!sti) {
drivers/video/fbdev/sticore.h +3 -0
@@ -370,6 +370,9 @@ struct sti_struct {/* pointer to all internal data */ struct sti_all_data *sti_data; + +/* pa_path of this device */ +char pa_path[24 ]; };
Greg Kroah-Hartman
maintainerPATCH 6/879 RISC-V: Mark IORESOURCE_EXCLUSIVE for reserved mem instead of IORESOURCE_BUSY
In reply to Greg Kroah-HartmanFrom: Xianting Tian <[email protected]>
commit e61bf5c071148c80d091f8e7220b3b9130780ae3 upstream.
Commit 00ab027a3b82 ("RISC-V: Add kernel image sections to the resource tree") marked IORESOURCE_BUSY for reserved memory, which caused resource map failed in subsequent operations of related driver, so remove the IORESOURCE_BUSY flag. In order to prohibit userland mapping reserved memory, mark IORESOURCE_EXCLUSIVE for it.
The code to reproduce the issue,
dts:
mem0: memory@a0000000 {
reg = <0x0 0xa0000000 0 0x1000000>;
no-map;
};
&test {
status = "okay";
memory-region = <&mem0>;
};code:
np = of_parse_phandle(pdev->dev.of_node, "memory-region", 0);
ret = of_address_to_resource(np, 0, &r);
base = devm_ioremap_resource(&pdev->dev, &r);
// base = -EBUSY--- arch/riscv/kernel/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/riscv/kernel/setup.c +2 -2
@@ -189,7 +189,7 @@ static void __init init_resources(void) res = &mem_res[res_idx--]; res->name ="Reserved" ; - res->flags =IORESOURCE_MEM |IORESOURCE_BUSY ; + res->flags =IORESOURCE_MEM |IORESOURCE_EXCLUSIVE ; res->start =__pfn_to_phys (memblock_region_reserved_base_pfn (region)); res->end =__pfn_to_phys (memblock_region_reserved_end_pfn (region)) -1 ;
@@ -214,7 +214,7 @@ static void __init init_resources(void)if (unlikely (memblock_is_nomap (region))) { res->name ="Reserved" ; - res->flags =IORESOURCE_MEM |IORESOURCE_BUSY ; + res->flags =IORESOURCE_MEM |IORESOURCE_EXCLUSIVE ; }else { res->name ="System RAM" ; res->flags =IORESOURCE_SYSTEM_RAM |IORESOURCE_BUSY ;
Greg Kroah-Hartman
maintainerPATCH 7/879 riscv: Initialize thread pointer before calling C functions
In reply to Greg Kroah-HartmanFrom: Alexandre Ghiti <[email protected]>
commit 35d33c76d68dfacc330a8eb477b51cc647c5a847 upstream.
Because of the stack canary feature that reads from the current task structure the stack canary value, the thread pointer register "tp" must be set before calling any C function from head.S: by chance, setup_vm and all the functions that it calls does not seem to be part of the functions where the canary check is done, but in the following commits, some functions will.
--- arch/riscv/kernel/head.S | 1 + 1 file changed, 1 insertion(+)
arch/riscv/kernel/head.S +1 -0
@@ -297,6 +297,7 @@ clear_bss_done: REG_S a0, (a2) /* Initialize page tables and relocate to virtual addresses */ + la tp, init_task la sp, init_thread_union + THREAD_SIZE XIP_FIXUP_OFFSET sp #ifdef CONFIG_BUILTIN_DTB
Greg Kroah-Hartman
maintainerPATCH 8/879 riscv: Fix irq_work when SMP is disabled
In reply to Greg Kroah-HartmanFrom: Samuel Holland <[email protected]>
commit 2273272823db6f67d57761df8116ae32e7f05bed upstream.
irq_work is triggered via an IPI, but the IPI infrastructure is not included in uniprocessor kernels. As a result, irq_work never runs. Fall back to the tick-based irq_work implementation on uniprocessor configurations.
--- arch/riscv/include/asm/irq_work.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/include/asm/irq_work.h +1 -1
@@ -4,7 +4,7 @@static inline bool arch_irq_work_has_interrupt (void ) { -return true; +return IS_ENABLED (CONFIG_SMP ); }extern void arch_irq_work_raise (void );#endif /* _ASM_RISCV_IRQ_WORK_H */
Greg Kroah-Hartman
maintainerPATCH 9/879 riscv: Wire up memfd_secret in UAPI header
In reply to Greg Kroah-HartmanFrom: Tobias Klauser <[email protected]>
commit 02d88b40cb2e9614e0117c3385afdce878f0d377 upstream.
Move the __ARCH_WANT_MEMFD_SECRET define added in commit 7bb7f2ac24a0 ("arch, mm: wire up memfd_secret system call where relevant") to <uapi/asm/unistd.h> so __NR_memfd_secret is defined when including <unistd.h> in userspace.
This allows the memfd_secret selftest to pass on riscv.
--- arch/riscv/include/asm/unistd.h | 1 - arch/riscv/include/uapi/asm/unistd.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-)
arch/riscv/include/asm/unistd.h +0 -1
@@ -9,7 +9,6 @@*/ #define __ARCH_WANT_SYS_CLONE -#define __ARCH_WANT_MEMFD_SECRET#include <uapi/asm/unistd.h>
arch/riscv/include/uapi/asm/unistd.h +1 -0
@@ -21,6 +21,7 @@#endif /* __LP64__ */ #define __ARCH_WANT_SYS_CLONE3 +#define __ARCH_WANT_MEMFD_SECRET#include <asm-generic/unistd.h>
Greg Kroah-Hartman
maintainerPATCH 10/879 riscv: Move alternative length validation into subsection
In reply to Greg Kroah-HartmanFrom: Nathan Chancellor <[email protected]>
commit 61114e734ccb804bc12561ab4020745e02c468c2 upstream.
After commit 49b290e430d3 ("riscv: prevent compressed instructions in alternatives"), builds with LLVM's integrated assembler fail:
In file included from arch/riscv/mm/init.c:10:
In file included from ./include/linux/mm.h:29:
In file included from ./include/linux/pgtable.h:6:
In file included from ./arch/riscv/include/asm/pgtable.h:108:
./arch/riscv/include/asm/tlbflush.h:23:2: error: expected assembly-time absolute expression
ALT_FLUSH_TLB_PAGE(__asm__ __volatile__ ("sfence.vma %0" : : "r" (addr) : "memory"));
^
./arch/riscv/include/asm/errata_list.h:33:5: note: expanded from macro 'ALT_FLUSH_TLB_PAGE'
asm(ALTERNATIVE("sfence.vma %0", "sfence.vma", SIFIVE_VENDOR_ID, \
^
./arch/riscv/include/asm/alternative-macros.h:187:2: note: expanded from macro 'ALTERNATIVE'
_ALTERNATIVE_CFG(old_content, new_content, vendor_id, errata_id, CONFIG_k)
^
./arch/riscv/include/asm/alternative-macros.h:113:2: note: expanded from macro '_ALTERNATIVE_CFG'
__ALTERNATIVE_CFG(old_c, new_c, vendor_id, errata_id, IS_ENABLED(CONFIG_k))
^
./arch/riscv/include/asm/alternative-macros.h:110:2: note: expanded from macro '__ALTERNATIVE_CFG'
ALT_NEW_CONTENT(vendor_id, errata_id, enable, new_c)
^
./arch/riscv/include/asm/alternative-macros.h:99:3: note: expanded from macro 'ALT_NEW_CONTENT'
".org . - (889b - 888b) + (887b - 886b)\n" \
^
<inline asm>:26:6: note: instantiated into assembly here
.org . - (889b - 888b) + (887b - 886b)
^This error happens because LLVM's integrated assembler has a one-pass design, which means it cannot figure out the instruction lengths when the .org directive is outside of the subsection that contains the instructions, which was changed by the .option directives added by the above change.
Move the .org directives before the .previous directive so that these directives are always within the same subsection, which resolves the failures and does not introduce any new issues with GNU as. This was done for arm64 in commit 966a0acce2fc ("arm64/alternatives: move length validation inside the subsection") and commit 22315a2296f4 ("arm64:
alternatives: Move length validation in alternative_{insn, endif}").
While there is no error from the assembly versions of the macro, they appear to have the same problem so just make the same change there as well so that there are no problems in the future.
--- arch/riscv/include/asm/alternative-macros.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/riscv/include/asm/alternative-macros.h +2 -2
@@ -23,9 +23,9 @@ 888 : \new_c 889 : - .previous .org . - (889b - 888b) + (887b - 886b) .org . - (887b - 886b) + (889b - 888b) + .previous .endif .endm
@@ -60,9 +60,9 @@"888 :\n" \ new_c"\n" \"889 :\n" \ -".previous\n" \".org . - (887b - 886b) + (889b - 888b)\n" \".org . - (889b - 888b) + (887b - 886b)\n" \ +".previous\n" \".endif\n" #define __ALTERNATIVE_CFG(old_c, new_c, vendor_id, errata_id, enable) \
Greg Kroah-Hartman
maintainerPATCH 11/879 ALSA: hda/realtek - Add new type for ALC245
In reply to Greg Kroah-HartmanFrom: Kailang Yang <[email protected]>
commit 60571929d06b028800f27b51a7c81de1144944cf upstream.
Add new type for ALC245.
--- sound/pci/hda/patch_realtek.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
sound/pci/hda/patch_realtek.c +8 -2
@@ -3131,6 +3131,7 @@ enum {ALC269_TYPE_ALC257 ,ALC269_TYPE_ALC215 ,ALC269_TYPE_ALC225 , +ALC269_TYPE_ALC245 ,ALC269_TYPE_ALC287 ,ALC269_TYPE_ALC294 , ALC269_TYPE_ALC300,
@@ -3168,6 +3169,7 @@ static int alc269_parse_auto_config(strucase ALC269_TYPE_ALC257 :case ALC269_TYPE_ALC215 :case ALC269_TYPE_ALC225 : +case ALC269_TYPE_ALC245 :case ALC269_TYPE_ALC287 :case ALC269_TYPE_ALC294 :case ALC269_TYPE_ALC300 :
@@ -3695,7 +3697,8 @@ static void alc225_init(struct hda_codechda_nid_t hp_pin =alc_get_hp_pin (spec);bool hp1_pin_sense, hp2_pin_sense; -if (spec->codec_variant !=ALC269_TYPE_ALC287 ) +if (spec->codec_variant !=ALC269_TYPE_ALC287 && + spec->codec_variant !=ALC269_TYPE_ALC245 )/* required only at boot or S3 and S4 resume time */ if (!spec->done_hp_init || is_s3_resume(codec) ||
@@ -10148,7 +10151,10 @@ static int patch_alc269(struct hda_codeccase 0x10ec0245 :case 0x10ec0285 :case 0x10ec0289 : - spec->codec_variant =ALC269_TYPE_ALC215 ; +if (alc_get_coef0 (codec) &0x0010 ) + spec->codec_variant =ALC269_TYPE_ALC245 ; +else + spec->codec_variant =ALC269_TYPE_ALC215 ; spec->shutup = alc225_shutup; spec->init_hook = alc225_init; spec->gen.mixer_nid =0 ;
Greg Kroah-Hartman
maintainerPATCH 12/879 ALSA: hda/realtek: Enable 4-speaker output for Dell XPS 15 9520 laptop
In reply to Greg Kroah-HartmanFrom: Rik van der Kemp <[email protected]>
commit 15dad62f4bdb5dc0f0efde8181d680db9963544c upstream.
The 2022-model XPS 15 appears to use the same 4-speakers-on-ALC289 audio setup as the Dell XPS 15 9510, so requires the same quirk to enable woofer output. Tested on my own 9520.
[ Move the entry to the right position in the SSID order -- tiwai ]
--- sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+)
sound/pci/hda/patch_realtek.c +1 -0
@@ -8957,6 +8957,7 @@ static const struct snd_pci_quirk alc269SND_PCI_QUIRK (0x1028 ,0x0a62 ,"Dell Precision 5560" ,ALC289_FIXUP_DUAL_SPK ),SND_PCI_QUIRK (0x1028 ,0x0a9d ,"Dell Latitude 5430" ,ALC269_FIXUP_DELL4_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1028 ,0x0a9e ,"Dell Latitude 5430" ,ALC269_FIXUP_DELL4_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1028 ,0x0b19 ,"Dell XPS 15 9520" ,ALC289_FIXUP_DUAL_SPK ),SND_PCI_QUIRK (0x1028 ,0x164a ,"Dell" ,ALC293_FIXUP_DELL1_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1028 ,0x164b ,"Dell" ,ALC293_FIXUP_DELL1_MIC_NO_PRESENCE ), SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),
Greg Kroah-Hartman
maintainerPATCH 13/879 ALSA: hda/realtek - Fix microphone noise on ASUS TUF B550M-PLUS
In reply to Greg Kroah-HartmanFrom: Marios Levogiannis <[email protected]>
commit 9bfa7b36343c7d84370bc61c9ed774635b05e4eb upstream.
Set microphone pins 0x18 (rear) and 0x19 (front) to VREF_50 to fix the microphone noise on ASUS TUF B550M-PLUS which uses the ALCS1200A codec. The initial value was VREF_80.
The same issue is also present on Windows using both the default Windows driver and all tested Realtek drivers before version 6.0.9049.1. Comparing Realtek driver 6.0.9049.1 (the first one without the microphone noise) to Realtek driver 6.0.9047.1 (the last one with the microphone noise) revealed that the fix is the result of setting pins 0x18 and 0x19 to VREF_50.
This fix may also work for other boards that have been reported to have the same microphone issue and use the ALC1150 and ALCS1200A codecs, since these codecs are similar and the fix in the Realtek driver on Windows is common for both. However, it is currently enabled only for ASUS TUF B550M-PLUS as this is the only board that could be tested.
--- sound/pci/hda/patch_realtek.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
sound/pci/hda/patch_realtek.c +10 -0
@@ -1981,6 +1981,7 @@ enum {ALC1220_FIXUP_CLEVO_PB51ED_PINS ,ALC887_FIXUP_ASUS_AUDIO ,ALC887_FIXUP_ASUS_HMIC , + ALCS1200A_FIXUP_MIC_VREF, }; static void alc889_fixup_coef(struct hda_codec *codec,
@@ -2526,6 +2527,14 @@ static const struct hda_fixup alc882_fix .chained = true, .chain_id = ALC887_FIXUP_ASUS_AUDIO, }, + [ALCS1200A_FIXUP_MIC_VREF] = { + .type = HDA_FIXUP_PINCTLS, + .v.pins = (const struct hda_pintbl []) { + {0x18 ,PIN_VREF50 },/* rear mic */ + {0x19 ,PIN_VREF50 },/* front mic */ + {} + } + }, };static const struct snd_pci_quirk alc882_fixup_tbl[] = {
@@ -2563,6 +2572,7 @@ static const struct snd_pci_quirk alc882SND_PCI_QUIRK (0x1043 ,0x835f ,"Asus Eee 1601" ,ALC888_FIXUP_EEE1601 ),SND_PCI_QUIRK (0x1043 ,0x84bc ,"ASUS ET2700" ,ALC887_FIXUP_ASUS_BASS ),SND_PCI_QUIRK (0x1043 ,0x8691 ,"ASUS ROG Ranger VIII" ,ALC882_FIXUP_GPIO3 ), +SND_PCI_QUIRK (0x1043 ,0x8797 ,"ASUS TUF B550M-PLUS" ,ALCS1200A_FIXUP_MIC_VREF ),SND_PCI_QUIRK (0x104d ,0x9043 ,"Sony Vaio VGC-LN51JGB" ,ALC882_FIXUP_NO_PRIMARY_HP ),SND_PCI_QUIRK (0x104d ,0x9044 ,"Sony VAIO AiO" ,ALC882_FIXUP_NO_PRIMARY_HP ), SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT),
Greg Kroah-Hartman
maintainerPATCH 14/879 ALSA: usb-audio: Cancel pending work at closing a MIDI substream
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
commit 0125de38122f0f66bf61336158d12a1aabfe6425 upstream.
At closing a USB MIDI output substream, there might be still a pending work, which would eventually access the rawmidi runtime object that is being released. For fixing the race, make sure to cancel the pending work at closing.
--- sound/usb/midi.c | 3 +++ 1 file changed, 3 insertions(+)
sound/usb/midi.c +3 -0
@@ -1145,6 +1145,9 @@ static int snd_usbmidi_output_open(strucstatic int snd_usbmidi_output_close (struct snd_rawmidi_substream *substream) { +struct usbmidi_out_port *port = substream->runtime->private_data; + +cancel_work_sync (&port->ep->work);return substream_open (substream,0 ,0 ); }
Greg Kroah-Hartman
maintainerPATCH 15/879 USB: serial: pl2303: fix type detection for odd device
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit e82e7c6dde91acd6748d672a44dc1980ce239f86 upstream.
At least one pl2303 device has a bcdUSB of 1.0.1 which most likely was was intended as 1.1.
Allow bcdDevice 1.0.1 but interpret it as 1.1.
--- drivers/usb/serial/pl2303.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/usb/serial/pl2303.c +3 -0
@@ -421,6 +421,9 @@ static int pl2303_detect_type(struct usb bcdUSB =le16_to_cpu (desc->bcdUSB);switch (bcdUSB) { +case 0x101 : +/* USB 1.0.1? Let's assume they meant 1.1... */ + fallthrough;case 0x110 :switch (bcdDevice) {case 0x300 :
Greg Kroah-Hartman
maintainerPATCH 16/879 USB: serial: option: add Quectel BG95 modem
In reply to Greg Kroah-HartmanFrom: Carl Yin(殷张成) <[email protected]>
commit 33b7af2f459df453feb0d44628d820c47fefe7a8 upstream.
The BG95 modem has 3 USB configurations that are configurable via the AT command AT+QCFGEXT="usbnet",["ecm"|"modem"|"rmnet"] which make the modem enumerate with the following interfaces, respectively:
"modem": Diag + GNSS + Modem + Modem
"ecm" : Diag + GNSS + Modem + ECM
"rmnet": Diag + GNSS + Modem + QMI
Don't support Full QMI messages (e.g WDS_START_NETWORK_INTERFACE)
A detailed description of the USB configuration for each mode follows:
+QCFGEXT: "usbnet","modem"
--------------------------
T: Bus=01 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#= 3 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=0700 Rev= 0.00 S: Manufacturer=Quectel, Incorporated S: Product=Quectel LPWA Module S: SerialNumber=884328a2 C:* #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 64 Ivl=2ms E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=fe Prot=ff Driver=option E: Ad=85(I) Atr=03(Int.) MxPS= 64 Ivl=2ms E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+QCFGEXT: "usbnet","ecm"
------------------------
T: Bus=01 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#= 4 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=0700 Rev= 0.00 S: Manufacturer=Quectel, Incorporated S: Product=Quectel LPWA Module S: SerialNumber=884328a2 C:* #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA A: FirstIf#= 3 IfCount= 2 Cls=02(comm.) Sub=00 Prot=00 I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 64 Ivl=2ms E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=cdc_ether E: Ad=85(I) Atr=03(Int.) MxPS= 64 Ivl=2ms I: If#= 4 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether I:* If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+QCFGEXT: "usbnet","rmnet"
--------------------------
T: Bus=01 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#= 4 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=0700 Rev= 0.00 S: Manufacturer=Quectel, Incorporated S: Product=Quectel LPWA Module S: SerialNumber=884328a2 C:* #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 64 Ivl=2ms E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan E: Ad=85(I) Atr=03(Int.) MxPS= 64 Ivl=2ms E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
--- drivers/usb/serial/option.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/usb/serial/option.c +2 -0
@@ -1137,6 +1137,8 @@ static const struct usb_device_id option { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM12, 0xff, 0, 0) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, 0x0620, 0xff, 0xff, 0x30) }, /* EM160R-GL */ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, 0x0620, 0xff, 0, 0) }, + { USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, 0x0700, 0xff), /* BG95 */ + .driver_info = RSVD(3) | ZLP }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0xff, 0x30) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0, 0) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0xff, 0x10),
Greg Kroah-Hartman
maintainerPATCH 17/879 USB: new quirk for Dell Gen 2 devices
In reply to Greg Kroah-HartmanFrom: Monish Kumar R <[email protected]>
commit 97fa5887cf283bb75ffff5f6b2c0e71794c02400 upstream.
Add USB_QUIRK_NO_LPM and USB_QUIRK_RESET_RESUME quirks for Dell usb gen 2 device to not fail during enumeration.
Found this bug on own testing
--- drivers/usb/core/quirks.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/usb/core/quirks.c +3 -0
@@ -510,6 +510,9 @@ static const struct usb_device_id usb_qu/* DJI CineSSD */ { USB_DEVICE(0x2ca3, 0x0031), .driver_info = USB_QUIRK_NO_LPM }, + /* DELL USB GEN2 */ + { USB_DEVICE(0x413c, 0xb062), .driver_info = USB_QUIRK_NO_LPM | USB_QUIRK_RESET_RESUME }, + /* VCOM device */ { USB_DEVICE(0x4296, 0x7570), .driver_info = USB_QUIRK_CONFIG_INTF_STRINGS },
Greg Kroah-Hartman
maintainerPATCH 18/879 usb: isp1760: Fix out-of-bounds array access
In reply to Greg Kroah-HartmanFrom: Linus Walleij <[email protected]>
commit 26ae2c942b5702f2e43d36b2a4389cfb7d616b6a upstream.
Running the driver through kasan gives an interesting splat:
BUG: KASAN: global-out-of-bounds in isp1760_register+0x180/0x70c Read of size 20 at addr f1db2e64 by task swapper/0/1 (...) isp1760_register from isp1760_plat_probe+0x1d8/0x220 (...)
This happens because the loop reading the regmap fields for the different ISP1760 variants look like this:
for (i = 0; i < HC_FIELD_MAX; i++) { ... }
Meaning it expects the arrays to be at least HC_FIELD_MAX - 1 long.
However the arrays isp1760_hc_reg_fields[], isp1763_hc_reg_fields[], isp1763_hc_volatile_ranges[] and isp1763_dc_volatile_ranges[] are dynamically sized during compilation.
Fix this by putting an empty assignment to the [HC_FIELD_MAX] and [DC_FIELD_MAX] array member at the end of each array. This will make the array one member longer than it needs to be, but avoids the risk of overwriting whatever is inside [HC_FIELD_MAX - 1] and is simple and intuitive to read. Also add comments explaining what is going on.
--- drivers/usb/isp1760/isp1760-core.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/usb/isp1760/isp1760-core.c +8 -0
@@ -251,6 +251,8 @@ static const struct reg_field isp1760_hc [HW_DM_PULLDOWN] = REG_FIELD(ISP176x_HC_OTG_CTRL, 2, 2), [HW_DP_PULLDOWN] = REG_FIELD(ISP176x_HC_OTG_CTRL, 1, 1), [HW_DP_PULLUP ] =REG_FIELD (ISP176x_HC_OTG_CTRL,0 ,0 ), + /* Make sure the array is sized properly during compilation */ + [HC_FIELD_MAX] = {}, };static const struct reg_field isp1763_hc_reg_fields[] = {
@@ -321,6 +323,8 @@ static const struct reg_field isp1763_hc [HW_DM_PULLDOWN_CLEAR] = REG_FIELD(ISP1763_HC_OTG_CTRL_CLEAR, 2, 2), [HW_DP_PULLDOWN_CLEAR] = REG_FIELD(ISP1763_HC_OTG_CTRL_CLEAR, 1, 1), [HW_DP_PULLUP_CLEAR ] =REG_FIELD (ISP1763_HC_OTG_CTRL_CLEAR ,0 ,0 ), + /* Make sure the array is sized properly during compilation */ + [HC_FIELD_MAX] = {}, };static const struct regmap_range isp1763_hc_volatile_ranges[] = {
@@ -405,6 +409,8 @@ static const struct reg_field isp1761_dc [DC_CHIP_ID_HIGH] = REG_FIELD(ISP176x_DC_CHIPID, 16, 31), [DC_CHIP_ID_LOW] = REG_FIELD(ISP176x_DC_CHIPID, 0, 15), [DC_SCRATCH ] =REG_FIELD (ISP176x_DC_SCRATCH,0 ,15 ), + /* Make sure the array is sized properly during compilation */ + [DC_FIELD_MAX] = {}, };static const struct regmap_range isp1763_dc_volatile_ranges[] = {
@@ -458,6 +464,8 @@ static const struct reg_field isp1763_dc [DC_CHIP_ID_HIGH] = REG_FIELD(ISP1763_DC_CHIPID_HIGH, 0, 15), [DC_CHIP_ID_LOW] = REG_FIELD(ISP1763_DC_CHIPID_LOW, 0, 15), [DC_SCRATCH ] =REG_FIELD (ISP1763_DC_SCRATCH ,0 ,15 ), + /* Make sure the array is sized properly during compilation */ + [DC_FIELD_MAX] = {}, };static const struct regmap_config isp1763_dc_regmap_conf = {
Greg Kroah-Hartman
maintainerPATCH 19/879 usb: dwc3: gadget: Move null pinter check to proper place
In reply to Greg Kroah-HartmanFrom: Albert Wang <[email protected]>
commit 3c5880745b4439ac64eccdb040e37fc1cc4c5406 upstream.
When dwc3_gadget_ep_cleanup_completed_requests() called to dwc3_gadget_giveback() where the dwc3 lock is released, other thread is able to execute. In this situation, usb_ep_disable() gets the chance to clear endpoint descriptor pointer which leds to the null pointer dereference problem. So needs to move the null pointer check to a proper place.
Example call stack:
Thread#1:dwc3_thread_interrupt()
spin_lock
-> dwc3_process_event_buf()
-> dwc3_process_event_entry()
-> dwc3_endpoint_interrupt()
-> dwc3_gadget_endpoint_trbs_complete()
-> dwc3_gadget_ep_cleanup_completed_requests()
...
-> dwc3_giveback()
spin_unlock
Thread#2 executesThread#2:configfs_composite_disconnect()
-> __composite_disconnect()
-> ffs_func_disable()
-> ffs_func_set_alt()
-> ffs_func_eps_disable()
-> usb_ep_disable()
wait for dwc3 spin_lock
Thread#1 released lock
clear endpoint.desc--- drivers/usb/dwc3/gadget.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/usb/dwc3/gadget.c +3 -3
@@ -3380,14 +3380,14 @@ static bool dwc3_gadget_endpoint_trbs_costruct dwc3 *dwc = dep->dwc;bool no_started_trb = true; -if (!dep->endpoint.desc) -return no_started_trb; -dwc3_gadget_ep_cleanup_completed_requests (dep, event, status);if (dep->flags &DWC3_EP_END_TRANSFER_PENDING ) goto out; +if (!dep->endpoint.desc) +return no_started_trb; +if (usb_endpoint_xfer_isoc (dep->endpoint.desc) &&list_empty (&dep->started_list) && (list_empty (&dep->pending_list) || status == -EXDEV ))
Greg Kroah-Hartman
maintainerPATCH 20/879 usb: core: hcd: Add support for deferring roothub registration
In reply to Greg Kroah-HartmanFrom: Kishon Vijay Abraham I <[email protected]>
commit a44623d9279086c89f631201d993aa332f7c9e66 upstream.
It has been observed with certain PCIe USB cards (like Inateck connected to AM64 EVM or J7200 EVM) that as soon as the primary roothub is registered, port status change is handled even before xHC is running leading to cold plug USB devices not detected. For such cases, registering both the root hubs along with the second HCD is required. Add support for deferring roothub registration in usb_add_hcd(), so that both primary and secondary roothubs are registered along with the second HCD.
This patch has been added and reverted earier as it triggered a race in usb device enumeration.
That race is now fixed in 5.16-rc3, and in stable back to 5.4 commit 6cca13de26ee ("usb: hub: Fix locking issues with address0_mutex") commit 6ae6dc22d2d1 ("usb: hub: Fix usb enumeration issue due to address0 race")
--- drivers/usb/core/hcd.c | 29 +++++++++++++++++++++++------ include/linux/usb/hcd.h | 2 ++ 2 files changed, 25 insertions(+), 6 deletions(-)
drivers/usb/core/hcd.c +23 -6
@@ -2816,6 +2816,7 @@ int usb_add_hcd(struct usb_hcd *hcd, {int retval;struct usb_device *rhdev; +struct usb_hcd *shared_hcd;if (!hcd->skip_phy_initialization &&usb_hcd_is_primary_hcd (hcd)) { hcd->phy_roothub =usb_phy_roothub_alloc (hcd->self.sysdev);
@@ -2976,13 +2977,26 @@ int usb_add_hcd(struct usb_hcd *hcd, goto err_hcd_driver_start; } +/* starting here, usbcore will pay attention to the shared HCD roothub */ + shared_hcd = hcd->shared_hcd; +if (!usb_hcd_is_primary_hcd (hcd) && shared_hcd &&HCD_DEFER_RH_REGISTER (shared_hcd)) { + retval =register_root_hub (shared_hcd); +if (retval !=0 ) + goto err_register_root_hub; + +if (shared_hcd->uses_new_polling &&HCD_POLL_RH (shared_hcd)) +usb_hcd_poll_rh_status (shared_hcd); + } +/* starting here, usbcore will pay attention to this root hub */ - retval =register_root_hub (hcd); -if (retval !=0 ) - goto err_register_root_hub; +if (!HCD_DEFER_RH_REGISTER (hcd)) { + retval =register_root_hub (hcd); +if (retval !=0 ) + goto err_register_root_hub; -if (hcd->uses_new_polling &&HCD_POLL_RH (hcd)) -usb_hcd_poll_rh_status (hcd); +if (hcd->uses_new_polling &&HCD_POLL_RH (hcd)) +usb_hcd_poll_rh_status (hcd); + }return retval;
@@ -3020,6 +3034,7 @@ EXPORT_SYMBOL_GPL(usb_add_hcd);void usb_remove_hcd (struct usb_hcd *hcd) {struct usb_device *rhdev = hcd->self.root_hub; +bool rh_registered;dev_info (hcd->self.controller,"remove, state %x\n" , hcd->state);
@@ -3030,6 +3045,7 @@ void usb_remove_hcd(struct usb_hcd *hcd)dev_dbg (hcd->self.controller,"roothub graceful disconnect\n" );spin_lock_irq (&hcd_root_hub_lock); + rh_registered = hcd->rh_registered; hcd->rh_registered =0 ;spin_unlock_irq (&hcd_root_hub_lock);
@@ -3039,7 +3055,8 @@ void usb_remove_hcd(struct usb_hcd *hcd)cancel_work_sync (&hcd->died_work);mutex_lock (&usb_bus_idr_lock); -usb_disconnect (&rhdev);/* Sets rhdev to NULL */ +if (rh_registered) +usb_disconnect (&rhdev);/* Sets rhdev to NULL */ mutex_unlock (&usb_bus_idr_lock);/*
include/linux/usb/hcd.h +2 -0
@@ -124,6 +124,7 @@ struct usb_hcd {#define HCD_FLAG_RH_RUNNING 5/* root hub is running? */ #define HCD_FLAG_DEAD 6/* controller has died? */ #define HCD_FLAG_INTF_AUTHORIZED 7/* authorize interfaces? */ +#define HCD_FLAG_DEFER_RH_REGISTER 8/* Defer roothub registration */ /* The flags can be tested using these macros; they are likely to * be slightly faster than test_bit().
@@ -134,6 +135,7 @@ struct usb_hcd {#define HCD_WAKEUP_PENDING (hcd) ((hcd)->flags & (1U << HCD_FLAG_WAKEUP_PENDING))#define HCD_RH_RUNNING (hcd) ((hcd)->flags & (1U << HCD_FLAG_RH_RUNNING))#define HCD_DEAD (hcd) ((hcd)->flags & (1U << HCD_FLAG_DEAD)) +#define HCD_DEFER_RH_REGISTER (hcd) ((hcd)->flags & (1U << HCD_FLAG_DEFER_RH_REGISTER))/* * Specifies if interfaces are authorized by default
Greg Kroah-Hartman
maintainerPATCH 21/879 fs/ntfs3: provide block_invalidate_folio to fix memory leak
In reply to Greg Kroah-HartmanFrom: Mikulas Patocka <[email protected]>
commit 724bbe49c5e427cb077357d72d240a649f2e4054 upstream.
The ntfs3 filesystem lacks the 'invalidate_folio' method and it causes memory leak. If you write to the filesystem and then unmount it, the cached written data are not freed and they are permanently leaked.
--- fs/ntfs3/inode.c | 1 + 1 file changed, 1 insertion(+)
fs/ntfs3/inode.c +1 -0
@@ -1951,6 +1951,7 @@ const struct address_space_operations nt .direct_IO = ntfs_direct_IO, .bmap = ntfs_bmap, .dirty_folio = block_dirty_folio, + .invalidate_folio = block_invalidate_folio, };const struct address_space_operations ntfs_aops_cmpr = {
Greg Kroah-Hartman
maintainerPATCH 22/879 fs/ntfs3: Update valid size if -EIOCBQUEUED
In reply to Greg Kroah-HartmanFrom: Konstantin Komarov <[email protected]>
commit 52e00ea6b26e45fb8159e3b57cdde8d3f9bdd8e9 upstream.
Update valid size if write is still in I/O queue.
Fixes xfstest generic/240
--- fs/ntfs3/inode.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
fs/ntfs3/inode.c +6 -2
@@ -757,6 +757,7 @@ static ssize_t ntfs_direct_IO(struct kioloff_t vbo = iocb->ki_pos;loff_t end;int wr =iov_iter_rw (iter) &WRITE ; +size_t iter_count =iov_iter_count (iter);loff_t valid;ssize_t ret;
@@ -770,10 +771,13 @@ static ssize_t ntfs_direct_IO(struct kio wr ? ntfs_get_block_direct_IO_W : ntfs_get_block_direct_IO_R); -if (ret <=0 ) +if (ret >0 ) + end = vbo + ret; +else if (wr && ret == -EIOCBQUEUED ) + end = vbo + iter_count; +else goto out; - end = vbo + ret; valid = ni->i_valid;if (wr) {if (end > valid && !S_ISBLK (inode->i_mode)) {
Greg Kroah-Hartman
maintainerPATCH 23/879 fs/ntfs3: Fix fiemap + fix shrink file size (to remove preallocated space)
In reply to Greg Kroah-HartmanFrom: Konstantin Komarov <[email protected]>
commit 3880f2b816a7e4ca889b7e8a42e6c62c5706ed36 upstream.
Two problems:
1. ntfs3_setattr can't truncate preallocated space;
2. if allocated fragment "cross" valid size, then fragment splits into two parts:
- normal part;
- unwritten part (here we must return FIEMAP_EXTENT_LAST).
Before this commit we returned FIEMAP_EXTENT_LAST for whole fragment. Fixes xfstest generic/092
--- fs/ntfs3/file.c | 2 +- fs/ntfs3/frecord.c | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-)
fs/ntfs3/file.c +1 -1
@@ -762,7 +762,7 @@ int ntfs3_setattr(struct user_namespace }inode_dio_wait (inode); -if (attr->ia_size < oldsize) +if (attr->ia_size <= oldsize) err =ntfs_truncate (inode, attr->ia_size);else if (attr->ia_size > oldsize) err =ntfs_extend (inode, attr->ia_size,0 ,NULL );
fs/ntfs3/frecord.c +7 -3
@@ -1964,10 +1964,8 @@ int ni_fiemap(struct ntfs_inode *ni, str vcn += clen; -if (vbo + bytes >= end) { +if (vbo + bytes >= end) bytes = end - vbo; - flags |=FIEMAP_EXTENT_LAST ; - }if (vbo + bytes <= valid) { ;
@@ -1977,6 +1975,9 @@ int ni_fiemap(struct ntfs_inode *ni, str/* vbo < valid && valid < vbo + bytes */ u64 dlen = valid - vbo; +if (vbo + dlen >= end) + flags |=FIEMAP_EXTENT_LAST ; + err =fiemap_fill_next_extent (fieinfo, vbo, lbo, dlen, flags);if (err <0 )
@@ -1995,6 +1996,9 @@ int ni_fiemap(struct ntfs_inode *ni, str flags |=FIEMAP_EXTENT_UNWRITTEN ; } +if (vbo + bytes >= end) + flags |=FIEMAP_EXTENT_LAST ; + err =fiemap_fill_next_extent (fieinfo, vbo, lbo, bytes, flags);if (err <0 )break ;
Greg Kroah-Hartman
maintainerPATCH 24/879 fs/ntfs3: Keep preallocated only if option prealloc enabled
In reply to Greg Kroah-HartmanFrom: Konstantin Komarov <[email protected]>
commit e95113ed4d428219e3395044e29f5713fc446720 upstream.
If size of file was reduced, we still kept allocated blocks. This commit makes ntfs3 work as other fs like btrfs.
--- fs/ntfs3/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ntfs3/file.c +1 -1
@@ -495,7 +495,7 @@ static int ntfs_truncate(struct inode *idown_write (&ni->file.run_lock); err =attr_set_size (ni,ATTR_DATA ,NULL ,0 , &ni->file.run, new_size, - &new_valid, true,NULL ); + &new_valid, ni->mi.sbi->options->prealloc,NULL );up_write (&ni->file.run_lock);if (new_valid < ni->i_valid)
Greg Kroah-Hartman
maintainerPATCH 25/879 fs/ntfs3: Check new size for limits
In reply to Greg Kroah-HartmanFrom: Konstantin Komarov <[email protected]>
commit 114346978cf61de02832cc3cc68432a3de70fb38 upstream.
We must check size before trying to allocate.
Size can be set for example by "ulimit -f".
Fixes xfstest generic/228
--- fs/ntfs3/file.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
fs/ntfs3/file.c +7 -1
@@ -662,7 +662,13 @@ static long ntfs_fallocate(struct file */* * Normal file: Allocate clusters, do not change 'valid' size. */ - err =ntfs_set_size (inode,max (end, i_size)); +loff_t new_size =max (end, i_size); + + err =inode_newsize_ok (inode, new_size); +if (err) + goto out; + + err =ntfs_set_size (inode, new_size);if (err) goto out;
Greg Kroah-Hartman
maintainerPATCH 26/879 fs/ntfs3: In function ntfs_set_acl_ex do not change inode->i_mode if called from function ntfs_init_acl
In reply to Greg Kroah-HartmanFrom: Konstantin Komarov <[email protected]>
commit 9186d472ee780fabf74424756c4c00545166157e upstream.
ntfs_init_acl sets mode. ntfs_init_acl calls ntfs_set_acl_ex. ntfs_set_acl_ex must not change this mode.
Fixes xfstest generic/444
--- fs/ntfs3/xattr.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
fs/ntfs3/xattr.c +7 -6
@@ -541,7 +541,7 @@ struct posix_acl *ntfs_get_acl(struct in static noinline int ntfs_set_acl_ex(struct user_namespace *mnt_userns,struct inode *inode,struct posix_acl *acl, -int type) +int type,bool init_acl) {const char *name;size_t size, name_len;
@@ -554,8 +554,9 @@ static noinline int ntfs_set_acl_ex(struswitch (type) {case ACL_TYPE_ACCESS : -if (acl) { -umode_t mode = inode->i_mode; +/* Do not change i_mode if we are in init_acl */ +if (acl && !init_acl) { +umode_t mode; err =posix_acl_update_mode (mnt_userns, inode, &mode, &acl);
@@ -616,7 +617,7 @@ out:int ntfs_set_acl (struct user_namespace *mnt_userns,struct inode *inode,struct posix_acl *acl,int type) { -return ntfs_set_acl_ex (mnt_userns, inode, acl, type); +return ntfs_set_acl_ex (mnt_userns, inode, acl, type, false); }/*
@@ -636,7 +637,7 @@ int ntfs_init_acl(struct user_namespaceif (default_acl) { err =ntfs_set_acl_ex (mnt_userns, inode, default_acl, -ACL_TYPE_DEFAULT ); +ACL_TYPE_DEFAULT , true);posix_acl_release (default_acl); }else { inode->i_default_acl =NULL ;
@@ -647,7 +648,7 @@ int ntfs_init_acl(struct user_namespaceelse {if (!err) err =ntfs_set_acl_ex (mnt_userns, inode, acl, -ACL_TYPE_ACCESS ); +ACL_TYPE_ACCESS , true);posix_acl_release (acl); }
Greg Kroah-Hartman
maintainerPATCH 27/879 fs/ntfs3: Fix some memory leaks in an error handling path of log_replay()
In reply to Greg Kroah-HartmanFrom: Christophe JAILLET <[email protected]>
commit e589f9b7078e1c0191613cd736f598e81d2390de upstream.
All error handling paths lead to 'out' where many resources are freed.
Do it as well here instead of a direct return, otherwise 'log', 'ra' and 'log->one_page_buf' (at least) will leak.
--- fs/ntfs3/fslog.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
fs/ntfs3/fslog.c +4 -2
@@ -4085,8 +4085,10 @@ process_log:if (client ==LFS_NO_CLIENT_LE ) {/* Insert "NTFS" client LogFile. */ client = ra->client_idx[0 ]; -if (client ==LFS_NO_CLIENT_LE ) -return -EINVAL ; +if (client ==LFS_NO_CLIENT_LE ) { + err = -EINVAL ; + goto out; + } t16 =le16_to_cpu (client); cr = ca + t16;
Greg Kroah-Hartman
maintainerPATCH 28/879 fs/ntfs3: Update i_ctime when xattr is added
In reply to Greg Kroah-HartmanFrom: Konstantin Komarov <[email protected]>
commit 2d44667c306e7806848a3478820f87343feb5421 upstream.
Ctime wasn't updated after setfacl command.
This commit fixes xfstest generic/307
--- fs/ntfs3/xattr.c | 3 +++ 1 file changed, 3 insertions(+)
fs/ntfs3/xattr.c +3 -0
@@ -902,6 +902,9 @@ set_new_fa: err =ntfs_set_ea (inode, name, name_len, value, size, flags); out: + inode->i_ctime =current_time (inode); +mark_inode_dirty (inode); +return err; }
Greg Kroah-Hartman
maintainerPATCH 29/879 fs/ntfs3: Restore ntfs_xattr_get_acl and ntfs_xattr_set_acl functions
In reply to Greg Kroah-HartmanFrom: Konstantin Komarov <[email protected]>
commit 87e21c99bad763524c953ff4d1a61ee19038ddc2 upstream.
Apparently we need to maintain these functions with ntfs_get_acl_ex and ntfs_set_acl_ex.
This commit fixes xfstest generic/099
--- fs/ntfs3/xattr.c | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 95 insertions(+), 1 deletion(-)
fs/ntfs3/xattr.c +95 -1
@@ -112,7 +112,7 @@ static int ntfs_read_ea(struct ntfs_inodreturn -ENOMEM ;if (!size) { - ; +/* EA info persists, but xattr is empty. Looks like EA problem. */ }else if (attr_ea->non_res) {struct runs_tree run;
@@ -620,6 +620,67 @@ int ntfs_set_acl(struct user_namespace *return ntfs_set_acl_ex (mnt_userns, inode, acl, type, false); } +static int ntfs_xattr_get_acl (struct user_namespace *mnt_userns, +struct inode *inode,int type,void *buffer, +size_t size) +{ +struct posix_acl *acl; +int err; + +if (!(inode->i_sb->s_flags &SB_POSIXACL )) { +ntfs_inode_warn (inode,"add mount option \"acl\" to use acl" ); +return -EOPNOTSUPP ; + } + + acl =ntfs_get_acl (inode, type, false); +if (IS_ERR (acl)) +return PTR_ERR (acl); + +if (!acl) +return -ENODATA ; + + err =posix_acl_to_xattr (mnt_userns, acl, buffer, size); +posix_acl_release (acl); + +return err; +} + +static int ntfs_xattr_set_acl (struct user_namespace *mnt_userns, +struct inode *inode,int type,const void *value, +size_t size) +{ +struct posix_acl *acl; +int err; + +if (!(inode->i_sb->s_flags &SB_POSIXACL )) { +ntfs_inode_warn (inode,"add mount option \"acl\" to use acl" ); +return -EOPNOTSUPP ; + } + +if (!inode_owner_or_capable (mnt_userns, inode)) +return -EPERM ; + +if (!value) { + acl =NULL ; + }else { + acl =posix_acl_from_xattr (mnt_userns, value, size); +if (IS_ERR (acl)) +return PTR_ERR (acl); + +if (acl) { + err =posix_acl_valid (mnt_userns, acl); +if (err) + goto release_and_out; + } + } + + err =ntfs_set_acl (mnt_userns, inode, acl, type); + +release_and_out: +posix_acl_release (acl); +return err; +} +/* * ntfs_init_acl - Initialize the ACLs of a new inode. *
@@ -786,6 +847,23 @@ static int ntfs_getxattr(const struct xa goto out; } +#ifdef CONFIG_NTFS3_FS_POSIX_ACL +if ((name_len ==sizeof (XATTR_NAME_POSIX_ACL_ACCESS ) -1 && + !memcmp (name,XATTR_NAME_POSIX_ACL_ACCESS , +sizeof (XATTR_NAME_POSIX_ACL_ACCESS ))) || + (name_len ==sizeof (XATTR_NAME_POSIX_ACL_DEFAULT ) -1 && + !memcmp (name,XATTR_NAME_POSIX_ACL_DEFAULT , +sizeof (XATTR_NAME_POSIX_ACL_DEFAULT )))) { +/* TODO: init_user_ns? */ + err =ntfs_xattr_get_acl ( + &init_user_ns, inode, + name_len ==sizeof (XATTR_NAME_POSIX_ACL_ACCESS ) -1 + ?ACL_TYPE_ACCESS + :ACL_TYPE_DEFAULT , + buffer, size); + goto out; + } +#endif /* Deal with NTFS extended attribute. */ err =ntfs_get_ea (inode, name, name_len, buffer, size,NULL );
@@ -898,6 +976,22 @@ set_new_fa: goto out; } +#ifdef CONFIG_NTFS3_FS_POSIX_ACL +if ((name_len ==sizeof (XATTR_NAME_POSIX_ACL_ACCESS ) -1 && + !memcmp (name,XATTR_NAME_POSIX_ACL_ACCESS , +sizeof (XATTR_NAME_POSIX_ACL_ACCESS ))) || + (name_len ==sizeof (XATTR_NAME_POSIX_ACL_DEFAULT ) -1 && + !memcmp (name,XATTR_NAME_POSIX_ACL_DEFAULT , +sizeof (XATTR_NAME_POSIX_ACL_DEFAULT )))) { + err =ntfs_xattr_set_acl ( + mnt_userns, inode, + name_len ==sizeof (XATTR_NAME_POSIX_ACL_ACCESS ) -1 + ?ACL_TYPE_ACCESS + :ACL_TYPE_DEFAULT , + value, size); + goto out; + } +#endif /* Deal with NTFS extended attribute. */ err =ntfs_set_ea (inode, name, name_len, value, size, flags);
Greg Kroah-Hartman
maintainerPATCH 30/879 cifs: dont call cifs_dfs_query_info_nonascii_quirk() if nodfs was set
In reply to Greg Kroah-HartmanFrom: Enzo Matsumiya <[email protected]>
commit 421ef3d56513b2ff02e563623688cb6ab4977c4f upstream.
Also return EOPNOTSUPP if path is remote but nodfs was set.
--- fs/cifs/connect.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)
fs/cifs/connect.c +12 -4
@@ -3432,6 +3432,7 @@ static int is_path_remote(struct mount_cstruct cifs_tcon *tcon = mnt_ctx->tcon;struct smb3_fs_context *ctx = mnt_ctx->fs_ctx;char *full_path; +bool nodfs = cifs_sb->mnt_cifs_flags &CIFS_MOUNT_NO_DFS ;if (!server->ops->is_path_accessible)return -EOPNOTSUPP ;
@@ -3449,14 +3450,20 @@ static int is_path_remote(struct mount_c rc = server->ops->is_path_accessible (xid, tcon, cifs_sb, full_path);#ifdef CONFIG_CIFS_DFS_UPCALL +if (nodfs) { +if (rc == -EREMOTE ) + rc = -EOPNOTSUPP ; + goto out; + } + +/* path *might* exist with non-ASCII characters in DFS root +* try again with full path (only if nodfs is not set) */ if (rc == -ENOENT &&is_tcon_dfs (tcon)) rc =cifs_dfs_query_info_nonascii_quirk (xid, tcon, cifs_sb, full_path);#endif -if (rc !=0 && rc != -EREMOTE ) { -kfree (full_path); -return rc; - } +if (rc !=0 && rc != -EREMOTE ) + goto out;if (rc != -EREMOTE ) { rc = cifs_are_all_path_components_accessible(server, xid, tcon,
@@ -3468,6 +3475,7 @@ static int is_path_remote(struct mount_c } } +out:kfree (full_path);return rc; }
Greg Kroah-Hartman
maintainerPATCH 31/879 cifs: fix ntlmssp on old servers
In reply to Greg Kroah-HartmanFrom: Paulo Alcantara <[email protected]>
commit de3a9e943ddecba8d2ac1dde4cfff538e5c6a7b9 upstream.
Some older servers seem to require the workstation name during ntlmssp to be at most 15 chars (RFC1001 name length), so truncate it before sending when using insecure dialects.
--- fs/cifs/cifsglob.h | 15 ++++++++++++++- fs/cifs/connect.c | 22 ++++------------------ fs/cifs/fs_context.c | 29 ++++------------------------- fs/cifs/fs_context.h | 2 +- fs/cifs/misc.c | 1 - fs/cifs/sess.c | 6 +++--- 6 files changed, 26 insertions(+), 49 deletions(-)
fs/cifs/cifsglob.h +14 -1
@@ -944,7 +944,7 @@ struct cifs_ses {and after mount option parsing we fill it */ char *domainName;char *password; -char *workstation_name; +char workstation_name[CIFS_MAX_WORKSTATION_LEN ];struct session_key auth_key;struct ntlmssp_auth *ntlmssp;/* ciphertext, flags, server challenge */ enum securityEnum sectype;/* what security flavor was specified? */
@@ -1979,4 +1979,17 @@ static inline bool cifs_is_referral_serv return is_tcon_dfs(tcon) || (ref && (ref->flags & DFSREF_REFERRAL_SERVER)); } +static inline size_t ntlmssp_workstation_name_size (const struct cifs_ses *ses) +{ +if (WARN_ON_ONCE (!ses || !ses->server)) +return 0 ; +/* +* Make workstation name no more than 15 chars when using insecure dialects as some legacy +* servers do require it during NTLMSSP. +*/ +if (ses->server->dialect <=SMB20_PROT_ID ) +return min_t (size_t,sizeof (ses->workstation_name),RFC1001_NAME_LEN_WITH_NULL ); +return sizeof (ses->workstation_name); +} +#endif /* _CIFS_GLOB_H */
fs/cifs/connect.c +4 -18
@@ -2037,18 +2037,7 @@ cifs_set_cifscreds(struct smb3_fs_contex } } - ctx->workstation_name =kstrdup (ses->workstation_name,GFP_KERNEL ); -if (!ctx->workstation_name) { -cifs_dbg (FYI ,"Unable to allocate memory for workstation_name\n" ); - rc = -ENOMEM ; -kfree (ctx->username); - ctx->username =NULL ; -kfree_sensitive (ctx->password); - ctx->password =NULL ; -kfree (ctx->domainname); - ctx->domainname =NULL ; - goto out_key_put; - } +strscpy (ctx->workstation_name, ses->workstation_name,sizeof (ctx->workstation_name)); out_key_put:up_read (&key->sem);
@@ -2157,12 +2146,9 @@ cifs_get_smb_ses(struct TCP_Server_Infoif (!ses->domainName) goto get_ses_fail; } -if (ctx->workstation_name) { - ses->workstation_name =kstrdup (ctx->workstation_name, -GFP_KERNEL ); -if (!ses->workstation_name) - goto get_ses_fail; - } + +strscpy (ses->workstation_name, ctx->workstation_name,sizeof (ses->workstation_name)); +if (ctx->domainauto) ses->domainAuto = ctx->domainauto; ses->cred_uid = ctx->cred_uid;
fs/cifs/fs_context.c +4 -25
@@ -312,7 +312,6 @@ smb3_fs_context_dup(struct smb3_fs_conte new_ctx->password =NULL ; new_ctx->server_hostname =NULL ; new_ctx->domainname =NULL ; - new_ctx->workstation_name =NULL ; new_ctx->UNC =NULL ; new_ctx->source =NULL ; new_ctx->iocharset =NULL ;
@@ -327,7 +326,6 @@ smb3_fs_context_dup(struct smb3_fs_conteDUP_CTX_STR (UNC );DUP_CTX_STR (source);DUP_CTX_STR (domainname); -DUP_CTX_STR (workstation_name);DUP_CTX_STR (nodename);DUP_CTX_STR (iocharset);
@@ -766,8 +764,7 @@ static int smb3_verify_reconfigure_ctx(scifs_errorf (fc,"can not change domainname during remount\n" );return -EINVAL ; } -if (new_ctx->workstation_name && - (!old_ctx->workstation_name ||strcmp (new_ctx->workstation_name, old_ctx->workstation_name))) { +if (strcmp (new_ctx->workstation_name, old_ctx->workstation_name)) {cifs_errorf (fc,"can not change workstation_name during remount\n" );return -EINVAL ; }
@@ -814,7 +811,6 @@ static int smb3_reconfigure(struct fs_coSTEAL_STRING (cifs_sb, ctx, username);STEAL_STRING (cifs_sb, ctx, password);STEAL_STRING (cifs_sb, ctx, domainname); -STEAL_STRING (cifs_sb, ctx, workstation_name);STEAL_STRING (cifs_sb, ctx, nodename);STEAL_STRING (cifs_sb, ctx, iocharset);
@@ -1467,22 +1463,15 @@ static int smb3_fs_context_parse_param(sint smb3_init_fs_context (struct fs_context *fc) { -int rc;struct smb3_fs_context *ctx;char *nodename =utsname ()->nodename;int i; ctx =kzalloc (sizeof (struct smb3_fs_context ),GFP_KERNEL ); -if (unlikely (!ctx)) { - rc = -ENOMEM ; - goto err_exit; - } +if (unlikely (!ctx)) +return -ENOMEM ; - ctx->workstation_name =kstrdup (nodename,GFP_KERNEL ); -if (unlikely (!ctx->workstation_name)) { - rc = -ENOMEM ; - goto err_exit; - } +strscpy (ctx->workstation_name, nodename,sizeof (ctx->workstation_name));/* * does not have to be perfect mapping since field is
@@ -1555,14 +1544,6 @@ int smb3_init_fs_context(struct fs_conte fc->fs_private = ctx; fc->ops = &smb3_fs_context_ops;return 0 ; - -err_exit: -if (ctx) { -kfree (ctx->workstation_name); -kfree (ctx); - } - -return rc; }void
@@ -1588,8 +1569,6 @@ smb3_cleanup_fs_context_contents(struct ctx->source =NULL ;kfree (ctx->domainname); ctx->domainname =NULL ; -kfree (ctx->workstation_name); - ctx->workstation_name =NULL ;kfree (ctx->nodename); ctx->nodename =NULL ;kfree (ctx->iocharset);
fs/cifs/fs_context.h +1 -1
@@ -170,7 +170,7 @@ struct smb3_fs_context {char *server_hostname;char *UNC ;char *nodename; -char *workstation_name; +char workstation_name[CIFS_MAX_WORKSTATION_LEN ];char *iocharset;/* local code page for mapping to and from Unicode */ char source_rfc1001_name[RFC1001_NAME_LEN_WITH_NULL ];/* clnt nb name */ char target_rfc1001_name[RFC1001_NAME_LEN_WITH_NULL ];/* srvr nb name */
fs/cifs/misc.c +0 -1
@@ -95,7 +95,6 @@ sesInfoFree(struct cifs_ses *buf_to_freekfree_sensitive (buf_to_free->password);kfree (buf_to_free->user_name);kfree (buf_to_free->domainName); -kfree (buf_to_free->workstation_name);kfree_sensitive (buf_to_free->auth_key.response);kfree (buf_to_free->iface_list);kfree_sensitive (buf_to_free);
fs/cifs/sess.c +3 -3
@@ -714,9 +714,9 @@ static int size_of_ntlmssp_blob(struct celse sz +=sizeof (__le16); -if (ses->workstation_name) +if (ses->workstation_name[0 ]) sz +=sizeof (__le16) *strnlen (ses->workstation_name, -CIFS_MAX_WORKSTATION_LEN ); +ntlmssp_workstation_name_size (ses));else sz +=sizeof (__le16);
@@ -960,7 +960,7 @@ int build_ntlmssp_auth_blob(unsigned chacifs_security_buffer_from_str (&sec_blob->WorkstationName, ses->workstation_name, -CIFS_MAX_WORKSTATION_LEN , +ntlmssp_workstation_name_size (ses), *pbuffer, &tmp, nls_cp);
Greg Kroah-Hartman
maintainerPATCH 32/879 cifs: fix potential double free during failed mount
In reply to Greg Kroah-HartmanFrom: Ronnie Sahlberg <[email protected]>
commit 8378a51e3f8140f60901fb27208cc7a6e47047b5 upstream.
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=2088799
--- fs/cifs/cifsfs.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
fs/cifs/cifsfs.c +6 -4
@@ -836,7 +836,7 @@ cifs_smb3_do_mount(struct file_system_ty int flags, struct smb3_fs_context *old_ctx) { int rc; -struct super_block *sb; +struct super_block *sb =NULL ;struct cifs_sb_info *cifs_sb =NULL ;struct cifs_mnt_data mnt_data;struct dentry *root;
@@ -932,9 +932,11 @@ out_super:return root; out:if (cifs_sb) { -kfree (cifs_sb->prepath); -smb3_cleanup_fs_context (cifs_sb->ctx); -kfree (cifs_sb); +if (!sb ||IS_ERR (sb)) {/* otherwise kill_sb will handle */ +kfree (cifs_sb->prepath); +smb3_cleanup_fs_context (cifs_sb->ctx); +kfree (cifs_sb); + } }return root; }
Greg Kroah-Hartman
maintainerPATCH 33/879 cifs: when extending a file with falloc we should make files not-sparse
In reply to Greg Kroah-HartmanFrom: Ronnie Sahlberg <[email protected]>
commit f66f8b94e7f2f4ac9fffe710be231ca8f25c5057 upstream.
as this is the only way to make sure the region is allocated. Fix the conditional that was wrong and only tried to make already non-sparse files non-sparse.
--- fs/cifs/smb2ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/cifs/smb2ops.c +1 -1
@@ -3837,7 +3837,7 @@ static long smb3_simple_falloc(struct fiif (rc) goto out; -if ((cifsi->cifsAttrs &FILE_ATTRIBUTE_SPARSE_FILE ) ==0 ) +if (cifsi->cifsAttrs &FILE_ATTRIBUTE_SPARSE_FILE )smb2_set_sparse (xid, tcon, cfile, inode, false); eof =cpu_to_le64 (off + len);
Greg Kroah-Hartman
maintainerPATCH 34/879 xhci: Set HCD flag to defer primary roothub registration
In reply to Greg Kroah-HartmanFrom: Kishon Vijay Abraham I <[email protected]>
commit b7a4f9b5d0e4b6dd937678c546c0b322dd1a4054 upstream.
Set "HCD_FLAG_DEFER_RH_REGISTER" to hcd->flags in xhci_run() to defer registering primary roothub in usb_add_hcd() if xhci has two roothubs. This will make sure both primary roothub and secondary roothub will be registered along with the second HCD.
This is required for cold plugged USB devices to be detected in certain PCIe USB cards (like Inateck USB card connected to AM64 EVM or J7200 EVM).
This patch has been added and reverted earier as it triggered a race in usb device enumeration.
That race is now fixed in 5.16-rc3, and in stable back to 5.4 commit 6cca13de26ee ("usb: hub: Fix locking issues with address0_mutex") commit 6ae6dc22d2d1 ("usb: hub: Fix usb enumeration issue due to address0 race")
[minor rebase change, and commit message update -Mathias]
--- drivers/usb/host/xhci.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/usb/host/xhci.c +2 -0
@@ -696,6 +696,8 @@ int xhci_run(struct usb_hcd *hcd)xhci_dbg_trace (xhci, trace_xhci_dbg_init,"Finished xhci_run for USB2 roothub" ); +set_bit (HCD_FLAG_DEFER_RH_REGISTER , &hcd->flags); +xhci_create_dbc_dev (xhci);xhci_debugfs_init (xhci);
Greg Kroah-Hartman
maintainerPATCH 35/879 xhci: Allow host runtime PM as default for Intel Alder Lake N xHCI
In reply to Greg Kroah-HartmanFrom: Mathias Nyman <[email protected]>
commit 74f55a62c4c354f43a6d75f77dd184c4f57b9a26 upstream.
Alder Lake N TCSS xHCI needs to be runtime suspended whenever possible to allow the TCSS hardware block to enter D3 and thus save energy
--- drivers/usb/host/xhci-pci.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/usb/host/xhci-pci.c +2 -0
@@ -59,6 +59,7 @@#define PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI 0x9a13#define PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI 0x1138#define PCI_DEVICE_ID_INTEL_ALDER_LAKE_XHCI 0x461e +#define PCI_DEVICE_ID_INTEL_ALDER_LAKE_N_XHCI 0x464e#define PCI_DEVICE_ID_INTEL_ALDER_LAKE_PCH_XHCI 0x51ed#define PCI_DEVICE_ID_AMD_RENOIR_XHCI 0x1639
@@ -268,6 +269,7 @@ static void xhci_pci_quirks(struct devic pdev->device ==PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI || pdev->device ==PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI || pdev->device ==PCI_DEVICE_ID_INTEL_ALDER_LAKE_XHCI || + pdev->device ==PCI_DEVICE_ID_INTEL_ALDER_LAKE_N_XHCI || pdev->device == PCI_DEVICE_ID_INTEL_ALDER_LAKE_PCH_XHCI)) xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW;
Greg Kroah-Hartman
maintainerPATCH 36/879 platform/x86: intel-hid: fix _DSM function index handling
In reply to Greg Kroah-HartmanFrom: Michael Niewöhner <[email protected]>
commit 1620c80bba53af8c547bab34a1d3bc58319fe608 upstream.
intel_hid_dsm_fn_mask is a bit mask containing one bit for each function index. Fix the function index check in intel_hid_evaluate_method accordingly, which was missed in commit 97ab4516205e ("platform/x86:
intel-hid: fix _DSM function index handling").
--- drivers/platform/x86/intel/hid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/intel/hid.c +1 -1
@@ -238,7 +238,7 @@ static bool intel_hid_evaluate_method(ac method_name = (char *)intel_hid_dsm_fn_to_method[fn_index]; -if (!(intel_hid_dsm_fn_mask & fn_index)) +if (!(intel_hid_dsm_fn_mask &BIT (fn_index))) goto skip_dsm_eval; obj = acpi_evaluate_dsm_typed(handle, &intel_dsm_guid,
Greg Kroah-Hartman
maintainerPATCH 37/879 x86/MCE/AMD: Fix memory leak when threshold_create_bank() fails
In reply to Greg Kroah-HartmanFrom: Ammar Faizi <[email protected]>
commit e5f28623ceb103e13fc3d7bd45edf9818b227fd0 upstream.
In mce_threshold_create_device(), if threshold_create_bank() fails, the previously allocated threshold banks array @bp will be leaked because the call to mce_threshold_remove_device() will not free it.
This happens because mce_threshold_remove_device() fetches the pointer through the threshold_banks per-CPU variable but bp is written there only after the bank creation is successful, and not before, when threshold_create_bank() fails.
Add a helper which unwinds all the bank creation work previously done and pass into it the previously allocated threshold banks array for freeing.
[ bp: Massage. ]
--- arch/x86/kernel/cpu/mce/amd.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-)
arch/x86/kernel/cpu/mce/amd.c +19 -13
@@ -1294,10 +1294,23 @@ out_free:kfree (bank); } +static void __threshold_remove_device (struct threshold_bank **bp) +{ +unsigned int bank, numbanks =this_cpu_read (mce_num_banks); + +for (bank =0 ; bank < numbanks; bank++) { +if (!bp[bank]) +continue ; + +threshold_remove_bank (bp[bank]); + bp[bank] =NULL ; + } +kfree (bp); +} +int mce_threshold_remove_device (unsigned int cpu) {struct threshold_bank **bp =this_cpu_read (threshold_banks); -unsigned int bank, numbanks =this_cpu_read (mce_num_banks);if (!bp)return 0 ;
@@ -1308,13 +1321,7 @@ int mce_threshold_remove_device(unsigned*/ this_cpu_write (threshold_banks,NULL ); -for (bank =0 ; bank < numbanks; bank++) { -if (bp[bank]) { -threshold_remove_bank (bp[bank]); - bp[bank] =NULL ; - } - } -kfree (bp); +__threshold_remove_device (bp);return 0 ; }
@@ -1351,15 +1358,14 @@ int mce_threshold_create_device(unsignedif (!(this_cpu_read (bank_map) & (1 << bank)))continue ; err =threshold_create_bank (bp, cpu, bank); -if (err) - goto out_err; +if (err) { +__threshold_remove_device (bp); +return err; + } }this_cpu_write (threshold_banks, bp);if (thresholding_irq_en) mce_threshold_vector = amd_threshold_interrupt;return 0 ; -out_err: -mce_threshold_remove_device (cpu); -return err; }
Greg Kroah-Hartman
maintainerPATCH 38/879 perf/x86/intel: Fix event constraints for ICL
In reply to Greg Kroah-HartmanFrom: Kan Liang <[email protected]>
commit 86dca369075b3e310c3c0adb0f81e513c562b5e4 upstream.
According to the latest event list, the event encoding 0x55 INST_DECODED.DECODERS and 0x56 UOPS_DECODED.DEC0 are only available on the first 4 counters. Add them into the event constraints table.
--- arch/x86/events/intel/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/events/intel/core.c +1 -1
@@ -276,7 +276,7 @@ static struct event_constraint intel_iclINTEL_EVENT_CONSTRAINT_RANGE (0x03 ,0x0a ,0xf ),INTEL_EVENT_CONSTRAINT_RANGE (0x1f ,0x28 ,0xf ),INTEL_EVENT_CONSTRAINT (0x32 ,0xf ),/* SW_PREFETCH_ACCESS.* */ -INTEL_EVENT_CONSTRAINT_RANGE (0x48 ,0x54 ,0xf ), +INTEL_EVENT_CONSTRAINT_RANGE (0x48 ,0x56 ,0xf ),INTEL_EVENT_CONSTRAINT_RANGE (0x60 ,0x8b ,0xf ),INTEL_UEVENT_CONSTRAINT (0x04a3 ,0xff ),/* CYCLE_ACTIVITY.STALLS_TOTAL */ INTEL_UEVENT_CONSTRAINT(0x10a3, 0xff), /* CYCLE_ACTIVITY.CYCLES_MEM_ANY */
Greg Kroah-Hartman
maintainerPATCH 39/879 x86/kexec: fix memory leak of elf header buffer
In reply to Greg Kroah-HartmanFrom: Baoquan He <[email protected]>
commit b3e34a47f98974d0844444c5121aaff123004e57 upstream.
This is reported by kmemleak detector:
unreferenced object 0xffffc900002a9000 (size 4096):
comm "kexec", pid 14950, jiffies 4295110793 (age 373.951s) hex dump (first 32 bytes):
7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 .ELF............
04 00 3e 00 01 00 00 00 00 00 00 00 00 00 00 00 ..>.............
backtrace:
[<0000000016a8ef9f>] __vmalloc_node_range+0x101/0x170
[<000000002b66b6c0>] __vmalloc_node+0xb4/0x160
[<00000000ad40107d>] crash_prepare_elf64_headers+0x8e/0xcd0
[<0000000019afff23>] crash_load_segments+0x260/0x470
[<0000000019ebe95c>] bzImage64_load+0x814/0xad0
[<0000000093e16b05>] arch_kexec_kernel_image_load+0x1be/0x2a0
[<000000009ef2fc88>] kimage_file_alloc_init+0x2ec/0x5a0
[<0000000038f5a97a>] __do_sys_kexec_file_load+0x28d/0x530
[<0000000087c19992>] do_syscall_64+0x3b/0x90
[<0000000066e063a4>] entry_SYSCALL_64_after_hwframe+0x44/0xaeIn crash_prepare_elf64_headers(), a buffer is allocated via vmalloc() to store elf headers. While it's not freed back to system correctly when kdump kernel is reloaded or unloaded. Then memory leak is caused. Fix it by introducing x86 specific function arch_kimage_file_post_load_cleanup(), and freeing the buffer there.
And also remove the incorrect elf header buffer freeing code. Before calling arch specific kexec_file loading function, the image instance has been initialized. So 'image->elf_headers' must be NULL. It doesn't make sense to free the elf header buffer in the place.
Three different people have reported three bugs about the memory leak on x86_64 inside Redhat.
--- arch/x86/kernel/machine_kexec_64.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
arch/x86/kernel/machine_kexec_64.c +9 -3
@@ -376,9 +376,6 @@ void machine_kexec(struct kimage *image)#ifdef CONFIG_KEXEC_FILE void *arch_kexec_kernel_image_load (struct kimage *image) { -vfree (image->elf_headers); - image->elf_headers =NULL ; -if (!image->fops || !image->fops->load)return ERR_PTR (-ENOEXEC );
@@ -514,6 +511,15 @@ overflow: (int)ELF64_R_TYPE(rel[i].r_info), value);return -ENOEXEC ; } + +int arch_kimage_file_post_load_cleanup (struct kimage *image) +{ +vfree (image->elf_headers); + image->elf_headers =NULL ; + image->elf_headers_sz =0 ; + +return kexec_image_post_load_cleanup_default (image); +}#endif /* CONFIG_KEXEC_FILE */ static int
Greg Kroah-Hartman
maintainerPATCH 40/879 x86/sgx: Set active memcg prior to shmem allocation
In reply to Greg Kroah-HartmanFrom: Kristen Carlson Accardi <[email protected]>
commit 0c9782e204d3cc5625b9e8bf4e8625d38dfe0139 upstream.
When the system runs out of enclave memory, SGX can reclaim EPC pages by swapping to normal RAM. These backing pages are allocated via a per-enclave shared memory area. Since SGX allows unlimited over commit on EPC memory, the reclaimer thread can allocate a large number of backing RAM pages in response to EPC memory pressure.
When the shared memory backing RAM allocation occurs during the reclaimer thread context, the shared memory is charged to the root memory control group, and the shmem usage of the enclave is not properly accounted for, making cgroups ineffective at limiting the amount of RAM an enclave can consume.
For example, when using a cgroup to launch a set of test enclaves, the kernel does not properly account for 50% - 75% of shmem page allocations on average. In the worst case, when nearly all allocations occur during the reclaimer thread, the kernel accounts less than a percent of the amount of shmem used by the enclave's cgroup to the correct cgroup.
SGX stores a list of mm_structs that are associated with an enclave. Pick one of them during reclaim and charge that mm's memcg with the shmem allocation. The one that gets picked is arbitrary, but this list almost always only has one mm. The cases where there is more than one mm with different memcg's are not worth considering.
Create a new function - sgx_encl_alloc_backing(). This function is used whenever a new backing storage page needs to be allocated. Previously the same function was used for page allocation as well as retrieving a previously allocated page. Prior to backing page allocation, if there is a mm_struct associated with the enclave that is requesting the allocation, it is set as the active memory control group.
[ dhansen: - fix merge conflict with ELDU fixes
- check against actual ksgxd_tsk, not ->mm ]
--- arch/x86/kernel/cpu/sgx/encl.c | 105 ++++++++++++++++++++++++++++++++++++++++- arch/x86/kernel/cpu/sgx/encl.h | 7 +- arch/x86/kernel/cpu/sgx/main.c | 9 ++- 3 files changed, 115 insertions(+), 6 deletions(-)
arch/x86/kernel/cpu/sgx/encl.c +103 -2
@@ -152,7 +152,7 @@ static int __sgx_encl_eldu(struct sgx_en page_pcmd_off =sgx_encl_get_backing_page_pcmd_offset (encl, page_index); - ret =sgx_encl_get_backing (encl, page_index, &b); + ret =sgx_encl_lookup_backing (encl, page_index, &b);if (ret)return ret;
@@ -718,7 +718,7 @@ static struct page *sgx_encl_get_backing* 0 on success, * -errno otherwise. */ -int sgx_encl_get_backing (struct sgx_encl *encl,unsigned long page_index, +static int sgx_encl_get_backing (struct sgx_encl *encl,unsigned long page_index,struct sgx_backing *backing) {pgoff_t page_pcmd_off =sgx_encl_get_backing_page_pcmd_offset (encl, page_index);
@@ -743,6 +743,107 @@ int sgx_encl_get_backing(struct sgx_enclreturn 0 ; } +/* +* When called from ksgxd, returns the mem_cgroup of a struct mm stored +* in the enclave's mm_list. When not called from ksgxd, just returns +* the mem_cgroup of the current task. +*/ +static struct mem_cgroup *sgx_encl_get_mem_cgroup (struct sgx_encl *encl) +{ +struct mem_cgroup *memcg =NULL ; +struct sgx_encl_mm *encl_mm; +int idx; + +/* +* If called from normal task context, return the mem_cgroup +* of the current task's mm. The remainder of the handling is for +* ksgxd. +*/ +if (!current_is_ksgxd ()) +return get_mem_cgroup_from_mm (current->mm); + +/* +* Search the enclave's mm_list to find an mm associated with +* this enclave to charge the allocation to. +*/ + idx =srcu_read_lock (&encl->srcu); + +list_for_each_entry_rcu (encl_mm, &encl->mm_list, list) { +if (!mmget_not_zero (encl_mm->mm)) +continue ; + + memcg =get_mem_cgroup_from_mm (encl_mm->mm); + +mmput_async (encl_mm->mm); + +break ; + } + +srcu_read_unlock (&encl->srcu, idx); + +/* +* In the rare case that there isn't an mm associated with +* the enclave, set memcg to the current active mem_cgroup. +* This will be the root mem_cgroup if there is no active +* mem_cgroup. +*/ +if (!memcg) +return get_mem_cgroup_from_mm (NULL ); + +return memcg; +} + +/** +* sgx_encl_alloc_backing() - allocate a new backing storage page +* @encl: an enclave pointer +* @page_index: enclave page index +* @backing: data for accessing backing storage for the page +* +* When called from ksgxd, sets the active memcg from one of the +* mms in the enclave's mm_list prior to any backing page allocation, +* in order to ensure that shmem page allocations are charged to the +* enclave. +* +* Return: +* 0 on success, +* -errno otherwise. +*/ +int sgx_encl_alloc_backing (struct sgx_encl *encl,unsigned long page_index, +struct sgx_backing *backing) +{ +struct mem_cgroup *encl_memcg =sgx_encl_get_mem_cgroup (encl); +struct mem_cgroup *memcg =set_active_memcg (encl_memcg); +int ret; + + ret =sgx_encl_get_backing (encl, page_index, backing); + +set_active_memcg (memcg); +mem_cgroup_put (encl_memcg); + +return ret; +} + +/** +* sgx_encl_lookup_backing() - retrieve an existing backing storage page +* @encl: an enclave pointer +* @page_index: enclave page index +* @backing: data for accessing backing storage for the page +* +* Retrieve a backing page for loading data back into an EPC page with ELDU. +* It is the caller's responsibility to ensure that it is appropriate to use +* sgx_encl_lookup_backing() rather than sgx_encl_alloc_backing(). If lookup is +* not used correctly, this will cause an allocation which is not accounted for. +* +* Return: +* 0 on success, +* -errno otherwise. +*/ +int sgx_encl_lookup_backing (struct sgx_encl *encl,unsigned long page_index, +struct sgx_backing *backing) +{ +return sgx_encl_get_backing (encl, page_index, backing); +} +/** * sgx_encl_put_backing() - Unpin the backing storage * @backing: data for accessing backing storage for the page
arch/x86/kernel/cpu/sgx/encl.h +5 -2
@@ -103,10 +103,13 @@ static inline int sgx_encl_find(struct mint sgx_encl_may_map (struct sgx_encl *encl,unsigned long start,unsigned long end,unsigned long vm_flags); +bool current_is_ksgxd (void );void sgx_encl_release (struct kref *ref);int sgx_encl_mm_add (struct sgx_encl *encl,struct mm_struct *mm); -int sgx_encl_get_backing (struct sgx_encl *encl,unsigned long page_index, -struct sgx_backing *backing); +int sgx_encl_lookup_backing (struct sgx_encl *encl,unsigned long page_index, +struct sgx_backing *backing); +int sgx_encl_alloc_backing (struct sgx_encl *encl,unsigned long page_index, +struct sgx_backing *backing);void sgx_encl_put_backing (struct sgx_backing *backing);int sgx_encl_test_and_clear_young (struct mm_struct *mm,struct sgx_encl_page *page);
arch/x86/kernel/cpu/sgx/main.c +7 -2
@@ -313,7 +313,7 @@ static void sgx_reclaimer_write(struct ssgx_encl_put_backing (backing);if (!encl->secs_child_cnt &&test_bit (SGX_ENCL_INITIALIZED , &encl->flags)) { - ret =sgx_encl_get_backing (encl,PFN_DOWN (encl->size), + ret =sgx_encl_alloc_backing (encl,PFN_DOWN (encl->size), &secs_backing);if (ret) goto out;
@@ -384,7 +384,7 @@ static void sgx_reclaim_pages(void) page_index =PFN_DOWN (encl_page->desc - encl_page->encl->base);mutex_lock (&encl_page->encl->lock); - ret =sgx_encl_get_backing (encl_page->encl, page_index, &backing[i]); + ret =sgx_encl_alloc_backing (encl_page->encl, page_index, &backing[i]);if (ret) {mutex_unlock (&encl_page->encl->lock); goto skip;
@@ -475,6 +475,11 @@ static bool __init sgx_page_reclaimer_inreturn true; } +bool current_is_ksgxd (void ) +{ +return current == ksgxd_tsk; +} +static struct sgx_epc_page *__sgx_alloc_epc_page_from_node (int nid) {struct sgx_numa_node *node = &sgx_numa_nodes[nid];
Greg Kroah-Hartman
maintainerPATCH 41/879 kthread: Dont allocate kthread_struct for init and umh
In reply to Greg Kroah-HartmanFrom: Eric W. Biederman <[email protected]>
commit 343f4c49f2438d8920f1f76fa823ee59b91f02e4 upstream.
If kthread_is_per_cpu runs concurrently with free_kthread_struct the kthread_struct that was just freed may be read from.
This bug was introduced by commit 40966e316f86 ("kthread: Ensure struct kthread is present for all kthreads"). When kthread_struct started to be allocated for all tasks that have PF_KTHREAD set. This in turn required the kthread_struct to be freed in kernel_execve and violated the assumption that kthread_struct will have the same lifetime as the task.
Looking a bit deeper this only applies to callers of kernel_execve which is just the init process and the user mode helper processes. These processes really don't want to be kernel threads but are for historical reasons. Mostly that copy_thread does not know how to take a kernel mode function to the process with for processes without PF_KTHREAD or PF_IO_WORKER set.
Solve this by not allocating kthread_struct for the init process and the user mode helper processes.
This is done by adding a kthread member to struct kernel_clone_args. Setting kthread in fork_idle and kernel_thread. Adding user_mode_thread that works like kernel_thread except it does not set kthread. In fork only allocating the kthread_struct if .kthread is set.
I have looked at kernel/kthread.c and since commit 40966e316f86 ("kthread: Ensure struct kthread is present for all kthreads") there have been no assumptions added that to_kthread or __to_kthread will not return NULL.
There are a few callers of to_kthread or __to_kthread that assume a non-NULL struct kthread pointer will be returned. These functions are kthread_data(), kthread_parmme(), kthread_exit(), kthread(), kthread_park(), kthread_unpark(), kthread_stop(). All of those functions can reasonably expected to be called when it is know that a task is a kthread so that assumption seems reasonable.
--- fs/exec.c | 6 ++++-- include/linux/sched/task.h | 2 ++ init/main.c | 2 +- kernel/fork.c | 22 ++++++++++++++++++++-- kernel/umh.c | 6 +++--- 5 files changed, 30 insertions(+), 8 deletions(-)
fs/exec.c +4 -2
@@ -1308,8 +1308,6 @@ int begin_new_exec(struct linux_binprm *if (retval) goto out_unlock; -if (me->flags &PF_KTHREAD ) -free_kthread_struct (me); me->flags &= ~(PF_RANDOMIZE |PF_FORKNOEXEC |PF_KTHREAD |PF_NOFREEZE |PF_NO_SETAFFINITY );flush_thread ();
@@ -1955,6 +1953,10 @@ int kernel_execve(const char *kernel_filint fd =AT_FDCWD ;int retval; +if (WARN_ON_ONCE ((current->flags &PF_KTHREAD ) && + (current->worker_private))) +return -EINVAL ; + filename =getname_kernel (kernel_filename);if (IS_ERR (filename))return PTR_ERR (filename);
include/linux/sched/task.h +2 -0
@@ -32,6 +32,7 @@ struct kernel_clone_args {size_t set_tid_size;int cgroup;int io_thread; +int kthread;struct cgroup *cgrp;struct css_set *cset; };
@@ -89,6 +90,7 @@ struct task_struct *create_io_thread(intstruct task_struct *fork_idle (int );struct mm_struct *copy_init_mm (void );extern pid_t kernel_thread (int (*fn)(void *),void *arg,unsigned long flags); +extern pid_t user_mode_thread (int (*fn)(void *),void *arg,unsigned long flags);extern long kernel_wait4 (pid_t ,int __user *,int ,struct rusage *);int kernel_wait (pid_t pid,int *stat);
init/main.c +1 -1
@@ -688,7 +688,7 @@ noinline void __ref rest_init(void)* the init task will end up wanting to create kthreads, which, if * we schedule it before we create kthreadd, will OOPS. */ - pid =kernel_thread (kernel_init,NULL ,CLONE_FS ); + pid =user_mode_thread (kernel_init,NULL ,CLONE_FS );/* * Pin init on the boot CPU. Task migration is not properly working * until sched_init_smp() has been run. It will set the allowed
kernel/fork.c +20 -2
@@ -2157,7 +2157,7 @@ static __latent_entropy struct task_stru p->io_context =NULL ;audit_set_context (p,NULL );cgroup_fork (p); -if (p->flags &PF_KTHREAD ) { +if (args->kthread) {if (!set_kthread_struct (p)) goto bad_fork_cleanup_delayacct; }
@@ -2548,7 +2548,8 @@ struct task_struct * __init fork_idle(in {struct task_struct *task;struct kernel_clone_args args = { - .flags =CLONE_VM , + .flags =CLONE_VM , + .kthread =1 , }; task =copy_process (&init_struct_pid,0 ,cpu_to_node (cpu), &args);
@@ -2682,6 +2683,23 @@ pid_t kernel_thread(int (*fn)(void *), v {struct kernel_clone_args args = { .flags = ((lower_32_bits (flags) |CLONE_VM | +CLONE_UNTRACED ) & ~CSIGNAL ), + .exit_signal = (lower_32_bits (flags) &CSIGNAL ), + .stack = (unsigned long )fn, + .stack_size = (unsigned long )arg, + .kthread =1 , + }; + +return kernel_clone (&args); +} + +/* +* Create a user mode thread. +*/ +pid_t user_mode_thread (int (*fn)(void *),void *arg,unsigned long flags) +{ +struct kernel_clone_args args = { + .flags = ((lower_32_bits (flags) |CLONE_VM |CLONE_UNTRACED ) & ~CSIGNAL ), .exit_signal = (lower_32_bits (flags) &CSIGNAL ), .stack = (unsigned long )fn,
kernel/umh.c +3 -3
@@ -132,7 +132,7 @@ static void call_usermodehelper_exec_syn/* If SIGCLD is ignored do_wait won't populate the status. */ kernel_sigaction (SIGCHLD ,SIG_DFL ); - pid =kernel_thread (call_usermodehelper_exec_async, sub_info,SIGCHLD ); + pid =user_mode_thread (call_usermodehelper_exec_async, sub_info,SIGCHLD );if (pid <0 ) sub_info->retval = pid;else
@@ -171,8 +171,8 @@ static void call_usermodehelper_exec_wor* want to pollute current->children, and we need a parent * that always ignores SIGCHLD to ensure auto-reaping. */ - pid =kernel_thread (call_usermodehelper_exec_async, sub_info, -CLONE_PARENT |SIGCHLD ); + pid =user_mode_thread (call_usermodehelper_exec_async, sub_info, +CLONE_PARENT |SIGCHLD );if (pid <0 ) { sub_info->retval = pid;umh_complete (sub_info);
Greg Kroah-Hartman
maintainerPATCH 42/879 ptrace/um: Replace PT_DTRACE with TIF_SINGLESTEP
In reply to Greg Kroah-HartmanFrom: Eric W. Biederman <[email protected]>
commit c200e4bb44e80b343c09841e7caaaca0aac5e5fa upstream.
User mode linux is the last user of the PT_DTRACE flag. Using the flag to indicate single stepping is a little confusing and worse changing tsk->ptrace without locking could potentionally cause problems.
So use a thread info flag with a better name instead of flag in tsk->ptrace.
Remove the definition PT_DTRACE as uml is the last user.
--- arch/um/include/asm/thread_info.h | 2 ++ arch/um/kernel/exec.c | 2 +- arch/um/kernel/process.c | 2 +- arch/um/kernel/ptrace.c | 8 ++++---- arch/um/kernel/signal.c | 4 ++-- include/linux/ptrace.h | 1 - 6 files changed, 10 insertions(+), 9 deletions(-)
arch/um/include/asm/thread_info.h +2 -0
@@ -60,6 +60,7 @@ static inline struct thread_info *curren#define TIF_RESTORE_SIGMASK 7#define TIF_NOTIFY_RESUME 8#define TIF_SECCOMP 9/* secure computing */ +#define TIF_SINGLESTEP 10/* single stepping userspace */ #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
@@ -68,5 +69,6 @@ static inline struct thread_info *curren#define _TIF_MEMDIE (1 << TIF_MEMDIE)#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)#define _TIF_SECCOMP (1 << TIF_SECCOMP) +#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)#endif
arch/um/kernel/exec.c +1 -1
@@ -43,7 +43,7 @@ void start_thread(struct pt_regs *regs, {PT_REGS_IP (regs) = eip;PT_REGS_SP (regs) = esp; - current->ptrace &= ~PT_DTRACE ; +clear_thread_flag (TIF_SINGLESTEP );#ifdef SUBARCH_EXECVE1 SUBARCH_EXECVE1 (regs->regs);#endif
arch/um/kernel/process.c +1 -1
@@ -335,7 +335,7 @@ int singlestepping(void * t) {struct task_struct *task = t ? t : current; -if (!(task->ptrace &PT_DTRACE )) +if (!test_thread_flag (TIF_SINGLESTEP ))return 0 ;if (task->thread.singlestep_syscall)
arch/um/kernel/ptrace.c +4 -4
@@ -11,7 +11,7 @@void user_enable_single_step (struct task_struct *child) { - child->ptrace |=PT_DTRACE ; +set_tsk_thread_flag (child,TIF_SINGLESTEP ); child->thread.singlestep_syscall =0 ;#ifdef SUBARCH_SET_SINGLESTEPPING
@@ -21,7 +21,7 @@ void user_enable_single_step(struct taskvoid user_disable_single_step (struct task_struct *child) { - child->ptrace &= ~PT_DTRACE ; +clear_tsk_thread_flag (child,TIF_SINGLESTEP ); child->thread.singlestep_syscall =0 ;#ifdef SUBARCH_SET_SINGLESTEPPING
@@ -120,7 +120,7 @@ static void send_sigtrap(struct uml_pt_r }/* -* XXX Check PT_DTRACE vs TIF_SINGLESTEP for singlestepping check and +* XXX Check TIF_SINGLESTEP for singlestepping check and * PT_PTRACED vs TIF_SYSCALL_TRACE for syscall tracing check */ int syscall_trace_enter (struct pt_regs *regs)
@@ -144,7 +144,7 @@ void syscall_trace_leave(struct pt_regsaudit_syscall_exit (regs);/* Fake a debug trap */ -if (ptraced &PT_DTRACE ) +if (test_thread_flag (TIF_SINGLESTEP ))send_sigtrap (®s->regs,0 );if (!test_thread_flag (TIF_SYSCALL_TRACE ))
arch/um/kernel/signal.c +2 -2
@@ -53,7 +53,7 @@ static void handle_signal(struct ksignalunsigned long sp;int err; -if ((current->ptrace &PT_DTRACE ) && (current->ptrace &PT_PTRACED )) +if (test_thread_flag (TIF_SINGLESTEP ) && (current->ptrace &PT_PTRACED )) singlestep =1 ;/* Did we come from a system call? */
@@ -128,7 +128,7 @@ void do_signal(struct pt_regs *regs)* on the host. The tracing thread will check this flag and * PTRACE_SYSCALL if necessary. */ -if (current->ptrace &PT_DTRACE ) +if (test_thread_flag (TIF_SINGLESTEP )) current->thread.singlestep_syscall =is_syscall (PT_REGS_IP (¤t->thread.regs));
include/linux/ptrace.h +0 -1
@@ -30,7 +30,6 @@ extern int ptrace_access_vm(struct task_#define PT_SEIZED 0x00010000/* SEIZE used, enable new behavior */ #define PT_PTRACED 0x00000001 -#define PT_DTRACE 0x00000002/* delayed trace (used on m68k, i386) */ #define PT_OPT_FLAG_SHIFT 3/* PT_TRACE_* event enable flags */
Greg Kroah-Hartman
maintainerPATCH 43/879 ptrace/xtensa: Replace PT_SINGLESTEP with TIF_SINGLESTEP
In reply to Greg Kroah-HartmanFrom: Eric W. Biederman <[email protected]>
commit 4a3d2717d140401df7501a95e454180831a0c5af upstream.
xtensa is the last user of the PT_SINGLESTEP flag. Changing tsk->ptrace in user_enable_single_step and user_disable_single_step without locking could potentiallly cause problems.
So use a thread info flag instead of a flag in tsk->ptrace. Use TIF_SINGLESTEP that xtensa already had defined but unused.
Remove the definitions of PT_SINGLESTEP and PT_BLOCKSTEP as they have no more users.
--- arch/xtensa/kernel/ptrace.c | 4 ++-- arch/xtensa/kernel/signal.c | 4 ++-- include/linux/ptrace.h | 6 ------ 3 files changed, 4 insertions(+), 10 deletions(-)
arch/xtensa/kernel/ptrace.c +2 -2
@@ -225,12 +225,12 @@ const struct user_regset_view *task_uservoid user_enable_single_step (struct task_struct *child) { - child->ptrace |=PT_SINGLESTEP ; +set_tsk_thread_flag (child,TIF_SINGLESTEP ); }void user_disable_single_step (struct task_struct *child) { - child->ptrace &= ~PT_SINGLESTEP ; +clear_tsk_thread_flag (child,TIF_SINGLESTEP ); }/*
arch/xtensa/kernel/signal.c +2 -2
@@ -473,7 +473,7 @@ static void do_signal(struct pt_regs *re/* Set up the stack frame */ ret =setup_frame (&ksig,sigmask_to_save (), regs);signal_setup_done (ret, &ksig,0 ); -if (current->ptrace &PT_SINGLESTEP ) +if (test_thread_flag (TIF_SINGLESTEP ))task_pt_regs (current)->icountlevel =1 ;return ;
@@ -499,7 +499,7 @@ static void do_signal(struct pt_regs *re/* If there's no signal to deliver, we just restore the saved mask. */ restore_saved_sigmask (); -if (current->ptrace &PT_SINGLESTEP ) +if (test_thread_flag (TIF_SINGLESTEP ))task_pt_regs (current)->icountlevel =1 ;return ; }
include/linux/ptrace.h +0 -6
@@ -46,12 +46,6 @@ extern int ptrace_access_vm(struct task_#define PT_EXITKILL (PTRACE_O_EXITKILL << PT_OPT_FLAG_SHIFT)#define PT_SUSPEND_SECCOMP (PTRACE_O_SUSPEND_SECCOMP << PT_OPT_FLAG_SHIFT) -/* single stepping state bits (used on ARM and PA-RISC) */ -#define PT_SINGLESTEP_BIT 31 -#define PT_SINGLESTEP (1<<PT_SINGLESTEP_BIT) -#define PT_BLOCKSTEP_BIT 30 -#define PT_BLOCKSTEP (1<<PT_BLOCKSTEP_BIT) -extern long arch_ptrace (struct task_struct *child,long request,unsigned long addr,unsigned long data);extern int ptrace_readdata (struct task_struct *tsk,unsigned long src,char __user *dst,int len);
Greg Kroah-Hartman
maintainerPATCH 44/879 ptrace: Reimplement PTRACE_KILL by always sending SIGKILL
In reply to Greg Kroah-HartmanFrom: Eric W. Biederman <[email protected]>
commit 6a2d90ba027adba528509ffa27097cffd3879257 upstream.
The current implementation of PTRACE_KILL is buggy and has been for many years as it assumes it's target has stopped in ptrace_stop. At a quick skim it looks like this assumption has existed since ptrace support was added in linux v1.0.
While PTRACE_KILL has been deprecated we can not remove it as a quick search with google code search reveals many existing programs calling it.
When the ptracee is not stopped at ptrace_stop some fields would be set that are ignored except in ptrace_stop. Making the userspace visible behavior of PTRACE_KILL a noop in those case.
As the usual rules are not obeyed it is not clear what the consequences are of calling PTRACE_KILL on a running process. Presumably userspace does not do this as it achieves nothing.
Replace the implementation of PTRACE_KILL with a simple send_sig_info(SIGKILL) followed by a return 0. This changes the observable user space behavior only in that PTRACE_KILL on a process not stopped in ptrace_stop will also kill it. As that has always been the intent of the code this seems like a reasonable change.
--- arch/x86/kernel/step.c | 3 +-- kernel/ptrace.c | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-)
arch/x86/kernel/step.c +1 -2
@@ -180,8 +180,7 @@ void set_task_blockstep(struct task_stru* * NOTE: this means that set/clear TIF_BLOCKSTEP is only safe if * task is current or it can't be running, otherwise we can race -* with __switch_to_xtra(). We rely on ptrace_freeze_traced() but -* PTRACE_KILL is not safe. +* with __switch_to_xtra(). We rely on ptrace_freeze_traced(). */ local_irq_disable (); debugctl =get_debugctlmsr ();
kernel/ptrace.c +2 -3
@@ -1236,9 +1236,8 @@ int ptrace_request(struct task_struct *creturn ptrace_resume (child, request, data);case PTRACE_KILL : -if (child->exit_state)/* already dead */ -return 0 ; -return ptrace_resume (child, request,SIGKILL ); +send_sig_info (SIGKILL ,SEND_SIG_NOINFO , child); +return 0 ;#ifdef CONFIG_HAVE_ARCH_TRACEHOOK case PTRACE_GETREGSET :
Greg Kroah-Hartman
maintainerPATCH 45/879 btrfs: add "0x" prefix for unsupported optional features
In reply to Greg Kroah-HartmanFrom: Qu Wenruo <[email protected]>
commit d5321a0fa8bc49f11bea0b470800962c17d92d8f upstream.
The following error message lack the "0x" obviously:
cannot mount because of unsupported optional features (4000)
Add the prefix to make it less confusing. This can happen on older kernels that try to mount a filesystem with newer features so it makes sense to backport to older trees.
--- fs/btrfs/disk-io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/btrfs/disk-io.c +2 -2
@@ -3611,7 +3611,7 @@ int __cold open_ctree(struct super_block ~BTRFS_FEATURE_INCOMPAT_SUPP ;if (features) {btrfs_err (fs_info, -"cannot mount because of unsupported optional features (%llx)" , +"cannot mount because of unsupported optional features (0x%llx)" , features); err = -EINVAL ; goto fail_alloc;
@@ -3649,7 +3649,7 @@ int __cold open_ctree(struct super_block ~BTRFS_FEATURE_COMPAT_RO_SUPP ;if (!sb_rdonly (sb) && features) {btrfs_err (fs_info, -"cannot mount read-write because of unsupported optional features (%llx)" , +"cannot mount read-write because of unsupported optional features (0x%llx)" , features); err = -EINVAL ; goto fail_alloc;
Greg Kroah-Hartman
maintainerPATCH 46/879 btrfs: return correct error number for __extent_writepage_io()
In reply to Greg Kroah-HartmanFrom: Qu Wenruo <[email protected]>
commit 44e5801fada6925d2bba1987c7b59cbcc9d0d592 upstream.
[BUG]
If we hit an error from submit_extent_page() inside __extent_writepage_io(), we could still return 0 to the caller, and even trigger the warning in btrfs_page_assert_not_dirty().
[CAUSE]
In __extent_writepage_io(), if we hit an error from submit_extent_page(), we will just clean up the range and continue.
This is completely fine for regular PAGE_SIZE == sectorsize, as we can only hit one sector in one page, thus after the error we're ensured to exit and @ret will be saved.
But for subpage case, we may have other dirty subpage range in the page, and in the next loop, we may succeeded submitting the next range.
In that case, @ret will be overwritten, and we return 0 to the caller, while we have hit some error.
[FIX]
Introduce @has_error and @saved_ret to record the first error we hit, so we will never forget what error we hit.
--- fs/btrfs/extent_io.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
fs/btrfs/extent_io.c +12 -1
@@ -3920,10 +3920,12 @@ static noinline_for_stack int __extent_wu64 extent_offset;u64 block_start;struct extent_map *em; +int saved_ret =0 ;int ret =0 ;int nr =0 ;u32 opf =REQ_OP_WRITE ;const unsigned int write_flags =wbc_to_write_flags (wbc); +bool has_error = false;bool compressed; ret =btrfs_writepage_cow_fixup (page);
@@ -3973,6 +3975,9 @@ static noinline_for_stack int __extent_wif (IS_ERR (em)) {btrfs_page_set_error (fs_info, page, cur, end - cur +1 ); ret =PTR_ERR_OR_ZERO (em); + has_error = true; +if (!saved_ret) + saved_ret = ret;break ; }
@@ -4036,6 +4041,10 @@ static noinline_for_stack int __extent_w end_bio_extent_writepage, 0, 0, false);if (ret) { + has_error = true; +if (!saved_ret) + saved_ret = ret; +btrfs_page_set_error (fs_info, page, cur, iosize);if (PageWriteback (page)) btrfs_page_clear_writeback(fs_info, page, cur,
@@ -4049,8 +4058,10 @@ static noinline_for_stack int __extent_w* If we finish without problem, we should not only clear page dirty, * but also empty subpage dirty bits */ -if (!ret) +if (!has_error)btrfs_page_assert_not_dirty (fs_info, page); +else + ret = saved_ret; *nr_ret = nr;return ret; }
Greg Kroah-Hartman
maintainerPATCH 47/879 btrfs: repair super block num_devices automatically
In reply to Greg Kroah-HartmanFrom: Qu Wenruo <[email protected]>
commit d201238ccd2f30b9bfcfadaeae0972e3a486a176 upstream.
[BUG]
There is a report that a btrfs has a bad super block num devices.
This makes btrfs to reject the fs completely.
BTRFS error (device sdd3): super_num_devices 3 mismatch with num_devices 2 found here BTRFS error (device sdd3): failed to read chunk tree: -22
BTRFS error (device sdd3): open_ctree failed
[CAUSE]
During btrfs device removal, chunk tree and super block num devs are updated in two different transactions:
btrfs_rm_device()
|- btrfs_rm_dev_item(device) | |- trans = btrfs_start_transaction() | | Now we got transaction X | | | |- btrfs_del_item() | | Now device item is removed from chunk tree | | | |- btrfs_commit_transaction() | Transaction X got committed, super num devs untouched, | but device item removed from chunk tree. | (AKA, super num devs is already incorrect) | |- cur_devices->num_devices--; |- cur_devices->total_devices--; |- btrfs_set_super_num_devices()
All those operations are not in transaction X, thus it will only be written back to disk in next transaction.
So after the transaction X in btrfs_rm_dev_item() committed, but before transaction X+1 (which can be minutes away), a power loss happen, then we got the super num mismatch.
This has been fixed by commit bbac58698a55 ("btrfs: remove device item and update super block in the same transaction").
[FIX]
Make the super_num_devices check less strict, converting it from a hard error to a warning, and reset the value to a correct one for the current or next transaction commit.
As the number of device items is the critical information where the super block num_devices is only a cached value (and also useful for cross checking), it's safe to automatically update it. Other device related problems like missing device are handled after that and may require other means to resolve, like degraded mount. With this fix, potentially affected filesystems won't fail mount and require the manual repair by btrfs check.
--- fs/btrfs/volumes.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
fs/btrfs/volumes.c +4 -4
@@ -7671,12 +7671,12 @@ int btrfs_read_chunk_tree(struct btrfs_f* do another round of validation checks. */ if (total_dev != fs_info->fs_devices->total_devices) { -btrfs_err (fs_info, -"super_num_devices %llu mismatch with num_devices %llu found here" , +btrfs_warn (fs_info, +"super block num_devices %llu mismatch with DEV_ITEM count %llu, will be repaired on next transaction commit" ,btrfs_super_num_devices (fs_info->super_copy), total_dev); - ret = -EINVAL ; - goto error; + fs_info->fs_devices->total_devices = total_dev; +btrfs_set_super_num_devices (fs_info->super_copy, total_dev); }if (btrfs_super_total_bytes (fs_info->super_copy) < fs_info->fs_devices->total_rw_bytes) {
Greg Kroah-Hartman
maintainerPATCH 48/879 btrfs: fix the error handling for submit_extent_page() for btrfs_do_readpage()
In reply to Greg Kroah-HartmanFrom: Qu Wenruo <[email protected]>
commit 10f7f6f879c28f8368d6516ab1ccf3517a1f5d3d upstream.
[BUG]
Test case generic/475 have a very high chance (almost 100%) to hit a fs hang, where a data page will never be unlocked and hang all later operations.
[CAUSE]
In btrfs_do_readpage(), if we hit an error from submit_extent_page() we will try to do the cleanup for our current io range, and exit.
This works fine for PAGE_SIZE == sectorsize cases, but not for subpage.
For subpage btrfs_do_readpage() will lock the full page first, which can contain several different sectors and extents:
btrfs_do_readpage()
|- begin_page_read() | |- btrfs_subpage_start_reader(); | Now the page will have PAGE_SIZE / sectorsize reader pending, | and the page is locked. | |- end_page_read() for different branches | This function will reduce subpage readers, and when readers | reach 0, it will unlock the page.
But when submit_extent_page() failed, we only cleanup the current io range, while the remaining io range will never be cleaned up, and the page remains locked forever.
[FIX]
Update the error handling of submit_extent_page() to cleanup all the remaining subpage range before exiting the loop.
Please note that, now submit_extent_page() can only fail due to sanity check in alloc_new_bio().
Thus regular IO errors are impossible to trigger the error path.
--- fs/btrfs/extent_io.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
fs/btrfs/extent_io.c +6 -2
@@ -3743,8 +3743,12 @@ int btrfs_do_readpage(struct page *page, this_bio_flag, force_bio_submit);if (ret) { -unlock_extent (tree, cur, cur + iosize -1 ); -end_page_read (page, false, cur, iosize); +/* +* We have to unlock the remaining range, or the page +* will never be unlocked. +*/ +unlock_extent (tree, cur, end); +end_page_read (page, false, cur, end +1 - cur); goto out; } cur = cur + iosize;
Greg Kroah-Hartman
maintainerPATCH 49/879 btrfs: fix deadlock between concurrent dio writes when low on free data space
In reply to Greg Kroah-HartmanFrom: Filipe Manana <[email protected]>
commit f5585f4f0ef5b17026bbd60fbff6fcc91b99d5bf upstream.
When reserving data space for a direct IO write we can end up deadlocking if we have multiple tasks attempting a write to the same file range, there are multiple extents covered by that file range, we are low on available space for data and the writes don't expand the inode's i_size.
The deadlock can happen like this:
1) We have a file with an i_size of 1M, at offset 0 it has an extent with a size of 128K and at offset 128K it has another extent also with a size of 128K;
2) Task A does a direct IO write against file range [0, 256K), and because the write is within the i_size boundary, it takes the inode's lock (VFS level) in shared mode;
3) Task A locks the file range [0, 256K) at btrfs_dio_iomap_begin(), and then gets the extent map for the extent covering the range [0, 128K). At btrfs_get_blocks_direct_write(), it creates an ordered extent for that file range ([0, 128K));
4) Before returning from btrfs_dio_iomap_begin(), it unlocks the file range [0, 256K);
5) Task A executes btrfs_dio_iomap_begin() again, this time for the file range [128K, 256K), and locks the file range [128K, 256K);
6) Task B starts a direct IO write against file range [0, 256K) as well. It also locks the inode in shared mode, as it's within the i_size limit, and then tries to lock file range [0, 256K). It is able to lock the subrange [0, 128K) but then blocks waiting for the range [128K, 256K), as it is currently locked by task A;
7) Task A enters btrfs_get_blocks_direct_write() and tries to reserve data space. Because we are low on available free space, it triggers the async data reclaim task, and waits for it to reserve data space;
8) The async reclaim task decides to wait for all existing ordered extents to complete (through btrfs_wait_ordered_roots()).
It finds the ordered extent previously created by task A for the file range [0, 128K) and waits for it to complete;
9) The ordered extent for the file range [0, 128K) can not complete because it blocks at btrfs_finish_ordered_io() when trying to lock the file range [0, 128K).
This results in a deadlock, because:
- task B is holding the file range [0, 128K) locked, waiting for the
range [128K, 256K) to be unlocked by task A;
- task A is holding the file range [128K, 256K) locked and it's waiting for the async data reclaim task to satisfy its space reservation request;
- the async data reclaim task is waiting for ordered extent [0, 128K) to complete, but the ordered extent can not complete because the file range [0, 128K) is currently locked by task B, which is waiting on task A to unlock file range [128K, 256K) and task A waiting on the async data reclaim task.
This results in a deadlock between 4 task: task A, task B, the async data reclaim task and the task doing ordered extent completion (a work queue task).
This type of deadlock can sporadically be triggered by the test case generic/300 from fstests, and results in a stack trace like the following:
[12084.033689] INFO: task kworker/u16:7:123749 blocked for more than 241 seconds. [12084.034877] Not tainted 5.18.0-rc2-btrfs-next-115 #1 [12084.035562] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [12084.036548] task:kworker/u16:7 state:D stack: 0 pid:123749 ppid: 2 flags:0x00004000 [12084.036554] Workqueue: btrfs-flush_delalloc btrfs_work_helper [btrfs] [12084.036599] Call Trace: [12084.036601] <TASK> [12084.036606] __schedule+0x3cb/0xed0 [12084.036616] schedule+0x4e/0xb0 [12084.036620] btrfs_start_ordered_extent+0x109/0x1c0 [btrfs] [12084.036651] ? prepare_to_wait_exclusive+0xc0/0xc0 [12084.036659] btrfs_run_ordered_extent_work+0x1a/0x30 [btrfs] [12084.036688] btrfs_work_helper+0xf8/0x400 [btrfs] [12084.036719] ? lock_is_held_type+0xe8/0x140 [12084.036727] process_one_work+0x252/0x5a0 [12084.036736] ? process_one_work+0x5a0/0x5a0 [12084.036738] worker_thread+0x52/0x3b0 [12084.036743] ? process_one_work+0x5a0/0x5a0 [12084.036745] kthread+0xf2/0x120 [12084.036747] ? kthread_complete_and_exit+0x20/0x20 [12084.036751] ret_from_fork+0x22/0x30 [12084.036765] </TASK> [12084.036769] INFO: task kworker/u16:11:153787 blocked for more than 241 seconds. [12084.037702] Not tainted 5.18.0-rc2-btrfs-next-115 #1 [12084.038540] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [12084.039506] task:kworker/u16:11 state:D stack: 0 pid:153787 ppid: 2 flags:0x00004000 [12084.039511] Workqueue: events_unbound btrfs_async_reclaim_data_space [btrfs] [12084.039551] Call Trace: [12084.039553] <TASK> [12084.039557] __schedule+0x3cb/0xed0 [12084.039566] schedule+0x4e/0xb0 [12084.039569] schedule_timeout+0xed/0x130 [12084.039573] ? mark_held_locks+0x50/0x80 [12084.039578] ? _raw_spin_unlock_irq+0x24/0x50 [12084.039580] ? lockdep_hardirqs_on+0x7d/0x100 [12084.039585] __wait_for_common+0xaf/0x1f0 [12084.039587] ? usleep_range_state+0xb0/0xb0 [12084.039596] btrfs_wait_ordered_extents+0x3d6/0x470 [btrfs] [12084.039636] btrfs_wait_ordered_roots+0x175/0x240 [btrfs] [12084.039670] flush_space+0x25b/0x630 [btrfs] [12084.039712] btrfs_async_reclaim_data_space+0x108/0x1b0 [btrfs] [12084.039747] process_one_work+0x252/0x5a0 [12084.039756] ? process_one_work+0x5a0/0x5a0 [12084.039758] worker_thread+0x52/0x3b0 [12084.039762] ? process_one_work+0x5a0/0x5a0 [12084.039765] kthread+0xf2/0x120 [12084.039766] ? kthread_complete_and_exit+0x20/0x20 [12084.039770] ret_from_fork+0x22/0x30 [12084.039783] </TASK> [12084.039800] INFO: task kworker/u16:17:217907 blocked for more than 241 seconds. [12084.040709] Not tainted 5.18.0-rc2-btrfs-next-115 #1 [12084.041398] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [12084.042404] task:kworker/u16:17 state:D stack: 0 pid:217907 ppid: 2 flags:0x00004000 [12084.042411] Workqueue: btrfs-endio-write btrfs_work_helper [btrfs] [12084.042461] Call Trace: [12084.042463] <TASK> [12084.042471] __schedule+0x3cb/0xed0 [12084.042485] schedule+0x4e/0xb0 [12084.042490] wait_extent_bit.constprop.0+0x1eb/0x260 [btrfs] [12084.042539] ? prepare_to_wait_exclusive+0xc0/0xc0 [12084.042551] lock_extent_bits+0x37/0x90 [btrfs] [12084.042601] btrfs_finish_ordered_io.isra.0+0x3fd/0x960 [btrfs] [12084.042656] ? lock_is_held_type+0xe8/0x140 [12084.042667] btrfs_work_helper+0xf8/0x400 [btrfs] [12084.042716] ? lock_is_held_type+0xe8/0x140 [12084.042727] process_one_work+0x252/0x5a0 [12084.042742] worker_thread+0x52/0x3b0 [12084.042750] ? process_one_work+0x5a0/0x5a0 [12084.042754] kthread+0xf2/0x120 [12084.042757] ? kthread_complete_and_exit+0x20/0x20 [12084.042763] ret_from_fork+0x22/0x30 [12084.042783] </TASK> [12084.042798] INFO: task fio:234517 blocked for more than 241 seconds. [12084.043598] Not tainted 5.18.0-rc2-btrfs-next-115 #1 [12084.044282] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [12084.045244] task:fio state:D stack: 0 pid:234517 ppid:234515 flags:0x00004000 [12084.045248] Call Trace: [12084.045250] <TASK> [12084.045254] __schedule+0x3cb/0xed0 [12084.045263] schedule+0x4e/0xb0 [12084.045266] wait_extent_bit.constprop.0+0x1eb/0x260 [btrfs] [12084.045298] ? prepare_to_wait_exclusive+0xc0/0xc0 [12084.045306] lock_extent_bits+0x37/0x90 [btrfs] [12084.045336] btrfs_dio_iomap_begin+0x336/0xc60 [btrfs] [12084.045370] ? lock_is_held_type+0xe8/0x140 [12084.045378] iomap_iter+0x184/0x4c0 [12084.045383] __iomap_dio_rw+0x2c6/0x8a0 [12084.045406] iomap_dio_rw+0xa/0x30 [12084.045408] btrfs_do_write_iter+0x370/0x5e0 [btrfs] [12084.045440] aio_write+0xfa/0x2c0 [12084.045448] ? __might_fault+0x2a/0x70 [12084.045451] ? kvm_sched_clock_read+0x14/0x40 [12084.045455] ? lock_release+0x153/0x4a0 [12084.045463] io_submit_one+0x615/0x9f0 [12084.045467] ? __might_fault+0x2a/0x70 [12084.045469] ? kvm_sched_clock_read+0x14/0x40 [12084.045478] __x64_sys_io_submit+0x83/0x160 [12084.045483] ? syscall_enter_from_user_mode+0x1d/0x50 [12084.045489] do_syscall_64+0x3b/0x90 [12084.045517] entry_SYSCALL_64_after_hwframe+0x44/0xae [12084.045521] RIP: 0033:0x7fa76511af79 [12084.045525] RSP: 002b:00007ffd6d6b9058 EFLAGS: 00000246 ORIG_RAX: 00000000000000d1 [12084.045530] RAX: ffffffffffffffda RBX: 00007fa75ba6e760 RCX: 00007fa76511af79 [12084.045532] RDX: 0000557b304ff3f0 RSI: 0000000000000001 RDI: 00007fa75ba4c000 [12084.045535] RBP: 00007fa75ba4c000 R08: 00007fa751b76000 R09: 0000000000000330 [12084.045537] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 [12084.045540] R13: 0000000000000000 R14: 0000557b304ff3f0 R15: 0000557b30521eb0 [12084.045561] </TASK>
Fix this issue by always reserving data space before locking a file range at btrfs_dio_iomap_begin(). If we can't reserve the space, then we don't error out immediately - instead after locking the file range, check if we can do a NOCOW write, and if we can we don't error out since we don't need to allocate a data extent, however if we can't NOCOW then error out with -ENOSPC. This also implies that we may end up reserving space when it's not needed because the write will end up being done in NOCOW mode - in that case we just release the space after we noticed we did a NOCOW write - this is the same type of logic that is done in the path for buffered IO writes.
--- fs/btrfs/inode.c | 81 +++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 64 insertions(+), 17 deletions(-)
fs/btrfs/inode.c +64 -17
@@ -64,6 +64,8 @@ struct btrfs_iget_args {struct btrfs_dio_data {ssize_t submitted;struct extent_changeset *data_reserved; +bool data_space_reserved; +bool nocow_done; };struct btrfs_rename_ctx {
@@ -7489,15 +7491,25 @@ static int btrfs_get_blocks_direct_write ret =PTR_ERR (em2); goto out; } + + dio_data->nocow_done = true; }else {/* Our caller expects us to free the input extent map. */ free_extent_map (em); *map =NULL ; -/* We have to COW, so need to reserve metadata and data space. */ - ret =btrfs_delalloc_reserve_space (BTRFS_I (inode), - &dio_data->data_reserved, - start, len); +/* +* If we could not allocate data space before locking the file +* range and we can't do a NOCOW write, then we have to fail. +*/ +if (!dio_data->data_space_reserved) +return -ENOSPC ; + +/* +* We have to COW and we have already reserved data space before, +* so now we reserve only metadata. +*/ + ret =btrfs_delalloc_reserve_metadata (BTRFS_I (inode), len, len);if (ret <0 ) goto out; space_reserved = true;
@@ -7510,10 +7522,8 @@ static int btrfs_get_blocks_direct_write *map = em; len =min (len, em->len - (start - em->start));if (len < prev_len) -btrfs_delalloc_release_space (BTRFS_I (inode), - dio_data->data_reserved, - start + len, prev_len - len, - true); +btrfs_delalloc_release_metadata (BTRFS_I (inode), + prev_len - len, true); }/*
@@ -7531,15 +7541,7 @@ static int btrfs_get_blocks_direct_write out:if (ret && space_reserved) {btrfs_delalloc_release_extents (BTRFS_I (inode), len); -if (can_nocow) { -btrfs_delalloc_release_metadata (BTRFS_I (inode), len, true); - }else { -btrfs_delalloc_release_space (BTRFS_I (inode), - dio_data->data_reserved, - start, len, true); -extent_changeset_free (dio_data->data_reserved); - dio_data->data_reserved =NULL ; - } +btrfs_delalloc_release_metadata (BTRFS_I (inode), len, true); }return ret; }
@@ -7556,6 +7558,7 @@ static int btrfs_dio_iomap_begin(structconst bool write = !!(flags &IOMAP_WRITE );int ret =0 ;u64 len = length; +const u64 data_alloc_len = length;bool unlock_extents = false;if (!write)
@@ -7584,6 +7587,25 @@ static int btrfs_dio_iomap_begin(struct iomap->private = dio_data; +/* +* We always try to allocate data space and must do it before locking +* the file range, to avoid deadlocks with concurrent writes to the same +* range if the range has several extents and the writes don't expand the +* current i_size (the inode lock is taken in shared mode). If we fail to +* allocate data space here we continue and later, after locking the +* file range, we fail with ENOSPC only if we figure out we can not do a +* NOCOW write. +*/ +if (write && !(flags &IOMAP_NOWAIT )) { + ret =btrfs_check_data_free_space (BTRFS_I (inode), + &dio_data->data_reserved, + start, data_alloc_len); +if (!ret) + dio_data->data_space_reserved = true; +else if (ret && !(BTRFS_I (inode)->flags & + (BTRFS_INODE_NODATACOW |BTRFS_INODE_PREALLOC ))) + goto err; + }/* * If this errors out it's because we couldn't invalidate pagecache for
@@ -7658,6 +7680,24 @@ static int btrfs_dio_iomap_begin(struct unlock_extents = true;/* Recalc len in case the new em is smaller than requested */ len =min (len, em->len - (start - em->start)); +if (dio_data->data_space_reserved) { +u64 release_offset; +u64 release_len =0 ; + +if (dio_data->nocow_done) { + release_offset = start; + release_len = data_alloc_len; + }else if (len < data_alloc_len) { + release_offset = start + len; + release_len = data_alloc_len - len; + } + +if (release_len >0 ) +btrfs_free_reserved_data_space (BTRFS_I (inode), + dio_data->data_reserved, + release_offset, + release_len); + } }else {/* * We need to unlock only the end area that we aren't using.
@@ -7702,6 +7742,13 @@ unlock_err:unlock_extent_cached (&BTRFS_I (inode)->io_tree, lockstart, lockend, &cached_state); err: +if (dio_data->data_space_reserved) { +btrfs_free_reserved_data_space (BTRFS_I (inode), + dio_data->data_reserved, + start, data_alloc_len); +extent_changeset_free (dio_data->data_reserved); + } +kfree (dio_data);return ret;
Greg Kroah-Hartman
maintainerPATCH 50/879 btrfs: zoned: properly finish block group on metadata write
In reply to Greg Kroah-HartmanFrom: Naohiro Aota <[email protected]>
commit 56fbb0a4e8b3e929e41cc846e6ef89eb01152201 upstream.
Commit be1a1d7a5d24 ("btrfs: zoned: finish fully written block group") introduced zone finishing code both for data and metadata end_io path. However, the metadata side is not working as it should. First, it compares logical address (eb->start + eb->len) with offset within a block group (cache->zone_capacity) in submit_eb_page(). That essentially disabled zone finishing on metadata end_io path.
Furthermore, fixing the issue above revealed we cannot call btrfs_zone_finish_endio() in end_extent_buffer_writeback(). We cannot call btrfs_lookup_block_group() which require spin lock inside end_io context.
Introduce btrfs_schedule_zone_finish_bg() to wait for the extent buffer writeback and do the zone finish IO in a workqueue.
Also, drop EXTENT_BUFFER_ZONE_FINISH as it is no longer used.
--- fs/btrfs/block-group.h | 2 ++ fs/btrfs/extent_io.c | 6 +----- fs/btrfs/extent_io.h | 1 - fs/btrfs/zoned.c | 31 +++++++++++++++++++++++++++++++ fs/btrfs/zoned.h | 5 +++++ 5 files changed, 39 insertions(+), 6 deletions(-)
fs/btrfs/block-group.h +2 -0
@@ -212,6 +212,8 @@ struct btrfs_block_group {u64 meta_write_pointer;struct map_lookup *physical_map;struct list_head active_bg_list; +struct work_struct zone_finish_work; +struct extent_buffer *last_eb; };static inline u64 btrfs_block_group_end (struct btrfs_block_group *block_group)
fs/btrfs/extent_io.c +1 -5
@@ -4196,9 +4196,6 @@ void wait_on_extent_buffer_writeback(strstatic void end_extent_buffer_writeback (struct extent_buffer *eb) { -if (test_bit (EXTENT_BUFFER_ZONE_FINISH , &eb->bflags)) -btrfs_zone_finish_endio (eb->fs_info, eb->start, eb->len); -clear_bit (EXTENT_BUFFER_WRITEBACK , &eb->bflags);smp_mb__after_atomic ();wake_up_bit (&eb->bflags,EXTENT_BUFFER_WRITEBACK );
@@ -4818,8 +4815,7 @@ static int submit_eb_page(struct page *p/* * Implies write in zoned mode. Mark the last eb in a block group. */ -if (cache->seq_zone && eb->start + eb->len == cache->zone_capacity) -set_bit (EXTENT_BUFFER_ZONE_FINISH , &eb->bflags); +btrfs_schedule_zone_finish_bg (cache, eb);btrfs_put_block_group (cache); } ret =write_one_eb (eb, wbc, epd);
fs/btrfs/extent_io.h +0 -1
@@ -32,7 +32,6 @@ enum {/* write IO error */ EXTENT_BUFFER_WRITE_ERR , EXTENT_BUFFER_NO_CHECK, - EXTENT_BUFFER_ZONE_FINISH, };/* these are flags for __process_pages_contig */
fs/btrfs/zoned.c +31 -0
@@ -2046,6 +2046,37 @@ out:btrfs_put_block_group (block_group); } +static void btrfs_zone_finish_endio_workfn (struct work_struct *work) +{ +struct btrfs_block_group *bg = + container_of(work, struct btrfs_block_group, zone_finish_work); + +wait_on_extent_buffer_writeback (bg->last_eb); +free_extent_buffer (bg->last_eb); +btrfs_zone_finish_endio (bg->fs_info, bg->start, bg->length); +btrfs_put_block_group (bg); +} + +void btrfs_schedule_zone_finish_bg (struct btrfs_block_group *bg, +struct extent_buffer *eb) +{ +if (!bg->seq_zone || eb->start + eb->len *2 <= bg->start + bg->zone_capacity) +return ; + +if (WARN_ON (bg->zone_finish_work.func == btrfs_zone_finish_endio_workfn)) { +btrfs_err (bg->fs_info,"double scheduling of bg %llu zone finishing" , + bg->start); +return ; + } + +/* For the work */ +btrfs_get_block_group (bg); +atomic_inc (&eb->refs); + bg->last_eb = eb; +INIT_WORK (&bg->zone_finish_work, btrfs_zone_finish_endio_workfn); +queue_work (system_unbound_wq, &bg->zone_finish_work); +} +void btrfs_clear_data_reloc_bg (struct btrfs_block_group *bg) {struct btrfs_fs_info *fs_info = bg->fs_info;
fs/btrfs/zoned.h +5 -0
@@ -76,6 +76,8 @@ int btrfs_zone_finish(struct btrfs_blockbool btrfs_can_activate_zone (struct btrfs_fs_devices *fs_devices,u64 flags);void btrfs_zone_finish_endio (struct btrfs_fs_info *fs_info,u64 logical,u64 length); +void btrfs_schedule_zone_finish_bg (struct btrfs_block_group *bg, +struct extent_buffer *eb);void btrfs_clear_data_reloc_bg (struct btrfs_block_group *bg);void btrfs_free_zone_cache (struct btrfs_fs_info *fs_info);#else /* CONFIG_BLK_DEV_ZONED */
@@ -233,6 +235,9 @@ static inline bool btrfs_can_activate_zostatic inline void btrfs_zone_finish_endio (struct btrfs_fs_info *fs_info,u64 logical,u64 length) { } +static inline void btrfs_schedule_zone_finish_bg (struct btrfs_block_group *bg, +struct extent_buffer *eb) { } +static inline void btrfs_clear_data_reloc_bg (struct btrfs_block_group *bg) { }static inline void btrfs_free_zone_cache (struct btrfs_fs_info *fs_info) { }
Greg Kroah-Hartman
maintainerPATCH 51/879 btrfs: zoned: zone finish unused block group
In reply to Greg Kroah-HartmanFrom: Naohiro Aota <[email protected]>
commit 74e91b12b11560f01d120751d99d91d54b265d3d upstream.
While the active zones within an active block group are reset, and their active resource is released, the block group itself is kept in the active block group list and marked as active. As a result, the list will contain more than max_active_zones block groups. That itself is not fatal for the device as the zones are properly reset.
However, that inflated list is, of course, strange. Also, a to-appear patch series, which deactivates an active block group on demand, gets confused with the wrong list.
So, fix the issue by finishing the unused block group once it gets read-only, so that we can release the active resource in an early stage.
--- fs/btrfs/block-group.c | 8 ++++++++ 1 file changed, 8 insertions(+)
fs/btrfs/block-group.c +8 -0
@@ -1367,6 +1367,14 @@ void btrfs_delete_unused_bgs(struct btrf goto next; } + ret =btrfs_zone_finish (block_group); +if (ret <0 ) { +btrfs_dec_block_group_ro (block_group); +if (ret == -EAGAIN ) + ret =0 ; + goto next; + } +/* * Want to do this before we do anything else so we can recover * properly if we fail to join the transaction.
Greg Kroah-Hartman
maintainerPATCH 52/879 btrfs: zoned: finish block group when there are no more allocatable bytes left
In reply to Greg Kroah-HartmanFrom: Naohiro Aota <[email protected]>
commit 8b8a53998caefebfe5c8da7a74c2b601caf5dd48 upstream.
Currently, btrfs_zone_finish_endio() finishes a block group only when the written region reaches the end of the block group. We can also finish the block group when no more allocation is possible.
--- fs/btrfs/zoned.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
fs/btrfs/zoned.c +10 -1
@@ -2000,6 +2000,7 @@ void btrfs_zone_finish_endio(struct btrfstruct btrfs_block_group *block_group;struct map_lookup *map;struct btrfs_device *device; +u64 min_alloc_bytes;u64 physical;if (!btrfs_is_zoned (fs_info))
@@ -2008,7 +2009,15 @@ void btrfs_zone_finish_endio(struct btrf block_group =btrfs_lookup_block_group (fs_info, logical);ASSERT (block_group); -if (logical + length < block_group->start + block_group->zone_capacity) +/* No MIXED_BG on zoned btrfs. */ +if (block_group->flags &BTRFS_BLOCK_GROUP_DATA ) + min_alloc_bytes = fs_info->sectorsize; +else + min_alloc_bytes = fs_info->nodesize; + +/* Bail out if we can allocate more data from this block group. */ +if (logical + length + min_alloc_bytes <= + block_group->start + block_group->zone_capacity) goto out;spin_lock (&block_group->lock);
Greg Kroah-Hartman
maintainerPATCH 53/879 btrfs: zoned: fix comparison of alloc_offset vs meta_write_pointer
In reply to Greg Kroah-HartmanFrom: Naohiro Aota <[email protected]>
commit aa9ffadfcae33e611d8c2d476bcc2aa0d273b587 upstream.
The block_group->alloc_offset is an offset from the start of the block group. OTOH, the ->meta_write_pointer is an address in the logical space. So, we should compare the alloc_offset shifted with the block_group->start.
--- fs/btrfs/zoned.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/zoned.c +1 -1
@@ -1896,7 +1896,7 @@ int btrfs_zone_finish(struct btrfs_block/* Check if we have unwritten allocated space */ if ((block_group->flags & (BTRFS_BLOCK_GROUP_METADATA |BTRFS_BLOCK_GROUP_SYSTEM )) && - block_group->alloc_offset > block_group->meta_write_pointer) { + block_group->start + block_group->alloc_offset > block_group->meta_write_pointer) {spin_unlock (&block_group->lock);return -EAGAIN ; }
Greg Kroah-Hartman
maintainerPATCH 54/879 iommu/vt-d: Add RPLS to quirk list to skip TE disabling
In reply to Greg Kroah-HartmanFrom: Tejas Upadhyay <[email protected]>
[ Upstream commit 0a967f5bfd9134b89681cae58deb222e20840e76 ]
The VT-d spec requires (10.4.4 Global Command Register, TE field) that:
Hardware implementations supporting DMA draining must drain any in-flight DMA read/write requests queued within the Root-Complex before completing the translation enable command and reflecting the status of the command through the TES field in the Global Status register.
Unfortunately, some integrated graphic devices fail to do so after some kind of power state transition. As the result, the system might stuck in iommu_disable_translati on(), waiting for the completion of TE transition.
This adds RPLS to a quirk list for those devices and skips TE disabling if the qurik hits.
--- drivers/iommu/intel/iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/intel/iommu.c +1 -1
@@ -5031,7 +5031,7 @@ static void quirk_igfx_skip_te_disable(struct pci_dev *dev) ver = (dev->device >>8 ) &0xff ;if (ver !=0x45 && ver !=0x46 && ver !=0x4c && ver !=0x4e && ver !=0x8a && ver !=0x98 && - ver !=0x9a ) + ver !=0x9a && ver !=0xa7 )return ;if (risky_device (dev))
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 55/879 drm/selftests: fix a shift-out-of-bounds bug
In reply to Greg Kroah-HartmanFrom: Arunpravin <[email protected]>
[ Upstream commit fc3785fb56a27304c769af730d079f4337d4dc76 ]
pass the correct size value computed using the max_order.
<log snip>
[ 68.124177][ T1] UBSAN: shift-out-of-bounds in include/linux/log2.h:67:13 [ 68.125333][ T1] shift exponent 4294967295 is too large for 32-bit type 'long unsigned int' [ 68.126563][ T1] CPU: 0 PID: 1 Comm: swapper Not tainted 5.17.0-rc2-00311-g39ec47bbfd5d #2 [ 68.127758][ T1] Call Trace: [ 68.128187][ T1] dump_stack_lvl (lib/dump_stack.c:108) [ 68.128793][ T1] dump_stack (lib/dump_stack.c:114) [ 68.129331][ T1] ubsan_epilogue (lib/ubsan.c:152) [ 68.129958][ T1] __ubsan_handle_shift_out_of_bounds.cold (arch/x86/include/asm/smap.h:85)
[ 68.130791][ T1] ? drm_block_alloc+0x28/0x80 [ 68.131582][ T1] ? rcu_read_lock_sched_held (kernel/rcu/update.c:125) [ 68.132215][ T1] ? kmem_cache_alloc (include/trace/events/kmem.h:54 mm/slab.c:3501) [ 68.132878][ T1] ? mark_free+0x2e/0x80 [ 68.133524][ T1] drm_buddy_init.cold (include/linux/log2.h:67 drivers/gpu/drm/drm_buddy.c:131) [ 68.134145][ T1] ? test_drm_cmdline_init (drivers/gpu/drm/selftests/test-drm_buddy.c:87)
[ 68.134770][ T1] igt_buddy_alloc_limit (drivers/gpu/drm/selftests/test-drm_buddy.c:30) [ 68.135472][ T1] ? vprintk_default (kernel/printk/printk.c:2257) [ 68.136057][ T1] ? test_drm_cmdline_init (drivers/gpu/drm/selftests/test-drm_buddy.c:87)
[ 68.136812][ T1] test_drm_buddy_init (drivers/gpu/drm/selftests/drm_selftest.c:77 drivers/gpu/drm/selftests/test-drm_buddy.c:95) [ 68.137475][ T1] do_one_initcall (init/main.c:1300) [ 68.138111][ T1] ? parse_args (kernel/params.c:609 kernel/params.c:146 kernel/params.c:188) [ 68.138717][ T1] do_basic_setup (init/main.c:1372 init/main.c:1389 init/main.c:1408) [ 68.139366][ T1] kernel_init_freeable (init/main.c:1617) [ 68.140040][ T1] ? rest_init (init/main.c:1494) [ 68.140634][ T1] kernel_init (init/main.c:1504) [ 68.141155][ T1] ret_from_fork (arch/x86/entry/entry_32.S:772) [ 68.141607][ T1] ================================================================================ [ 68.146730][ T1] ------------[ cut here ]------------ [ 68.147460][ T1] kernel BUG at drivers/gpu/drm/drm_buddy.c:140! [ 68.148280][ T1] invalid opcode: 0000 [#1] [ 68.148895][ T1] CPU: 0 PID: 1 Comm: swapper Not tainted 5.17.0-rc2-00311-g39ec47bbfd5d #2 [ 68.149896][ T1] EIP: drm_buddy_init (drivers/gpu/drm/drm_buddy.c:140 (discriminator 1))
For more details: https://lists.01.org/hyperkitty/list/[email protected]/thread/FDIF3HCILZNN5UQAZMOR7E3MQSMHHKWU/
--- drivers/gpu/drm/selftests/test-drm_buddy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/selftests/test-drm_buddy.c +3 -3
@@ -902,14 +902,13 @@ static int igt_buddy_alloc_range(void *arg)static int igt_buddy_alloc_limit (void *arg) { -u64 end, size =U64_MAX , start =0 ; +u64 size =U64_MAX , start =0 ;struct drm_buddy_block *block;unsigned long flags =0 ;LIST_HEAD (allocated);struct drm_buddy mm;int err; - size = end =round_down (size,4096 ); err =drm_buddy_init (&mm, size,PAGE_SIZE );if (err)return err;
@@ -921,7 +920,8 @@ static int igt_buddy_alloc_limit(void *arg) goto out_fini; } - err =drm_buddy_alloc_blocks (&mm, start, end, size, + size = mm.chunk_size << mm.max_order; + err =drm_buddy_alloc_blocks (&mm, start, size, size,PAGE_SIZE , &allocated, flags);if (unlikely (err))
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 56/879 drm/vmwgfx: validate the screen formats
In reply to Greg Kroah-HartmanFrom: Zack Rusin <[email protected]>
[ Upstream commit 8bb75aeb58bd688d70827ae179bd3da57b6d975b ]
The kms code wasn't validating the modifiers and was letting through unsupported formats. rgb8 was never properly supported and has no matching svga screen target format so remove it.
This fixes format/modifier failures in kms_addfb_basic from IGT.
--- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 30 +++++++++++++++-------------- drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 1 - 2 files changed, 16 insertions(+), 15 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +16 -14
@@ -914,6 +914,15 @@ static int vmw_kms_new_framebuffer_surface(struct vmw_private *dev_priv,* Sanity checks. */ +if (!drm_any_plane_has_format (&dev_priv->drm, + mode_cmd->pixel_format, + mode_cmd->modifier[0 ])) { +drm_dbg (&dev_priv->drm, +"unsupported pixel format %p4cc / modifier 0x%llx\n" , + &mode_cmd->pixel_format, mode_cmd->modifier[0 ]); +return -EINVAL ; + } +/* Surface must be marked as a scanout. */ if (unlikely (!surface->metadata.scanout))return -EINVAL ;
@@ -1236,20 +1245,13 @@ static int vmw_kms_new_framebuffer_bo(struct vmw_private *dev_priv,return -EINVAL ; } -/* Limited framebuffer color depth support for screen objects */ -if (dev_priv->active_display_unit == vmw_du_screen_object) { -switch (mode_cmd->pixel_format) { -case DRM_FORMAT_XRGB8888 : -case DRM_FORMAT_ARGB8888 : -break ; -case DRM_FORMAT_XRGB1555 : -case DRM_FORMAT_RGB565 : -break ; -default : -DRM_ERROR ("Invalid pixel format: %p4cc\n" , - &mode_cmd->pixel_format); -return -EINVAL ; - } +if (!drm_any_plane_has_format (&dev_priv->drm, + mode_cmd->pixel_format, + mode_cmd->modifier[0 ])) { +drm_dbg (&dev_priv->drm, +"unsupported pixel format %p4cc / modifier 0x%llx\n" , + &mode_cmd->pixel_format, mode_cmd->modifier[0 ]); +return -EINVAL ; } vfbd =kzalloc (sizeof (*vfbd),GFP_KERNEL );
drivers/gpu/drm/vmwgfx/vmwgfx_kms.h +0 -1
@@ -247,7 +247,6 @@ struct vmw_framebuffer_bo {static const uint32_t __maybe_unused vmw_primary_plane_formats[] = {DRM_FORMAT_XRGB1555 ,DRM_FORMAT_RGB565 , -DRM_FORMAT_RGB888 ,DRM_FORMAT_XRGB8888 ,DRM_FORMAT_ARGB8888 , };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 57/879 ath11k: fix the warning of dev_wake in mhi_pm_disable_transition()
In reply to Greg Kroah-HartmanFrom: Wen Gong <[email protected]>
[ Upstream commit 0d7a8a6204ea9271f1d0a8c66a9fd2f54d2e3cbc ]
When test device recovery with below command, it has warning in message as below.
echo assert > /sys/kernel/debug/ath11k/wcn6855\ hw2.0/simulate_fw_crash echo assert > /sys/kernel/debug/ath11k/qca6390\ hw2.0/simulate_fw_crash
warning message:
[ 1965.642121] ath11k_pci 0000:06:00.0: simulating firmware assert crash [ 1968.471364] ieee80211 phy0: Hardware restart was requested [ 1968.511305] ------------[ cut here ]------------ [ 1968.511368] WARNING: CPU: 3 PID: 1546 at drivers/bus/mhi/core/pm.c:505 mhi_pm_disable_transition+0xb37/0xda0 [mhi] [ 1968.511443] Modules linked in: ath11k_pci ath11k mac80211 libarc4 cfg80211 qmi_helpers qrtr_mhi mhi qrtr nvme nvme_core [ 1968.511563] CPU: 3 PID: 1546 Comm: kworker/u17:0 Kdump: loaded Tainted: G W 5.17.0-rc3-wt-ath+ #579 [ 1968.511629] Hardware name: Intel(R) Client Systems NUC8i7HVK/NUC8i7HVB, BIOS HNKBLi70.86A.0067.2021.0528.1339 05/28/2021 [ 1968.511704] Workqueue: mhi_hiprio_wq mhi_pm_st_worker [mhi] [ 1968.511787] RIP: 0010:mhi_pm_disable_transition+0xb37/0xda0 [mhi] [ 1968.511870] Code: a9 fe ff ff 4c 89 ff 44 89 04 24 e8 03 46 f6 e5 44 8b 04 24 41 83 f8 01 0f 84 21 fe ff ff e9 4c fd ff ff 0f 0b e9 af f8 ff ff <0f> 0b e9 5c f8 ff ff 48 89 df e8 da 9e ee e3 e9 12 fd ff ff 4c 89 [ 1968.511923] RSP: 0018:ffffc900024efbf0 EFLAGS: 00010286 [ 1968.511969] RAX: 00000000ffffffff RBX: ffff88811d241250 RCX: ffffffffc0176922 [ 1968.512014] RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffff888118a90a24 [ 1968.512059] RBP: ffff888118a90800 R08: 0000000000000000 R09: ffff888118a90a27 [ 1968.512102] R10: ffffed1023152144 R11: 0000000000000001 R12: ffff888118a908ac [ 1968.512229] R13: ffff888118a90928 R14: dffffc0000000000 R15: ffff888118a90a24 [ 1968.512310] FS: 0000000000000000(0000) GS:ffff888234200000(0000) knlGS:0000000000000000 [ 1968.512405] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1968.512493] CR2: 00007f5538f443a8 CR3: 000000016dc28001 CR4: 00000000003706e0 [ 1968.512587] Call Trace: [ 1968.512672] <TASK> [ 1968.512751] ? _raw_spin_unlock_irq+0x1f/0x40 [ 1968.512859] mhi_pm_st_worker+0x3ac/0x790 [mhi] [ 1968.512959] ? mhi_pm_mission_mode_transition.isra.0+0x7d0/0x7d0 [mhi] [ 1968.513063] process_one_work+0x86a/0x1400 [ 1968.513184] ? pwq_dec_nr_in_flight+0x230/0x230 [ 1968.513312] ? move_linked_works+0x125/0x290 [ 1968.513416] worker_thread+0x6db/0xf60 [ 1968.513536] ? process_one_work+0x1400/0x1400 [ 1968.513627] kthread+0x241/0x2d0 [ 1968.513733] ? kthread_complete_and_exit+0x20/0x20 [ 1968.513821] ret_from_fork+0x22/0x30 [ 1968.513924] </TASK>
Reason is mhi_deassert_dev_wake() from mhi_device_put() is called but mhi_assert_dev_wake() from __mhi_device_get_sync() is not called in progress of recovery. Commit 8e0559921f9a ("bus: mhi: core:
Skip device wake in error or shutdown state") add check for the pm_state of mhi in __mhi_device_get_sync(), and the pm_state is not the normal state untill recovery is completed, so it leads the dev_wake is not 0 and above warning print in mhi_pm_disable_transition() while checking mhi_cntrl->dev_wake.
Add check in ath11k_pci_write32()/ath11k_pci_read32() to skip call mhi_device_put() if mhi_device_get_sync() does not really do wake, then the warning gone.
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03003-QCAHSPSWPL_V1_V2_SILICONZ_LITE-2
--- drivers/net/wireless/ath/ath11k/pci.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/ath11k/pci.c +8 -4
@@ -191,6 +191,7 @@ void ath11k_pci_write32(struct ath11k_base *ab, u32 offset, u32 value) {struct ath11k_pci *ab_pci =ath11k_pci_priv (ab);u32 window_start; +int ret =0 ;/* for offset beyond BAR + 4K - 32, may * need to wakeup MHI to access.
@@ -198,7 +199,7 @@ void ath11k_pci_write32(struct ath11k_base *ab, u32 offset, u32 value)if (ab->hw_params.wakeup_mhi &&test_bit (ATH11K_PCI_FLAG_INIT_DONE , &ab_pci->flags) && offset >=ACCESS_ALWAYS_OFF ) -mhi_device_get_sync (ab_pci->mhi_ctrl->mhi_dev); + ret =mhi_device_get_sync (ab_pci->mhi_ctrl->mhi_dev);if (offset <WINDOW_START ) {iowrite32 (value, ab->mem + offset);
@@ -222,7 +223,8 @@ void ath11k_pci_write32(struct ath11k_base *ab, u32 offset, u32 value)if (ab->hw_params.wakeup_mhi &&test_bit (ATH11K_PCI_FLAG_INIT_DONE , &ab_pci->flags) && - offset >=ACCESS_ALWAYS_OFF ) + offset >=ACCESS_ALWAYS_OFF && + !ret)mhi_device_put (ab_pci->mhi_ctrl->mhi_dev); }
@@ -230,6 +232,7 @@ u32 ath11k_pci_read32(struct ath11k_base *ab, u32 offset) {struct ath11k_pci *ab_pci =ath11k_pci_priv (ab);u32 val, window_start; +int ret =0 ;/* for offset beyond BAR + 4K - 32, may * need to wakeup MHI to access.
@@ -237,7 +240,7 @@ u32 ath11k_pci_read32(struct ath11k_base *ab, u32 offset)if (ab->hw_params.wakeup_mhi &&test_bit (ATH11K_PCI_FLAG_INIT_DONE , &ab_pci->flags) && offset >=ACCESS_ALWAYS_OFF ) -mhi_device_get_sync (ab_pci->mhi_ctrl->mhi_dev); + ret =mhi_device_get_sync (ab_pci->mhi_ctrl->mhi_dev);if (offset <WINDOW_START ) { val =ioread32 (ab->mem + offset);
@@ -261,7 +264,8 @@ u32 ath11k_pci_read32(struct ath11k_base *ab, u32 offset)if (ab->hw_params.wakeup_mhi &&test_bit (ATH11K_PCI_FLAG_INIT_DONE , &ab_pci->flags) && - offset >=ACCESS_ALWAYS_OFF ) + offset >=ACCESS_ALWAYS_OFF && + !ret)mhi_device_put (ab_pci->mhi_ctrl->mhi_dev);return val;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 58/879 drm/virtio: fix NULL pointer dereference in virtio_gpu_conn_get_modes
In reply to Greg Kroah-HartmanFrom: Liu Zixian <[email protected]>
[ Upstream commit 194d250cdc4a40ccbd179afd522a9e9846957402 ]
drm_cvt_mode may return NULL and we should check it.
This bug is found by syzkaller:
FAULT_INJECTION stacktrace:
[ 168.567394] FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 1 [ 168.567403] CPU: 1 PID: 6425 Comm: syz Kdump: loaded Not tainted 4.19.90-vhulk2201.1.0.h1035.kasan.eulerosv2r10.aarch64 #1 [ 168.567406] Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015 [ 168.567408] Call trace: [ 168.567414] dump_backtrace+0x0/0x310 [ 168.567418] show_stack+0x28/0x38 [ 168.567423] dump_stack+0xec/0x15c [ 168.567427] should_fail+0x3ac/0x3d0 [ 168.567437] __should_failslab+0xb8/0x120 [ 168.567441] should_failslab+0x28/0xc0 [ 168.567445] kmem_cache_alloc_trace+0x50/0x640 [ 168.567454] drm_mode_create+0x40/0x90 [ 168.567458] drm_cvt_mode+0x48/0xc78 [ 168.567477] virtio_gpu_conn_get_modes+0xa8/0x140 [virtio_gpu] [ 168.567485] drm_helper_probe_single_connector_modes+0x3a4/0xd80 [ 168.567492] drm_mode_getconnector+0x2e0/0xa70 [ 168.567496] drm_ioctl_kernel+0x11c/0x1d8 [ 168.567514] drm_ioctl+0x558/0x6d0 [ 168.567522] do_vfs_ioctl+0x160/0xf30 [ 168.567525] ksys_ioctl+0x98/0xd8 [ 168.567530] __arm64_sys_ioctl+0x50/0xc8 [ 168.567536] el0_svc_common+0xc8/0x320 [ 168.567540] el0_svc_handler+0xf8/0x160 [ 168.567544] el0_svc+0x10/0x218
KASAN stacktrace:
[ 168.567561] BUG: KASAN: null-ptr-deref in virtio_gpu_conn_get_modes+0xb4/0x140 [virtio_gpu] [ 168.567565] Read of size 4 at addr 0000000000000054 by task syz/6425 [ 168.567566] [ 168.567571] CPU: 1 PID: 6425 Comm: syz Kdump: loaded Not tainted 4.19.90-vhulk2201.1.0.h1035.kasan.eulerosv2r10.aarch64 #1 [ 168.567573] Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015 [ 168.567575] Call trace: [ 168.567578] dump_backtrace+0x0/0x310 [ 168.567582] show_stack+0x28/0x38 [ 168.567586] dump_stack+0xec/0x15c [ 168.567591] kasan_report+0x244/0x2f0 [ 168.567594] __asan_load4+0x58/0xb0 [ 168.567607] virtio_gpu_conn_get_modes+0xb4/0x140 [virtio_gpu] [ 168.567612] drm_helper_probe_single_connector_modes+0x3a4/0xd80 [ 168.567617] drm_mode_getconnector+0x2e0/0xa70 [ 168.567621] drm_ioctl_kernel+0x11c/0x1d8 [ 168.567624] drm_ioctl+0x558/0x6d0 [ 168.567628] do_vfs_ioctl+0x160/0xf30 [ 168.567632] ksys_ioctl+0x98/0xd8 [ 168.567636] __arm64_sys_ioctl+0x50/0xc8 [ 168.567641] el0_svc_common+0xc8/0x320 [ 168.567645] el0_svc_handler+0xf8/0x160 [ 168.567649] el0_svc+0x10/0x218
--- drivers/gpu/drm/virtio/virtgpu_display.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/virtio/virtgpu_display.c +2 -0
@@ -179,6 +179,8 @@ static int virtio_gpu_conn_get_modes(struct drm_connector *connector)DRM_DEBUG ("add mode: %dx%d\n" , width, height); mode =drm_cvt_mode (connector->dev, width, height,60 , false, false, false); +if (!mode) +return count; mode->type |=DRM_MODE_TYPE_PREFERRED ;drm_mode_probed_add (connector, mode); count++;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 59/879 selftests/bpf: Fix vfs_link kprobe definition
In reply to Greg Kroah-HartmanFrom: Nikolay Borisov <[email protected]>
[ Upstream commit e299bcd4d16ff86f46c48df1062c8aae0eca1ed8 ]
Since commit 6521f8917082 ("namei: prepare for idmapped mounts") vfs_link's prototype was changed, the kprobe definition in profiler selftest in turn wasn't updated. The result is that all argument after the first are now stored in different registers. This means that self-test has been broken ever since. Fix it by updating the kprobe definition accordingly.
--- tools/testing/selftests/bpf/progs/profiler.inc.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
tools/testing/selftests/bpf/progs/profiler.inc.h +3 -2
@@ -826,8 +826,9 @@ int kprobe_ret__do_filp_open(struct pt_regs* ctx) SEC("kprobe/vfs_link")int BPF_KPROBE (kprobe__vfs_link , -struct dentry * old_dentry,struct inode * dir, -struct dentry * new_dentry,struct inode ** delegated_inode) +struct dentry * old_dentry,struct user_namespace *mnt_userns, +struct inode * dir,struct dentry * new_dentry, +struct inode ** delegated_inode) {struct bpf_func_stats_ctx stats_ctx;bpf_stats_enter (&stats_ctx, profiler_bpf_vfs_link);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 60/879 selftests/bpf: Fix parsing of prog types in UAPI hdr for bpftool sync
In reply to Greg Kroah-HartmanFrom: Quentin Monnet <[email protected]>
[ Upstream commit 4eeebce6ac4ad80ee8243bb847c98e0e55848d47 ]
The script for checking that various lists of types in bpftool remain in sync with the UAPI BPF header uses a regex to parse enum bpf_prog_type. If this enum contains a set of values different from the list of program types in bpftool, it complains.
This script should have reported the addition, some time ago, of the new BPF_PROG_TYPE_SYSCALL, which was not reported to bpftool's program types list. It failed to do so, because it failed to parse that new type from the enum. This is because the new value, in the BPF header, has an explicative comment on the same line, and the regex does not support that.
Let's update the script to support parsing enum values when they have comments on the same line.
--- tools/testing/selftests/bpf/test_bpftool_synctypes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/bpf/test_bpftool_synctypes.py +1 -1
@@ -180,7 +180,7 @@ class FileExtractor(object): @enum_name: name of the enum to parse """ start_marker = re.compile(f'enum {enum_name} {{\n') - pattern = re.compile('^\s*(BPF_\w+),?$') + pattern = re.compile('^\s*(BPF_\w+),?(\s+/\*.*\*/)?$') end_marker = re.compile('^};') parser = BlockParser(self.reader) parser.search_block(start_marker)
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 61/879 ath11k: Change max no of active probe SSID and BSSID to fw capability
In reply to Greg Kroah-HartmanFrom: Karthikeyan Kathirvel <[email protected]>
[ Upstream commit 50dc9ce9f80554a88e33b73c30851acf2be36ed3 ]
The maximum number of SSIDs in a for active probe requests is currently reported as 16 (WLAN_SCAN_PARAMS_MAX_SSID) when registering the driver. The scan_req_params structure only has the capacity to hold 10 SSIDs. This leads to a buffer overflow which can be triggered from wpa_supplicant in userspace. When copying the SSIDs into the scan_req_params structure in the ath11k_mac_op_hw_scan route, it can overwrite the extraie pointer.
Firmware supports 16 ssid * 4 bssid, for each ssid 4 bssid combo probe request will be sent, so totally 64 probe requests supported. So set both max ssid and bssid to 16 and 4 respectively. Remove the redundant macros of ssid and bssid.
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01300-QCAHKSWPL_SILICONZ-1
--- drivers/net/wireless/ath/ath11k/wmi.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
drivers/net/wireless/ath/ath11k/wmi.h +2 -10
@@ -3088,9 +3088,6 @@ enum scan_dwelltime_adaptive_mode {SCAN_DWELL_MODE_STATIC =4 }; -#define WLAN_SCAN_MAX_NUM_SSID 10 -#define WLAN_SCAN_MAX_NUM_BSSID 10 -#define WLAN_SSID_MAX_LEN 32struct element_info {
@@ -3105,7 +3102,6 @@ struct wlan_ssid {#define WMI_IE_BITMAP_SIZE 8 -#define WMI_SCAN_MAX_NUM_SSID 0x0A/* prefix used by scan requestor ids on the host */ #define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
@@ -3113,10 +3109,6 @@ struct wlan_ssid {/* host cycles through the lower 12 bits to generate ids */ #define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000 -#define WLAN_SCAN_PARAMS_MAX_SSID 16 -#define WLAN_SCAN_PARAMS_MAX_BSSID 4 -#define WLAN_SCAN_PARAMS_MAX_IE_LEN 256 -/* Values lower than this may be refused by some firmware revisions with a scan * completion with a timedout reason. */
@@ -3312,8 +3304,8 @@ struct scan_req_params {u32 n_probes;u32 *chan_list;u32 notify_scan_events; -struct wlan_ssid ssid[WLAN_SCAN_MAX_NUM_SSID ]; -struct wmi_mac_addr bssid_list[WLAN_SCAN_MAX_NUM_BSSID ]; +struct wlan_ssid ssid[WLAN_SCAN_PARAMS_MAX_SSID ]; +struct wmi_mac_addr bssid_list[WLAN_SCAN_PARAMS_MAX_BSSID ];struct element_info extraie;struct element_info htcap;struct element_info vhtcap;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 62/879 selftests/bpf: Fix file descriptor leak in load_kallsyms()
In reply to Greg Kroah-HartmanFrom: Yuntao Wang <[email protected]>
[ Upstream commit 2d0df01974ce2b59b6f7d5bd3ea58d74f12ddf85 ]
Currently, if sym_cnt > 0, it just returns and does not close file, fix it.
--- tools/testing/selftests/bpf/trace_helpers.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
tools/testing/selftests/bpf/trace_helpers.c +5 -4
@@ -25,15 +25,12 @@ static int ksym_cmp(const void *p1, const void *p2)int load_kallsyms (void ) { -FILE *f =fopen ("/proc/kallsyms" ,"r" ); +FILE *f;char func[256 ], buf[256 ];char symbol;void *addr;int i =0 ; -if (!f) -return -ENOENT ; -/* * This is called/used from multiplace places, * load symbols just once.
@@ -41,6 +38,10 @@ int load_kallsyms(void)if (sym_cnt)return 0 ; + f =fopen ("/proc/kallsyms" ,"r" ); +if (!f) +return -ENOENT ; +while (fgets (buf,sizeof (buf), f)) {if (sscanf (buf,"%p %c %s" , &addr, &symbol, func) !=3 )break ;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 63/879 rtw89: ser: fix CAM leaks occurring in L2 reset
In reply to Greg Kroah-HartmanFrom: Zong-Zhe Yang <[email protected]>
[ Upstream commit b169f877f001a474fb89939842c390518160bcc5 ]
The CAM, meaning address CAM and bssid CAM here, will get leaks during SER (system error recover) L2 reset process and ieee80211_restart_hw() which is called by L2 reset process eventually.
The normal flow would be like
-> add interface (acquire 1)
-> enter ips (release 1)
-> leave ips (acquire 1)
-> connection (occupy 1) <(A) 1 leak after L2 reset if non-sec connection>
The ieee80211_restart_hw() flow (under connection) -> ieee80211 reconfig
-> add interface (acquire 1)
-> leave ips (acquire 1)
-> connection (occupy (A) + 2) <(B) 1 more leak>
Originally, CAM is released before HW restart only if connection is under security. Now, release CAM whatever connection it is to fix leak in (A). OTOH, check if CAM is already valid to avoid acquiring multiple times to fix (B).
Besides, if AP mode, release address CAM of all stations before HW restart.
--- drivers/net/wireless/realtek/rtw89/cam.c | 14 ++++++++++++-- drivers/net/wireless/realtek/rtw89/ser.c | 21 +++++++++++++++++++++ 2 files changed, 33 insertions(+), 2 deletions(-)
drivers/net/wireless/realtek/rtw89/cam.c +12 -2
@@ -421,10 +421,8 @@ static void rtw89_cam_reset_key_iter(struct ieee80211_hw *hw, void *data) {struct rtw89_dev *rtwdev = (struct rtw89_dev *)data; -struct rtw89_vif *rtwvif = (struct rtw89_vif *)vif->drv_priv;rtw89_cam_sec_key_del (rtwdev, vif, sta, key, false); -rtw89_cam_deinit (rtwdev, rtwvif); } void rtw89_cam_deinit_addr_cam(struct rtw89_dev *rtwdev,
@@ -480,6 +478,12 @@ int rtw89_cam_init_addr_cam(struct rtw89_dev *rtwdev,int i;int ret; +if (unlikely (addr_cam->valid)) { +rtw89_debug (rtwdev,RTW89_DBG_FW , +"addr cam is already valid; skip init\n" ); +return 0 ; + } + ret =rtw89_cam_get_avail_addr_cam (rtwdev, &addr_cam_idx);if (ret) {rtw89_err (rtwdev,"failed to get available addr cam\n" );
@@ -531,6 +535,12 @@ static int rtw89_cam_init_bssid_cam(struct rtw89_dev *rtwdev,u8 bssid_cam_idx;int ret; +if (unlikely (bssid_cam->valid)) { +rtw89_debug (rtwdev,RTW89_DBG_FW , +"bssid cam is already valid; skip init\n" ); +return 0 ; + } + ret =rtw89_cam_get_avail_bssid_cam (rtwdev, &bssid_cam_idx);if (ret) {rtw89_err (rtwdev,"failed to get available bssid cam\n" );
drivers/net/wireless/realtek/rtw89/ser.c +21 -0
@@ -220,11 +220,32 @@ static void ser_reset_vif(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif) rtwvif->trigger = false; } +static void ser_sta_deinit_addr_cam_iter (void *data,struct ieee80211_sta *sta) +{ +struct rtw89_dev *rtwdev = (struct rtw89_dev *)data; +struct rtw89_sta *rtwsta = (struct rtw89_sta *)sta->drv_priv; + +rtw89_cam_deinit_addr_cam (rtwdev, &rtwsta->addr_cam); +} + +static void ser_deinit_cam (struct rtw89_dev *rtwdev,struct rtw89_vif *rtwvif) +{ +if (rtwvif->net_type ==RTW89_NET_TYPE_AP_MODE ) +ieee80211_iterate_stations_atomic (rtwdev->hw, + ser_sta_deinit_addr_cam_iter, + rtwdev); + +rtw89_cam_deinit (rtwdev, rtwvif); +} +static void ser_reset_mac_binding (struct rtw89_dev *rtwdev) {struct rtw89_vif *rtwvif;rtw89_cam_reset_keys (rtwdev); +rtw89_for_each_rtwvif (rtwdev, rtwvif) +ser_deinit_cam (rtwdev, rtwvif); +rtw89_core_release_all_bits_map (rtwdev->mac_id_map,RTW89_MAX_MAC_ID_NUM );rtw89_for_each_rtwvif (rtwdev, rtwvif)ser_reset_vif (rtwdev, rtwvif);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 64/879 rtw89: fix misconfiguration on hw_scan channel time
In reply to Greg Kroah-HartmanFrom: Po Hao Huang <[email protected]>
[ Upstream commit 65ee4971a262a024e239e5d2b7f4dee1b3dff40e ]
Without this patch, hw scan won't stay long enough on DFS/passive channels. Found previous logic error and fix it.
--- drivers/net/wireless/realtek/rtw89/fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/realtek/rtw89/fw.c +1 -1
@@ -2065,7 +2065,7 @@ static void rtw89_hw_scan_add_chan(struct rtw89_dev *rtwdev, int chan_type, ch_info->num_pkt =0 ;break ;case RTW89_CHAN_DFS : - ch_info->period =min_t (u8, ch_info->period, + ch_info->period =max_t (u8, ch_info->period,RTW89_DFS_CHAN_TIME ); ch_info->dwell_time =RTW89_DWELL_TIME ;break ;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 65/879 mwifiex: add mutex lock for call in mwifiex_dfs_chan_sw_work_queue
In reply to Greg Kroah-HartmanFrom: Niels Dossche <[email protected]>
[ Upstream commit 3e12968f6d12a34b540c39cbd696a760cc4616f0 ]
cfg80211_ch_switch_notify uses ASSERT_WDEV_LOCK to assert that net_device->ieee80211_ptr->mtx (which is the same as priv->wdev.mtx) is held during the function's execution. mwifiex_dfs_chan_sw_work_queue is one of its callers, which does not hold that lock, therefore violating the assertion.
Add a lock around the call.
Disclaimer:
I am currently working on a static analyser to detect missing locks. This was a reported case. I manually verified the report by looking at the code, so that I do not send wrong information or patches. After concluding that this seems to be a true positive, I created this patch.
However, as I do not in fact have this particular hardware, I was unable to test it.
--- drivers/net/wireless/marvell/mwifiex/11h.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/wireless/marvell/mwifiex/11h.c +2 -0
@@ -303,5 +303,7 @@ void mwifiex_dfs_chan_sw_work_queue(struct work_struct *work)mwifiex_dbg (priv->adapter,MSG ,"indicating channel switch completion to kernel\n" ); +mutex_lock (&priv->wdev.mtx);cfg80211_ch_switch_notify (priv->netdev, &priv->dfs_chandef); +mutex_unlock (&priv->wdev.mtx); }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 66/879 b43legacy: Fix assigning negative value to unsigned variable
In reply to Greg Kroah-HartmanFrom: Haowen Bai <[email protected]>
[ Upstream commit 3f6b867559b3d43a7ce1b4799b755e812fc0d503 ]
fix warning reported by smatch:drivers/net/wireless/broadcom/b43legacy/phy.c:1181 b43legacy_phy_lo_b_measure()
warn: assigning (-772) to unsigned variable 'fval'
--- drivers/net/wireless/broadcom/b43legacy/phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/broadcom/b43legacy/phy.c +1 -1
@@ -1123,7 +1123,7 @@ void b43legacy_phy_lo_b_measure(struct b43legacy_wldev *dev)struct b43legacy_phy *phy = &dev->phy;u16 regstack[12 ] = {0 };u16 mls; -u16 fval; +s16 fval;int i;int j;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 67/879 b43: Fix assigning negative value to unsigned variable
In reply to Greg Kroah-HartmanFrom: Haowen Bai <[email protected]>
[ Upstream commit 11800d893b38e0e12d636c170c1abc19c43c730c ]
fix warning reported by smatch:drivers/net/wireless/broadcom/b43/phy_n.c:585 b43_nphy_adjust_lna_gain_table()
warn: assigning (-2) to unsigned variable '*(lna_gain[0])'
--- drivers/net/wireless/broadcom/b43/phy_n.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/broadcom/b43/phy_n.c +1 -1
@@ -582,7 +582,7 @@ static void b43_nphy_adjust_lna_gain_table(struct b43_wldev *dev)u16 data[4 ];s16 gain[2 ];u16 minmax[2 ]; -static const u16 lna_gain[4 ] = {-2 ,10 ,19 ,25 }; +static const s16 lna_gain[4 ] = {-2 ,10 ,19 ,25 };if (nphy->hang_avoid)b43_nphy_stay_in_carrier_search (dev,1 );
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 68/879 ipw2x00: Fix potential NULL dereference in libipw_xmit()
In reply to Greg Kroah-HartmanFrom: Haowen Bai <[email protected]>
[ Upstream commit e8366bbabe1d207cf7c5b11ae50e223ae6fc278b ]
crypt and crypt->ops could be null, so we need to checking null before dereference
--- drivers/net/wireless/intel/ipw2x00/libipw_tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/intel/ipw2x00/libipw_tx.c +1 -1
@@ -383,7 +383,7 @@ netdev_tx_t libipw_xmit(struct sk_buff *skb, struct net_device *dev)/* Each fragment may need to have room for encryption * pre/postfix */ -if (host_encrypt) +if (host_encrypt && crypt && crypt->ops) bytes_per_frag -= crypt->ops->extra_mpdu_prefix_len + crypt->ops->extra_mpdu_postfix_len;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 69/879 ipv6: fix locking issues with loops over idev->addr_list
In reply to Greg Kroah-HartmanFrom: Niels Dossche <[email protected]>
[ Upstream commit 51454ea42c1ab4e0c2828bb0d4d53957976980de ]
idev->addr_list needs to be protected by idev->lock. However, it is not always possible to do so while iterating and performing actions on inet6_ifaddr instances. For example, multiple functions (like addrconf_{join,leave}_anycast) eventually call down to other functions that acquire the idev->lock. The current code temporarily unlocked the idev->lock during the loops, which can cause race conditions. Moving the locks up is also not an appropriate solution as the ordering of lock acquisition will be inconsistent with for example mc_lock.
This solution adds an additional field to inet6_ifaddr that is used to temporarily add the instances to a temporary list while holding idev->lock. The temporary list can then be traversed without holding idev->lock. This change was done in two places. In addrconf_ifdown, the list_for_each_entry_safe variant of the list loop is also no longer necessary as there is no deletion within that specific loop.
--- include/net/if_inet6.h | 8 ++++++++ net/ipv6/addrconf.c | 30 ++++++++++++++++++++++++------ 2 files changed, 32 insertions(+), 6 deletions(-)
include/net/if_inet6.h +8 -0
@@ -64,6 +64,14 @@ struct inet6_ifaddr {struct hlist_node addr_lst;struct list_head if_list; +/* +* Used to safely traverse idev->addr_list in process context +* if the idev->lock needed to protect idev->addr_list cannot be held. +* In that case, add the items to this list temporarily and iterate +* without holding idev->lock. +* See addrconf_ifdown and dev_forward_change. +*/ +struct list_head if_list_aux;struct list_head tmp_list;struct inet6_ifaddr *ifpub;
net/ipv6/addrconf.c +24 -6
@@ -797,6 +797,7 @@ static void dev_forward_change(struct inet6_dev *idev) {struct net_device *dev;struct inet6_ifaddr *ifa; +LIST_HEAD (tmp_addr_list);if (!idev)return ;
@@ -815,14 +816,24 @@ static void dev_forward_change(struct inet6_dev *idev) } } +read_lock_bh (&idev->lock);list_for_each_entry (ifa, &idev->addr_list, if_list) {if (ifa->flags&IFA_F_TENTATIVE )continue ; +list_add_tail (&ifa->if_list_aux, &tmp_addr_list); + } +read_unlock_bh (&idev->lock); + +while (!list_empty (&tmp_addr_list)) { + ifa =list_first_entry (&tmp_addr_list, + struct inet6_ifaddr, if_list_aux); +list_del (&ifa->if_list_aux);if (idev->cnf.forwarding)addrconf_join_anycast (ifa);else addrconf_leave_anycast (ifa); } +inet6_netconf_notify_devconf (dev_net (dev),RTM_NEWNETCONF ,NETCONFA_FORWARDING , dev->ifindex, &idev->cnf);
@@ -3728,7 +3739,8 @@ static int addrconf_ifdown(struct net_device *dev, bool unregister)unsigned long event = unregister ?NETDEV_UNREGISTER :NETDEV_DOWN ;struct net *net =dev_net (dev);struct inet6_dev *idev; -struct inet6_ifaddr *ifa, *tmp; +struct inet6_ifaddr *ifa; +LIST_HEAD (tmp_addr_list);bool keep_addr = false;bool was_ready;int state, i;
@@ -3820,16 +3832,23 @@ static int addrconf_ifdown(struct net_device *dev, bool unregister)write_lock_bh (&idev->lock); } -list_for_each_entry_safe (ifa, tmp, &idev->addr_list, if_list) { +list_for_each_entry (ifa, &idev->addr_list, if_list) +list_add_tail (&ifa->if_list_aux, &tmp_addr_list); +write_unlock_bh (&idev->lock); + +while (!list_empty (&tmp_addr_list)) {struct fib6_info *rt =NULL ;bool keep; + ifa =list_first_entry (&tmp_addr_list, + struct inet6_ifaddr, if_list_aux); +list_del (&ifa->if_list_aux); +addrconf_del_dad_work (ifa); keep = keep_addr && (ifa->flags &IFA_F_PERMANENT ) && !addr_is_local (&ifa->addr); -write_unlock_bh (&idev->lock);spin_lock_bh (&ifa->lock);if (keep) {
@@ -3860,15 +3879,14 @@ static int addrconf_ifdown(struct net_device *dev, bool unregister)addrconf_leave_solict (ifa->idev, &ifa->addr); } -write_lock_bh (&idev->lock);if (!keep) { +write_lock_bh (&idev->lock);list_del_rcu (&ifa->if_list); +write_unlock_bh (&idev->lock);in6_ifa_put (ifa); } } -write_unlock_bh (&idev->lock); -/* Step 5: Discard anycast and multicast list */ if (unregister) {ipv6_ac_destroy_dev (idev);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 70/879 fbcon: Consistently protect deferred_takeover with console_lock()
In reply to Greg Kroah-HartmanFrom: Daniel Vetter <[email protected]>
[ Upstream commit 43553559121ca90965b572cf8a1d6d0fd618b449 ]
This shouldn't be a problem in practice since until we've actually taken over the console there's nothing we've registered with the console/vt subsystem, so the exit/unbind path that check this can't do the wrong thing. But it's confusing, so fix it by moving it a tad later.
--- drivers/video/fbdev/core/fbcon.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/video/fbdev/core/fbcon.c +3 -2
@@ -3265,6 +3265,9 @@ static void fbcon_register_existing_fbs(struct work_struct *work)console_lock (); + deferred_takeover = false; + logo_shown =FBCON_LOGO_DONTSHOW ; +for_each_registered_fb (i)fbcon_fb_registered (registered_fb[i]);
@@ -3282,8 +3285,6 @@ static int fbcon_output_notifier(struct notifier_block *nb,pr_info ("fbcon: Taking over console\n" );dummycon_unregister_output_notifier (&fbcon_output_nb); - deferred_takeover = false; - logo_shown =FBCON_LOGO_DONTSHOW ;/* We may get called in atomic context */ schedule_work (&fbcon_deferred_takeover_work);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 71/879 x86/platform/uv: Update TSC sync state for UV5
In reply to Greg Kroah-HartmanFrom: Mike Travis <[email protected]>
[ Upstream commit bb3ab81bdbd53f88f26ffabc9fb15bd8466486ec ]
The UV5 platform synchronizes the TSCs among all chassis, and will not proceed to OS boot without achieving synchronization. Previous UV platforms provided a register indicating successful synchronization. This is no longer available on UV5. On this platform TSC_ADJUST should not be reset by the kernel.
--- arch/x86/kernel/apic/x2apic_uv_x.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
arch/x86/kernel/apic/x2apic_uv_x.c +7 -1
@@ -199,7 +199,13 @@ static void __init uv_tsc_check_sync(void)int mmr_shift;char *state; -/* Different returns from different UV BIOS versions */ +/* UV5 guarantees synced TSCs; do not zero TSC_ADJUST */ +if (!is_uv (UV2 |UV3 |UV4 )) { +mark_tsc_async_resets ("UV5+" ); +return ; + } + +/* UV2,3,4, UV BIOS TSC sync state available */ mmr =uv_early_read_mmr (UVH_TSC_SYNC_MMR ); mmr_shift =is_uv2_hub () ?UVH_TSC_SYNC_SHIFT_UV2K :UVH_TSC_SYNC_SHIFT ;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 72/879 ACPICA: Avoid cache flush inside virtual machines
In reply to Greg Kroah-HartmanFrom: Kirill A. Shutemov <[email protected]>
[ Upstream commit e2efb6359e620521d1e13f69b2257de8ceaa9475 ]
While running inside virtual machine, the kernel can bypass cache flushing. Changing sleep state in a virtual machine doesn't affect the host system sleep state and cannot lead to data loss.
Before entering sleep states, the ACPI code flushes caches to prevent data loss using the WBINVD instruction. This mechanism is required on bare metal.
But, any use WBINVD inside of a guest is worthless. Changing sleep state in a virtual machine doesn't affect the host system sleep state and cannot lead to data loss, so most hypervisors simply ignore it. Despite this, the ACPI code calls WBINVD unconditionally anyway. It's useless, but also normally harmless.
In TDX guests, though, WBINVD stops being harmless; it triggers a virtualization exception (#VE). If the ACPI cache-flushing WBINVD were left in place, TDX guests would need handling to recover from the exception.
Avoid using WBINVD whenever running under a hypervisor. This both removes the useless WBINVDs and saves TDX from implementing WBINVD handling.
--- arch/x86/include/asm/acenv.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
arch/x86/include/asm/acenv.h +13 -1
@@ -13,7 +13,19 @@/* Asm macros */ -#define ACPI_FLUSH_CPU_CACHE () wbinvd() +/* +* ACPI_FLUSH_CPU_CACHE() flushes caches on entering sleep states. +* It is required to prevent data loss. +* +* While running inside virtual machine, the kernel can bypass cache flushing. +* Changing sleep state in a virtual machine doesn't affect the host system +* sleep state and cannot lead to data loss. +*/ +#define ACPI_FLUSH_CPU_CACHE () \ +do { \ + if (!cpu_feature_enabled(X86_FEATURE_HYPERVISOR)) \ + wbinvd(); \ +} while (0)int __acpi_acquire_global_lock (unsigned int *lock);int __acpi_release_global_lock (unsigned int *lock);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 73/879 libbpf: Fix a bug with checking bpf_probe_read_kernel() support in old kernels
In reply to Greg Kroah-HartmanFrom: Runqing Yang <[email protected]>
[ Upstream commit d252a4a499a07bec21c65873f605c3a1ef52ffed ]
Background:
Libbpf automatically replaces calls to BPF bpf_probe_read_{kernel,user} [_str]() helpers with bpf_probe_read[_str](), if libbpf detects that kernel doesn't support new APIs. Specifically, libbpf invokes the probe_kern_probe_read_kernel function to load a small eBPF program into the kernel in which bpf_probe_read_kernel API is invoked and lets the kernel checks whether the new API is valid. If the loading fails, libbpf considers the new API invalid and replaces it with the old API.
static int probe_kern_probe_read_kernel(void)
{
struct bpf_insn insns[] = {
BPF_MOV64_REG(BPF_REG_1, BPF_REG_10), /* r1 = r10 (fp) */
BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, -8), /* r1 += -8 */
BPF_MOV64_IMM(BPF_REG_2, 8), /* r2 = 8 */
BPF_MOV64_IMM(BPF_REG_3, 0), /* r3 = 0 */
BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, BPF_FUNC_probe_read_kernel),
BPF_EXIT_INSN(),
};
int fd, insn_cnt = ARRAY_SIZE(insns);
fd = bpf_prog_load(BPF_PROG_TYPE_KPROBE, NULL,
"GPL", insns, insn_cnt, NULL);
return probe_fd(fd);
}Bug:
On older kernel versions [0], the kernel checks whether the version number provided in the bpf syscall, matches the LINUX_VERSION_CODE. If not matched, the bpf syscall fails. eBPF However, the probe_kern_probe_read_kernel code does not set the kernel version number provided to the bpf syscall, which causes the loading process alwasys fails for old versions. It means that libbpf will replace the new API with the old one even the kernel supports the new one.
Solution:
After a discussion in [1], the solution is using BPF_PROG_TYPE_TRACEPOINT program type instead of BPF_PROG_TYPE_KPROBE because kernel does not enfoce version check for tracepoint programs. I test the patch in old kernels (4.18 and 4.19) and it works well.
[0] https://elixir.bootlin.com/linux/v4.19/source/kernel/bpf/syscall.c#L1360
[1] Closes: https://github.com/libbpf/libbpf/issues/473
--- tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/lib/bpf/libbpf.c +1 -1
@@ -4587,7 +4587,7 @@ static int probe_kern_probe_read_kernel(void) };int fd, insn_cnt =ARRAY_SIZE (insns); - fd =bpf_prog_load (BPF_PROG_TYPE_KPROBE ,NULL ,"GPL" , insns, insn_cnt,NULL ); + fd =bpf_prog_load (BPF_PROG_TYPE_TRACEPOINT ,NULL ,"GPL" , insns, insn_cnt,NULL );return probe_fd (fd); }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 74/879 mac80211: minstrel_ht: fix where rate stats are stored (fixes debugfs output)
In reply to Greg Kroah-HartmanFrom: Peter Seiderer <[email protected]>
[ Upstream commit 5c6dd7bd569b54c0d2904125d7366aa93f077f67 ]
Using an ath9k card the debugfs output of minstrel_ht looks like the following (note the zero values for the first four rates sum-of success/attempts):
best ____________rate__________ ____statistics___ _____last____ ______sum-of________ mode guard # rate [name idx airtime max_tp] [avg(tp) avg(prob)] [retry|suc|att] [#success | #attempts] OFDM 1 DP 6.0M 272 1640 5.2 3.1 53.8 3 0 0 0 0 OFDM 1 C 9.0M 273 1104 7.7 4.6 53.8 4 0 0 0 0 OFDM 1 B 12.0M 274 836 10.0 6.0 53.8 4 0 0 0 0 OFDM 1 A S 18.0M 275 568 14.3 8.5 53.8 5 0 0 0 0 OFDM 1 S 24.0M 276 436 18.1 0.0 0.0 5 0 1 80 1778 OFDM 1 36.0M 277 300 24.9 0.0 0.0 0 0 1 0 107 OFDM 1 S 48.0M 278 236 30.4 0.0 0.0 0 0 0 0 75 OFDM 1 54.0M 279 212 33.0 0.0 0.0 0 0 0 0 72
Total packet count:: ideal 16582 lookaround 885
Average # of aggregated frames per A-MPDU: 1.0
Debugging showed that the rate statistics for the first four rates where stored in the MINSTREL_CCK_GROUP instead of the MINSTREL_OFDM_GROUP because in minstrel_ht_get_stats() the supported check was not honoured as done in various other places, e.g net/mac80211/rc80211_minstrel_ht_debugfs.c:
74 if (!(mi->supported[i] & BIT(j)))
75 continue;
With the patch applied the output looks good:
best ____________rate__________ ____statistics___ _____last____ ______sum-of________ mode guard # rate [name idx airtime max_tp] [avg(tp) avg(prob)] [retry|suc|att] [#success | #attempts] OFDM 1 D 6.0M 272 1640 5.2 5.2 100.0 3 0 0 1 1 OFDM 1 C 9.0M 273 1104 7.7 7.7 100.0 4 0 0 38 38 OFDM 1 B 12.0M 274 836 10.0 9.9 89.5 4 2 2 372 395 OFDM 1 A P 18.0M 275 568 14.3 14.3 97.2 5 52 53 6956 7181 OFDM 1 S 24.0M 276 436 18.1 0.0 0.0 0 0 1 6 163 OFDM 1 36.0M 277 300 24.9 0.0 0.0 0 0 1 0 35 OFDM 1 S 48.0M 278 236 30.4 0.0 0.0 0 0 0 0 38 OFDM 1 S 54.0M 279 212 33.0 0.0 0.0 0 0 0 0 38
Total packet count:: ideal 7097 lookaround 287
Average # of aggregated frames per A-MPDU: 1.0
--- net/mac80211/rc80211_minstrel_ht.c | 3 +++ 1 file changed, 3 insertions(+)
net/mac80211/rc80211_minstrel_ht.c +3 -0
@@ -362,6 +362,9 @@ minstrel_ht_get_stats(struct minstrel_priv *mp, struct minstrel_ht_sta *mi, group =MINSTREL_CCK_GROUP ;for (idx =0 ; idx <ARRAY_SIZE (mp->cck_rates); idx++) { +if (!(mi->supported[group] &BIT (idx))) +continue ; +if (rate->idx != mp->cck_rates[idx])continue ;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 75/879 drm/komeda: return early if drm_universal_plane_init() fails.
In reply to Greg Kroah-HartmanFrom: Liviu Dudau <[email protected]>
[ Upstream commit c8f76c37cc3668ee45e081e76a15f24a352ebbdd ]
If drm_universal_plane_init() fails early we jump to the common cleanup code that calls komeda_plane_destroy() which in turn could access the uninitalised drm_plane and crash. Return early if an error is detected without going through the common code.
--- drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/arm/display/komeda/komeda_plane.c +4 -2
@@ -275,8 +275,10 @@ static int komeda_plane_add(struct komeda_kms_dev *kms,komeda_put_fourcc_list (formats); -if (err) - goto cleanup; +if (err) { +kfree (kplane); +return err; + }drm_plane_helper_add (plane, &komeda_plane_helper_funcs);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 76/879 drm/amd/display: Disabling Z10 on DCN31
In reply to Greg Kroah-HartmanFrom: Saaem Rizvi <[email protected]>
[ Upstream commit 5d5af34072c8b11f60960c3bea57ff9de5877791 ]
[WHY]
Z10 is should not be enabled by default on DCN31.
[HOW]
Using DC debug flags to disable Z10 by default on DCN31.
--- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c +1 -0
@@ -1030,6 +1030,7 @@ static const struct dc_debug_options debug_defaults_drv = { .afmt = true, } }, + .disable_z10 = true, .optimize_edp_link_rate = true, .enable_sw_cntl_psr = true, .apply_vendor_specific_lttpr_wa = true,
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 77/879 rcu-tasks: Fix race in schedule and flush work
In reply to Greg Kroah-HartmanFrom: Padmanabha Srinivasaiah <[email protected]>
[ Upstream commit f75fd4b9221d93177c50dcfde671b2e907f53e86 ]
While booting secondary CPUs, cpus_read_[lock/unlock] is not keeping online cpumask stable. The transient online mask results in below calltrace.
[ 0.324121] CPU1: Booted secondary processor 0x0000000001 [0x410fd083] [ 0.346652] Detected PIPT I-cache on CPU2 [ 0.347212] CPU2: Booted secondary processor 0x0000000002 [0x410fd083] [ 0.377255] Detected PIPT I-cache on CPU3 [ 0.377823] CPU3: Booted secondary processor 0x0000000003 [0x410fd083] [ 0.379040] ------------[ cut here ]------------ [ 0.383662] WARNING: CPU: 0 PID: 10 at kernel/workqueue.c:3084 __flush_work+0x12c/0x138 [ 0.384850] Modules linked in: [ 0.385403] CPU: 0 PID: 10 Comm: rcu_tasks_rude_ Not tainted 5.17.0-rc3-v8+ #13 [ 0.386473] Hardware name: Raspberry Pi 4 Model B Rev 1.4 (DT) [ 0.387289] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 0.388308] pc : __flush_work+0x12c/0x138 [ 0.388970] lr : __flush_work+0x80/0x138 [ 0.389620] sp : ffffffc00aaf3c60 [ 0.390139] x29: ffffffc00aaf3d20 x28: ffffffc009c16af0 x27: ffffff80f761df48 [ 0.391316] x26: 0000000000000004 x25: 0000000000000003 x24: 0000000000000100 [ 0.392493] x23: ffffffffffffffff x22: ffffffc009c16b10 x21: ffffffc009c16b28 [ 0.393668] x20: ffffffc009e53861 x19: ffffff80f77fbf40 x18: 00000000d744fcc9 [ 0.394842] x17: 000000000000000b x16: 00000000000001c2 x15: ffffffc009e57550 [ 0.396016] x14: 0000000000000000 x13: ffffffffffffffff x12: 0000000100000000 [ 0.397190] x11: 0000000000000462 x10: ffffff8040258008 x9 : 0000000100000000 [ 0.398364] x8 : 0000000000000000 x7 : ffffffc0093c8bf4 x6 : 0000000000000000 [ 0.399538] x5 : 0000000000000000 x4 : ffffffc00a976e40 x3 : ffffffc00810444c [ 0.400711] x2 : 0000000000000004 x1 : 0000000000000000 x0 : 0000000000000000 [ 0.401886] Call trace: [ 0.402309] __flush_work+0x12c/0x138 [ 0.402941] schedule_on_each_cpu+0x228/0x278 [ 0.403693] rcu_tasks_rude_wait_gp+0x130/0x144 [ 0.404502] rcu_tasks_kthread+0x220/0x254 [ 0.405264] kthread+0x174/0x1ac [ 0.405837] ret_from_fork+0x10/0x20 [ 0.406456] irq event stamp: 102 [ 0.406966] hardirqs last enabled at (101): [<ffffffc0093c8468>] _raw_spin_unlock_irq+0x78/0xb4 [ 0.408304] hardirqs last disabled at (102): [<ffffffc0093b8270>] el1_dbg+0x24/0x5c [ 0.409410] softirqs last enabled at (54): [<ffffffc0081b80c8>] local_bh_enable+0xc/0x2c [ 0.410645] softirqs last disabled at (50): [<ffffffc0081b809c>] local_bh_disable+0xc/0x2c [ 0.411890] ---[ end trace 0000000000000000 ]--- [ 0.413000] smp: Brought up 1 node, 4 CPUs [ 0.413762] SMP: Total of 4 processors activated. [ 0.414566] CPU features: detected: 32-bit EL0 Support [ 0.415414] CPU features: detected: 32-bit EL1 Support [ 0.416278] CPU features: detected: CRC32 instructions [ 0.447021] Callback from call_rcu_tasks_rude() invoked. [ 0.506693] Callback from call_rcu_tasks() invoked.
This commit therefore fixes this issue by applying a single-CPU optimization to the RCU Tasks Rude grace-period process. The key point here is that the purpose of this RCU flavor is to force a schedule on each online CPU since some past event. But the rcu_tasks_rude_wait_gp() function runs in the context of the RCU Tasks Rude's grace-period kthread, so there must already have been a context switch on the current CPU since the call to either synchronize_rcu_tasks_rude() or call_rcu_tasks_rude(). So if there is only a single CPU online, RCU Tasks Rude's grace-period kthread does not need to anything at all.
It turns out that the rcu_tasks_rude_wait_gp() function's call to schedule_on_each_cpu() causes problems during early boot. During that time, there is only one online CPU, namely the boot CPU. Therefore, applying this single-CPU optimization fixes early-boot instances of this problem.
--- kernel/rcu/tasks.h | 3 +++ 1 file changed, 3 insertions(+)
kernel/rcu/tasks.h +3 -0
@@ -950,6 +950,9 @@ static void rcu_tasks_be_rude(struct work_struct *work)// Wait for one rude RCU-tasks grace period. static void rcu_tasks_rude_wait_gp (struct rcu_tasks *rtp) { +if (num_online_cpus () <=1 ) +return ;// Fastpath for only one CPU. + rtp->n_ipis +=cpumask_weight (cpu_online_mask);schedule_on_each_cpu (rcu_tasks_be_rude); }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 78/879 rcu-tasks: Handle sparse cpu_possible_mask in rcu_tasks_invoke_cbs()
In reply to Greg Kroah-HartmanFrom: Paul E. McKenney <[email protected]>
[ Upstream commit ab2756ea6b74987849b44ad0e33c3cfec159033b ]
If the cpu_possible_mask is sparse (for example, if bits are set only for CPUs 0, 4, 8, ...), then rcu_tasks_invoke_cbs() will access per-CPU data for a CPU not in cpu_possible_mask. It makes these accesses while doing a workqueue-based binary search for non-empty callback lists. Although this search must pass through CPUs not represented in cpu_possible_mask, it has no need to check the callback list for such CPUs.
This commit therefore changes the rcu_tasks_invoke_cbs() function's binary search so as to only check callback lists for CPUs present in cpu_possible_mask.
--- kernel/rcu/tasks.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/rcu/tasks.h +1 -1
@@ -460,7 +460,7 @@ static void rcu_tasks_invoke_cbs(struct rcu_tasks *rtp, struct rcu_tasks_percpu } } -if (rcu_segcblist_empty (&rtpcp->cblist)) +if (rcu_segcblist_empty (&rtpcp->cblist) || !cpu_possible (cpu))return ;raw_spin_lock_irqsave_rcu_node (rtpcp, flags);rcu_segcblist_advance (&rtpcp->cblist,rcu_seq_current (&rtp->tasks_gp_seq));
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 79/879 rcu: Make TASKS_RUDE_RCU select IRQ_WORK
In reply to Greg Kroah-HartmanFrom: Paul E. McKenney <[email protected]>
[ Upstream commit 46e861be589881e0905b9ade3d8439883858721c ]
The TASKS_RUDE_RCU does not select IRQ_WORK, which can result in build failures for kernels that do not otherwise select IRQ_WORK. This commit therefore causes the TASKS_RUDE_RCU Kconfig option to select IRQ_WORK.
--- kernel/rcu/Kconfig | 1 + 1 file changed, 1 insertion(+)
kernel/rcu/Kconfig +1 -0
@@ -86,6 +86,7 @@ config TASKS_RCU config TASKS_RUDE_RCU def_bool 0 + select IRQ_WORK help This option enables a task-based RCU implementation that uses only context switch (including preemption) and user-mode
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 80/879 sfc: ef10: Fix assigning negative value to unsigned variable
In reply to Greg Kroah-HartmanFrom: Haowen Bai <[email protected]>
[ Upstream commit b8ff3395fbdf3b79a99d0ef410fc34c51044121e ]
fix warning reported by smatch:
251 drivers/net/ethernet/sfc/ef10.c:2259 efx_ef10_tx_tso_desc()
warn: assigning (-208) to unsigned variable 'ip_tot_len'
--- drivers/net/ethernet/sfc/ef10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/sfc/ef10.c +1 -1
@@ -2256,7 +2256,7 @@ int efx_ef10_tx_tso_desc(struct efx_tx_queue *tx_queue, struct sk_buff *skb,* guaranteed to satisfy the second as we only attempt TSO if * inner_network_header <= 208. */ - ip_tot_len = -EFX_TSO2_MAX_HDRLEN ; + ip_tot_len =0x10000 -EFX_TSO2_MAX_HDRLEN ;EFX_WARN_ON_ONCE_PARANOID (mss +EFX_TSO2_MAX_HDRLEN + (tcp->doff <<2u ) > ip_tot_len);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 81/879 ALSA: jack: Access input_dev under mutex
In reply to Greg Kroah-HartmanFrom: Amadeusz Sławiński <[email protected]>
[ Upstream commit 1b6a6fc5280e97559287b61eade2d4b363e836f2 ]
It is possible when using ASoC that input_dev is unregistered while calling snd_jack_report, which causes NULL pointer dereference. In order to prevent this serialize access to input_dev using mutex lock.
--- include/sound/jack.h | 1 + sound/core/jack.c | 34 +++++++++++++++++++++++++++------- 2 files changed, 28 insertions(+), 7 deletions(-)
include/sound/jack.h +1 -0
@@ -62,6 +62,7 @@ struct snd_jack {const char *id;#ifdef CONFIG_SND_JACK_INPUT_DEV struct input_dev *input_dev; +struct mutex input_dev_lock;int registered;int type;char name[100 ];
sound/core/jack.c +27 -7
@@ -42,8 +42,11 @@ static int snd_jack_dev_disconnect(struct snd_device *device)#ifdef CONFIG_SND_JACK_INPUT_DEV struct snd_jack *jack = device->device_data; -if (!jack->input_dev) +mutex_lock (&jack->input_dev_lock); +if (!jack->input_dev) { +mutex_unlock (&jack->input_dev_lock);return 0 ; + }/* If the input device is registered with the input subsystem * then we need to use a different deallocator. */
@@ -52,6 +55,7 @@ static int snd_jack_dev_disconnect(struct snd_device *device) else input_free_device(jack->input_dev); jack->input_dev =NULL ; +mutex_unlock (&jack->input_dev_lock);#endif /* CONFIG_SND_JACK_INPUT_DEV */ return 0 ; }
@@ -90,8 +94,11 @@ static int snd_jack_dev_register(struct snd_device *device)snprintf (jack->name,sizeof (jack->name),"%s %s" , card->shortname, jack->id); -if (!jack->input_dev) +mutex_lock (&jack->input_dev_lock); +if (!jack->input_dev) { +mutex_unlock (&jack->input_dev_lock);return 0 ; + } jack->input_dev->name = jack->name;
@@ -116,6 +123,7 @@ static int snd_jack_dev_register(struct snd_device *device)if (err ==0 ) jack->registered =1 ; +mutex_unlock (&jack->input_dev_lock); return err; }#endif /* CONFIG_SND_JACK_INPUT_DEV */
@@ -517,9 +525,11 @@ int snd_jack_new(struct snd_card *card, const char *id, int type,return -ENOMEM ; } -/* don't creat input device for phantom jack */ -if (!phantom_jack) {#ifdef CONFIG_SND_JACK_INPUT_DEV +mutex_init (&jack->input_dev_lock); + +/* don't create input device for phantom jack */ +if (!phantom_jack) {int i; jack->input_dev =input_allocate_device ();
@@ -537,8 +547,8 @@ int snd_jack_new(struct snd_card *card, const char *id, int type,input_set_capability (jack->input_dev,EV_SW , jack_switch_types[i]); -#endif /* CONFIG_SND_JACK_INPUT_DEV */ } +#endif /* CONFIG_SND_JACK_INPUT_DEV */ err =snd_device_new (card,SNDRV_DEV_JACK , jack, &ops);if (err <0 )
@@ -578,10 +588,14 @@ EXPORT_SYMBOL(snd_jack_new);void snd_jack_set_parent (struct snd_jack *jack,struct device *parent) {WARN_ON (jack->registered); -if (!jack->input_dev) +mutex_lock (&jack->input_dev_lock); +if (!jack->input_dev) { +mutex_unlock (&jack->input_dev_lock);return ; + } jack->input_dev->dev.parent = parent; +mutex_unlock (&jack->input_dev_lock); }EXPORT_SYMBOL (snd_jack_set_parent);
@@ -629,6 +643,8 @@ EXPORT_SYMBOL(snd_jack_set_key);/** * snd_jack_report - Report the current status of a jack +* Note: This function uses mutexes and should be called from a +* context which can sleep (such as a workqueue). * * @jack: The jack to report status for * @status: The current status of the jack
@@ -654,8 +670,11 @@ void snd_jack_report(struct snd_jack *jack, int status) status & jack_kctl->mask_bits);#ifdef CONFIG_SND_JACK_INPUT_DEV -if (!jack->input_dev) +mutex_lock (&jack->input_dev_lock); +if (!jack->input_dev) { +mutex_unlock (&jack->input_dev_lock);return ; + }for (i =0 ; i <ARRAY_SIZE (jack->key); i++) {int testbit = ((SND_JACK_BTN_0 >> i) & ~mask_bits);
@@ -675,6 +694,7 @@ void snd_jack_report(struct snd_jack *jack, int status) }input_sync (jack->input_dev); +mutex_unlock (&jack->input_dev_lock);#endif /* CONFIG_SND_JACK_INPUT_DEV */ }EXPORT_SYMBOL (snd_jack_report);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 82/879 rtw88: fix incorrect frequency reported
In reply to Greg Kroah-HartmanFrom: Po-Hao Huang <[email protected]>
[ Upstream commit 6723c0cde84fde582a261c186ce84100dcfa0019 ]
We should only fill in frequency reported by firmware during scan. Add this so frames won't be dropped by mac80211 due to frequency mismatch.
--- drivers/net/wireless/realtek/rtw88/rx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/realtek/rtw88/rx.c +2 -1
@@ -158,7 +158,8 @@ void rtw_rx_fill_rx_status(struct rtw_dev *rtwdev,memset (rx_status,0 ,sizeof (*rx_status)); rx_status->freq = hw->conf.chandef.chan->center_freq; rx_status->band = hw->conf.chandef.chan->band; -if (rtw_fw_feature_check (&rtwdev->fw,FW_FEATURE_SCAN_OFFLOAD )) +if (rtw_fw_feature_check (&rtwdev->fw,FW_FEATURE_SCAN_OFFLOAD ) && +test_bit (RTW_FLAG_SCANNING , rtwdev->flags))rtw_set_rx_freq_by_pktstat (pkt_stat, rx_status);if (pkt_stat->crc_err) rx_status->flag |=RX_FLAG_FAILED_FCS_CRC ;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 83/879 rtw88: 8821c: fix debugfs rssi value
In reply to Greg Kroah-HartmanFrom: Po-Hao Huang <[email protected]>
[ Upstream commit ece31c93d4d68f7eb8eea4431b052aacdb678de2 ]
RSSI value per frame is reported to mac80211 but not maintained in our own statistics, add it back to help us debug.
--- drivers/net/wireless/realtek/rtw88/rtw8821c.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/wireless/realtek/rtw88/rtw8821c.c +4 -0
@@ -512,6 +512,7 @@ static s8 get_cck_rx_pwr(struct rtw_dev *rtwdev, u8 lna_idx, u8 vga_idx)static void query_phy_status_page0 (struct rtw_dev *rtwdev,u8 *phy_status,struct rtw_rx_pkt_stat *pkt_stat) { +struct rtw_dm_info *dm_info = &rtwdev->dm_info;s8 rx_power;u8 lna_idx =0 ;u8 vga_idx =0 ;
@@ -523,6 +524,7 @@ static void query_phy_status_page0(struct rtw_dev *rtwdev, u8 *phy_status, pkt_stat->rx_power[RF_PATH_A ] = rx_power; pkt_stat->rssi =rtw_phy_rf_power_2_rssi (pkt_stat->rx_power,1 ); + dm_info->rssi[RF_PATH_A ] = pkt_stat->rssi; pkt_stat->bw =RTW_CHANNEL_WIDTH_20 ; pkt_stat->signal_power = rx_power; }
@@ -530,6 +532,7 @@ static void query_phy_status_page0(struct rtw_dev *rtwdev, u8 *phy_status,static void query_phy_status_page1 (struct rtw_dev *rtwdev,u8 *phy_status,struct rtw_rx_pkt_stat *pkt_stat) { +struct rtw_dm_info *dm_info = &rtwdev->dm_info;u8 rxsc, bw;s8 min_rx_power =-120 ;
@@ -549,6 +552,7 @@ static void query_phy_status_page1(struct rtw_dev *rtwdev, u8 *phy_status, pkt_stat->rx_power[RF_PATH_A ] =GET_PHY_STAT_P1_PWDB_A (phy_status) -110 ; pkt_stat->rssi =rtw_phy_rf_power_2_rssi (pkt_stat->rx_power,1 ); + dm_info->rssi[RF_PATH_A ] = pkt_stat->rssi; pkt_stat->bw = bw; pkt_stat->signal_power =max (pkt_stat->rx_power[RF_PATH_A ], min_rx_power);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 84/879 spi: spi-rspi: Remove setting {src,dst}_{addr,addr_width} based on DMA direction
In reply to Greg Kroah-HartmanFrom: Biju Das <[email protected]>
[ Upstream commit 6f381481a5b236cb53d6de2c49c6ef83a4d0f432 ]
The direction field in the DMA config is deprecated. The rspi driver sets {src,dst}_{addr,addr_width} based on the DMA direction and it results in dmaengine_slave_config() failure as RZ DMAC driver validates {src,dst}_addr_width values independent of DMA direction.
This patch fixes the issue by passing both {src,dst}_{addr,addr_width} values independent of DMA direction.
--- drivers/spi/spi-rspi.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-)
drivers/spi/spi-rspi.c +6 -9
@@ -1108,14 +1108,11 @@ static struct dma_chan *rspi_request_dma_chan(struct device *dev, }memset (&cfg,0 ,sizeof (cfg)); + cfg.dst_addr = port_addr +RSPI_SPDR ; + cfg.src_addr = port_addr +RSPI_SPDR ; + cfg.dst_addr_width =DMA_SLAVE_BUSWIDTH_1_BYTE ; + cfg.src_addr_width =DMA_SLAVE_BUSWIDTH_1_BYTE ; cfg.direction = dir; -if (dir ==DMA_MEM_TO_DEV ) { - cfg.dst_addr = port_addr; - cfg.dst_addr_width =DMA_SLAVE_BUSWIDTH_1_BYTE ; - }else { - cfg.src_addr = port_addr; - cfg.src_addr_width =DMA_SLAVE_BUSWIDTH_1_BYTE ; - } ret =dmaengine_slave_config (chan, &cfg);if (ret) {
@@ -1146,12 +1143,12 @@ static int rspi_request_dma(struct device *dev, struct spi_controller *ctlr, } ctlr->dma_tx =rspi_request_dma_chan (dev,DMA_MEM_TO_DEV , dma_tx_id, - res->start +RSPI_SPDR ); + res->start);if (!ctlr->dma_tx)return -ENODEV ; ctlr->dma_rx =rspi_request_dma_chan (dev,DMA_DEV_TO_MEM , dma_rx_id, - res->start +RSPI_SPDR ); + res->start);if (!ctlr->dma_rx) {dma_release_channel (ctlr->dma_tx); ctlr->dma_tx =NULL ;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 85/879 tools/power turbostat: fix ICX DRAM power numbers
In reply to Greg Kroah-HartmanFrom: Len Brown <[email protected]>
[ Upstream commit 6397b6418935773a34b533b3348b03f4ce3d7050 ]
ICX (and its duplicates) require special hard-coded DRAM RAPL units, rather than using the generic RAPL energy units.
--- tools/power/x86/turbostat/turbostat.c | 1 + 1 file changed, 1 insertion(+)
tools/power/x86/turbostat/turbostat.c +1 -0
@@ -4376,6 +4376,7 @@ static double rapl_dram_energy_units_probe(int model, double rapl_energy_units)case INTEL_FAM6_BROADWELL_X :/* BDX */ case INTEL_FAM6_SKYLAKE_X :/* SKX */ case INTEL_FAM6_XEON_PHI_KNL :/* KNL */ +case INTEL_FAM6_ICELAKE_X :/* ICX */ return (rapl_dram_energy_units =15.3 /1000000 );default :return (rapl_energy_units);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 86/879 tcp: consume incoming skb leading to a reset
In reply to Greg Kroah-HartmanFrom: Eric Dumazet <[email protected]>
[ Upstream commit d9d024f96609016628d750ebc8ee4a6f0d80e6e1 ]
Whenever tcp_validate_incoming() handles a valid RST packet, we should not pretend the packet was dropped.
Create a special section at the end of tcp_validate_incoming() to handle this case.
--- net/ipv4/tcp_input.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-)
net/ipv4/tcp_input.c +16 -12
@@ -5711,7 +5711,7 @@ static bool tcp_validate_incoming(struct sock *sk, struct sk_buff *skb, &tp->last_oow_ack_time))tcp_send_dupack (sk, skb); }else if (tcp_reset_check (sk, skb)) { -tcp_reset (sk, skb); + goto reset; } goto discard; }
@@ -5747,17 +5747,16 @@ static bool tcp_validate_incoming(struct sock *sk, struct sk_buff *skb, }if (rst_seq_match) -tcp_reset (sk, skb); -else { -/* Disable TFO if RST is out-of-order -* and no data has been received -* for current active TFO socket -*/ -if (tp->syn_fastopen && !tp->data_segs_in && - sk->sk_state ==TCP_ESTABLISHED ) -tcp_fastopen_active_disable (sk); -tcp_send_challenge_ack (sk); - } + goto reset; + +/* Disable TFO if RST is out-of-order +* and no data has been received +* for current active TFO socket +*/ +if (tp->syn_fastopen && !tp->data_segs_in && + sk->sk_state ==TCP_ESTABLISHED ) +tcp_fastopen_active_disable (sk); +tcp_send_challenge_ack (sk); goto discard; }
@@ -5782,6 +5781,11 @@ static bool tcp_validate_incoming(struct sock *sk, struct sk_buff *skb, discard:tcp_drop (sk, skb);return false; + +reset: +tcp_reset (sk, skb); +__kfree_skb (skb); +return false; }/*
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 87/879 loop: implement ->free_disk
In reply to Greg Kroah-HartmanFrom: Christoph Hellwig <[email protected]>
[ Upstream commit d2c7f56f8b5256d57f9e3fc7794c31361d43bdd9 ]
Ensure that the lo_device which is stored in the gendisk private data is valid until the gendisk is freed. Currently the loop driver uses a lot of effort to make sure a device is not freed when it is still in use, but to to fix a potential deadlock this will be relaxed a bit soon.
--- drivers/block/loop.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)
drivers/block/loop.c +12 -4
@@ -1768,6 +1768,14 @@ static void lo_release(struct gendisk *disk, fmode_t mode)mutex_unlock (&lo->lo_mutex); } +static void lo_free_disk (struct gendisk *disk) +{ +struct loop_device *lo = disk->private_data; + +mutex_destroy (&lo->lo_mutex); +kfree (lo); +} +static const struct block_device_operations lo_fops = { .owner =THIS_MODULE , .open = lo_open,
@@ -1776,6 +1784,7 @@ static const struct block_device_operations lo_fops = {#ifdef CONFIG_COMPAT .compat_ioctl = lo_compat_ioctl, #endif + .free_disk = lo_free_disk, };/*
@@ -2090,15 +2099,14 @@ static void loop_remove(struct loop_device *lo) {/* Make this loop device unreachable from pathname. */ del_gendisk (lo->lo_disk); -blk_cleanup_disk (lo->lo_disk); +blk_cleanup_queue (lo->lo_disk->queue);blk_mq_free_tag_set (&lo->tag_set);mutex_lock (&loop_ctl_mutex);idr_remove (&loop_index_idr, lo->lo_number);mutex_unlock (&loop_ctl_mutex); -/* There is no route which can find this loop device. */ -mutex_destroy (&lo->lo_mutex); -kfree (lo); + +put_disk (lo->lo_disk); }static void loop_probe (dev_t dev)
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 88/879 scsi: lpfc: Move cfg_log_verbose check before calling lpfc_dmp_dbg()
In reply to Greg Kroah-HartmanFrom: James Smart <[email protected]>
[ Upstream commit e294647b1aed4247fe52851f3a3b2b19ae906228 ]
In an attempt to log message 0126 with LOG_TRACE_EVENT, the following hard lockup call trace hangs the system.
Call Trace: _raw_spin_lock_irqsave+0x32/0x40 lpfc_dmp_dbg.part.32+0x28/0x220 [lpfc] lpfc_cmpl_els_fdisc+0x145/0x460 [lpfc] lpfc_sli_cancel_jobs+0x92/0xd0 [lpfc] lpfc_els_flush_cmd+0x43c/0x670 [lpfc] lpfc_els_flush_all_cmd+0x37/0x60 [lpfc] lpfc_sli4_async_event_proc+0x956/0x1720 [lpfc] lpfc_do_work+0x1485/0x1d70 [lpfc] kthread+0x112/0x130 ret_from_fork+0x1f/0x40 Kernel panic - not syncing: Hard LOCKUP
The same CPU tries to claim the phba->port_list_lock twice.
Move the cfg_log_verbose checks as part of the lpfc_printf_vlog() and lpfc_printf_log() macros before calling lpfc_dmp_dbg(). There is no need to take the phba->port_list_lock within lpfc_dmp_dbg().
--- drivers/scsi/lpfc/lpfc_init.c | 29 +---------------------------- drivers/scsi/lpfc/lpfc_logmsg.h | 6 +++--- 2 files changed, 4 insertions(+), 31 deletions(-)
drivers/scsi/lpfc/lpfc_init.c +1 -28
@@ -15700,34 +15700,7 @@ void lpfc_dmp_dbg(struct lpfc_hba *phba)unsigned int temp_idx;int i;int j =0 ; -unsigned long rem_nsec, iflags; -bool log_verbose = false; -struct lpfc_vport *port_iterator; - -/* Don't dump messages if we explicitly set log_verbose for the -* physical port or any vport. -*/ -if (phba->cfg_log_verbose) -return ; - -spin_lock_irqsave (&phba->port_list_lock, iflags); -list_for_each_entry (port_iterator, &phba->port_list, listentry) { -if (port_iterator->load_flag &FC_UNLOADING ) -continue ; -if (scsi_host_get (lpfc_shost_from_vport (port_iterator))) { -if (port_iterator->cfg_log_verbose) - log_verbose = true; - -scsi_host_put (lpfc_shost_from_vport (port_iterator)); - -if (log_verbose) { -spin_unlock_irqrestore (&phba->port_list_lock, - iflags); -return ; - } - } - } -spin_unlock_irqrestore (&phba->port_list_lock, iflags); +unsigned long rem_nsec;if (atomic_cmpxchg (&phba->dbg_log_dmping,0 ,1 ) !=0 )return ;
drivers/scsi/lpfc/lpfc_logmsg.h +3 -3
@@ -73,7 +73,7 @@ do { \ #define lpfc_printf_vlog(vport, level, mask, fmt, arg...) \ do { \ { if (((mask) & (vport)->cfg_log_verbose) || (level[1] <= '3')) { \ - if ((mask) & LOG_TRACE_EVENT) \ + if ((mask) & LOG_TRACE_EVENT && !(vport)->cfg_log_verbose) \ lpfc_dmp_dbg((vport)->phba); \ dev_printk(level, &((vport)->phba->pcidev)->dev, "%d:(%d):" \ fmt, (vport)->phba->brd_no, vport->vpi, ##arg); \
@@ -89,11 +89,11 @@ do { \ (phba)->pport->cfg_log_verbose : \ (phba)->cfg_log_verbose; \if (((mask) & log_verbose) || (level[1 ] <='3' )) { \ -if ((mask) &LOG_TRACE_EVENT ) \ +if ((mask) &LOG_TRACE_EVENT && !log_verbose) \lpfc_dmp_dbg (phba); \ dev_printk(level, &((phba)->pcidev)->dev, "%d:" \ fmt, phba->brd_no, ##arg); \ - } else if (!(phba)->cfg_log_verbose)\ + } else if (!log_verbose)\ lpfc_dbg_print(phba, "%d:" fmt, phba->brd_no, ##arg); \ } \ } while (0)
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 89/879 scsi: lpfc: Fix SCSI I/O completion and abort handler deadlock
In reply to Greg Kroah-HartmanFrom: James Smart <[email protected]>
[ Upstream commit 03cbbd7c2f5ee288f648f4aeedc765a181188553 ]
During stress I/O tests with 500+ vports, hard LOCKUP call traces are observed.
CPU A:
native_queued_spin_lock_slowpath+0x192
_raw_spin_lock_irqsave+0x32
lpfc_handle_fcp_err+0x4c6
lpfc_fcp_io_cmd_wqe_cmpl+0x964
lpfc_sli4_fp_handle_cqe+0x266
__lpfc_sli4_process_cq+0x105
__lpfc_sli4_hba_process_cq+0x3c
lpfc_cq_poll_hdler+0x16
irq_poll_softirq+0x76
__softirqentry_text_start+0xe4
irq_exit+0xf7
do_IRQ+0x7f
CPU B:
native_queued_spin_lock_slowpath+0x5b
_raw_spin_lock+0x1c
lpfc_abort_handler+0x13e
scmd_eh_abort_handler+0x85
process_one_work+0x1a7
worker_thread+0x30
kthread+0x112
ret_from_fork+0x1f
Diagram of lockup:
CPUA CPUB
---- ----lpfc_cmd->buf_lock
phba->hbalock
lpfc_cmd->buf_lockphba->hbalock
Fix by reordering the taking of the lpfc_cmd->buf_lock and phba->hbalock in lpfc_abort_handler routine so that it tries to take the lpfc_cmd->buf_lock first before phba->hbalock.
--- drivers/scsi/lpfc/lpfc_scsi.c | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-)
drivers/scsi/lpfc/lpfc_scsi.c +15 -18
@@ -5864,25 +5864,25 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd)if (!lpfc_cmd)return ret; -spin_lock_irqsave (&phba->hbalock, flags); +/* Guard against IO completion being called at same time */ +spin_lock_irqsave (&lpfc_cmd->buf_lock, flags); + +spin_lock (&phba->hbalock);/* driver queued commands are in process of being flushed */ if (phba->hba_flag &HBA_IOQ_FLUSH ) {lpfc_printf_vlog (vport,KERN_WARNING ,LOG_FCP ,"3168 SCSI Layer abort requested I/O has been " "flushed by LLD.\n" ); ret =FAILED ; - goto out_unlock; + goto out_unlock_hba; } -/* Guard against IO completion being called at same time */ -spin_lock (&lpfc_cmd->buf_lock); -if (!lpfc_cmd->pCmd) {lpfc_printf_vlog (vport,KERN_WARNING ,LOG_FCP ,"2873 SCSI Layer I/O Abort Request IO CMPL Status " "x%x ID %d LUN %llu\n" ,SUCCESS , cmnd->device->id, cmnd->device->lun); - goto out_unlock_buf; + goto out_unlock_hba; } iocb = &lpfc_cmd->cur_iocbq;
@@ -5890,7 +5890,7 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd) pring_s4 = phba->sli4_hba.hdwq[iocb->hba_wqidx].io_wq->pring;if (!pring_s4) { ret =FAILED ; - goto out_unlock_buf; + goto out_unlock_hba; }spin_lock (&pring_s4->ring_lock); }
@@ -5923,8 +5923,8 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd) "3389 SCSI Layer I/O Abort Request is pending\n");if (phba->sli_rev ==LPFC_SLI_REV4 )spin_unlock (&pring_s4->ring_lock); -spin_unlock (&lpfc_cmd->buf_lock); -spin_unlock_irqrestore (&phba->hbalock, flags); +spin_unlock (&phba->hbalock); +spin_unlock_irqrestore (&lpfc_cmd->buf_lock, flags); goto wait_for_cmpl; }
@@ -5945,15 +5945,13 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd)if (ret_val !=IOCB_SUCCESS ) {/* Indicate the IO is not being aborted by the driver. */ lpfc_cmd->waitq =NULL ; -spin_unlock (&lpfc_cmd->buf_lock); -spin_unlock_irqrestore (&phba->hbalock, flags); ret =FAILED ; - goto out; + goto out_unlock_hba; }/* no longer need the lock after this point */ -spin_unlock (&lpfc_cmd->buf_lock); -spin_unlock_irqrestore (&phba->hbalock, flags); +spin_unlock (&phba->hbalock); +spin_unlock_irqrestore (&lpfc_cmd->buf_lock, flags);if (phba->cfg_poll &DISABLE_FCP_RING_INT ) lpfc_sli_handle_fast_ring_event(phba,
@@ -5988,10 +5986,9 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd) out_unlock_ring:if (phba->sli_rev ==LPFC_SLI_REV4 )spin_unlock (&pring_s4->ring_lock); -out_unlock_buf: -spin_unlock (&lpfc_cmd->buf_lock); -out_unlock: -spin_unlock_irqrestore (&phba->hbalock, flags); +out_unlock_hba: +spin_unlock (&phba->hbalock); +spin_unlock_irqrestore (&lpfc_cmd->buf_lock, flags); out:lpfc_printf_vlog (vport,KERN_WARNING ,LOG_FCP , "0749 SCSI Layer I/O Abort Request Status x%x ID %d "
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 90/879 scsi: lpfc: Fix null pointer dereference after failing to issue FLOGI and PLOGI
In reply to Greg Kroah-HartmanFrom: James Smart <[email protected]>
[ Upstream commit 577a942df3de2666f6947bdd3a5c9e8d30073424 ]
If lpfc_issue_els_flogi() fails and returns non-zero status, the node reference count is decremented to trigger the release of the nodelist structure. However, if there is a prior registration or dev-loss-evt work pending, the node may be released prematurely. When dev-loss-evt completes, the released node is referenced causing a use-after-free null pointer dereference.
Similarly, when processing non-zero ELS PLOGI completion status in lpfc_cmpl_els_plogi(), the ndlp flags are checked for a transport registration before triggering node removal. If dev-loss-evt work is pending, the node may be released prematurely and a subsequent call to lpfc_dev_loss_tmo_handler() results in a use after free ndlp dereference.
Add test for pending dev-loss before decrementing the node reference count for FLOGI, PLOGI, PRLI, and ADISC handling.
--- drivers/scsi/lpfc/lpfc_els.c | 51 +++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 16 deletions(-)
drivers/scsi/lpfc/lpfc_els.c +35 -16
@@ -1532,10 +1532,13 @@ lpfc_initial_flogi(struct lpfc_vport *vport) }if (lpfc_issue_els_flogi (vport, ndlp,0 )) { -/* This decrement of reference count to node shall kick off -* the release of the node. +/* A node reference should be retained while registered with a +* transport or dev-loss-evt work is pending. +* Otherwise, decrement node reference to trigger release. */ -lpfc_nlp_put (ndlp); +if (!(ndlp->fc4_xpt_flags & (SCSI_XPT_REGD |NVME_XPT_REGD )) && + !(ndlp->nlp_flag &NLP_IN_DEV_LOSS )) +lpfc_nlp_put (ndlp);return 0 ; }return 1 ;
@@ -1578,10 +1581,13 @@ lpfc_initial_fdisc(struct lpfc_vport *vport) }if (lpfc_issue_els_fdisc (vport, ndlp,0 )) { -/* decrement node reference count to trigger the release of -* the node. +/* A node reference should be retained while registered with a +* transport or dev-loss-evt work is pending. +* Otherwise, decrement node reference to trigger release. */ -lpfc_nlp_put (ndlp); +if (!(ndlp->fc4_xpt_flags & (SCSI_XPT_REGD |NVME_XPT_REGD )) && + !(ndlp->nlp_flag &NLP_IN_DEV_LOSS )) +lpfc_nlp_put (ndlp);return 0 ; }return 1 ;
@@ -1983,6 +1989,7 @@ lpfc_cmpl_els_plogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,int disc;struct serv_parm *sp =NULL ;u32 ulp_status, ulp_word4, did, iotag; +bool release_node = false;/* we pass cmdiocb to state machine which needs rspiocb as well */ cmdiocb->context_un.rsp_iocb = rspiocb;
@@ -2071,19 +2078,21 @@ lpfc_cmpl_els_plogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,spin_unlock_irq (&ndlp->lock); goto out; } -spin_unlock_irq (&ndlp->lock);/* No PLOGI collision and the node is not registered with the * scsi or nvme transport. It is no longer an active node. Just * start the device remove process. */ if (!(ndlp->fc4_xpt_flags & (SCSI_XPT_REGD |NVME_XPT_REGD ))) { -spin_lock_irq (&ndlp->lock); ndlp->nlp_flag &= ~NLP_NPR_2B_DISC ; -spin_unlock_irq (&ndlp->lock); +if (!(ndlp->nlp_flag &NLP_IN_DEV_LOSS )) + release_node = true; + } +spin_unlock_irq (&ndlp->lock); + +if (release_node)lpfc_disc_state_machine (vport, ndlp, cmdiocb,NLP_EVT_DEVICE_RM ); - } }else {/* Good status, call state machine */ prsp = list_entry(((struct lpfc_dmabuf *)
@@ -2294,6 +2303,7 @@ lpfc_cmpl_els_prli(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,u32 loglevel;u32 ulp_status;u32 ulp_word4; +bool release_node = false;/* we pass cmdiocb to state machine which needs rspiocb as well */ cmdiocb->context_un.rsp_iocb = rspiocb;
@@ -2370,14 +2380,18 @@ lpfc_cmpl_els_prli(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,* it is no longer an active node. Otherwise devloss * handles the final cleanup. */ +spin_lock_irq (&ndlp->lock);if (!(ndlp->fc4_xpt_flags & (SCSI_XPT_REGD |NVME_XPT_REGD )) && !ndlp->fc4_prli_sent) { -spin_lock_irq (&ndlp->lock); ndlp->nlp_flag &= ~NLP_NPR_2B_DISC ; -spin_unlock_irq (&ndlp->lock); +if (!(ndlp->nlp_flag &NLP_IN_DEV_LOSS )) + release_node = true; + } +spin_unlock_irq (&ndlp->lock); + +if (release_node)lpfc_disc_state_machine (vport, ndlp, cmdiocb,NLP_EVT_DEVICE_RM ); - } }else {/* Good status, call state machine. However, if another * PRLI is outstanding, don't call the state machine
@@ -2749,6 +2763,7 @@ lpfc_cmpl_els_adisc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,struct lpfc_nodelist *ndlp;int disc;u32 ulp_status, ulp_word4, tmo; +bool release_node = false;/* we pass cmdiocb to state machine which needs rspiocb as well */ cmdiocb->context_un.rsp_iocb = rspiocb;
@@ -2815,13 +2830,17 @@ lpfc_cmpl_els_adisc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,* transport, it is no longer an active node. Otherwise * devloss handles the final cleanup. */ +spin_lock_irq (&ndlp->lock);if (!(ndlp->fc4_xpt_flags & (SCSI_XPT_REGD |NVME_XPT_REGD ))) { -spin_lock_irq (&ndlp->lock); ndlp->nlp_flag &= ~NLP_NPR_2B_DISC ; -spin_unlock_irq (&ndlp->lock); +if (!(ndlp->nlp_flag &NLP_IN_DEV_LOSS )) + release_node = true; + } +spin_unlock_irq (&ndlp->lock); + +if (release_node)lpfc_disc_state_machine (vport, ndlp, cmdiocb,NLP_EVT_DEVICE_RM ); - } }else /* Good status, call state machine */ lpfc_disc_state_machine(vport, ndlp, cmdiocb,
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 91/879 scsi: lpfc: Protect memory leak for NPIV ports sending PLOGI_RJT
In reply to Greg Kroah-HartmanFrom: James Smart <[email protected]>
[ Upstream commit 672d1cb40551ea9c95efad43ab6d45e4ab4e015f ]
There is a potential memory leak in lpfc_ignore_els_cmpl() and lpfc_els_rsp_reject() that was allocated from NPIV PLOGI_RJT (lpfc_rcv_plogi()'s login_mbox).
Check if cmdiocb->context_un.mbox was allocated in lpfc_ignore_els_cmpl(), and then free it back to phba->mbox_mem_pool along with mbox->ctx_buf for service parameters.
For lpfc_els_rsp_reject() failure, free both the ctx_buf for service parameters and the login_mbox.
--- drivers/scsi/lpfc/lpfc_nportdisc.c | 10 ++++++++-- drivers/scsi/lpfc/lpfc_sli.c | 17 +++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-)
drivers/scsi/lpfc/lpfc_nportdisc.c +8 -2
@@ -614,9 +614,15 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, stat.un.b.lsRjtRsnCode =LSRJT_INVALID_CMD ; stat.un.b.lsRjtRsnCodeExp =LSEXP_NOTHING_MORE ; rc =lpfc_els_rsp_reject (vport, stat.un.lsRjtError, cmdiocb, - ndlp, login_mbox); -if (rc) + ndlp, login_mbox); +if (rc) { + mp = (struct lpfc_dmabuf *)login_mbox->ctx_buf; +if (mp) { +lpfc_mbuf_free (phba, mp->virt, mp->phys); +kfree (mp); + }mempool_free (login_mbox, phba->mbox_mem_pool); + }return 1 ; }
drivers/scsi/lpfc/lpfc_sli.c +17 -0
@@ -12066,6 +12066,8 @@ lpfc_ignore_els_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, {struct lpfc_nodelist *ndlp =NULL ;IOCB_t *irsp; +LPFC_MBOXQ_t *mbox; +struct lpfc_dmabuf *mp;u32 ulp_command, ulp_status, ulp_word4, iotag; ulp_command =get_job_cmnd (phba, cmdiocb);
@@ -12077,6 +12079,21 @@ lpfc_ignore_els_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, }else { irsp = &rspiocb->iocb; iotag = irsp->ulpIoTag; + +/* It is possible a PLOGI_RJT for NPIV ports to get aborted. +* The MBX_REG_LOGIN64 mbox command is freed back to the +* mbox_mem_pool here. +*/ +if (cmdiocb->context_un.mbox) { + mbox = cmdiocb->context_un.mbox; + mp = (struct lpfc_dmabuf *)mbox->ctx_buf; +if (mp) { +lpfc_mbuf_free (phba, mp->virt, mp->phys); +kfree (mp); + } +mempool_free (mbox, phba->mbox_mem_pool); + cmdiocb->context_un.mbox =NULL ; + } }/* ELS cmd tag <ulpIoTag> completes */
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 92/879 scsi: lpfc: Fix call trace observed during I/O with CMF enabled
In reply to Greg Kroah-HartmanFrom: James Smart <[email protected]>
[ Upstream commit d6d45f67a11136cb88a70a29ab22ea6db8ae6bd5 ]
The following was seen with CMF enabled:
BUG: using smp_processor_id() in preemptible
code: systemd-udevd/31711
kernel: caller is lpfc_update_cmf_cmd+0x214/0x420 [lpfc]
kernel: CPU: 12 PID: 31711 Comm: systemd-udevd
kernel: Call Trace:
kernel: <TASK>
kernel: dump_stack_lvl+0x44/0x57
kernel: check_preemption_disabled+0xbf/0xe0
kernel: lpfc_update_cmf_cmd+0x214/0x420 [lpfc]
kernel: lpfc_nvme_fcp_io_submit+0x23b4/0x4df0 [lpfc]
this_cpu_ptr() calls smp_processor_id() in a preemptible context.
Fix by using per_cpu_ptr() with raw_smp_processor_id() instead.
--- drivers/scsi/lpfc/lpfc_scsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/lpfc/lpfc_scsi.c +2 -2
@@ -3835,7 +3835,7 @@ lpfc_update_cmf_cmpl(struct lpfc_hba *phba,else time =div_u64 (time +500 ,1000 );/* round it */ - cgs =this_cpu_ptr (phba->cmf_stat); + cgs =per_cpu_ptr (phba->cmf_stat,raw_smp_processor_id ());atomic64_add (size, &cgs->rcv_bytes);atomic64_add (time, &cgs->rx_latency);atomic_inc (&cgs->rx_io_cnt);
@@ -3879,7 +3879,7 @@ lpfc_update_cmf_cmd(struct lpfc_hba *phba, uint32_t size)atomic_set (&phba->rx_max_read_cnt, size); } - cgs =this_cpu_ptr (phba->cmf_stat); + cgs =per_cpu_ptr (phba->cmf_stat,raw_smp_processor_id ());atomic64_add (size, &cgs->total_bytes);return 0 ; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 93/879 cpuidle: PSCI: Improve support for suspend-to-RAM for PSCI OSI mode
In reply to Greg Kroah-HartmanFrom: Ulf Hansson <[email protected]>
[ Upstream commit 171b66e2e2e9d80b93c8cff799e6175074b22297 ]
When PSCI OSI mode is supported the syscore flag is set for the CPU devices that becomes attached to their PM domains (genpds). In the suspend-to-idle case, we call dev_pm_genpd_suspend|resume() to allow genpd to properly manage the power-off/on operations (pick an idlestate and manage the on/off notifications).
For suspend-to-ram, dev_pm_genpd_suspend|resume() is currently not being called, which causes a problem that the genpd on/off notifiers do not get sent as expected. This prevents the platform-specific operations from being executed, typically needed just before/after the boot CPU is being turned off/on.
To deal with this problem, let's register a syscore ops for cpuidle-psci when PSCI OSI mode is being used and call dev_pm_genpd_suspend|resume() from them. In this way, genpd regains control of the PM domain topology and then sends the on/off notifications when it's appropriate.
--- drivers/cpuidle/cpuidle-psci.c | 46 ++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+)
drivers/cpuidle/cpuidle-psci.c +46 -0
@@ -23,6 +23,7 @@#include <linux/pm_runtime.h> #include <linux/slab.h> #include <linux/string.h> +#include <linux/syscore_ops.h> #include <asm/cpuidle.h>
@@ -131,6 +132,49 @@ static int psci_idle_cpuhp_down(unsigned int cpu)return 0 ; } +static void psci_idle_syscore_switch (bool suspend) +{ +bool cleared = false; +struct device *dev; +int cpu; + +for_each_possible_cpu (cpu) { + dev =per_cpu_ptr (&psci_cpuidle_data, cpu)->dev; + +if (dev && suspend) { +dev_pm_genpd_suspend (dev); + }else if (dev) { +dev_pm_genpd_resume (dev); + +/* Account for userspace having offlined a CPU. */ +if (pm_runtime_status_suspended (dev)) +pm_runtime_set_active (dev); + +/* Clear domain state to re-start fresh. */ +if (!cleared) { +psci_set_domain_state (0 ); + cleared = true; + } + } + } +} + +static int psci_idle_syscore_suspend (void ) +{ +psci_idle_syscore_switch (true); +return 0 ; +} + +static void psci_idle_syscore_resume (void ) +{ +psci_idle_syscore_switch (false); +} + +static struct syscore_ops psci_idle_syscore_ops = { + .suspend = psci_idle_syscore_suspend, + .resume = psci_idle_syscore_resume, +}; +static void psci_idle_init_cpuhp (void ) {int err;
@@ -138,6 +182,8 @@ static void psci_idle_init_cpuhp(void)if (!psci_cpuidle_use_cpuhp)return ; +register_syscore_ops (&psci_idle_syscore_ops); + err = cpuhp_setup_state_nocalls(CPUHP_AP_CPU_PM_STARTING, "cpuidle/psci:online", psci_idle_cpuhp_up,
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 94/879 drm/amdgpu/pm: fix the null pointer while the smu is disabled
In reply to Greg Kroah-HartmanFrom: Huang Rui <[email protected]>
[ Upstream commit eea5c7b3390c6e006ba4cbd906447dd8cea8cfbf ]
It needs to check if the pp_funcs is initialized while release the context, otherwise it will trigger null pointer panic while the software smu is not enabled.
[ 1109.404555] BUG: kernel NULL pointer dereference, address: 0000000000000078 [ 1109.404609] #PF: supervisor read access in kernel mode [ 1109.404638] #PF: error_code(0x0000) - not-present page [ 1109.404657] PGD 0 P4D 0 [ 1109.404672] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 1109.404701] CPU: 7 PID: 9150 Comm: amdgpu_test Tainted: G OEL 5.16.0-custom #1 [ 1109.404732] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 1109.404765] RIP: 0010:amdgpu_dpm_force_performance_level+0x1d/0x170 [amdgpu] [ 1109.405109] Code: 5d c3 44 8b a3 f0 80 00 00 eb e5 66 90 0f 1f 44 00 00 55 48 89 e5 41 57 41 56 41 55 41 54 53 48 83 ec 08 4c 8b b7 f0 7d 00 00 <49> 83 7e 78 00 0f 84 f2 00 00 00 80 bf 87 80 00 00 00 48 89 fb 0f [ 1109.405176] RSP: 0018:ffffaf3083ad7c20 EFLAGS: 00010282 [ 1109.405203] RAX: 0000000000000000 RBX: ffff9796b1c14600 RCX: 0000000002862007 [ 1109.405229] RDX: ffff97968591c8c0 RSI: 0000000000000001 RDI: ffff9796a3700000 [ 1109.405260] RBP: ffffaf3083ad7c50 R08: ffffffff9897de00 R09: ffff979688d9db60 [ 1109.405286] R10: 0000000000000000 R11: ffff979688d9db90 R12: 0000000000000001 [ 1109.405316] R13: ffff9796a3700000 R14: 0000000000000000 R15: ffff9796a3708fc0 [ 1109.405345] FS: 00007ff055cff180(0000) GS:ffff9796bfdc0000(0000) knlGS:0000000000000000 [ 1109.405378] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1109.405400] CR2: 0000000000000078 CR3: 000000000a394000 CR4: 00000000000506e0 [ 1109.405434] Call Trace: [ 1109.405445] <TASK> [ 1109.405456] ? delete_object_full+0x1d/0x20 [ 1109.405480] amdgpu_ctx_set_stable_pstate+0x7c/0xa0 [amdgpu] [ 1109.405698] amdgpu_ctx_fini.part.0+0xcb/0x100 [amdgpu] [ 1109.405911] amdgpu_ctx_do_release+0x71/0x80 [amdgpu] [ 1109.406121] amdgpu_ctx_ioctl+0x52d/0x550 [amdgpu] [ 1109.406327] ? _raw_spin_unlock+0x1a/0x30 [ 1109.406354] ? drm_gem_handle_delete+0x81/0xb0 [drm] [ 1109.406400] ? amdgpu_ctx_get_entity+0x2c0/0x2c0 [amdgpu] [ 1109.406609] drm_ioctl_kernel+0xb6/0x140 [drm]
--- drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/amdgpu_dpm.c +1 -1
@@ -790,7 +790,7 @@ int amdgpu_dpm_force_performance_level(struct amdgpu_device *adev,AMD_DPM_FORCED_LEVEL_PROFILE_MIN_MCLK |AMD_DPM_FORCED_LEVEL_PROFILE_PEAK ; -if (!pp_funcs->force_performance_level) +if (!pp_funcs || !pp_funcs->force_performance_level)return 0 ;if (adev->pm.dpm.thermal_active)
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 95/879 drm/amd/pm: fix double free in si_parse_power_table()
In reply to Greg Kroah-HartmanFrom: Keita Suzuki <[email protected]>
[ Upstream commit f3fa2becf2fc25b6ac7cf8d8b1a2e4a86b3b72bd ]
In function si_parse_power_table(), array adev->pm.dpm.ps and its member is allocated. If the allocation of each member fails, the array itself is freed and returned with an error code. However, the array is later freed again in si_dpm_fini() function which is called when the function returns an error.
This leads to potential double free of the array adev->pm.dpm.ps, as well as leak of its array members, since the members are not freed in the allocation function and the array is not nulled when freed. In addition adev->pm.dpm.num_ps, which keeps track of the allocated array member, is not updated until the member allocation is successfully finished, this could also lead to either use after free, or uninitialized variable access in si_dpm_fini().
Fix this by postponing the free of the array until si_dpm_fini() and increment adev->pm.dpm.num_ps everytime the array member is allocated.
--- drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c +3 -5
@@ -7297,17 +7297,15 @@ static int si_parse_power_table(struct amdgpu_device *adev)if (!adev->pm.dpm.ps)return -ENOMEM ; power_state_offset = (u8 *)state_array->states; -for (i =0 ; i < state_array->ucNumEntries; i++) { +for (adev->pm.dpm.num_ps =0 , i =0 ; i < state_array->ucNumEntries; i++) {u8 *idx; power_state = (union pplib_power_state *)power_state_offset; non_clock_array_index = power_state->v2.nonClockInfoIndex; non_clock_info = (struct _ATOM_PPLIB_NONCLOCK_INFO *) &non_clock_info_array->nonClockInfo[non_clock_array_index]; ps =kzalloc (sizeof (struct si_ps ),GFP_KERNEL ); -if (ps ==NULL ) { -kfree (adev->pm.dpm.ps); +if (ps ==NULL )return -ENOMEM ; - } adev->pm.dpm.ps[i].ps_priv = ps; si_parse_pplib_non_clock_info(adev, &adev->pm.dpm.ps[i], non_clock_info,
@@ -7329,8 +7327,8 @@ static int si_parse_power_table(struct amdgpu_device *adev) k++; } power_state_offset +=2 + power_state->v2.ucNumDPMLevels; + adev->pm.dpm.num_ps++; } - adev->pm.dpm.num_ps = state_array->ucNumEntries;/* fill in the vce power states */ for (i =0 ; i < adev->pm.dpm.num_of_vce_states; i++) {
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 96/879 ASoC: rsnd: care default case on rsnd_ssiu_busif_err_status_clear()
In reply to Greg Kroah-HartmanFrom: Kuninori Morimoto <[email protected]>
[ Upstream commit b1384d4c95088d01f4266237faabf165d3d605fc ]
commit cfb7b8bf1e2d66 ("ASoC: rsnd: tidyup rsnd_ssiu_busif_err_status_clear()") merged duplicate code, but it didn't care about default case, and causes smatch warnings.
smatch warnings:sound/soc/sh/rcar/ssiu.c:112 rsnd_ssiu_busif_err_status_clear() \
error: uninitialized symbol 'offset'.sound/soc/sh/rcar/ssiu.c:114 rsnd_ssiu_busif_err_status_clear() \
error: uninitialized symbol 'shift'.
This patch cares it.
--- sound/soc/sh/rcar/ssiu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
sound/soc/sh/rcar/ssiu.c +3 -1
@@ -102,6 +102,8 @@ bool rsnd_ssiu_busif_err_status_clear(struct rsnd_mod *mod) shift =1 ; offset =1 ;break ; +default : + goto out; }for (i =0 ; i <4 ; i++) {
@@ -120,7 +122,7 @@ bool rsnd_ssiu_busif_err_status_clear(struct rsnd_mod *mod) }rsnd_mod_write (mod, reg, val); } - +out:return error; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 97/879 ASoC: rsnd: care return value from rsnd_node_fixed_index()
In reply to Greg Kroah-HartmanFrom: Kuninori Morimoto <[email protected]>
[ Upstream commit d09a7db431c65aaa8303eb456439d1831ca2e6b4 ]
Renesas Sound is very complex, and thus it needs to use rsnd_node_fixed_index() to know enabled pin index.
It returns error if strange pin was selected, but some codes didn't check it.
This patch 1) indicates error message, 2) check return value.
--- sound/soc/sh/rcar/core.c | 15 ++++++++++----- sound/soc/sh/rcar/dma.c | 9 ++++++++- sound/soc/sh/rcar/rsnd.h | 2 +- sound/soc/sh/rcar/src.c | 7 ++++++- sound/soc/sh/rcar/ssi.c | 14 ++++++++++++-- sound/soc/sh/rcar/ssiu.c | 7 ++++++- 6 files changed, 43 insertions(+), 11 deletions(-)
sound/soc/sh/rcar/core.c +10 -5
@@ -1159,6 +1159,7 @@ void rsnd_parse_connect_common(struct rsnd_dai *rdai, char *name, struct device_node *capture) {struct rsnd_priv *priv =rsnd_rdai_to_priv (rdai); +struct device *dev =rsnd_priv_to_dev (priv);struct device_node *np;int i;
@@ -1169,7 +1170,11 @@ void rsnd_parse_connect_common(struct rsnd_dai *rdai, char *name,for_each_child_of_node (node, np) {struct rsnd_mod *mod; - i =rsnd_node_fixed_index (np, name, i); + i =rsnd_node_fixed_index (dev, np, name, i); +if (i <0 ) { +of_node_put (np); +break ; + } mod =mod_get (priv, i);
@@ -1183,7 +1188,7 @@ void rsnd_parse_connect_common(struct rsnd_dai *rdai, char *name,of_node_put (node); } -int rsnd_node_fixed_index (struct device_node *node,char *name,int idx) +int rsnd_node_fixed_index (struct device *dev,struct device_node *node,char *name,int idx) {char node_name[16 ];
@@ -1210,6 +1215,8 @@ int rsnd_node_fixed_index(struct device_node *node, char *name, int idx)return idx; } +dev_err (dev,"strange node numbering (%s)" , +of_node_full_name (node));return -EINVAL ; }
@@ -1221,10 +1228,8 @@ int rsnd_node_count(struct rsnd_priv *priv, struct device_node *node, char *name i =0 ;for_each_child_of_node (node, np) { - i =rsnd_node_fixed_index (np, name, i); + i =rsnd_node_fixed_index (dev, np, name, i);if (i <0 ) { -dev_err (dev,"strange node numbering (%s)" , -of_node_full_name (node));of_node_put (np);return 0 ; }
sound/soc/sh/rcar/dma.c +8 -1
@@ -240,12 +240,19 @@ static int rsnd_dmaen_start(struct rsnd_mod *mod,struct dma_chan *rsnd_dma_request_channel (struct device_node *of_node,char *name,struct rsnd_mod *mod,char *x) { +struct rsnd_priv *priv =rsnd_mod_to_priv (mod); +struct device *dev =rsnd_priv_to_dev (priv);struct dma_chan *chan =NULL ;struct device_node *np;int i =0 ;for_each_child_of_node (of_node, np) { - i =rsnd_node_fixed_index (np, name, i); + i =rsnd_node_fixed_index (dev, np, name, i); +if (i <0 ) { + chan =NULL ; +of_node_put (np); +break ; + }if (i ==rsnd_mod_id_raw (mod) && (!chan)) chan =of_dma_request_slave_channel (np, x);
sound/soc/sh/rcar/rsnd.h +1 -1
@@ -460,7 +460,7 @@ void rsnd_parse_connect_common(struct rsnd_dai *rdai, char *name,struct device_node *playback, struct device_node *capture);int rsnd_node_count (struct rsnd_priv *priv,struct device_node *node,char *name); -int rsnd_node_fixed_index (struct device_node *node,char *name,int idx); +int rsnd_node_fixed_index (struct device *dev,struct device_node *node,char *name,int idx);int rsnd_channel_normalization (int chan);#define rsnd_runtime_channel_original (io) \
sound/soc/sh/rcar/src.c +6 -1
@@ -676,7 +676,12 @@ int rsnd_src_probe(struct rsnd_priv *priv)if (!of_device_is_available (np)) goto skip; - i =rsnd_node_fixed_index (np,SRC_NAME , i); + i =rsnd_node_fixed_index (dev, np,SRC_NAME , i); +if (i <0 ) { + ret = -EINVAL ; +of_node_put (np); + goto rsnd_src_probe_done; + } src =rsnd_src_get (priv, i);
sound/soc/sh/rcar/ssi.c +12 -2
@@ -1105,6 +1105,7 @@ void rsnd_parse_connect_ssi(struct rsnd_dai *rdai, struct device_node *capture) {struct rsnd_priv *priv =rsnd_rdai_to_priv (rdai); +struct device *dev =rsnd_priv_to_dev (priv);struct device_node *node;struct device_node *np;int i;
@@ -1117,7 +1118,11 @@ void rsnd_parse_connect_ssi(struct rsnd_dai *rdai,for_each_child_of_node (node, np) {struct rsnd_mod *mod; - i =rsnd_node_fixed_index (np,SSI_NAME , i); + i =rsnd_node_fixed_index (dev, np,SSI_NAME , i); +if (i <0 ) { +of_node_put (np); +break ; + } mod =rsnd_ssi_mod_get (priv, i);
@@ -1182,7 +1187,12 @@ int rsnd_ssi_probe(struct rsnd_priv *priv)if (!of_device_is_available (np)) goto skip; - i =rsnd_node_fixed_index (np,SSI_NAME , i); + i =rsnd_node_fixed_index (dev, np,SSI_NAME , i); +if (i <0 ) { + ret = -EINVAL ; +of_node_put (np); + goto rsnd_ssi_probe_done; + } ssi =rsnd_ssi_get (priv, i);
sound/soc/sh/rcar/ssiu.c +6 -1
@@ -462,6 +462,7 @@ void rsnd_parse_connect_ssiu(struct rsnd_dai *rdai, struct device_node *capture) {struct rsnd_priv *priv =rsnd_rdai_to_priv (rdai); +struct device *dev =rsnd_priv_to_dev (priv);struct device_node *node =rsnd_ssiu_of_node (priv);struct rsnd_dai_stream *io_p = &rdai->playback;struct rsnd_dai_stream *io_c = &rdai->capture;
@@ -474,7 +475,11 @@ void rsnd_parse_connect_ssiu(struct rsnd_dai *rdai,for_each_child_of_node (node, np) {struct rsnd_mod *mod; - i =rsnd_node_fixed_index (np,SSIU_NAME , i); + i =rsnd_node_fixed_index (dev, np,SSIU_NAME , i); +if (i <0 ) { +of_node_put (np); +break ; + } mod =rsnd_ssiu_mod_get (priv, i);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 98/879 net: macb: In ZynqMP initialization make SGMII phy configuration optional
In reply to Greg Kroah-HartmanFrom: Radhey Shyam Pandey <[email protected]>
[ Upstream commit 29e96fe9e0ec0f0fe1dd306a4ccb7b8983eae67a ]
In the macb binding documentation "phys" is an optional property. Make implementation in line with it. This change allows the traditional flow in which first stage bootloader does PS-GT configuration to work along with newer use cases in which PS-GT configuration is managed by the phy-zynqmp driver.
It fixes below macb probe failure when macb DT node doesn't have SGMII phys handle.
"macb ff0b0000.ethernet: error -ENODEV: failed to get PS-GTR PHY"
--- drivers/net/ethernet/cadence/macb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/cadence/macb_main.c +1 -1
@@ -4594,7 +4594,7 @@ static int zynqmp_init(struct platform_device *pdev)if (bp->phy_interface ==PHY_INTERFACE_MODE_SGMII ) {/* Ensure PS-GTR PHY device used in SGMII mode is ready */ - bp->sgmii_phy =devm_phy_get (&pdev->dev,"sgmii-phy" ); + bp->sgmii_phy =devm_phy_optional_get (&pdev->dev,NULL );if (IS_ERR (bp->sgmii_phy)) { ret =PTR_ERR (bp->sgmii_phy);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 99/879 ath9k: fix QCA9561 PA bias level
In reply to Greg Kroah-HartmanFrom: Thibaut VARÈNE <[email protected]>
[ Upstream commit e999a5da28a0e0f7de242d841ef7d5e48f4646ae ]
This patch fixes an invalid TX PA DC bias level on QCA9561, which results in a very low output power and very low throughput as devices are further away from the AP (compared to other 2.4GHz APs).
This patch was suggested by Felix Fietkau, who noted[1]:
"The value written to that register is wrong, because while the mask definition AR_CH0_TOP2_XPABIASLVL uses a different value for 9561, the shift definition AR_CH0_TOP2_XPABIASLVL_S is hardcoded to 12, which is wrong for 9561."
In real life testing, without this patch the 2.4GHz throughput on Yuncore XD3200 is around 10Mbps sitting next to the AP, and closer to practical maximum with the patch applied.
[1] https://lore.kernel.org/all/[email protected]
--- drivers/net/wireless/ath/ath9k/ar9003_phy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath9k/ar9003_phy.h +1 -1
@@ -720,7 +720,7 @@#define AR_CH0_TOP2 (AR_SREV_9300(ah) ? 0x1628c : \ (AR_SREV_9462(ah) ? 0x16290 : 0x16284))#define AR_CH0_TOP2_XPABIASLVL (AR_SREV_9561(ah) ? 0x1e00 : 0xf000) -#define AR_CH0_TOP2_XPABIASLVL_S 12 +#define AR_CH0_TOP2_XPABIASLVL_S (AR_SREV_9561(ah) ? 9 : 12)#define AR_CH0_XTAL (AR_SREV_9300(ah) ? 0x16294 : \ ((AR_SREV_9462(ah) || AR_SREV_9565(ah)) ? 0x16298 : \
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 100/879 media: Revert "media: dw9768: activate runtime PM and turn off device"
In reply to Greg Kroah-HartmanFrom: Sakari Ailus <[email protected]>
[ Upstream commit 7dd0f93a31af03cba81c684c4c361bba510ffe71 ]
This reverts commit c09d776eaa060534a1663e3b89d842db3e1d9076.
Revert the commit as it breaks runtime PM support on OF based systems. More fixes to the driver are needed.
--- drivers/media/i2c/dw9768.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/media/i2c/dw9768.c +0 -6
@@ -469,11 +469,6 @@ static int dw9768_probe(struct i2c_client *client) dw9768->sd.entity.function =MEDIA_ENT_F_LENS ; -/* -* Device is already turned on by i2c-core with ACPI domain PM. -* Attempt to turn off the device to satisfy the privacy LED concerns. -*/ -pm_runtime_set_active (dev);pm_runtime_enable (dev);if (!pm_runtime_enabled (dev)) { ret =dw9768_runtime_resume (dev);
@@ -488,7 +483,6 @@ static int dw9768_probe(struct i2c_client *client)dev_err (dev,"failed to register V4L2 subdev: %d" , ret); goto err_power_off; } -pm_runtime_idle (dev);return 0 ;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 101/879 media: i2c: dw9714: Disable the regulator when the driver fails to probe
In reply to Greg Kroah-HartmanFrom: Zheyu Ma <[email protected]>
[ Upstream commit 02276e18defa2fccf16413b44440277d98c2b1ea ]
When the driver fails to probe, we will get the following splat:
[ 59.305988] ------------[ cut here ]------------ [ 59.306417] WARNING: CPU: 2 PID: 395 at drivers/regulator/core.c:2257 _regulator_put+0x3ec/0x4e0 [ 59.310345] RIP: 0010:_regulator_put+0x3ec/0x4e0 [ 59.318362] Call Trace: [ 59.318582] <TASK> [ 59.318765] regulator_put+0x1f/0x30 [ 59.319058] devres_release_group+0x319/0x3d0 [ 59.319420] i2c_device_probe+0x766/0x940
Fix this by disabling the regulator in error handling.
--- drivers/media/i2c/dw9714.c | 1 + 1 file changed, 1 insertion(+)
drivers/media/i2c/dw9714.c +1 -0
@@ -183,6 +183,7 @@ static int dw9714_probe(struct i2c_client *client)return 0 ; err_cleanup: +regulator_disable (dw9714_dev->vcc);v4l2_ctrl_handler_free (&dw9714_dev->ctrls_vcm);media_entity_cleanup (&dw9714_dev->sd.entity);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 102/879 media: venus: hfi: avoid null dereference in deinit
In reply to Greg Kroah-HartmanFrom: Luca Weiss <[email protected]>
[ Upstream commit 86594f6af867b5165d2ba7b5a71fae3a5961e56c ]
If venus_probe fails at pm_runtime_put_sync the error handling first calls hfi_destroy and afterwards hfi_core_deinit. As hfi_destroy sets core->ops to NULL, hfi_core_deinit cannot call the core_deinit function anymore.
Avoid this null pointer derefence by skipping the call when necessary.
--- drivers/media/platform/qcom/venus/hfi.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/media/platform/qcom/venus/hfi.c +3 -0
@@ -104,6 +104,9 @@ int hfi_core_deinit(struct venus_core *core, bool blocking)mutex_lock (&core->lock); } +if (!core->ops) + goto unlock; + ret = core->ops->core_deinit (core);if (!ret)
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 103/879 media: venus: do not queue internal buffers from previous sequence
In reply to Greg Kroah-HartmanFrom: Vikash Garodia <[email protected]>
[ Upstream commit 73664f107c0fafb59cd91e576b81c986adb74610 ]
During reconfig (DRC) event from firmware, it is not guaranteed that all the DPB(internal) buffers would be released by the firmware. Some buffers might be released gradually while processing frames from the new sequence. These buffers now stay idle in the dpblist. In subsequent call to queue the DPBs to firmware, these idle buffers should not be queued. The fix identifies those buffers and free them.
--- drivers/media/platform/qcom/venus/helpers.c | 34 +++++++++++++++------ 1 file changed, 25 insertions(+), 9 deletions(-)
drivers/media/platform/qcom/venus/helpers.c +25 -9
@@ -90,12 +90,28 @@ bool venus_helper_check_codec(struct venus_inst *inst, u32 v4l2_pixfmt) }EXPORT_SYMBOL_GPL (venus_helper_check_codec); +static void free_dpb_buf (struct venus_inst *inst,struct intbuf *buf) +{ +ida_free (&inst->dpb_ids, buf->dpb_out_tag); + +list_del_init (&buf->list); +dma_free_attrs (inst->core->dev, buf->size, buf->va, buf->da, + buf->attrs); +kfree (buf); +} +int venus_helper_queue_dpb_bufs (struct venus_inst *inst) { -struct intbuf *buf; +struct intbuf *buf, *next; +unsigned int dpb_size =0 ;int ret =0 ; -list_for_each_entry (buf, &inst->dpbbufs, list) { +if (inst->dpb_buftype ==HFI_BUFFER_OUTPUT ) + dpb_size = inst->output_buf_size; +else if (inst->dpb_buftype ==HFI_BUFFER_OUTPUT2 ) + dpb_size = inst->output2_buf_size; + +list_for_each_entry_safe (buf, next, &inst->dpbbufs, list) {struct hfi_frame_data fdata;memset (&fdata,0 ,sizeof (fdata));
@@ -106,6 +122,12 @@ int venus_helper_queue_dpb_bufs(struct venus_inst *inst)if (buf->owned_by ==FIRMWARE )continue ; +/* free buffer from previous sequence which was released later */ +if (dpb_size > buf->size) { +free_dpb_buf (inst, buf); +continue ; + } + fdata.clnt_data = buf->dpb_out_tag; ret =hfi_session_process_buf (inst, &fdata);
@@ -127,13 +149,7 @@ int venus_helper_free_dpb_bufs(struct venus_inst *inst)list_for_each_entry_safe (buf, n, &inst->dpbbufs, list) {if (buf->owned_by ==FIRMWARE )continue ; - -ida_free (&inst->dpb_ids, buf->dpb_out_tag); - -list_del_init (&buf->list); -dma_free_attrs (inst->core->dev, buf->size, buf->va, buf->da, - buf->attrs); -kfree (buf); +free_dpb_buf (inst, buf); }if (list_empty (&inst->dpbbufs))
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 104/879 media: pci: cx23885: Fix the error handling in cx23885_initdev()
In reply to Greg Kroah-HartmanFrom: Zheyu Ma <[email protected]>
[ Upstream commit e8123311cf06d7dae71e8c5fe78e0510d20cd30b ]
When the driver fails to call the dma_set_mask(), the driver will get the following splat:
[ 55.853884] BUG: KASAN: use-after-free in __process_removed_driver+0x3c/0x240 [ 55.854486] Read of size 8 at addr ffff88810de60408 by task modprobe/590 [ 55.856822] Call Trace: [ 55.860327] __process_removed_driver+0x3c/0x240 [ 55.861347] bus_for_each_dev+0x102/0x160 [ 55.861681] i2c_del_driver+0x2f/0x50
This is because the driver has initialized the i2c related resources in cx23885_dev_setup() but not released them in error handling, fix this bug by modifying the error path that jumps after failing to call the dma_set_mask().
--- drivers/media/pci/cx23885/cx23885-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/media/pci/cx23885/cx23885-core.c +3 -3
@@ -2165,7 +2165,7 @@ static int cx23885_initdev(struct pci_dev *pci_dev, err =dma_set_mask (&pci_dev->dev,0xffffffff );if (err) {pr_err ("%s/0: Oops: no 32bit PCI DMA ???\n" , dev->name); - goto fail_ctrl; + goto fail_dma_set_mask; } err = request_irq(pci_dev->irq, cx23885_irq,
@@ -2173,7 +2173,7 @@ static int cx23885_initdev(struct pci_dev *pci_dev,if (err <0 ) {pr_err ("%s: can't get IRQ %d\n" , dev->name, pci_dev->irq); - goto fail_irq; + goto fail_dma_set_mask; }switch (dev->board) {
@@ -2195,7 +2195,7 @@ static int cx23885_initdev(struct pci_dev *pci_dev,return 0 ; -fail_irq: +fail_dma_set_mask:cx23885_dev_unregister (dev); fail_ctrl:v4l2_ctrl_handler_free (hdl);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 105/879 media: cx25821: Fix the warning when removing the module
In reply to Greg Kroah-HartmanFrom: Zheyu Ma <[email protected]>
[ Upstream commit 2203436a4d24302871617373a7eb21bc17e38762 ]
When removing the module, we will get the following warning:
[ 14.746697] remove_proc_entry: removing non-empty directory 'irq/21', leaking at least 'cx25821[1]' [ 14.747449] WARNING: CPU: 4 PID: 368 at fs/proc/generic.c:717 remove_proc_entry+0x389/0x3f0 [ 14.751611] RIP: 0010:remove_proc_entry+0x389/0x3f0 [ 14.759589] Call Trace: [ 14.759792] <TASK> [ 14.759975] unregister_irq_proc+0x14c/0x170 [ 14.760340] irq_free_descs+0x94/0xe0 [ 14.760640] mp_unmap_irq+0xb6/0x100 [ 14.760937] acpi_unregister_gsi_ioapic+0x27/0x40 [ 14.761334] acpi_pci_irq_disable+0x1d3/0x320 [ 14.761688] pci_disable_device+0x1ad/0x380 [ 14.762027] ? _raw_spin_unlock_irqrestore+0x2d/0x60 [ 14.762442] ? cx25821_shutdown+0x20/0x9f0 [cx25821] [ 14.762848] cx25821_finidev+0x48/0xc0 [cx25821] [ 14.763242] pci_device_remove+0x92/0x240
Fix this by freeing the irq before call pci_disable_device().
--- drivers/media/pci/cx25821/cx25821-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/cx25821/cx25821-core.c +1 -1
@@ -1332,11 +1332,11 @@ static void cx25821_finidev(struct pci_dev *pci_dev)struct cx25821_dev *dev =get_cx25821 (v4l2_dev);cx25821_shutdown (dev); -pci_disable_device (pci_dev);/* unregister stuff */ if (pci_dev->irq)free_irq (pci_dev->irq, dev); +pci_disable_device (pci_dev);cx25821_dev_unregister (dev);v4l2_device_unregister (v4l2_dev);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 106/879 md/bitmap: dont set sb values if cant pass sanity check
In reply to Greg Kroah-HartmanFrom: Heming Zhao <[email protected]>
[ Upstream commit e68cb83a57a458b01c9739e2ad9cb70b04d1e6d2 ]
If bitmap area contains invalid data, kernel will crash then mdadm triggers "Segmentation fault".
This is cluster-md speical bug. In non-clustered env, mdadm will handle broken metadata case. In clustered array, only kernel space handles bitmap slot info. But even this bug only happened in clustered env, current sanity check is wrong, the code should be changed.
How to trigger: (faulty injection)
dd if=/dev/zero bs=1M count=1 oflag=direct of=/dev/sda
dd if=/dev/zero bs=1M count=1 oflag=direct of=/dev/sdb mdadm -C /dev/md0 -b clustered -e 1.2 -n 2 -l mirror /dev/sda /dev/sdb mdadm -Ss
echo aaa > magic.txt
== below modifying slot 2 bitmap data ==
dd if=magic.txt of=/dev/sda seek=16384 bs=1 count=3 <== destroy magic dd if=/dev/zero of=/dev/sda seek=16436 bs=1 count=4 <== ZERO chunksize mdadm -A /dev/md0 /dev/sda /dev/sdb
== kernel crashes. mdadm outputs "Segmentation fault" ==
Reason of kernel crash:
In md_bitmap_read_sb (called by md_bitmap_create), bad bitmap magic didn't block chunksize assignment, and zero value made DIV_ROUND_UP_SECTOR_T() trigger "divide error".
Crash log:
kernel: md: md0 stopped. kernel: md/raid1:md0: not clean -- starting background reconstruction kernel: md/raid1:md0: active with 2 out of 2 mirrors kernel: dlm: ... ... kernel: md-cluster: Joined cluster 44810aba-38bb-e6b8-daca-bc97a0b254aa slot 1 kernel: md0: invalid bitmap file superblock: bad magic kernel: md_bitmap_copy_from_slot can't get bitmap from slot 2 kernel: md-cluster: Could not gather bitmaps from slot 2 kernel: divide error: 0000 [#1] SMP NOPTI kernel: CPU: 0 PID: 1603 Comm: mdadm Not tainted 5.14.6-1-default kernel: Hardware name: QEMU Standard PC (i440FX + PIIX, 1996) kernel: RIP: 0010:md_bitmap_create+0x1d1/0x850 [md_mod] kernel: RSP: 0018:ffffc22ac0843ba0 EFLAGS: 00010246 kernel: ... ... kernel: Call Trace: kernel: ? dlm_lock_sync+0xd0/0xd0 [md_cluster 77fe..7a0] kernel: md_bitmap_copy_from_slot+0x2c/0x290 [md_mod 24ea..d3a] kernel: load_bitmaps+0xec/0x210 [md_cluster 77fe..7a0] kernel: md_bitmap_load+0x81/0x1e0 [md_mod 24ea..d3a] kernel: do_md_run+0x30/0x100 [md_mod 24ea..d3a] kernel: md_ioctl+0x1290/0x15a0 [md_mod 24ea....d3a] kernel: ? mddev_unlock+0xaa/0x130 [md_mod 24ea..d3a] kernel: ? blkdev_ioctl+0xb1/0x2b0 kernel: block_ioctl+0x3b/0x40 kernel: __x64_sys_ioctl+0x7f/0xb0 kernel: do_syscall_64+0x59/0x80 kernel: ? exit_to_user_mode_prepare+0x1ab/0x230 kernel: ? syscall_exit_to_user_mode+0x18/0x40 kernel: ? do_syscall_64+0x69/0x80 kernel: entry_SYSCALL_64_after_hwframe+0x44/0xae kernel: RIP: 0033:0x7f4a15fa722b kernel: ... ... kernel: ---[ end trace 8afa7612f559c868 ]--- kernel: RIP: 0010:md_bitmap_create+0x1d1/0x850 [md_mod]
--- drivers/md/md-bitmap.c | 44 ++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 21 deletions(-)
drivers/md/md-bitmap.c +23 -21
@@ -639,14 +639,6 @@ static int md_bitmap_read_sb(struct bitmap *bitmap) daemon_sleep =le32_to_cpu (sb->daemon_sleep) *HZ ; write_behind =le32_to_cpu (sb->write_behind); sectors_reserved =le32_to_cpu (sb->sectors_reserved); -/* Setup nodes/clustername only if bitmap version is -* cluster-compatible -*/ -if (sb->version ==cpu_to_le32 (BITMAP_MAJOR_CLUSTERED )) { - nodes =le32_to_cpu (sb->nodes); -strlcpy (bitmap->mddev->bitmap_info.cluster_name, - sb->cluster_name,64 ); - }/* verify that the bitmap-specific fields are valid */ if (sb->magic !=cpu_to_le32 (BITMAP_MAGIC ))
@@ -668,6 +660,16 @@ static int md_bitmap_read_sb(struct bitmap *bitmap) goto out; } +/* +* Setup nodes/clustername only if bitmap version is +* cluster-compatible +*/ +if (sb->version ==cpu_to_le32 (BITMAP_MAJOR_CLUSTERED )) { + nodes =le32_to_cpu (sb->nodes); +strlcpy (bitmap->mddev->bitmap_info.cluster_name, + sb->cluster_name,64 ); + } +/* keep the array size field of the bitmap superblock up to date */ sb->sync_size =cpu_to_le64 (bitmap->mddev->resync_max_sectors);
@@ -700,9 +702,9 @@ static int md_bitmap_read_sb(struct bitmap *bitmap) out:kunmap_atomic (sb); -/* Assigning chunksize is required for "re_read" */ - bitmap->mddev->bitmap_info.chunksize = chunksize;if (err ==0 && nodes && (bitmap->cluster_slot <0 )) { +/* Assigning chunksize is required for "re_read" */ + bitmap->mddev->bitmap_info.chunksize = chunksize; err =md_setup_cluster (bitmap->mddev, nodes);if (err) { pr_warn("%s: Could not setup cluster service (%d)\n",
@@ -713,18 +715,18 @@ static int md_bitmap_read_sb(struct bitmap *bitmap) goto re_read; } - out_no_sb: -if (test_bit (BITMAP_STALE , &bitmap->flags)) - bitmap->events_cleared = bitmap->mddev->events; - bitmap->mddev->bitmap_info.chunksize = chunksize; - bitmap->mddev->bitmap_info.daemon_sleep = daemon_sleep; - bitmap->mddev->bitmap_info.max_write_behind = write_behind; - bitmap->mddev->bitmap_info.nodes = nodes; -if (bitmap->mddev->bitmap_info.space ==0 || - bitmap->mddev->bitmap_info.space > sectors_reserved) - bitmap->mddev->bitmap_info.space = sectors_reserved; -if (err) { +if (err ==0 ) { +if (test_bit (BITMAP_STALE , &bitmap->flags)) + bitmap->events_cleared = bitmap->mddev->events; + bitmap->mddev->bitmap_info.chunksize = chunksize; + bitmap->mddev->bitmap_info.daemon_sleep = daemon_sleep; + bitmap->mddev->bitmap_info.max_write_behind = write_behind; + bitmap->mddev->bitmap_info.nodes = nodes; +if (bitmap->mddev->bitmap_info.space ==0 || + bitmap->mddev->bitmap_info.space > sectors_reserved) + bitmap->mddev->bitmap_info.space = sectors_reserved; + }else {md_bitmap_print_sb (bitmap);if (bitmap->cluster_slot <0 )md_cluster_stop (bitmap->mddev);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 107/879 mmc: jz4740: Apply DMA engine limits to maximum segment size
In reply to Greg Kroah-HartmanFrom: Aidan MacDonald <[email protected]>
[ Upstream commit afadb04f1d6e74b18a253403f5274cde5e3fd7bd ]
Do what is done in other DMA-enabled MMC host drivers (cf. host/mmci.c) and limit the maximum segment size based on the DMA engine's capabilities. This is needed to avoid warnings like the following with CONFIG_DMA_API_DEBUG=y.
------------[ cut here ]------------
WARNING: CPU: 0 PID: 21 at kernel/dma/debug.c:1162 debug_dma_map_sg+0x2f4/0x39c
DMA-API: jz4780-dma 13420000.dma-controller: mapping sg segment longer than device claims to support [len=98304] [max=65536]
CPU: 0 PID: 21 Comm: kworker/0:1H Not tainted 5.18.0-rc1 #19
Workqueue: kblockd blk_mq_run_work_fn
Stack : 81575aec 00000004 80620000 80620000 80620000 805e7358 00000009 801537ac
814c832c 806276e3 806e34b4 80620000 81575aec 00000001 81575ab8 09291444
00000000 00000000 805e7358 81575958 ffffffea 8157596c 00000000 636f6c62
6220646b 80387a70 0000000f 6d5f6b6c 80620000 00000000 81575ba4 00000009
805e170c 80896640 00000001 00010000 00000000 00000000 00006098 806e0000
...
Call Trace:
[<80107670>] show_stack+0x84/0x120
[<80528cd8>] __warn+0xb8/0xec
[<80528d78>] warn_slowpath_fmt+0x6c/0xb8
[<8016f1d4>] debug_dma_map_sg+0x2f4/0x39c
[<80169d4c>] __dma_map_sg_attrs+0xf0/0x118
[<8016a27c>] dma_map_sg_attrs+0x14/0x28
[<804f66b4>] jz4740_mmc_prepare_dma_data+0x74/0xa4
[<804f6714>] jz4740_mmc_pre_request+0x30/0x54
[<804f4ff4>] mmc_blk_mq_issue_rq+0x6e0/0x7bc
[<804f5590>] mmc_mq_queue_rq+0x220/0x2d4
[<8038b2c0>] blk_mq_dispatch_rq_list+0x480/0x664
[<80391040>] blk_mq_do_dispatch_sched+0x2dc/0x370
[<80391468>] __blk_mq_sched_dispatch_requests+0xec/0x164
[<80391540>] blk_mq_sched_dispatch_requests+0x44/0x94
[<80387900>] __blk_mq_run_hw_queue+0xb0/0xcc
[<80134c14>] process_one_work+0x1b8/0x264
[<80134ff8>] worker_thread+0x2ec/0x3b8
[<8013b13c>] kthread+0x104/0x10c
[<80101dcc>] ret_from_kernel_thread+0x14/0x1c
---[ end trace 0000000000000000 ]------ drivers/mmc/host/jz4740_mmc.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
drivers/mmc/host/jz4740_mmc.c +20 -0
@@ -247,6 +247,26 @@ static int jz4740_mmc_acquire_dma_channels(struct jz4740_mmc_host *host)return PTR_ERR (host->dma_rx); } +/* +* Limit the maximum segment size in any SG entry according to +* the parameters of the DMA engine device. +*/ +if (host->dma_tx) { +struct device *dev = host->dma_tx->device->dev; +unsigned int max_seg_size =dma_get_max_seg_size (dev); + +if (max_seg_size < host->mmc->max_seg_size) + host->mmc->max_seg_size = max_seg_size; + } + +if (host->dma_rx) { +struct device *dev = host->dma_rx->device->dev; +unsigned int max_seg_size =dma_get_max_seg_size (dev); + +if (max_seg_size < host->mmc->max_seg_size) + host->mmc->max_seg_size = max_seg_size; + } +return 0 ; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 108/879 drivers: mmc: sdhci_am654: Add the quirk to set TESTCD bit
In reply to Greg Kroah-HartmanFrom: Vignesh Raghavendra <[email protected]>
[ Upstream commit c7666240ec76422cb7546bd07cc8ae80dc0ccdd2 ]
The ARASAN MMC controller on Keystone 3 class of devices need the SDCD line to be connected for proper functioning. Similar to the issue pointed out in sdhci-of-arasan.c driver, commit 3794c542641f ("mmc:
sdhci-of-arasan: Set controller to test mode when no CD bit").
In cases where this can't be connected, add a quirk to force the controller into test mode and set the TESTCD bit. Use the flag "ti,fails-without-test-cd", to implement this above quirk when required.
--- drivers/mmc/host/sdhci_am654.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-)
drivers/mmc/host/sdhci_am654.c +22 -1
@@ -147,6 +147,9 @@ struct sdhci_am654_data {int drv_strength;int strb_sel;u32 flags; +u32 quirks; + +#define SDHCI_AM654_QUIRK_FORCE_CDTEST BIT(0) };struct sdhci_am654_driver_data {
@@ -369,6 +372,21 @@ static void sdhci_am654_write_b(struct sdhci_host *host, u8 val, int reg) } } +static void sdhci_am654_reset (struct sdhci_host *host,u8 mask) +{ +u8 ctrl; +struct sdhci_pltfm_host *pltfm_host =sdhci_priv (host); +struct sdhci_am654_data *sdhci_am654 =sdhci_pltfm_priv (pltfm_host); + +sdhci_reset (host, mask); + +if (sdhci_am654->quirks &SDHCI_AM654_QUIRK_FORCE_CDTEST ) { + ctrl =sdhci_readb (host,SDHCI_HOST_CONTROL ); + ctrl |=SDHCI_CTRL_CDTEST_INS |SDHCI_CTRL_CDTEST_EN ; +sdhci_writeb (host, ctrl,SDHCI_HOST_CONTROL ); + } +} +static int sdhci_am654_execute_tuning (struct mmc_host *mmc,u32 opcode) {struct sdhci_host *host =mmc_priv (mmc);
@@ -500,7 +518,7 @@ static struct sdhci_ops sdhci_j721e_4bit_ops = { .set_clock = sdhci_j721e_4bit_set_clock, .write_b = sdhci_am654_write_b, .irq = sdhci_am654_cqhci_irq, - .reset = sdhci_reset, + .reset = sdhci_am654_reset, };static const struct sdhci_pltfm_data sdhci_j721e_4bit_pdata = {
@@ -719,6 +737,9 @@ static int sdhci_am654_get_of_property(struct platform_device *pdev,device_property_read_u32 (dev,"ti,clkbuf-sel" , &sdhci_am654->clkbuf_sel); +if (device_property_read_bool (dev,"ti,fails-without-test-cd" )) + sdhci_am654->quirks |=SDHCI_AM654_QUIRK_FORCE_CDTEST ; +sdhci_get_of_property (pdev);return 0 ;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 109/879 scsi: megaraid: Fix error check return value of register_chrdev()
In reply to Greg Kroah-HartmanFrom: Lv Ruyi <[email protected]>
[ Upstream commit c5acd61dbb32b6bda0f3a354108f2b8dcb788985 ]
If major equals 0, register_chrdev() returns an error code when it fails. This function dynamically allocates a major and returns its number on success, so we should use "< 0" to check it instead of "!".
--- drivers/scsi/megaraid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/megaraid.c +1 -1
@@ -4607,7 +4607,7 @@ static int __init megaraid_init(void)* major number allocation. */ major =register_chrdev (0 ,"megadev_legacy" , &megadev_fops); -if (!major) { +if (major <0 ) {printk (KERN_WARNING "megaraid: failed to register char device\n" ); }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 110/879 drm/amdgpu/sdma: Fix incorrect calculations of the wptr of the doorbells
In reply to Greg Kroah-HartmanFrom: Haohui Mai <[email protected]>
[ Upstream commit 7dba6e838e741caadcf27ef717b6dcb561e77f89 ]
This patch fixes the issue where the driver miscomputes the 64-bit values of the wptr of the SDMA doorbell when initializing the hardware. SDMA engines v4 and later on have full 64-bit registers for wptr thus they should be set properly.
Older generation hardwares like CIK / SI have only 16 / 20 / 24bits for the WPTR, where the calls of lower_32_bits() will be removed in a following patch.
--- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +2 -2
@@ -772,8 +772,8 @@ static void sdma_v4_0_ring_set_wptr(struct amdgpu_ring *ring)DRM_DEBUG ("Using doorbell -- " "wptr_offs == 0x%08x " -"lower_32_bits(ring->wptr) << 2 == 0x%08x " -"upper_32_bits(ring->wptr) << 2 == 0x%08x\n" , +"lower_32_bits(ring->wptr << 2) == 0x%08x " +"upper_32_bits(ring->wptr << 2) == 0x%08x\n" , ring->wptr_offs,lower_32_bits (ring->wptr <<2 ),upper_32_bits (ring->wptr <<2 ));
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c +4 -4
@@ -394,8 +394,8 @@ static void sdma_v5_0_ring_set_wptr(struct amdgpu_ring *ring)if (ring->use_doorbell) {DRM_DEBUG ("Using doorbell -- " "wptr_offs == 0x%08x " -"lower_32_bits(ring->wptr) << 2 == 0x%08x " -"upper_32_bits(ring->wptr) << 2 == 0x%08x\n" , +"lower_32_bits(ring->wptr << 2) == 0x%08x " +"upper_32_bits(ring->wptr << 2) == 0x%08x\n" , ring->wptr_offs,lower_32_bits (ring->wptr <<2 ),upper_32_bits (ring->wptr <<2 ));
@@ -774,9 +774,9 @@ static int sdma_v5_0_gfx_resume(struct amdgpu_device *adev)if (!amdgpu_sriov_vf (adev)) {/* only bare-metal use register write for wptr */ WREG32 (sdma_v5_0_get_reg_offset (adev, i, mmSDMA0_GFX_RB_WPTR), -lower_32_bits (ring->wptr) <<2 ); +lower_32_bits (ring->wptr <<2 ));WREG32 (sdma_v5_0_get_reg_offset (adev, i, mmSDMA0_GFX_RB_WPTR_HI), -upper_32_bits (ring->wptr) <<2 ); +upper_32_bits (ring->wptr <<2 )); } doorbell =RREG32_SOC15_IP (GC ,sdma_v5_0_get_reg_offset (adev, i, mmSDMA0_GFX_DOORBELL));
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +4 -4
@@ -295,8 +295,8 @@ static void sdma_v5_2_ring_set_wptr(struct amdgpu_ring *ring)if (ring->use_doorbell) {DRM_DEBUG ("Using doorbell -- " "wptr_offs == 0x%08x " -"lower_32_bits(ring->wptr) << 2 == 0x%08x " -"upper_32_bits(ring->wptr) << 2 == 0x%08x\n" , +"lower_32_bits(ring->wptr << 2) == 0x%08x " +"upper_32_bits(ring->wptr << 2) == 0x%08x\n" , ring->wptr_offs,lower_32_bits (ring->wptr <<2 ),upper_32_bits (ring->wptr <<2 ));
@@ -672,8 +672,8 @@ static int sdma_v5_2_gfx_resume(struct amdgpu_device *adev)WREG32_SOC15_IP (GC ,sdma_v5_2_get_reg_offset (adev, i, mmSDMA0_GFX_MINOR_PTR_UPDATE),1 );if (!amdgpu_sriov_vf (adev)) {/* only bare-metal use register write for wptr */ -WREG32 (sdma_v5_2_get_reg_offset (adev, i, mmSDMA0_GFX_RB_WPTR),lower_32_bits (ring->wptr) <<2 ); -WREG32 (sdma_v5_2_get_reg_offset (adev, i, mmSDMA0_GFX_RB_WPTR_HI),upper_32_bits (ring->wptr) <<2 ); +WREG32 (sdma_v5_2_get_reg_offset (adev, i, mmSDMA0_GFX_RB_WPTR),lower_32_bits (ring->wptr <<2 )); +WREG32 (sdma_v5_2_get_reg_offset (adev, i, mmSDMA0_GFX_RB_WPTR_HI),upper_32_bits (ring->wptr <<2 )); } doorbell =RREG32_SOC15_IP (GC ,sdma_v5_2_get_reg_offset (adev, i, mmSDMA0_GFX_DOORBELL));
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 111/879 scsi: ufs: Use pm_runtime_resume_and_get() instead of pm_runtime_get_sync()
In reply to Greg Kroah-HartmanFrom: Minghao Chi <[email protected]>
[ Upstream commit 75b8715e20a20bc7b4844835e4035543a2674200 ]
Using pm_runtime_resume_and_get() to replace pm_runtime_get_sync() and pm_runtime_put_noidle(). This change is just to simplify the code, no actual functional changes.
--- drivers/scsi/ufs/ti-j721e-ufs.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/scsi/ufs/ti-j721e-ufs.c +2 -4
@@ -29,11 +29,9 @@ static int ti_j721e_ufs_probe(struct platform_device *pdev)return PTR_ERR (regbase);pm_runtime_enable (dev); - ret =pm_runtime_get_sync (dev); -if (ret <0 ) { -pm_runtime_put_noidle (dev); + ret =pm_runtime_resume_and_get (dev); +if (ret <0 ) goto disable_pm; - }/* Select MPHY refclk frequency */ clk =devm_clk_get (dev,NULL );
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 112/879 scsi: lpfc: Fix resource leak in lpfc_sli4_send_seq_to_ulp()
In reply to Greg Kroah-HartmanFrom: James Smart <[email protected]>
[ Upstream commit 646db1a560f44236b7278b822ca99a1d3b6ea72c ]
If no handler is found in lpfc_complete_unsol_iocb() to match the rctl of a received frame, the frame is dropped and resources are leaked.
Fix by returning resources when discarding an unhandled frame type. Update lpfc_fc_frame_check() handling of NOP basic link service.
--- drivers/scsi/lpfc/lpfc_sli.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/scsi/lpfc/lpfc_sli.c +4 -2
@@ -18124,7 +18124,6 @@ lpfc_fc_frame_check(struct lpfc_hba *phba, struct fc_frame_header *fc_hdr)case FC_RCTL_ELS_REP :/* extended link services reply */ case FC_RCTL_ELS4_REQ :/* FC-4 ELS request */ case FC_RCTL_ELS4_REP :/* FC-4 ELS reply */ -case FC_RCTL_BA_NOP :/* basic link service NOP */ case FC_RCTL_BA_ABTS :/* basic link service abort */ case FC_RCTL_BA_RMC :/* remove connection */ case FC_RCTL_BA_ACC :/* basic accept */
@@ -18145,6 +18144,7 @@ lpfc_fc_frame_check(struct lpfc_hba *phba, struct fc_frame_header *fc_hdr) fc_vft_hdr = (struct fc_vft_header *)fc_hdr; fc_hdr = &((struct fc_frame_header *)fc_vft_hdr)[1 ];return lpfc_fc_frame_check (phba, fc_hdr); +case FC_RCTL_BA_NOP :/* basic link service NOP */ default : goto drop; }
@@ -18959,12 +18959,14 @@ lpfc_sli4_send_seq_to_ulp(struct lpfc_vport *vport,if (!lpfc_complete_unsol_iocb (phba, phba->sli4_hba.els_wq->pring, iocbq, fc_hdr->fh_r_ctl, - fc_hdr->fh_type)) + fc_hdr->fh_type)) {lpfc_printf_log (phba,KERN_ERR ,LOG_TRACE_EVENT ,"2540 Ring %d handler: unexpected Rctl " "x%x Type x%x received\n" ,LPFC_ELS_RING , fc_hdr->fh_r_ctl, fc_hdr->fh_type); +lpfc_in_buf_free (phba, &seq_dmabuf->dbuf); + }/* Free iocb created in lpfc_prep_seq */ list_for_each_entry_safe(curr_iocb, next_iocb,
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 113/879 ath11k: disable spectral scan during spectral deinit
In reply to Greg Kroah-HartmanFrom: Hari Chandrakanthan <[email protected]>
[ Upstream commit 161c64de239c7018e0295e7e0520a19f00aa32dc ]
When ath11k modules are removed using rmmod with spectral scan enabled, crash is observed. Different crash trace is observed for each crash.
Send spectral scan disable WMI command to firmware before cleaning the spectral dbring in the spectral_deinit API to avoid this crash.
call trace from one of the crash observed:
[ 1252.880802] Unable to handle kernel NULL pointer dereference at virtual address 00000008 [ 1252.882722] pgd = 0f42e886 [ 1252.890955] [00000008] *pgd=00000000 [ 1252.893478] Internal error: Oops: 5 [#1] PREEMPT SMP ARM [ 1253.093035] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.4.89 #0 [ 1253.115261] Hardware name: Generic DT based system [ 1253.121149] PC is at ath11k_spectral_process_data+0x434/0x574 [ath11k] [ 1253.125940] LR is at 0x88e31017 [ 1253.132448] pc : [<7f9387b8>] lr : [<88e31017>] psr: a0000193 [ 1253.135488] sp : 80d01bc8 ip : 00000001 fp : 970e0000 [ 1253.141737] r10: 88e31000 r9 : 970ec000 r8 : 00000080 [ 1253.146946] r7 : 94734040 r6 : a0000113 r5 : 00000057 r4 : 00000000 [ 1253.152159] r3 : e18cb694 r2 : 00000217 r1 : 1df1f000 r0 : 00000001 [ 1253.158755] Flags: NzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment user [ 1253.165266] Control: 10c0383d Table: 5e71006a DAC: 00000055 [ 1253.172472] Process swapper/0 (pid: 0, stack limit = 0x60870141) [ 1253.458055] [<7f9387b8>] (ath11k_spectral_process_data [ath11k]) from [<7f917fdc>] (ath11k_dbring_buffer_release_event+0x214/0x2e4 [ath11k]) [ 1253.466139] [<7f917fdc>] (ath11k_dbring_buffer_release_event [ath11k]) from [<7f8ea3c4>] (ath11k_wmi_tlv_op_rx+0x1840/0x29cc [ath11k]) [ 1253.478807] [<7f8ea3c4>] (ath11k_wmi_tlv_op_rx [ath11k]) from [<7f8fe868>] (ath11k_htc_rx_completion_handler+0x180/0x4e0 [ath11k]) [ 1253.490699] [<7f8fe868>] (ath11k_htc_rx_completion_handler [ath11k]) from [<7f91308c>] (ath11k_ce_per_engine_service+0x2c4/0x3b4 [ath11k]) [ 1253.502386] [<7f91308c>] (ath11k_ce_per_engine_service [ath11k]) from [<7f9a4198>] (ath11k_pci_ce_tasklet+0x28/0x80 [ath11k_pci]) [ 1253.514811] [<7f9a4198>] (ath11k_pci_ce_tasklet [ath11k_pci]) from [<8032227c>] (tasklet_action_common.constprop.2+0x64/0xe8) [ 1253.526476] [<8032227c>] (tasklet_action_common.constprop.2) from [<803021e8>] (__do_softirq+0x130/0x2d0) [ 1253.537756] [<803021e8>] (__do_softirq) from [<80322610>] (irq_exit+0xcc/0xe8) [ 1253.547304] [<80322610>] (irq_exit) from [<8036a4a4>] (__handle_domain_irq+0x60/0xb4) [ 1253.554428] [<8036a4a4>] (__handle_domain_irq) from [<805eb348>] (gic_handle_irq+0x4c/0x90) [ 1253.562321] [<805eb348>] (gic_handle_irq) from [<80301a78>] (__irq_svc+0x58/0x8c)
Tested-on: QCN6122 hw1.0 AHB WLAN.HK.2.6.0.1-00851-QCAHKSWPL_SILICONZ-1
--- drivers/net/wireless/ath/ath11k/spectral.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
drivers/net/wireless/ath/ath11k/spectral.c +9 -8
@@ -212,7 +212,10 @@ static int ath11k_spectral_scan_config(struct ath11k *ar,return -ENODEV ; arvif->spectral_enabled = (mode !=ATH11K_SPECTRAL_DISABLED ); + +spin_lock_bh (&ar->spectral.lock); ar->spectral.mode = mode; +spin_unlock_bh (&ar->spectral.lock); ret = ath11k_wmi_vdev_spectral_enable(ar, arvif->vdev_id, ATH11K_WMI_SPECTRAL_TRIGGER_CMD_CLEAR,
@@ -843,9 +846,6 @@ static inline void ath11k_spectral_ring_free(struct ath11k *ar) {struct ath11k_spectral *sp = &ar->spectral; -if (!sp->enabled) -return ; -ath11k_dbring_srng_cleanup (ar, &sp->rx_ring);ath11k_dbring_buf_cleanup (ar, &sp->rx_ring); }
@@ -897,15 +897,16 @@ void ath11k_spectral_deinit(struct ath11k_base *ab)if (!sp->enabled)continue ; -ath11k_spectral_debug_unregister (ar); -ath11k_spectral_ring_free (ar); +mutex_lock (&ar->conf_mutex); +ath11k_spectral_scan_config (ar,ATH11K_SPECTRAL_DISABLED ); +mutex_unlock (&ar->conf_mutex);spin_lock_bh (&sp->lock); - - sp->mode =ATH11K_SPECTRAL_DISABLED ; sp->enabled = false; -spin_unlock_bh (&sp->lock); + +ath11k_spectral_debug_unregister (ar); +ath11k_spectral_ring_free (ar); } }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 114/879 ASoC: Intel: bytcr_rt5640: Add quirk for the HP Pro Tablet 408
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
[ Upstream commit ce216cfa84a4e1c23b105e652c550bdeaac9e922 ]
Add a quirk for the HP Pro Tablet 408, this BYTCR tablet has no CHAN package in its ACPI tables and uses SSP0-AIF1 rather then SSP0-AIF2 which is the default for BYTCR devices.
It also uses DMIC1 for the internal mic rather then the default IN3 and it uses JD2 rather then the default JD1 for jack-detect.
--- sound/soc/intel/boards/bytcr_rt5640.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
sound/soc/intel/boards/bytcr_rt5640.c +12 -0
@@ -773,6 +773,18 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {BYT_RT5640_OVCD_SF_0P75 | BYT_RT5640_MCLK_EN), }, + { /* HP Pro Tablet 408 */ + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Hewlett-Packard" ), + DMI_MATCH(DMI_PRODUCT_NAME, "HP Pro Tablet 408"), + }, + .driver_data = (void *)(BYT_RT5640_DMIC1_MAP | +BYT_RT5640_JD_SRC_JD2_IN4N | +BYT_RT5640_OVCD_TH_1500UA | +BYT_RT5640_OVCD_SF_0P75 | +BYT_RT5640_SSP0_AIF1 | + BYT_RT5640_MCLK_EN), + }, { /* HP Stream 7 */ .matches = { DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
Signature · 1 line
2.35.1