5.16.3-rc1 review
Subsystems (9)
Greg Kroah-Hartman
maintainercover 5.16.3-rc1 review
This is the start of the stable review cycle for the 5.16.3 release. There are 1039 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 Wed, 26 Jan 2022 18:39:11 +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.16.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.16.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 5.16.3-rc1
Ranjani Sridharan <[email protected]>
ASoC: SOF: handle paused streams during system suspend
Pierre-Louis Bossart <[email protected]>
ASoC: SOF: sof-audio: setup sched widgets during pipeline complete step
Ranjani Sridharan <[email protected]>
ASoC: SOF: free widgets in sof_tear_down_pipelines() for static pipelines
Ranjani Sridharan <[email protected]>
ASoC: SOF: topology: remove sof_load_pipeline_ipc()
Vitaly Kuznetsov <[email protected]>
KVM: selftests: Test KVM_SET_CPUID2 after KVM_RUN
Vitaly Kuznetsov <[email protected]>
KVM: selftests: Rename 'get_cpuid_test' to 'cpuid_test'
Vitaly Kuznetsov <[email protected]>
KVM: x86: Partially allow KVM_SET_CPUID{,2} after KVM_RUN
Vitaly Kuznetsov <[email protected]>
KVM: x86: Do runtime CPUID update before updating vcpu->arch.cpuid_entries
Andrey Konovalov <[email protected]>
lib/test_meminit: destroy cache in kmem_cache_alloc_bulk() test
Moshe Tal <[email protected]>
bonding: Fix extraction of ports from the packet headers
Alistair Popple <[email protected]>
mm/hmm.c: allow VM_MIXEDMAP to work with hmm_range_fault
Miaoqian Lin <[email protected]>
lib82596: Fix IRQ check in sni_82596_probe
Matthias Schiffer <[email protected]>
scripts/dtc: dtx_diff: remove broken example from help text
Laibin Qiu <[email protected]>
blk-mq: fix tag_get wait task can't be awakened
Maxim Mikityanskiy <[email protected]>
sch_api: Don't skip qdisc attach on ingress
Sam Protsenko <[email protected]>
dt-bindings: watchdog: Require samsung,syscon-phandle for Exynos7
Alexander Stein <[email protected]>
dt-bindings: display: meson-vpu: Add missing amlogic,canvas property
Alexander Stein <[email protected]>
dt-bindings: display: meson-dw-hdmi: add missing sound-name-prefix property
Tom Rix <[email protected]>
net: mscc: ocelot: fix using match before it is set
Claudiu Beznea <[email protected]>
net: phy: micrel: use kszphy_suspend()/kszphy_resume for irq aware devices
Ard Biesheuvel <[email protected]>
net: cpsw: avoid alignment faults by taking NET_IP_ALIGN into account
Russell King (Oracle) <[email protected]>
net: sfp: fix high power modules without diagnostic monitoring
Horatiu Vultur <[email protected]>
net: ocelot: Fix the call to switchdev_bridge_port_offload
Tom Rix <[email protected]>
net: ethernet: mtk_eth_soc: fix error checking in mtk_mac_config()
Slark Xiao <[email protected]>
net: wwan: Fix MRU mismatch issue which may lead to data connection lost
Vladimir Oltean <[email protected]>
net: mscc: ocelot: don't dereference NULL pointers with shared tc filters
Sergey Shtylyov <[email protected]>
bcmgenet: add WOL IRQ check
Vladimir Oltean <[email protected]>
net: mscc: ocelot: don't let phylink re-enable TX PAUSE on the NPI port
Kevin Bracey <[email protected]>
net_sched: restore "mpu xxx" handling
Alex Elder <[email protected]>
net: ipa: fix atomic update in ipa_endpoint_replenish()
Jie Wang <[email protected]>
net: bonding: fix bond_xmit_broadcast return value error bug
Miroslav Lichvar <[email protected]>
net: fix sock_timestamping_bind_phc() to release device
David Heidelberg <[email protected]>
arm64: dts: qcom: msm8996: drop not documented adreno properties
Leon Romanovsky <[email protected]>
devlink: Remove misleading internal_flags from health reporter dump
Ian Rogers <[email protected]>
perf metric: Fix metric_leader
Zechuan Chen <[email protected]>
perf probe: Fix ppc64 'perf probe add events failed' case
Ian Rogers <[email protected]>
perf test: Enable system wide for metricgroups test
José Expósito <[email protected]>
perf metricgroup: Fix use after free in metric__new()
Uwe Kleine-König <[email protected]>
perf tools: Drop requirement for libstdc++.so for libopencsd check
Thomas Richter <[email protected]>
perf cputopo: Fix CPU topology reading on s/390
Tudor Ambarus <[email protected]>
dmaengine: at_xdmac: Fix at_xdmac_lld struct definition
Tudor Ambarus <[email protected]>
dmaengine: at_xdmac: Fix lld view setting
Tudor Ambarus <[email protected]>
dmaengine: at_xdmac: Fix concurrency over xfers_list
Tudor Ambarus <[email protected]>
dmaengine: at_xdmac: Print debug message after realeasing the lock
Tudor Ambarus <[email protected]>
dmaengine: at_xdmac: Start transfer for cyclic channels in issue_pending
Tudor Ambarus <[email protected]>
dmaengine: at_xdmac: Don't start transactions at tx_submit level
Adrian Hunter <[email protected]>
perf script: Fix hex dump character output
Guillaume Nault <[email protected]>
libcxgb: Don't accidentally set RTO_ONLINK in cxgb_find_route()
Guillaume Nault <[email protected]>
gre: Don't accidentally set RTO_ONLINK in gre_fill_metadata_dst()
Eli Cohen <[email protected]>
vdpa/mlx5: Restore cur_num_vqs in case of failure in change_num_qps()
Eli Cohen <[email protected]>
vdpa/mlx5: Fix config_attr_mask assignment
Guillaume Nault <[email protected]>
xfrm: Don't accidentally set RTO_ONLINK in decode_session4()
Johannes Berg <[email protected]>
iwlwifi: fix Bz NMI behaviour
Eric Dumazet <[email protected]>
netns: add schedule point in ops_exit_list()
Eric Dumazet <[email protected]>
inet: frags: annotate races around fqdir->dead and fqdir->high_thresh
Eric W. Biederman <[email protected]>
taskstats: Cleanup the use of task->exit_code
Michael S. Tsirkin <[email protected]>
virtio_ring: mark ring unused on error
Eli Cohen <[email protected]>
vdpa/mlx5: Fix wrong configuration of virtio_version_1_0
Laurence de Bruxelles <[email protected]>
rtc: pxa: fix null pointer dereference
Kees Cook <[email protected]>
rtc: Move variable into switch case statement
Matt Johnston <[email protected]>
mctp: test: zero out sockaddr
Dmitry Torokhov <[email protected]>
HID: vivaldi: fix handling devices not using numbered reports
Johannes Berg <[email protected]>
um: gitignore: Add kernel/capflags.c
Yury Norov <[email protected]>
bitops: protect find_first_{,zero}_bit properly
Robert Hancock <[email protected]>
net: axienet: increase default TX ring size to 128
Robert Hancock <[email protected]>
net: axienet: fix for TX busy handling
Robert Hancock <[email protected]>
net: axienet: fix number of TX ring slots for available check
Robert Hancock <[email protected]>
net: axienet: Fix TX ring slot available check
Robert Hancock <[email protected]>
net: axienet: limit minimum TX ring size
Robert Hancock <[email protected]>
net: axienet: add missing memory barriers
Robert Hancock <[email protected]>
net: axienet: reset core on initialization prior to MDIO access
Robert Hancock <[email protected]>
net: axienet: Wait for PhyRstCmplt after core reset
Robert Hancock <[email protected]>
net: axienet: increase reset timeout
Wen Gu <[email protected]>
net/smc: Fix hung_task when removing SMC-R devices
Miaoqian Lin <[email protected]>
gpio: idt3243x: Fix IRQ check in idt_gpio_probe
Miaoqian Lin <[email protected]>
gpio: mpc8xxx: Fix IRQ check in mpc8xxx_probe
John Keeping <[email protected]>
pinctrl/rockchip: fix gpio device creation
Robert Hancock <[email protected]>
clk: si5341: Fix clock HW provider cleanup
Stephen Boyd <[email protected]>
clk: Emit a stern warning with writable debugfs enabled
Eric Dumazet <[email protected]>
af_unix: annote lockless accesses to unix_tot_inflight & gc_in_progress
Dan Carpenter <[email protected]>
crypto: octeontx2 - uninitialized variable in kvf_limits_store()
Chao Yu <[email protected]>
f2fs: fix to check available space of CP area correctly in update_ckpt_flags()
Chao Yu <[email protected]>
f2fs: fix to reserve space for IO align feature
Hyeong-Jun Kim <[email protected]>
f2fs: compress: fix potential deadlock of compress file
Chao Yu <[email protected]>
f2fs: fix to avoid panic in is_alive() if metadata is inconsistent
Fengnan Chang <[email protected]>
f2fs: fix remove page failed in invalidate compress pages
Zack Rusin <[email protected]>
drm/vmwgfx: Remove unused compile options
Zack Rusin <[email protected]>
drm/vmwgfx: Remove explicit transparent hugepages support
Geert Uytterhoeven <[email protected]>
riscv: dts: microchip: mpfs: Drop empty chosen node
Palmer Dabbelt <[email protected]>
RISC-V: defconfigs: Set CONFIG_FB=y, for FB console
Miaoqian Lin <[email protected]>
parisc: pdc_stable: Fix memory leak in pdcs_register_pathentries
Tobias Waldekranz <[email protected]>
net/fsl: xgmac_mdio: Fix incorrect iounmap when removing module
Tobias Waldekranz <[email protected]>
net/fsl: xgmac_mdio: Add workaround for erratum A-009885
Guillaume Nault <[email protected]>
mlx5: Don't accidentally set RTO_ONLINK before mlx5e_route_lookup_ipv4_get()
Eric Dumazet <[email protected]>
ipv4: avoid quadratic behavior in netns dismantle
Eric Dumazet <[email protected]>
ipv4: update fib_info_cnt under spinlock protection
German Gomez <[email protected]>
perf evsel: Override attr->sample_period for non-libpfm4 events
Daniel Borkmann <[email protected]>
bpf: Mark PTR_TO_FUNC register initially with zero offset
Yafang Shao <[email protected]>
bpf: Fix mount source show for bpffs
Toke Høiland-Jørgensen <[email protected]>
xdp: check prog type before updating BPF link
Quentin Monnet <[email protected]>
bpftool: Fix indent in option lists in the documentation
Quentin Monnet <[email protected]>
bpftool: Remove inclusion of utilities.mak from Makefiles
Russell King <[email protected]>
arm64/bpf: Remove 128MB limit for BPF JIT programs
Andrii Nakryiko <[email protected]>
libbpf: Remove deprecation attribute from struct bpf_prog_prep_result
Maxime Ripard <[email protected]>
drm/vc4: crtc: Copy assigned channel to the CRTC
Maxime Ripard <[email protected]>
drm/vc4: Fix non-blocking commit getting stuck forever
Maxime Ripard <[email protected]>
drm/vc4: crtc: Drop feed_txp from state
Ye Bin <[email protected]>
block: Fix fsync always failed if once failed
Jens Axboe <[email protected]>
block: fix async_depth sysfs interface for mq-deadline
Tobias Waldekranz <[email protected]>
powerpc/fsl/dts: Enable WA for erratum A-009885 on fman3l MDIO buses
Anders Roxell <[email protected]>
powerpc/cell: Fix clang -Wimplicit-fallthrough warning
Moshe Shemesh <[email protected]>
Revert "net/mlx5: Add retry mechanism to the command entry index allocation"
Amelie Delaunay <[email protected]>
dmaengine: stm32-mdma: fix STM32_MDMA_CTBR_TSEL_MASK
Chengguang Xu <[email protected]>
RDMA/rxe: Fix a typo in opcode name
Yixing Liu <[email protected]>
RDMA/hns: Modify the mapping attribute of doorbell to device
Dave Jiang <[email protected]>
dmaengine: idxd: fix wq settings post wq disable
Kunihiko Hayashi <[email protected]>
dmaengine: uniphier-xdmac: Fix type of address variables
Miaoqian Lin <[email protected]>
scsi: ufs: ufs-mediatek: Fix error checking in ufs_mtk_init_va09_pwr_ctrl()
Baruch Siach <[email protected]>
of: base: Improve argument length mismatch error
Bart Van Assche <[email protected]>
scsi: core: Show SCMD_LAST in text form
Luiz Augusto von Dentz <[email protected]>
Bluetooth: hci_sync: Fix not setting adv set duration
Markus Reichl <[email protected]>
net: usb: Correct reset handling of smsc95xx
Mark Chen <[email protected]>
Bluetooth: btusb: Return error code when getting patch status failed
Randy Dunlap <[email protected]>
Documentation: fix firewire.rst ABI file path error
Lukas Bulwahn <[email protected]>
Documentation: refer to config RANDOMIZE_BASE for kernel address-space randomization
Alexandre Ghiti <[email protected]>
Documentation, arch: Remove leftovers from CIFS_WEAK_PW_HASH
Alexandre Ghiti <[email protected]>
Documentation, arch: Remove leftovers from raw device
Sakari Ailus <[email protected]>
Documentation: ACPI: Fix data node reference documentation
Daniel Thompson <[email protected]>
Documentation: dmaengine: Correctly describe dmatest with channel unset
Mike Leach <[email protected]>
Documentation: coresight: Fix documentation issue
Randy Dunlap <[email protected]>
media: correct MEDIA_TEST_SUPPORT help text
Maxime Ripard <[email protected]>
drm/vc4: hdmi: Make sure the device is powered with CEC
Suresh Udipi <[email protected]>
media: rcar-csi2: Optimize the selection PHTW register
Marc Kleine-Budde <[email protected]>
can: mcp251xfd: mcp251xfd_tef_obj_read(): fix typo in error message
Ben Hutchings <[email protected]>
firmware: Update Kconfig help text for Google firmware
Nicholas Kazlauskas <[email protected]>
drm/amdgpu/display: Only set vblank_disable_immediate when PSR is not enabled
Christian König <[email protected]>
drm/radeon: fix error handling in radeon_driver_open_kms
Rajneesh Bhardwaj <[email protected]>
Revert "drm/amdgpu: Don't inherit GEM object VMAs in child process"
Theodore Ts'o <[email protected]>
ext4: don't use the orphan list when migrating an inode
Zhang Yi <[email protected]>
ext4: fix an use-after-free issue about data=journal writeback mode
Ye Bin <[email protected]>
ext4: fix null-ptr-deref in '__ext4_journal_ensure_credits'
Sebastian Andrzej Siewior <[email protected]>
ext4: destroy ext4_fc_dentry_cachep kmemcache on module removal
Xin Yin <[email protected]>
ext4: fast commit may miss tracking unwritten range during ftruncate
Xin Yin <[email protected]>
ext4: use ext4_ext_remove_space() for fast commit replay delete range
Ye Bin <[email protected]>
ext4: Fix BUG_ON in ext4_bread when write quota data
Luís Henriques <[email protected]>
ext4: set csum seed in tmp inode while migrating to extents
Xin Yin <[email protected]>
ext4: fix fast commit may miss tracking range for FALLOC_FL_ZERO_RANGE
Harshad Shirwadkar <[email protected]>
ext4: initialize err_blk before calling __ext4_get_inode_loc
Chunguang Xu <[email protected]>
ext4: fix a possible ABBA deadlock due to busy PA
Jan Kara <[email protected]>
ext4: make sure quota gets properly shutdown on error
Jan Kara <[email protected]>
ext4: make sure to reset inode lockdep class when quota enabling fails
Filipe Manana <[email protected]>
btrfs: respect the max size in the header when activating swap file
Naohiro Aota <[email protected]>
btrfs: zoned: fix chunk allocation condition for zoned allocator
Naohiro Aota <[email protected]>
btrfs: zoned: unset dedicated block group on allocation failure
Naohiro Aota <[email protected]>
btrfs: add extent allocator hook to decide to allocate chunk or not
Josef Bacik <[email protected]>
btrfs: check the root node for uptodate before returning it
Naohiro Aota <[email protected]>
btrfs: zoned: cache reported zone during mount
Filipe Manana <[email protected]>
btrfs: fix deadlock between quota enable and other quota operations
Nicolas Dichtel <[email protected]>
xfrm: fix dflt policy check when there is no policy configured
Ghalem Boudour <[email protected]>
xfrm: fix policy lookup for ipv6 gre packets
Pali Rohár <[email protected]>
PCI: pci-bridge-emul: Set PCI_STATUS_CAP_LIST for PCIe device
Pali Rohár <[email protected]>
PCI: pci-bridge-emul: Correctly set PCIe capabilities
Pali Rohár <[email protected]>
PCI: pci-bridge-emul: Fix definitions of reserved bits
Pali Rohár <[email protected]>
PCI: pci-bridge-emul: Properly mark reserved PCIe bits in PCI config space
Pali Rohár <[email protected]>
PCI: pci-bridge-emul: Make expansion ROM Base Address register read-only
Lukas Wunner <[email protected]>
PCI: pciehp: Fix infinite loop in IRQ handler upon power fault
Hans de Goede <[email protected]>
PCI: pciehp: Use down_read/write_nested(reset_lock) to fix lockdep errors
Rob Herring <[email protected]>
PCI: xgene: Fix IB window setup
José Roberto de Souza <[email protected]>
drm/i915/display/ehl: Update voltage swing table
Mario Limonciello <[email protected]>
drm/amd/display: Revert W/A for hard hangs on DCN20/DCN21
Alex Deucher <[email protected]>
drm/amdgpu: don't do resets on APUs which don't support it
Lukas Fink <[email protected]>
drm/amdgpu: Fix rejecting Tahiti GPUs
Harry Wentland <[email protected]>
drm/amdgpu: Use correct VIEWPORT_DIMENSION for DCN2
James Smart <[email protected]>
scsi: lpfc: Fix lpfc_force_rscn ndlp kref imbalance
Nicholas Piggin <[email protected]>
powerpc/64s/radix: Fix huge vmap false positive
John David Anglin <[email protected]>
parisc: Fix lpa and lpa_user defines
Brian Norris <[email protected]>
drm/bridge: analogix_dp: Make PSR-exit block less
Ilia Mirkin <[email protected]>
drm/nouveau/kms/nv04: use vzalloc for nv04_display
Yizhuo Zhai <[email protected]>
drm/amd/display: Fix the uninitialized variable in enable_stream_features()
Lucas Stach <[email protected]>
drm/etnaviv: limit submit sizes
Dmitry Osipenko <[email protected]>
drm/tegra: submit: Add missing pm_runtime_mark_last_busy()
Sakari Ailus <[email protected]>
device property: Fix fwnode_graph_devcon_match() fwnode leak
Alexander Gordeev <[email protected]>
s390/mm: fix 2KB pgtable release race
Ilan Peer <[email protected]>
iwlwifi: mvm: Increase the scan timeout guard to 30 seconds
Christophe JAILLET <[email protected]>
remoteproc: imx_rproc: Fix a resource leak in the remove function
Steven Rostedt <[email protected]>
tracing: Have syscall trace events use trace_event_buffer_lock_reserve()
Xiangyang Zhang <[email protected]>
tracing/kprobes: 'nmissed' not showed correctly for kretprobe
Nikita Yushchenko <[email protected]>
tracing/osnoise: Properly unhook events if start_per_cpu_kthreads() fails
Andrey Ryabinin <[email protected]>
sched/cpuacct: Fix user/system in shown cpuacct.usage*
Andrey Ryabinin <[email protected]>
cputime, cpuacct: Include guest time in user time in cpuacct.stat
Lukas Wunner <[email protected]>
serial: Fix incorrect rs485 polarity on uart open
Xie Yongji <[email protected]>
fuse: Pass correct lend value to filemap_write_and_wait_range()
Borislav Petkov <[email protected]>
x86/mce: Check regs before accessing it
Christophe JAILLET <[email protected]>
HID: magicmouse: Fix an error handling path in magicmouse_probe()
Xiao Ni <[email protected]>
md: Move alloc/free acct bioset in to personality
Oleksandr Andrushchenko <[email protected]>
xen/gntdev: fix unmap notification order
Kunihiko Hayashi <[email protected]>
spi: uniphier: Fix a bug that doesn't point to private data correctly
Dmitry Osipenko <[email protected]>
mfd: tps65910: Set PWR_OFF bit during driver probe
Patrick Williams <[email protected]>
tpm: fix NPE on probe for missing device
Lino Sanfilippo <[email protected]>
tpm: fix potential NULL pointer access in tpm_del_char_device
Petr Cvachoucek <[email protected]>
ubifs: Error path in ubifs_remount_rw() seems to wrongly free write buffers
Meng Li <[email protected]>
crypto: caam - replace this_cpu_ptr with raw_cpu_ptr
Marek Vasut <[email protected]>
crypto: stm32/crc32 - Fix kernel BUG triggered in probe()
Heiner Kallweit <[email protected]>
crypto: omap-aes - Fix broken pm_runtime_and_get() usage
Zhu Lingshan <[email protected]>
ifcvf/vDPA: fix misuse virtio-net device config size for blk dev
Arnaud Pouliquen <[email protected]>
rpmsg: core: Clean up resources on announce_create failure.
Sean Christopherson <[email protected]>
hugetlbfs: fix off-by-one error in hugetlb_vmdelete_list()
Chen Wandun <[email protected]>
mm/page_isolation: unset migratetype directly for non Buddy page
Waiman Long <[email protected]>
selftests/vm: make charge_reserved_hugetlb.sh work with existing cgroup setting
Andrey Konovalov <[email protected]>
kasan: fix quarantine conflicting with init_on_free
Kefeng Wang <[email protected]>
mm: defer kmemleak object creation of module_alloc()
Xiaoke Wang <[email protected]>
tracing/probes: check the return value of kstrndup() for pbuf
Xiaoke Wang <[email protected]>
tracing/uprobes: Check the return value of kstrdup() for tu->filename
Weizhao Ouyang <[email protected]>
dma-buf: cma_heap: Fix mutex locking section
Tom Rix <[email protected]>
i3c: master: dw: check return of dw_i3c_master_get_free_pos()
Sergio Paracuellos <[email protected]>
PCI: mt7621: Add missing MODULE_LICENSE()
Guchun Chen <[email protected]>
drm/amdgpu: use spin_lock_irqsave to avoid deadlock by local interrupt
Jiasheng Jiang <[email protected]>
drm/amdkfd: Check for null pointer after calling kmemdup
José Expósito <[email protected]>
drm/amd/display: invalid parameter check in dmub_hpd_callback
Wesley Sheng <[email protected]>
ntb_hw_switchtec: Fix bug with more than 32 partitions
Jeremy Pallotta <[email protected]>
ntb_hw_switchtec: Fix pff ioread to read into mmio_part_cfg_all
Liu Ying <[email protected]>
drm/atomic: Check new_crtc_state->active to determine if CRTC needs disable in self refresh mode
Miaoqian Lin <[email protected]>
drm/sun4i: dw-hdmi: Fix missing put_device() call in sun8i_hdmi_phy_get
Chuck Lever <[email protected]>
SUNRPC: Fix sockaddr handling in svcsock_accept_class trace points
Chuck Lever <[email protected]>
SUNRPC: Fix sockaddr handling in the svc_xprt_create_error trace point
Matthew Auld <[email protected]>
drm/i915: don't call free_mmap_offset when purging
Juston Li <[email protected]>
drm/i915/pxp: Hold RPM wakelock during PXP unbind
Vitaly Kuznetsov <[email protected]>
x86/hyperv: Properly deal with empty cpumasks in hyperv_flush_tlb_multi()
J. Bruce Fields <[email protected]>
nfsd: fix crash on COPY_NOTIFY with special stateid
Chuck Lever <[email protected]>
Revert "nfsd: skip some unnecessary stats in the v4 case"
Chuck Lever <[email protected]>
NFSD: Fix verifier returned in stable WRITEs
Vincent Chen <[email protected]>
KVM: RISC-V: Avoid spurious virtual interrupts after clearing hideleg CSR
Pali Rohár <[email protected]>
PCI: mvebu: Fix support for DEVCAP2, DEVCTL2 and LNKCTL2 registers on emulated bridge
Pali Rohár <[email protected]>
PCI: mvebu: Fix support for PCI_EXP_RTSTA on emulated bridge
Pali Rohár <[email protected]>
PCI: mvebu: Fix support for PCI_EXP_DEVCTL on emulated bridge
Pali Rohár <[email protected]>
PCI: mvebu: Fix support for PCI_BRIDGE_CTL_BUS_RESET on emulated bridge
Pali Rohár <[email protected]>
PCI: mvebu: Setup PCIe controller to Root Complex mode
Pali Rohár <[email protected]>
PCI: mvebu: Fix configuring secondary bus of PCIe Root Port via emulated bridge
Pali Rohár <[email protected]>
PCI: mvebu: Fix support for bus mastering and PCI_COMMAND on emulated bridge
Pali Rohár <[email protected]>
PCI: mvebu: Do not modify PCI IO type bits in conf_write
Pali Rohár <[email protected]>
PCI: mvebu: Check for errors from pci_bridge_emul_init() call
Dario Binacchi <[email protected]>
Input: ti_am335x_tsc - fix STEPCONFIG setup for Z2
Dario Binacchi <[email protected]>
Input: ti_am335x_tsc - set ADCREFM for X configuration
Beau Belgrave <[email protected]>
tracing: Do not let synth_events block other dyn_event systems during create
Christophe JAILLET <[email protected]>
i3c/master/mipi-i3c-hci: Fix a potentially infinite loop in 'hci_dat_v1_get_index()'
Jamie Iles <[email protected]>
i3c: fix incorrect address slot lookup on 64-bit
Hou Wenlong <[email protected]>
KVM: x86: Exit to userspace if emulation prepared a completion callback
Sean Christopherson <[email protected]>
KVM: x86: Handle 32-bit wrap of EIP for EMULTYPE_SKIP with flat code seg
Lai Jiangshan <[email protected]>
KVM: X86: Ensure that dirty PDPTRs are loaded
Sean Christopherson <[email protected]>
KVM: VMX: Read Posted Interrupt "control" exactly once per loop iteration
Sean Christopherson <[email protected]>
KVM: s390: Ensure kvm_arch_no_poll() is read once when blocking vCPU
Paolo Bonzini <[email protected]>
KVM: VMX: Don't unblock vCPU w/ Posted IRQ if IRQs are disabled in guest
Hector Martin <[email protected]>
PCI: apple: Fix REFCLK1 enable/poll logic
Pali Rohár <[email protected]>
PCI: aardvark: Fix checking for MEM resource type
Tim Harvey <[email protected]>
PCI: dwc: Do not remap invalid res
Marek Vasut <[email protected]>
PCI: rcar: Check if device is runtime suspended instead of __clk_is_enabled()
Christophe JAILLET <[email protected]>
PCI: qcom: Fix an error handling path in 'qcom_pcie_probe()'
Jianjun Wang <[email protected]>
PCI: mediatek-gen3: Disable DVFSRC voltage request
Eric W. Biederman <[email protected]>
signal: In get_signal test for signal_group_exit every time through the loop
Conor Dooley <[email protected]>
mailbox: change mailbox-mpfs compatible string
Miaoqian Lin <[email protected]>
phy: mediatek: Fix missing check in mtk_mipi_tx_probe
Ohad Sharabi <[email protected]>
habanalabs: skip read fw errors if dynamic descriptor invalid
Dani Liberman <[email protected]>
habanalabs: change wait for interrupt timeout to 64 bit
Tzung-Bi Shih <[email protected]>
ASoC: mediatek: mt8183: fix device_node leak
Tzung-Bi Shih <[email protected]>
ASoC: mediatek: mt8173: fix device_node leak
Chunfeng Yun <[email protected]>
phy: phy-mtk-tphy: add support efuse setting
Tzung-Bi Shih <[email protected]>
ASoC: mediatek: mt8192-mt6359: fix device_node leak
Sreekanth Reddy <[email protected]>
scsi: mpi3mr: Fixes around reply request queues
Christoph Hellwig <[email protected]>
scsi: sr: Don't use GFP_DMA
Tianjia Zhang <[email protected]>
MIPS: Octeon: Fix build errors using clang
Michael Ellerman <[email protected]>
selftests/powerpc: Add a test of sigreturning to the kernel
Ajit Kumar Pandey <[email protected]>
ASoC: SOF: ipc: Add null pointer check for substream->runtime
Qi Liu <[email protected]>
scsi: hisi_sas: Prevent parallel FLR and controller reset
Lakshmi Sowjanya D <[email protected]>
i2c: designware-pci: Fix to change data types of hcnt and lcnt parameters
Marc Zyngier <[email protected]>
irqchip/gic-v4: Disable redistributors' view of the VPE table at boot time
Ye Guojin <[email protected]>
MIPS: OCTEON: add put_device() after of_find_device_by_node()
Jan Kara <[email protected]>
udf: Fix error handling in udf_new_inode()
Pierre-Louis Bossart <[email protected]>
ASoC: SOF: Intel: hda: add quirks for HDAudio DMA position information
Hari Bathini <[email protected]>
powerpc/fadump: Fix inaccurate CPU state info in vmcore generated with panic
Hari Bathini <[email protected]>
powerpc: handle kdump appropriately with crash_kexec_post_notifiers option
Thadeu Lima de Souza Cascardo <[email protected]>
selftests/powerpc/spectre_v2: Return skip code when miss_percent is high
Christophe Leroy <[email protected]>
powerpc/40x: Map 32Mbytes of memory at startup
Nathan Chancellor <[email protected]>
MIPS: Loongson64: Use three arguments for slti
Takashi Iwai <[email protected]>
ALSA: seq: Set upper limit of processed events
James Smart <[email protected]>
scsi: lpfc: Trigger SLI4 firmware dump before doing driver cleanup
James Smart <[email protected]>
scsi: lpfc: Fix leaked lpfc_dmabuf mbox allocations with NPIV
Bart Van Assche <[email protected]>
scsi: ufs: Fix a kernel crash during shutdown
Stephan Gerhold <[email protected]>
interconnect: qcom: rpm: Prevent integer overflow in rate
Ameer Hamza <[email protected]>
ASoC: test-component: fix null pointer dereference.
Christoph Hellwig <[email protected]>
dm: make the DAX support depend on CONFIG_FS_DAX
Christoph Hellwig <[email protected]>
dm: fix alloc_dax error handling in alloc_dev
Srinivas Kandagatla <[email protected]>
nvmem: core: set size for sysfs bin file
Christophe Leroy <[email protected]>
w1: Misuse of get_user()/put_user() reported by sparse
Alexey Kardashevskiy <[email protected]>
KVM: PPC: Book3S: Suppress failed alloc warning in H_COPY_TOFROM_GUEST
Alexey Kardashevskiy <[email protected]>
KVM: PPC: Book3S: Suppress warnings when allocating too big memory slots
Christophe Leroy <[email protected]>
powerpc/powermac: Add missing lockdep_register_key()
Martin Blumenstingl <[email protected]>
clk: meson: gxbb: Fix the SDM_EN bit for MPLL0 on GXBB
Joakim Tjernlund <[email protected]>
i2c: mpc: Correct I2C reset procedure
Michael Ellerman <[email protected]>
powerpc/smp: Move setup_profiling_timer() under CONFIG_PROFILING
Heiner Kallweit <[email protected]>
i2c: i801: Don't silently correct invalid transfer size
Ye Guojin <[email protected]>
ASoC: imx-hdmi: add put_device() after of_find_device_by_node()
Nicholas Piggin <[email protected]>
powerpc/watchdog: Fix missed watchdog reset due to memory ordering race
Julia Lawall <[email protected]>
powerpc/btext: add missing of_node_put
Julia Lawall <[email protected]>
powerpc/cell: add missing of_node_put
Julia Lawall <[email protected]>
powerpc/powernv: add missing of_node_put
Julia Lawall <[email protected]>
powerpc/6xx: add missing of_node_put
Sam Protsenko <[email protected]>
clk: samsung: exynos850: Register clocks early
Ingo Molnar <[email protected]>
x86/kbuild: Enable CONFIG_KALLSYMS_ALL=y in the defconfigs
Marc Kleine-Budde <[email protected]>
can: flexcan: add more quirks to describe RX path capabilities
Marc Kleine-Budde <[email protected]>
can: flexcan: rename RX modes
Dario Binacchi <[email protected]>
can: flexcan: allow to change quirks at runtime
Mauro Carvalho Chehab <[email protected]>
scripts: sphinx-pre-install: Fix ctex support on Debian
John David Anglin <[email protected]>
parisc: Avoid calling faulthandler_disabled() twice
Maor Dickman <[email protected]>
net/mlx5e: Unblock setting vid 0 for VF in case PF isn't eswitch manager
Maher Sanalla <[email protected]>
net/mlx5: Update log_max_qp value to FW max capability
Jason A. Donenfeld <[email protected]>
random: do not throw away excess input to crng_fast_load
Lukas Wunner <[email protected]>
serial: core: Keep mctrl register state and cached copy in sync
Lukas Wunner <[email protected]>
serial: pl011: Drop CR register reset on set_termios
Lukas Wunner <[email protected]>
serial: pl010: Drop CR register reset on set_termios
Konrad Dybcio <[email protected]>
regulator: qcom_smd: Align probe function with rpmh-regulator
Russell King (Oracle) <[email protected]>
net: gemini: allow any RGMII interface mode
Russell King (Oracle) <[email protected]>
net: phy: marvell: configure RGMII delays for 88E1118
Danielle Ratson <[email protected]>
mlxsw: pci: Avoid flow control for EMAD packets
Jiri Olsa <[email protected]>
bpf/selftests: Fix namespace mount setup in tc_redirect
Vincent Mailhol <[email protected]>
can: do not increase rx statistics when generating a CAN rx error message frame
Joe Thornber <[email protected]>
dm space map common: add bounds check to sm_ll_lookup_bitmap()
Joe Thornber <[email protected]>
dm btree: add a defensive bounds check to insert_at()
Ping-Ke Shih <[email protected]>
mac80211: allow non-standard VHT MCS-10/11
Florian Fainelli <[email protected]>
net: mdio: Demote probed message to debug print
Josef Bacik <[email protected]>
btrfs: remove BUG_ON(!eie) in find_parent_nodes
Josef Bacik <[email protected]>
btrfs: remove BUG_ON() in find_parent_nodes()
Yevgeny Kliteynik <[email protected]>
net/mlx5: DR, Fix error flow in creating matcher
Mario Limonciello <[email protected]>
ACPI: CPPC: Check present CPUs for determining _CPC is valid
Thomas Weißschuh <[email protected]>
ACPI: battery: Add the ThinkPad "Not Charging" quirk
Marina Nikolic <[email protected]>
amdgpu/pm: Make sysfs pm attributes as read-only for VFs
Hans de Goede <[email protected]>
mfd: intel_soc_pmic: Use CPU-id check instead of _HRV check to differentiate variants
Zongmin Zhou <[email protected]>
drm/amdgpu: fixup bad vram size on gmc v8
Rajneesh Bhardwaj <[email protected]>
drm/amdgpu: Don't inherit GEM object VMAs in child process
AngeloGioacchino Del Regno <[email protected]>
mmc: mtk-sd: Use readl_poll_timeout instead of open-coded polling
Kirill A. Shutemov <[email protected]>
ACPICA: Hardware: Do not flush CPU cache when entering S4 and S5
Sudeep Holla <[email protected]>
ACPICA: Fix wrong interpretation of PCC address
Rafael J. Wysocki <[email protected]>
ACPICA: Executer: Fix the REFCLASS_REFOF case in acpi_ex_opcode_1A_0T_1R()
Rafael J. Wysocki <[email protected]>
ACPICA: Utilities: Avoid deleting the same object twice in a row
Mark Langsdorf <[email protected]>
ACPICA: actypes.h: Expand the ACPI_ACCESS_ definitions
Kyeong Yoo <[email protected]>
jffs2: GC deadlock reading a page that is used in jffs2_write_begin()
Lucas Stach <[email protected]>
drm/etnaviv: consider completed fence seqno in hang check
Antony Antony <[email protected]>
xfrm: rate limit SA mapping change message to user space
Luiz Augusto von Dentz <[email protected]>
Bluetooth: vhci: Set HCI_QUIRK_VALID_LE_STATES
Rafael J. Wysocki <[email protected]>
cpufreq: intel_pstate: Update cpuinfo.max_freq on HWP_CAP changes
Tedd Ho-Jeong An <[email protected]>
Bluetooth: btintel: Add missing quirks and msft ext for legacy bootloader
Ben Greear <[email protected]>
ath11k: Fix napi related hang
Randy Dunlap <[email protected]>
um: registers: Rename function names to avoid conflicts and build problems
Tetsuo Handa <[email protected]>
block: check minor range in device_add_disk()
Hector Martin <[email protected]>
mmc: sdhci-pci-gli: GL9755: Support for CD/WP inversion on OF platforms
Luca Coelho <[email protected]>
iwlwifi: pcie: make sure prph_info is set when treating wakeup IRQ
Avraham Stern <[email protected]>
iwlwifi: mvm: fix AUX ROC removal
Ilan Peer <[email protected]>
iwlwifi: mvm: Fix calculation of frame length
Johannes Berg <[email protected]>
iwlwifi: remove module loading failure message
Johannes Berg <[email protected]>
iwlwifi: fix leaks/bad data after failed firmware load
Luca Coelho <[email protected]>
iwlwifi: recognize missing PNVM data and then log filename
Changcheng Deng <[email protected]>
PM: AVS: qcom-cpr: Use div64_ul instead of do_div
Po-Hao Huang <[email protected]>
rtw88: 8822c: update rx settings to prevent potential hw deadlock
Zekun Shen <[email protected]>
ath9k: Fix out-of-bound memcpy in ath9k_hif_usb_rx_stream
Tetsuo Handa <[email protected]>
ath9k_htc: fix NULL pointer dereference at ath9k_htc_tx_get_packet()
Tetsuo Handa <[email protected]>
ath9k_htc: fix NULL pointer dereference at ath9k_htc_rxep()
Deren Wu <[email protected]>
mt76: mt7921: fix network buffer leak by txs missing
Felix Fietkau <[email protected]>
mt76: mt7615: improve wmm index allocation
Xing Song <[email protected]>
mt76: do not pass the received frame with decryption error
Lorenzo Bianconi <[email protected]>
mt76: connac: fix a theoretical NULL pointer dereference in mt76_connac_get_phy_mode
Ryder Lee <[email protected]>
mt76: mt7915: fix SMPS operation fail
Peter Chiu <[email protected]>
mt76: mt7615: fix possible deadlock while mt7615_register_ext_phy()
Kai-Heng Feng <[email protected]>
usb: hub: Add delay for SuperSpeed hub resume to let links transit to U0
Rafael J. Wysocki <[email protected]>
cpufreq: Fix initialization of min and max frequency QoS requests
Rafael J. Wysocki <[email protected]>
PM: runtime: Add safety net to supplier device release
Yang Shen <[email protected]>
crypto: hisilicon/qm - fix deadlock for remove driver
Weili Qian <[email protected]>
crypto: hisilicon/hpre - fix memory leak in hpre_curve25519_src_init()
Peter Gonda <[email protected]>
crypto: ccp - Move SEV_INIT retry for corrupted data
Thierry Reding <[email protected]>
arm64: tegra: Adjust length of CCPLEX cluster MMIO region
Biwen Li <[email protected]>
arm64: dts: ls1028a-qds: move rtc node to the correct i2c bus
Paul Moore <[email protected]>
audit: ensure userspace is penalized the same as the kernel when under pressure
Jingwen Chen <[email protected]>
drm/amd/amdgpu: fix gmc bo pin count leak in SRIOV
Jingwen Chen <[email protected]>
drm/amd/amdgpu: fix psp tmr bo pin count leak in SRIOV
H. Nikolaus Schaller <[email protected]>
mmc: omap_hsmmc: Revert special init for wl1251
Ulf Hansson <[email protected]>
mmc: core: Fixup storing of OCR for MMC_QUIRK_NONSTD_SDIO
Biju Das <[email protected]>
mmc: tmio: reinit card irqs in reset routine
Zhou Qingyang <[email protected]>
media: saa7146: hexium_gemini: Fix a NULL pointer dereference in hexium_attach()
Mikhail Rudenko <[email protected]>
media: rockchip: rkisp1: use device name for debugfs subdir name
Sean Young <[email protected]>
media: igorplugusb: receiver overflow should be reported
Alistair Francis <[email protected]>
HID: i2c-hid-of: Expose the touchscreen-inverted properties
Alistair Francis <[email protected]>
HID: quirks: Allow inverting the absolute X/Y values
Isabella Basso <[email protected]>
drm/amdgpu: fix amdgpu_ras_mca_query_error_status scope
Felix Kuehling <[email protected]>
drm/amdkfd: Fix error handling in svm_range_add
Paolo Abeni <[email protected]>
bpf: Do not WARN in bpf_warn_invalid_xdp_action()
David Gow <[email protected]>
kunit: Don't crash if no parameters are generated
Suresh Kumar <[email protected]>
net: bonding: debug: avoid printing debug logs when bond is not notifying peers
Borislav Petkov <[email protected]>
x86/mce: Mark mce_read_aux() noinstr
Borislav Petkov <[email protected]>
x86/mce: Mark mce_end() noinstr
Borislav Petkov <[email protected]>
x86/mce: Mark mce_panic() noinstr
Borislav Petkov <[email protected]>
x86/mce: Prevent severity computation from being instrumented
Borislav Petkov <[email protected]>
x86/mce: Allow instrumentation during task work queueing
Alex Elder <[email protected]>
ARM: dts: qcom: sdx55: fix IPA interconnect definitions
Baochen Qiang <[email protected]>
ath11k: Avoid false DEADLOCK warning reported by lockdep
Jagan Teki <[email protected]>
arm64: dts: rockchip: Fix Bluetooth on ROCK Pi 4 boards
Heiko Carstens <[email protected]>
selftests/ftrace: make kprobe profile testcase description unique
Iwona Winiarska <[email protected]>
gpio: aspeed-sgpio: Convert aspeed_sgpio.lock to raw_spinlock
Iwona Winiarska <[email protected]>
gpio: aspeed: Convert aspeed_gpio.lock to raw_spinlock
Russell King (Oracle) <[email protected]>
net: phy: prefer 1000baseT over 1000baseKX
Wen Gong <[email protected]>
ath10k: drop beacon and probe response which leak from other channel
Antoine Tenart <[email protected]>
net-sysfs: update the queue counts in the unregistration path
Ping-Ke Shih <[email protected]>
rtw89: don't kick off TX DMA if failed to write skb
Sebastian Gottschall <[email protected]>
ath10k: Fix tx hanging
Wen Gong <[email protected]>
ath11k: avoid deadlock by change ieee80211_queue_work for regd_update_work
Wander Lairson Costa <[email protected]>
rcutorture: Avoid soft lockup during cpu stall
Miri Korenblit <[email protected]>
iwlwifi: acpi: fix wgds rev 3 size
Shaul Triebitz <[email protected]>
iwlwifi: mvm: avoid clearing a just saved session protection id
Johannes Berg <[email protected]>
iwlwifi: mvm: synchronize with FW after multicast commands
Kieran Bingham <[email protected]>
arm64: dts: renesas: Fix thermal bindings
Mika Westerberg <[email protected]>
thunderbolt: Runtime PM activate both ends of the device link
Mauro Carvalho Chehab <[email protected]>
media: m920x: don't use stack on USB reads
Tsuchiya Yuto <[email protected]>
media: atomisp: fix "variable dereferenced before check 'asd'"
Zhou Qingyang <[email protected]>
media: saa7146: hexium_orion: Fix a NULL pointer dereference in hexium_attach()
Niklas Söderlund <[email protected]>
media: rcar-vin: Update format alignment constraints
James Hilliard <[email protected]>
media: uvcvideo: Increase UVC_CTRL_CONTROL_TIMEOUT to 5 seconds.
Laurent Pinchart <[email protected]>
drm: rcar-du: Fix CRTC timings when CMM is used
Joerg Roedel <[email protected]>
x86/mm: Flush global TLB when switching to trampoline page-table
Xiongwei Song <[email protected]>
floppy: Add max size check for user space request
Neal Liu <[email protected]>
usb: uhci: add aspeed ast2600 uhci support
Kishon Vijay Abraham I <[email protected]>
arm64: dts: ti: j721e-main: Fix 'dtbs_check' in serdes_ln_ctrl node
Kishon Vijay Abraham I <[email protected]>
arm64: dts: ti: j7200-main: Fix 'dtbs_check' serdes_ln_ctrl node
Vlad Zahorodnii <[email protected]>
drm/amd/display: Use oriented source size when checking cursor scaling
Thomas Zimmermann <[email protected]>
drm: Return error codes from struct drm_driver.gem_create_object
Hans de Goede <[email protected]>
ACPI / x86: Add not-present quirk for the PCI0.SDHB.BRC1 device on the GPD win
Hans de Goede <[email protected]>
ACPI / x86: Allow specifying acpi_device_override_status() quirks by path
Hans de Goede <[email protected]>
ACPI: Change acpi_device_always_present() into acpi_device_override_status()
Hans de Goede <[email protected]>
ACPI / x86: Drop PWM2 device on Lenovo Yoga Book from always present table
Zack Rusin <[email protected]>
drm/vmwgfx: Introduce a new placement for MOB page tables
Zack Rusin <[email protected]>
drm/vmwgfx: Release ttm memory if probe fails
Adam Ward <[email protected]>
regulator: da9121: Prevent current limit change when enabled
Mansur Alisha Shaik <[email protected]>
media: venus: avoid calling core_clk_setrate() concurrently during concurrent video sessions
Sriram R <[email protected]>
ath11k: Avoid NULL ptr access during mgmt tx cleanup
Zekun Shen <[email protected]>
rsi: Fix out-of-bounds read in rsi_read_pkt()
Zekun Shen <[email protected]>
rsi: Fix use-after-free in rsi_rx_done_handler()
Zekun Shen <[email protected]>
mwifiex: Fix skb_over_panic in mwifiex_usb_recv()
Ping-Ke Shih <[email protected]>
rtw89: fix potentially access out of range of RF register array
Stephan Müller <[email protected]>
crypto: jitter - consider 32 LSB for APT
Chengfeng Ye <[email protected]>
HSI: core: Fix return freed object in hsi_new_client
Hans de Goede <[email protected]>
gpiolib: acpi: Do not set the IRQ type if the IRQ is already in use
Fugang Duan <[email protected]>
tty: serial: imx: disable UCR4_OREN in .stop_rx() instead of .shutdown()
Emil Renner Berthing <[email protected]>
serial: 8250_dw: Add StarFive JH7100 quirk
Jiri Slaby <[email protected]>
mxser: increase buf_overrun if tty_insert_flip_char() fails
Jiri Slaby <[email protected]>
mxser: don't throttle manually
Jiri Slaby <[email protected]>
mxser: keep only !tty test in ISR
Martyn Welch <[email protected]>
drm/bridge: megachips: Ensure both bridges are probed before registration
Martin Leung <[email protected]>
drm/amd/display: add else to avoid double destroy clk_mgr
Danielle Ratson <[email protected]>
mlxsw: pci: Add shutdown method in PCI driver
Jan Kiszka <[email protected]>
soc: ti: pruss: fix referenced node in error message
Alex Deucher <[email protected]>
drm/amdgpu/display: set vblank_disable_immediate for DC
Yang Li <[email protected]>
drm/amd/display: check top_pipe_to_program pointer
Anilkumar Kolli <[email protected]>
ath11k: Fix mon status ring rx tlv processing
Lukas Bulwahn <[email protected]>
ARM: imx: rename DEBUG_IMX21_IMX27_UART to DEBUG_IMX27_UART
Marek Vasut <[email protected]>
soc: imx: gpcv2: Synchronously suspend MIX domains
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm8350: Shorten camera-thermal-bottom name
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm[68]350: Use interrupts-extended with pdc interrupts
Dinh Nguyen <[email protected]>
EDAC/synopsys: Use the quirk for version instead of ddr version
Yang Li <[email protected]>
ethernet: renesas: Use div64_ul instead of do_div
Andrii Nakryiko <[email protected]>
libbpf: Accommodate DWARF/compiler bug with duplicated structs
Zheyu Ma <[email protected]>
media: b2c2: Add missing check in flexcop_pci_isr:
José Expósito <[email protected]>
HID: apple: Do not reset quirks when the Fn key is not found
José Expósito <[email protected]>
HID: magicmouse: Report battery level over USB
Hans de Goede <[email protected]>
drm: panel-orientation-quirks: Add quirk for the Lenovo Yoga Book X91F/L
Brian Chen <[email protected]>
psi: Fix PSI_MEM_FULL state when tasks are in memstall and doing reclaim
Pavankumar Kondeti <[email protected]>
usb: gadget: f_fs: Use stream_open() for endpoint files
Haimin Zhang <[email protected]>
USB: ehci_brcm_hub_control: Improve port index sanitizing
Amjad Ouled-Ameur <[email protected]>
usb: dwc3: meson-g12a: fix shared reset control use
Baochen Qiang <[email protected]>
ath11k: Fix crash caused by uninitialized TX ring
Mauro Carvalho Chehab <[email protected]>
media: atomisp: handle errors at sh_css_create_isp_params()
Tiezhu Yang <[email protected]>
bpf: Change value of MAX_TAIL_CALL_CNT from 32 to 33
Linus Lüssing <[email protected]>
batman-adv: allow netlink usage in unprivileged containers
Wen Gong <[email protected]>
ath11k: enable IEEE80211_VHT_EXT_NSS_BW_CAPABLE if NSS ratio enabled
Wan Jiabing <[email protected]>
ARM: shmobile: rcar-gen2: Add missing of_node_put()
Mauro Carvalho Chehab <[email protected]>
media: atomisp: check before deference asd variable
Hans de Goede <[email protected]>
media: atomisp-ov2680: Fix ov2680_set_fmt() clobbering the exposure
Mauro Carvalho Chehab <[email protected]>
media: atomisp: set per-device's default mode
Mauro Carvalho Chehab <[email protected]>
media: atomisp: fix try_fmt logic
Ben Skeggs <[email protected]>
drm/nouveau/pmu/gm200-: avoid touching PMU outside of DEVINIT/PREOS/ACR
Neil Armstrong <[email protected]>
drm/bridge: dw-hdmi: handle ELD when DRM_BRIDGE_ATTACH_NO_CONNECTOR
Zekun Shen <[email protected]>
ar5523: Fix null-ptr-deref with unexpected WDCMSG_TARGET_START reply
Andrii Nakryiko <[email protected]>
selftests/bpf: Fix bpf_object leak in skb_ctx selftest
Andrii Nakryiko <[email protected]>
selftests/bpf: Destroy XDP link correctly
Andrii Nakryiko <[email protected]>
selftests/bpf: Fix memory leaks in btf_type_c_dump() helper
Qiang Yu <[email protected]>
drm/lima: fix warning when CONFIG_DEBUG_SG=y & CONFIG_DMA_API_DEBUG=y
Andrii Nakryiko <[email protected]>
libbpf: Validate that .BTF and .BTF.ext sections contain data
Andrii Nakryiko <[email protected]>
libbpf: Improve sanity checking during BTF fix up
Andrii Nakryiko <[email protected]>
libbpf: Detect corrupted ELF symbols section
Alexander Aring <[email protected]>
fs: dlm: filter user dlm messages for kernel locks
Andrey Grodzovsky <[email protected]>
drm/sched: Avoid lockdep spalt on killing a processes
Archie Pusaka <[email protected]>
Bluetooth: Fix removing adv when processing cmd complete
Brian Norris <[email protected]>
drm/panel: Delete panel on mipi_dsi_attach() failure
Wei Yongjun <[email protected]>
Bluetooth: Fix memory leak of hci device
Wei Yongjun <[email protected]>
Bluetooth: Fix debugfs entry leak in hci_register_dev()
Nguyen Dinh Phi <[email protected]>
Bluetooth: hci_sock: purge socket queues in the destruct() callback
Merlijn Wajer <[email protected]>
leds: lp55xx: initialise output direction from dts
Sicelo A. Mhlongo <[email protected]>
ARM: dts: omap3-n900: Fix lp5523 for multi color
Sudeep Holla <[email protected]>
mailbox: pcc: Handle all PCC subtypes correctly in pcc_mbox_irq
Sudeep Holla <[email protected]>
mailbox: pcc: Avoid using the uninitialized variable 'dev'
Dan Carpenter <[email protected]>
mailbox: imx: Fix an IS_ERR() vs NULL bug
jason-jh.lin <[email protected]>
mailbox: fix gce_num of mt8192 driver data
Paul Cercueil <[email protected]>
MIPS: compressed: Fix build with ZSTD compression
Stephen Boyd <[email protected]>
of/fdt: Don't worry about non-memory region overlap for no-map
Baruch Siach <[email protected]>
of: base: Fix phandle argument length mismatch error message
Conor Dooley <[email protected]>
clk: bm1880: remove kfrees on static allocations
Shengjiu Wang <[email protected]>
ASoC: fsl_asrc: refine the check of available clock divider
Shengjiu Wang <[email protected]>
ASoC: imx-card: improve the sound quality for low rate
Shengjiu Wang <[email protected]>
ASoC: imx-card: Fix mclk calculation issue for akcodec
Shengjiu Wang <[email protected]>
ASoC: imx-card: Need special setting for ak4497 on i.MX8MQ
Taniya Das <[email protected]>
clk: qcom: gcc-sc7280: Mark gcc_cfg_noc_lpass_clk always enabled
Kamal Heib <[email protected]>
RDMA/cxgb4: Set queue pair state when being queried
Huang Pei <[email protected]>
MIPS: fix local_{add,sub}_return on MIPS64
Nathan Chancellor <[email protected]>
cxl/core: Remove cxld_const_init in cxl_decoder_alloc()
Christian A. Ehrhardt <[email protected]>
ALSA: hda/cs8409: Fix Jack detection after resume
Christian A. Ehrhardt <[email protected]>
ALSA: hda/cs8409: Increase delay during jack detection
Alyssa Ross <[email protected]>
ASoC: fsl_mqs: fix MODULE_ALIAS
Ammar Faizi <[email protected]>
powerpc/xive: Add missing null check after calling kmalloc
Randy Dunlap <[email protected]>
mips: bcm63xx: add support for clk_set_parent()
Randy Dunlap <[email protected]>
mips: lantiq: add support for clk_set_parent()
Sameer Pujar <[email protected]>
arm64: tegra: Remove non existent Tegra194 reset
Trevor Wu <[email protected]>
ASoC: mediatek: mt8195: correct pcmif BE dai control flow
Wei Yongjun <[email protected]>
misc: lattice-ecp3-config: Fix task hung when firmware load failed
Jiasheng Jiang <[email protected]>
ASoC: samsung: idma: Check of ioremap return value
Tom Rix <[email protected]>
iio: chemical: sunrise_co2: set val parameter only on success
Swapnil Jakhade <[email protected]>
phy: cadence: Sierra: Fix to get correct parent for mux clocks
Michael Ellerman <[email protected]>
powerpc/64s: Use EMIT_WARN_ENTRY for SRR debug warnings
Michael Ellerman <[email protected]>
powerpc/64s: Mask NIP before checking against SRR0
Jiasheng Jiang <[email protected]>
ASoC: mediatek: Check for error clk pointer
Ryuta NAKANISHI <[email protected]>
phy: uniphier-usb3ss: fix unintended writing zeros to PHY register
Alan Stern <[email protected]>
scsi: block: pm: Always set request queue runtime active in blk_post_runtime_resume()
Pingfan Liu <[email protected]>
efi: apply memblock cap after memblock_add()
Zhen Lei <[email protected]>
of: fdt: Aggregate the processing of "linux,usable-memory-range"
William Breathitt Gray <[email protected]>
counter: 104-quad-8: Fix persistent enabled events bug
Trevor Wu <[email protected]>
ASoC: mediatek: mt8195: correct default value
Xiongfeng Wang <[email protected]>
iommu/iova: Fix race between FQ timeout and teardown
Cezary Rojewski <[email protected]>
ASoC: Intel: catpt: Test dmaengine_submit() result before moving on
Maxim Levitsky <[email protected]>
iommu/amd: Remove useless irq affinity notifier
Maxim Levitsky <[email protected]>
iommu/amd: X2apic mode: mask/unmask interrupts on suspend/resume
Maxim Levitsky <[email protected]>
iommu/amd: X2apic mode: setup the INTX registers on mask/unmask
Maxim Levitsky <[email protected]>
iommu/amd: X2apic mode: re-enable after resume
Maxim Levitsky <[email protected]>
iommu/amd: Restore GA log/tail pointer on host resume
Arnd Bergmann <[email protected]>
dmaengine: pxa/mmp: stop referencing config->slave_id
Lukas Bulwahn <[email protected]>
mips: fix Kconfig reference to PHYS_ADDR_T_64BIT
Lukas Bulwahn <[email protected]>
mips: add SYS_HAS_CPU_MIPS64_R5 config for MIPS Release 5 support
Dillon Min <[email protected]>
clk: stm32: Fix ltdc's clock turn off by clk_disable_unused() after system enter shell
Frank Rowand <[email protected]>
of: unittest: 64 bit dma address test requires arch support
Jim Quinlan <[email protected]>
of: unittest: fix warning on PowerPC frame size warning
Jiasheng Jiang <[email protected]>
ASoC: rt5663: Handle device_property_read_u32_array error codes
Avihai Horon <[email protected]>
RDMA/cma: Let cma_resolve_ib_dev() continue search even after empty entry
Avihai Horon <[email protected]>
RDMA/core: Let ib_find_gid() continue search even after empty entry
Rob Clark <[email protected]>
iommu/arm-smmu-qcom: Fix TTBR0 read
Christophe Leroy <[email protected]>
powerpc/powermac: Add additional missing lockdep_register_key()
Thomas Gleixner <[email protected]>
PCI/MSI: Fix pci_irq_vector()/pci_irq_get_affinity()
Kamal Heib <[email protected]>
RDMA/qedr: Fix reporting max_{send/recv}_wr attrs
Bart Van Assche <[email protected]>
scsi: ufs: Fix race conditions related to driver data
Bart Van Assche <[email protected]>
scsi: core: Fix scsi_device_max_queue_depth()
Kai Vehmanen <[email protected]>
ASoC: SOF: Intel: fix build issue related to CODEC_PROBE_ENTRIES
Hector Martin <[email protected]>
iommu/io-pgtable-arm: Fix table descriptor paddr formatting
Lu Baolu <[email protected]>
iommu: Extend mutex lock scope in iommu_probe_device()
Jiasheng Jiang <[email protected]>
uio: uio_dmem_genirq: Catch the Exception
Stafford Horne <[email protected]>
openrisc: Add clone3 ABI wrapper
Todd Kjos <[email protected]>
binder: avoid potential data leakage when copying txn
Todd Kjos <[email protected]>
binder: fix handling of error during copy
Kees Cook <[email protected]>
char/mwave: Adjust io port register size
Andy Shevchenko <[email protected]>
misc: at25: Make driver OF independent again
Lucas Tanure <[email protected]>
ASoC: amd: Fix dependency for SPI master
Takashi Iwai <[email protected]>
ALSA: usb-audio: Drop superfluous '0' in Presonus Studio 1810c's ID
Bixuan Cui <[email protected]>
ALSA: oss: fix compile error when OSS_DEBUG is enabled
Waiman Long <[email protected]>
clocksource: Avoid accidental unstable marking of clocksources
Christophe Leroy <[email protected]>
powerpc/32s: Fix shift-out-of-bounds in KASAN init
Christophe Leroy <[email protected]>
powerpc/modules: Don't WARN on first module allocation attempt
Athira Rajeev <[email protected]>
powerpc/perf: Fix PMU callbacks to clear pending PMI before resetting an overflown PMC
Niklas Söderlund <[email protected]>
dt-bindings: thermal: Fix definition of cooling-maps contribution property
Thomas Gleixner <[email protected]>
ALSA: hda: Make proper use of timecounter
Jack Wang <[email protected]>
RDMA/rtrs-clt: Fix the initial value of min_latency
Lukas Bulwahn <[email protected]>
ASoC: codecs: wcd938x: add SND_SOC_WCD938_SDW to codec list instead
Lukas Bulwahn <[email protected]>
ASoC: uniphier: drop selecting non-existing SND_SOC_UNIPHIER_AIO_DMA
Peiwei Hu <[email protected]>
powerpc/prom_init: Fix improper check of prom_getprop()
Richard Fitzgerald <[email protected]>
ASoC: cs42l42: Report initial jack state
Adam Ford <[email protected]>
clk: imx8mn: Fix imx8mn_clko1_sels
Lad Prabhakar <[email protected]>
clk: renesas: rzg2l: propagate return value of_genpd_add_provider_simple()
Lad Prabhakar <[email protected]>
clk: renesas: rzg2l: Check return value of pm_genpd_init()
Igor Pylypiv <[email protected]>
scsi: pm80xx: Update WARN_ON check in pm8001_mpi_build_cmd()
Kamal Heib <[email protected]>
RDMA/hns: Validate the pkey index
Christophe JAILLET <[email protected]>
RDMA/bnxt_re: Scan the whole bitmap when checking if "disabling RCFW with pending cmd-bit"
Takashi Iwai <[email protected]>
ALSA: hda: Fix potential deadlock at codec unbinding
Takashi Iwai <[email protected]>
ALSA: hda: Add missing rwsem around snd_ctl_remove() calls
Takashi Iwai <[email protected]>
ALSA: PCM: Add missing rwsem around snd_ctl_remove() calls
Takashi Iwai <[email protected]>
ALSA: jack: Add missing rwsem around snd_ctl_remove() calls
Pierre-Louis Bossart <[email protected]>
ASoC: Intel: sof_sdw: fix jack detection on HP Spectre x360 convertible
Jan Kara <[email protected]>
ext4: avoid trim error on fs with small groups
Taehee Yoo <[email protected]>
amt: fix wrong return type of amt_send_membership_update()
Pavel Skripkin <[email protected]>
net: mcs7830: handle usb read errors properly
Edwin Peer <[email protected]>
bnxt_en: use firmware provided max timeout for messages
Nathan Chancellor <[email protected]>
iwlwifi: mvm: Use div_s64 instead of do_div in iwl_mvm_ftm_rtt_smoothing()
Paul Blakey <[email protected]>
net: openvswitch: Fix ct_state nat flags for conns arriving from tc
Florian Westphal <[email protected]>
netfilter: egress: avoid a lockdep splat
Dominik Brodowski <[email protected]>
pcmcia: fix setting of kthread task states
Lad Prabhakar <[email protected]>
can: rcar_canfd: rcar_canfd_channel_probe(): make sure we free CAN network device
Jiasheng Jiang <[email protected]>
can: xilinx_can: xcan_probe(): check for error irq
Marc Kleine-Budde <[email protected]>
can: softing: softing_startstop(): fix set but not used variable warning
Christophe Jaillet <[email protected]>
tpm_tis: Fix an error handling path in 'tpm_tis_core_init()'
Chen Jun <[email protected]>
tpm: add request_locality before write TPM_INT_ENABLE
Marc Kleine-Budde <[email protected]>
can: mcp251xfd: add missing newline to printed strings
Sunil Goutham <[email protected]>
octeontx2-af: Fix interrupt name strings
Vladimir Oltean <[email protected]>
net: mscc: ocelot: fix incorrect balancing with down LAG ports
Fabio Estevam <[email protected]>
regmap: Call regmap_debugfs_exit() prior to _init()
Dan Carpenter <[email protected]>
netrom: fix api breakage in nr_setsockopt()
Dan Carpenter <[email protected]>
ax25: uninitialized variable in ax25_setsockopt()
Rakesh Babu Saladi <[email protected]>
octeontx2-nicvf: Free VF PTP resources.
Subbaraya Sundeep <[email protected]>
octeontx2-af: Increment ptp refcount before use
Miaoqian Lin <[email protected]>
spi: spi-meson-spifc: Add missing pm_runtime_disable() in meson_spifc_probe
Mat Martineau <[email protected]>
mptcp: Check reclaim amount before reducing allocation
Geliang Tang <[email protected]>
mptcp: fix a DSS option writing error
Matthieu Baerts <[email protected]>
mptcp: fix opt size when sending DSS + MP_FAIL
Paolo Abeni <[email protected]>
mptcp: fix per socket endpoint accounting
Dan Carpenter <[email protected]>
Bluetooth: hci_sock: fix endian bug in hci_sock_setsockopt()
Dan Carpenter <[email protected]>
Bluetooth: L2CAP: uninitialized variables in l2cap_sock_setsockopt()
Zizhuang Deng <[email protected]>
lib/mpi: Add the return value check of kcalloc()
Moshe Shemesh <[email protected]>
net/mlx5: Set command entry semaphore up once got index free
Maor Dickman <[email protected]>
net/mlx5e: Sync VXLAN udp ports during uplink representor profile change
Shay Drory <[email protected]>
net/mlx5: Fix access to sf_dev_table on allocation failure
Paul Blakey <[email protected]>
net/mlx5e: Fix matching on modified inner ip_ecn bits
Aya Levin <[email protected]>
Revert "net/mlx5e: Block offload of outer header csum for GRE tunnel"
Aya Levin <[email protected]>
Revert "net/mlx5e: Block offload of outer header csum for UDP tunnels"
Maor Dickman <[email protected]>
net/mlx5e: Don't block routes with nexthop objects in SW
Maor Dickman <[email protected]>
net/mlx5e: Fix wrong usage of fib_info_nh when routes with nexthop objects are used
Dima Chumak <[email protected]>
net/mlx5e: Fix nullptr on deleting mirroring rule
Aya Levin <[email protected]>
net/mlx5e: Fix page DMA map/unmap attributes
Huang Rui <[email protected]>
x86, sched: Fix undefined reference to init_freq_invariance_cppc() build error
Vinod Koul <[email protected]>
spi: qcom: geni: handle timeout for gpi mode
Vinod Koul <[email protected]>
spi: qcom: geni: set the error code for gpi transfer
Valentin Caron <[email protected]>
serial: stm32: move tx dma terminate DMA to shutdown
Alyssa Ross <[email protected]>
serial: liteuart: fix MODULE_ALIAS
Miaoqian Lin <[email protected]>
drivers/firmware: Add missing platform_device_put() in sysfb_create_simplefb
Michal Suchanek <[email protected]>
debugfs: lockdown: Allow reading debugfs files that are not world readable
José Expósito <[email protected]>
HID: hid-uclogic-params: Invalid parameter check in uclogic_params_frame_init_v1_buttonpad
José Expósito <[email protected]>
HID: hid-uclogic-params: Invalid parameter check in uclogic_params_huion_init
José Expósito <[email protected]>
HID: hid-uclogic-params: Invalid parameter check in uclogic_params_get_str_desc
José Expósito <[email protected]>
HID: hid-uclogic-params: Invalid parameter check in uclogic_params_init
Pavel Hofman <[email protected]>
usb: gadget: u_audio: Subdevice 0 for capture ctls
John Keeping <[email protected]>
usb: gadget: u_audio: fix calculations for small bInterval
John Keeping <[email protected]>
usb: dwc2: gadget: initialize max_speed from params
Dinh Nguyen <[email protected]>
usb: dwc2: do not gate off the hardware if it does not support clock gating
Miaoqian Lin <[email protected]>
usb: dwc3: qcom: Fix NULL vs IS_ERR checking in dwc3_qcom_probe
Wen Gu <[email protected]>
net/smc: Reset conn->lgr when link group registration fails
Miaoqian Lin <[email protected]>
Bluetooth: hci_qca: Fix NULL vs IS_ERR_OR_NULL check in qca_serdev_probe
Jiasheng Jiang <[email protected]>
Bluetooth: hci_bcm: Check for error irq
Jiasheng Jiang <[email protected]>
fsl/fman: Check for null pointer after calling devm_ioremap
Jiasheng Jiang <[email protected]>
staging: greybus: audio: Check null pointer
Dan Carpenter <[email protected]>
rocker: fix a sleeping in atomic bug
Eric Dumazet <[email protected]>
ppp: ensure minimum packet size in ppp_write()
Miroslav Lichvar <[email protected]>
net: fix SOF_TIMESTAMPING_BIND_PHC to work with multiple sockets
Florian Westphal <[email protected]>
netfilter: nft_set_pipapo: allocate pcpu scratch maps on clone
Pablo Neira Ayuso <[email protected]>
netfilter: nft_payload: do not update layer 4 checksum when mangling fragments
Qiang Wang <[email protected]>
libbpf: Use probe_name for legacy kprobe
Kuniyuki Iwashima <[email protected]>
bpf: Fix SO_RCVBUF/SO_SNDBUF handling in _bpf_setsockopt().
Kris Van Hees <[email protected]>
bpf: Fix verifier support for validation of async callbacks
Daniel Borkmann <[email protected]>
bpf: Don't promote bogus looking registers after null check.
John Fastabend <[email protected]>
bpf, sockmap: Fix double bpf_prog_put on error case in map_link
John Fastabend <[email protected]>
bpf, sockmap: Fix return codes from tcp_bpf_recvmsg_parser()
Hou Tao <[email protected]>
bpf, arm64: Use emit_addr_mov_i64() for BPF_PSEUDO_FUNC
Xin Xiong <[email protected]>
netfilter: ipt_CLUSTERIP: fix refcount leak in clusterip_tg_check()
Vladimir Oltean <[email protected]>
net: dsa: fix incorrect function pointer check for MRP ring roles
Daniel Golle <[email protected]>
net: ethernet: mtk_eth_soc: fix return values and refactor MDIO ops
Raed Salem <[email protected]>
net/xfrm: IPsec tunnel mode fix inner_ipproto setting in sec_path
Jiasheng Jiang <[email protected]>
power: reset: mt6397: Check for null res pointer
Zhou Qingyang <[email protected]>
pcmcia: rsrc_nonstatic: Fix a NULL pointer dereference in nonstatic_find_mem_region()
Zhou Qingyang <[email protected]>
pcmcia: rsrc_nonstatic: Fix a NULL pointer dereference in __nonstatic_find_io_region()
Hans de Goede <[email protected]>
ACPI: scan: Create platform device for BCM4752 and LNV4752 ACPI nodes
José Expósito <[email protected]>
drm/amd/display: fix dereference before NULL check
Lad Prabhakar <[email protected]>
serial: 8250_bcm7271: Propagate error codes from brcmuart_probe()
Haimin Zhang <[email protected]>
bpf: Add missing map_get_next_key method to bloom filter map.
Pavel Begunkov <[email protected]>
io_uring: remove double poll on poll update
Zhang Zixun <[email protected]>
x86/mce/inject: Avoid out-of-bounds write when setting flags
Arseny Demidov <[email protected]>
hwmon: (mr75203) fix wrong power-up delay value
Marijn Suijten <[email protected]>
regulator: qcom-labibb: OCP interrupts are not a failure while disabled
Ming Lei <[email protected]>
block: null_blk: only set set->nr_maps as 3 if active poll_queues is > 0
Dan Carpenter <[email protected]>
crypto: octeontx2 - prevent underflow in get_cores_bmap()
Nathan Chancellor <[email protected]>
x86/boot/compressed: Move CLANG_FLAGS to beginning of KBUILD_CFLAGS
Panicker Harish <[email protected]>
Bluetooth: hci_qca: Stop IBS timer during BT OFF
Lorenzo Bianconi <[email protected]>
mt76: mt7921: fix a possible race enabling/disabling runtime-pm
Baochen Qiang <[email protected]>
ath11k: Fix unexpected return buffer manager error for QCA6390
Clément Léger <[email protected]>
software node: fix wrong node passed to find nargs_prop
Marijn Suijten <[email protected]>
backlight: qcom-wled: Respect enabled-strings in set_brightness
Marijn Suijten <[email protected]>
backlight: qcom-wled: Use cpu_to_le16 macro to perform conversion
Marijn Suijten <[email protected]>
backlight: qcom-wled: Override default length with qcom,enabled-strings
Marijn Suijten <[email protected]>
backlight: qcom-wled: Fix off-by-one maximum with default num_strings
Marijn Suijten <[email protected]>
backlight: qcom-wled: Pass number of elements to read to read_u32_array
Marijn Suijten <[email protected]>
backlight: qcom-wled: Validate enabled string indices in DT
Paul Chaignon <[email protected]>
bpftool: Enable line buffering for stdout
Luiz Augusto von Dentz <[email protected]>
Bluetooth: L2CAP: Fix using wrong mode
Johannes Berg <[email protected]>
um: virtio_uml: Fix time-travel external time propagation
Johannes Berg <[email protected]>
lib/logic_iomem: Fix operation on 32-bit
Johannes Berg <[email protected]>
lib/logic_iomem: Fix 32-bit build
Johannes Berg <[email protected]>
um: virt-pci: Fix 32-bit compile
Johannes Berg <[email protected]>
um: rename set_signals() to um_set_signals()
Johannes Berg <[email protected]>
um: fix ndelay/udelay defines
Bernard Zhao <[email protected]>
selinux: fix potential memleak in selinux_add_opt()
Christoph Hellwig <[email protected]>
block: fix error unwinding in device_add_disk
Sergey Shtylyov <[email protected]>
mmc: meson-mx-sdio: add IRQ check
Sergey Shtylyov <[email protected]>
mmc: meson-mx-sdhc: add IRQ check
Avraham Stern <[email protected]>
iwlwifi: mvm: set protected flag only for NDP ranging
Avraham Stern <[email protected]>
iwlwifi: mvm: perform 6GHz passive scan after suspend
Nathan Errera <[email protected]>
iwlwifi: mvm: test roc running status bits before removing the sta
Luca Coelho <[email protected]>
iwlwifi: don't pass actual WGDS revision number in table_revision
Johannes Berg <[email protected]>
iwlwifi: mvm: fix 32-bit build in FTM
Kai-Heng Feng <[email protected]>
rtw88: Disable PCIe ASPM while doing NAPI poll on 8821CE
Ping-Ke Shih <[email protected]>
rtw88: add quirk to disable pci caps on HP 250 G7 Notebook PC
Dan Carpenter <[email protected]>
wilc1000: fix double free error in probe()
Sean Wang <[email protected]>
mt76: mt7921s: fix suspend error with enlarging mcu timeout value
Lorenzo Bianconi <[email protected]>
mt76: connac: introduce MCU_UNI_CMD macro
Lorenzo Bianconi <[email protected]>
mt76: connac: remove MCU_FW_PREFIX bit
Lorenzo Bianconi <[email protected]>
mt76: connac: align MCU_EXT definitions with 7915 driver
Lorenzo Bianconi <[email protected]>
mt76: connac: introduce MCU_EXT macros
Sean Wang <[email protected]>
mt76: mt7921: fix possible resume failure
Lorenzo Bianconi <[email protected]>
mt76: connac: fix last_chan configuration in mt76_connac_mcu_rate_txpower_band
Sean Wang <[email protected]>
mt76: mt7921s: fix possible kernel crash due to invalid Rx count
Shayne Chen <[email protected]>
mt76: mt7921: use correct iftype data on 6GHz cap init
Sean Wang <[email protected]>
mt76: mt7921s: fix the device cannot sleep deeply in suspend
Sean Wang <[email protected]>
mt76: mt7921: move mt76_connac_mcu_set_hif_suspend to bus-related files
Lorenzo Bianconi <[email protected]>
mt76: mt7921: fix possible NULL pointer dereference in mt7921_mac_write_txwi
Lorenzo Bianconi <[email protected]>
mt76: fix possible OOB issue in mt76_calculate_default_rate
Lorenzo Bianconi <[email protected]>
mt76: debugfs: fix queue reporting for mt76-usb
Sean Wang <[email protected]>
mt76: mt7921: fix MT7921E reset failure
Sean Wang <[email protected]>
mt76: mt7921: drop offload_flags overwritten
Marek Behún <[email protected]>
ARM: dts: armada-38x: Add generic compatible to UART nodes
Robert Marko <[email protected]>
arm64: dts: marvell: cn9130: enable CP0 GPIO controllers
Robert Marko <[email protected]>
arm64: dts: marvell: cn9130: add GPIO and SPI aliases
Wei Yongjun <[email protected]>
usb: ftdi-elan: fix memory leak on device disconnect
Andre Przywara <[email protected]>
ARM: 9159/1: decompressor: Avoid UNPREDICTABLE NOP encoding
Antony Antony <[email protected]>
xfrm: state and policy should fail if XFRMA_IF_ID 0
Antony Antony <[email protected]>
xfrm: interface with if_id 0 should return error
Jernej Skrabec <[email protected]>
media: hantro: Fix probe func error path
Robin Murphy <[email protected]>
drm/tegra: vic: Fix DMA API misuse
Thierry Reding <[email protected]>
drm/tegra: gr2d: Explicitly control module reset
Arnd Bergmann <[email protected]>
gpu: host1x: select CONFIG_DMA_SHARED_BUFFER
Stephen Boyd <[email protected]>
drm/bridge: ti-sn65dsi86: Set max register for regmap
Dmitry Baryshkov <[email protected]>
drm/msm/dpu: fix safe status debugfs file
Baruch Siach <[email protected]>
arm64: dts: qcom: ipq6018: Fix gpio-ranges property
Srinivas Kandagatla <[email protected]>
arm64: dts: qcom: c630: Fix soundcard setup
Kurt Kanzenbach <[email protected]>
net: dsa: hellcreek: Add missing PTP via UDP rules
Kurt Kanzenbach <[email protected]>
net: dsa: hellcreek: Allow PTP P2P measurements on blocked ports
Kurt Kanzenbach <[email protected]>
net: dsa: hellcreek: Add STP forwarding rule
Kurt Kanzenbach <[email protected]>
net: dsa: hellcreek: Fix insertion of static FDB entries
Zhou Qingyang <[email protected]>
ath11k: Fix a NULL pointer dereference in ath11k_mac_op_hw_scan()
Jiasheng Jiang <[email protected]>
media: coda/imx-vdoa: Handle dma_set_coherent_mask error codes
Wang Hai <[email protected]>
media: msi001: fix possible null-ptr-deref in msi001_probe()
Anton Vasilyev <[email protected]>
media: dw2102: Fix use after free
Robin Murphy <[email protected]>
perf/arm-cmn: Fix CPU hotplug unregistration
Christian Lamparter <[email protected]>
ARM: dts: gemini: NAS4220-B: fis-index-block with 128 KiB sectors
Daniel Latypov <[email protected]>
kunit: tool: fix --json output for skipped tests
Hector Martin <[email protected]>
spi: Fix incorrect cs_setup delay handling
Rameshkumar Sundaram <[email protected]>
ath11k: Fix deleting uninitialized kernel timer during fragment cache flush
Alexei Starovoitov <[email protected]>
libbpf: Fix gen_loader assumption on number of programs.
Weili Qian <[email protected]>
crypto: hisilicon/qm - fix incorrect return value of hisi_qm_resume()
Herbert Xu <[email protected]>
crypto: stm32 - Revert broken pm_runtime_resume_and_get changes
Nicolas Toromanoff <[email protected]>
crypto: stm32/cryp - fix bugs and crash in tests
Nicolas Toromanoff <[email protected]>
crypto: stm32/cryp - fix lrw chaining mode
Nicolas Toromanoff <[email protected]>
crypto: stm32/cryp - fix double pm exit
Nicolas Toromanoff <[email protected]>
crypto: stm32/cryp - check early input data
Nicolas Toromanoff <[email protected]>
crypto: stm32/cryp - fix xts and race condition in crypto_engine requests
Nicolas Toromanoff <[email protected]>
crypto: stm32/cryp - fix CTR counter carry
Jakub Kicinski <[email protected]>
selftests: harness: avoid false negatives if test has no ASSERTs
Anders Roxell <[email protected]>
selftests: clone3: clone3: add case CLONE3_ARGS_NO_TEST
Shuyi Cheng <[email protected]>
libbpf: Add "bool skipped" to struct bpf_map
Kees Cook <[email protected]>
x86/uaccess: Move variable into switch case statement
Eric Dumazet <[email protected]>
xfrm: fix a small bug in xfrm_sa_len()
Brian Norris <[email protected]>
mwifiex: Fix possible ABBA deadlock
Dmitry Baryshkov <[email protected]>
drm/msm/dsi: fix initialization in the bonded DSI case
Loic Poulain <[email protected]>
wcn36xx: Fix max channels retrieval
Frederic Weisbecker <[email protected]>
rcu/exp: Mark current CPU as exp-QS in IPI loop second pass
Jackie Liu <[email protected]>
drm/msm/dp: displayPort driver need algorithm rational
Rob Clark <[email protected]>
drm/msm/gpu: Don't allow zero fence_id
Nicholas Kazlauskas <[email protected]>
drm/amd/display: Fix out of bounds access on DNC31 stream encoder regs
Wayne Lin <[email protected]>
drm/amd/display: Fix bug in debugfs crc_win_update entry
Mark Chen <[email protected]>
Bluetooth: btusb: Handle download_firmware failure cases
Luiz Augusto von Dentz <[email protected]>
Bluetooth: MGMT: Use hci_dev_test_and_{set,clear}_flag
Seevalamuthu Mariappan <[email protected]>
ath11k: Fix QMI file type enum value
Fabio Estevam <[email protected]>
ath10k: Fix the MTU size on QCA9377 SDIO
Tudor Ambarus <[email protected]>
mtd: spi-nor: Fix mtd size for s3an flashes
Tudor Ambarus <[email protected]>
mtd: spi-nor: Get rid of nor->page_size
Li Hua <[email protected]>
sched/rt: Try to restart rt period timer when rt runtime exceeded
Lv Yunlong <[email protected]>
wireless: iwlwifi: Fix a double free in iwl_txq_dyn_alloc_dma
Robert Schlabbach <[email protected]>
media: si2157: Fix "warm" tuner state detection
Zhou Qingyang <[email protected]>
media: saa7146: mxb: Fix a NULL pointer dereference in mxb_attach()
Zhou Qingyang <[email protected]>
media: dib8000: Fix a memleak in dib8000_init()
Ricardo Ribalda <[email protected]>
media: uvcvideo: Avoid returning invalid controls
Ricardo Ribalda <[email protected]>
media: uvcvideo: Avoid invalid memory access
Colin Ian King <[email protected]>
media: uvcvideo: Fix memory leak of object map on error exit path
Alexander Lobakin <[email protected]>
samples: bpf: Fix 'unknown warning group' build warning on Clang
Alexander Lobakin <[email protected]>
samples: bpf: Fix xdp_sample_user.o linking with Clang
Andrii Nakryiko <[email protected]>
samples/bpf: Clean up samples/bpf build failes
Hans de Goede <[email protected]>
platform/x86: wmi: Fix driver->notify() vs ->probe() race
Hans de Goede <[email protected]>
platform/x86: wmi: Replace read_takes_no_args with a flags field
Reiji Watanabe <[email protected]>
arm64: mte: DC {GVA,GZVA} shouldn't be used when DCZID_EL0.DZP == 1Reiji Watanabe <[email protected]>
arm64: clear_page() shouldn't use DC ZVA when DCZID_EL0.DZP == 1
Kieran Bingham <[email protected]>
drm: rcar-du: crtc: Support external DSI dot clock
Kieran Bingham <[email protected]>
drm: rcar-du: Add DSI support to rcar_du_output_name
Kajol Jain <[email protected]>
bpf: Remove config check to enable bpf support for branch records
Hou Tao <[email protected]>
bpf: Disallow BPF_LOG_KERNEL log level for bpf(BPF_BTF_LOAD)
Alexei Starovoitov <[email protected]>
bpf: Adjust BTF log size limit.
Vincent Donnefort <[email protected]>
sched/fair: Fix per-CPU kthread and wakee stacking for asym CPU capacity
Vincent Donnefort <[email protected]>
sched/fair: Fix detection of per-CPU kthreads waking a task
Maxim Mikityanskiy <[email protected]>
bpf: Fix the test_task_vma selftest to support output shorter than 1 kB
Sean Wang <[email protected]>
Bluetooth: btmtksdio: fix resume failure
Yang Yingliang <[email protected]>
staging: rtl8192e: rtllib_module: fix error handle case in alloc_rtllib()
Yang Yingliang <[email protected]>
staging: rtl8192e: return error code from rtllib_softmac_init()
Tasos Sahanidis <[email protected]>
floppy: Fix hang in watchdog when disk is ejected
Michael Walle <[email protected]>
mtd: core: provide unique name for nvmem device
Lino Sanfilippo <[email protected]>
serial: amba-pl011: do not request memory region twice
Lizhi Hou <[email protected]>
tty: serial: uartlite: allow 64 bit address
Nishanth Menon <[email protected]>
arm64: dts: ti: k3-j7200: Correct the d-cache-sets info
Nishanth Menon <[email protected]>
arm64: dts: ti: k3-j721e: Fix the L2 cache sets
Nishanth Menon <[email protected]>
arm64: dts: ti: k3-j7200: Fix the L2 cache sets
Nishanth Menon <[email protected]>
arm64: dts: ti: k3-am642: Fix the L2 cache sets
Gaurav Jain <[email protected]>
crypto: caam - save caam memory to support crypto engine retry mechanism.
Ming Lei <[email protected]>
null_blk: allow zero poll queues
Alexei Starovoitov <[email protected]>
libbpf: Clean gen_loader's attach kind.
Zhou Qingyang <[email protected]>
drm/radeon/radeon_kms: Fix a NULL pointer dereference in radeon_driver_open_kms()
Zhou Qingyang <[email protected]>
drm/amdgpu: Fix a NULL pointer dereference in amdgpu_connector_lcd_native_mode()
Paul Gerber <[email protected]>
thermal/drivers/imx8mm: Enable ADC when enabling monitor
Dan Carpenter <[email protected]>
pinctrl: mediatek: add a check for error in mtk_pinconf_bias_get_rsel()
Dan Carpenter <[email protected]>
pinctrl: mediatek: uninitialized variable in mtk_pctrl_show_one_pin()
Rafael J. Wysocki <[email protected]>
ACPI: EC: Rework flushing of EC work while suspended to idle
William Kucharski <[email protected]>
cgroup: Trace event cgroup id fields should be u64
Zack Rusin <[email protected]>
drm/vmwgfx: Fail to initialize on broken configs
Zack Rusin <[email protected]>
drm/vmwgfx: Remove the deprecated lower mem limit
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: msm8916: fix MMC controller aliases
Jun Miao <[email protected]>
rcu: Avoid alloc_pages() when recording stack
Mark Rutland <[email protected]>
powerpc: Avoid discarding flags in system_call_exception()
Florian Westphal <[email protected]>
netfilter: bridge: add support for pppoe filtering
Jesper Dangaard Brouer <[email protected]>
igc: AF_XDP zero-copy metadata adjust breaks SKBs on XDP_PASS
Oleksij Rempel <[email protected]>
thermal/drivers/imx: Implement runtime PM support
Yang Yingliang <[email protected]>
net: lantiq: fix missing free_netdev() on error in ltq_etop_probe()
Bhupesh Sharma <[email protected]>
net: stmmac: Add platform level debug register dump feature
Christophe JAILLET <[email protected]>
media: venus: core: Fix a resource leak in the error handling path of 'venus_probe()'
Christophe JAILLET <[email protected]>
media: venus: core: Fix a potential NULL pointer dereference in an error handling path
Mansur Alisha Shaik <[email protected]>
media: venus: correct low power frequency calculation for encoder
Philipp Zabel <[email protected]>
media: coda: fix CODA960 JPEG encoder buffer overflow
Chen-Yu Tsai <[email protected]>
media: hantro: Hook up RK3399 JPEG encoder output
Dafna Hirschfeld <[email protected]>
media: mtk-vcodec: call v4l2_m2m_ctx_release first when file is released
Christophe JAILLET <[email protected]>
media: mtk-vcodec: Fix an error handling path in 'mtk_vcodec_probe()'
Yang Yingliang <[email protected]>
media: si470x-i2c: fix possible memory leak in si470x_i2c_probe()
Fabio Estevam <[email protected]>
media: imx-pxp: Initialize the spinlock prior to using it
Suresh Udipi <[email protected]>
media: rcar-csi2: Correct the selection of hsfreqrange
Hans de Goede <[email protected]>
media: i2c: ov8865: Fix lockdep error
Daniel Scally <[email protected]>
media: i2c: Re-order runtime pm initialisation
Eugen Hristev <[email protected]>
media: i2c: imx274: fix s_frame_interval runtime resume not requested
Alan Maguire <[email protected]>
libbpf: Silence uninitialized warning/error in btf_dump_dump_type_data
Jan Kara <[email protected]>
bfq: Do not let waker requests skip proper accounting
Claudiu Beznea <[email protected]>
mfd: atmel-flexcom: Use .resume_noirq
Claudiu Beznea <[email protected]>
mfd: atmel-flexcom: Remove #ifdef CONFIG_PM_SLEEP
Alvin Šipraga <[email protected]>
net: dsa: rtl8365mb: set RGMII RX delay in steps of 0.3 ns
Joey Gouly <[email protected]>
pinctrl: apple: return an error if pinmux is missing in the DT
Tudor Ambarus <[email protected]>
tty: serial: atmel: Call dma_async_issue_pending()
Tudor Ambarus <[email protected]>
tty: serial: atmel: Check return code of dmaengine_submit()
Peng Fan <[email protected]>
arm64: dts: ti: k3-j721e: correct cache-sets info
Anilkumar Kolli <[email protected]>
ath11k: Use host CE parameters for CE interrupts configuration
Giovanni Cabiddu <[email protected]>
crypto: qat - fix undetected PFVF timeout in ACK loop
Andrii Nakryiko <[email protected]>
libbpf: Fix using invalidated memory in bpf_linker
Andrii Nakryiko <[email protected]>
libbpf: Fix glob_syms memory leak in bpf_linker
Andrii Nakryiko <[email protected]>
libbpf: Fix potential misaligned memory access in btf_ext__new()
Andrii Nakryiko <[email protected]>
tools/resolve_btf_ids: Close ELF file on error
Andrii Nakryiko <[email protected]>
libbpf: Load global data maps lazily on legacy kernels
Dillon Min <[email protected]>
ARM: dts: stm32: fix dtbs_check warning on ili9341 dts binding on stm32f429 disco
Vladimir Zapolskiy <[email protected]>
cpufreq: qcom-hw: Fix probable nested interrupt handling
Adam Ford <[email protected]>
soc: imx: gpcv2: keep i.MX8MM VPU-H1 bus clock active
Lukasz Luba <[email protected]>
cpufreq: qcom-cpufreq-hw: Update offline CPUs per-cpu thermal pressure
George G. Davis <[email protected]>
mtd: hyperbus: rpc-if: fix bug in rpcif_hb_remove
Prasad Malisetty <[email protected]>
arm64: dts: qcom: sc7280: Fix 'interrupt-map' parent address cells
Prasad Malisetty <[email protected]>
arm64: dts: qcom: sc7280: Fix incorrect clock name
Chengfeng Ye <[email protected]>
crypto: qce - fix uaf on qce_skcipher_register_one
Chengfeng Ye <[email protected]>
crypto: qce - fix uaf on qce_ahash_register_one
Chengfeng Ye <[email protected]>
crypto: qce - fix uaf on qce_aead_register_one
Wei Yongjun <[email protected]>
crypto: keembay-ocs-ecc - Fix error return code in kmb_ocs_ecc_probe()
Tudor Ambarus <[email protected]>
crypto: atmel-aes - Reestablish the correct tfm context at dequeue
Wang Hai <[email protected]>
media: dmxdev: fix UAF when dvb_register_device() fails
Biju Das <[email protected]>
arm64: dts: renesas: cat875: Add rx/tx delays
Seevalamuthu Mariappan <[email protected]>
ath11k: add hw_param for wakeup_mhi
P Praneesh <[email protected]>
ath11k: allocate dst ring descriptors from cacheable memory
Wen Gong <[email protected]>
ath11k: set correct NL80211_FEATURE_DYNAMIC_SMPS for WCN6855
Dan Carpenter <[email protected]>
drm/vboxvideo: fix a NULL vs IS_ERR() check
Jeremy Kerr <[email protected]>
mctp/test: Update refcount checking in route fragment tests
Tirthendu Sarkar <[email protected]>
selftests/bpf: Fix xdpxceiver failures for no hugepages
Lyude Paul <[email protected]>
drm/dp: Don't read back backlight mode in drm_edp_backlight_enable()
Alexander Aring <[email protected]>
fs: dlm: fix build with CONFIG_IPV6 disabled
Sebastian Andrzej Siewior <[email protected]>
kernel/locking: Use a pointer in ww_mutex_trylock().
Jens Wiklander <[email protected]>
tee: fix put order in teedev_close_context()
oujiefeng <[email protected]>
spi: hisi-kunpeng: Fix the debugfs directory name incorrect
Karthikeyan Kathirvel <[email protected]>
ath11k: reset RSN/WPA present state for open BSS
Karthikeyan Kathirvel <[email protected]>
ath11k: clear the keys properly via DISABLE_KEY
Sven Eckelmann <[email protected]>
ath11k: Fix ETSI regd with weather radar overlap
Jackie Liu <[email protected]>
Bluetooth: fix uninitialized variables notify_evt
Pavel Skripkin <[email protected]>
Bluetooth: stop proccessing malicious adv data
Lad Prabhakar <[email protected]>
memory: renesas-rpc-if: Return error in case devm_ioremap_resource() fails
Alexander Aring <[email protected]>
fs: dlm: don't call kernel_getpeername() in error_report()
Christian Hewitt <[email protected]>
arm64: dts: meson-gxbb-wetek: fix missing GPIO binding
Christian Hewitt <[email protected]>
arm64: dts: meson-gxbb-wetek: fix HDMI in early boot
Alexander Stein <[email protected]>
arm64: dts: amlogic: Fix SPI NOR flash node name for ODROID N2/N2+
Alexander Stein <[email protected]>
arm64: dts: amlogic: meson-g12: Fix GPU operating point table node name
Jammy Huang <[email protected]>
media: aspeed: Update signal status immediately to ensure sane hw state
Dongliang Mu <[email protected]>
media: em28xx: fix memory leak in em28xx_init_dev
Jammy Huang <[email protected]>
media: aspeed: fix mode-detect always time out at 2nd run
Dan Carpenter <[email protected]>
media: atomisp: fix uninitialized bug in gmin_get_pmic_id_and_addr()
Mauro Carvalho Chehab <[email protected]>
media: atomisp: fix enum formats logic
Tsuchiya Yuto <[email protected]>
media: atomisp: add NULL check for asd obtained from atomisp_video_pipe
Tsuchiya Yuto <[email protected]>
media: atomisp: fix ifdefs in sh_css.c
Tsuchiya Yuto <[email protected]>
media: atomisp: fix inverted error check for ia_css_mipi_is_source_port_valid()
Tsuchiya Yuto <[email protected]>
media: atomisp: do not use err var when checking port validity for ISP2400
Tsuchiya Yuto <[email protected]>
media: atomisp: fix inverted logic in buffers_needed()
Tsuchiya Yuto <[email protected]>
media: atomisp: fix punit_ddr_dvfs_enable() argument for mrfld_power up case
Tsuchiya Yuto <[email protected]>
media: atomisp: add missing media_device_cleanup() in atomisp_unregister_entities()
Dan Carpenter <[email protected]>
media: ipu3-cio2: fix error code in cio2_bridge_connect_sensor()
Dillon Min <[email protected]>
media: videobuf2: Fix the size printk format
Lad Prabhakar <[email protected]>
mtd: hyperbus: rpc-if: Check return value of rpcif_sw_init()
Quentin Monnet <[email protected]>
bpftool: Fix memory leak in prog_dump()
Rameshkumar Sundaram <[email protected]>
ath11k: Send PPDU_STATS_CFG with proper pdev mask to firmware
Benjamin Li <[email protected]>
wcn36xx: fix RX BD rate mapping for 5GHz legacy rates
Benjamin Li <[email protected]>
wcn36xx: populate band before determining rate on RX
Bryan O'Donoghue <[email protected]>
wcn36xx: Put DXE block into reset before freeing memory
Bryan O'Donoghue <[email protected]>
wcn36xx: Release DMA channel descriptor allocations
Bryan O'Donoghue <[email protected]>
wcn36xx: Fix DMA channel enable/disable cycle
Andrii Nakryiko <[email protected]>
libbpf: Free up resources used by inner map definition
Andrii Nakryiko <[email protected]>
libbpf: Fix non-C89 loop variable declaration in gen_loader.c
Maxime Ripard <[email protected]>
drm/vc4: hdmi: Enable the scrambler on reconnection
Andrii Nakryiko <[email protected]>
libbpf: Fix section counting logic
Bryan O'Donoghue <[email protected]>
wcn36xx: Indicate beacon not connection loss on MISSED_BEACON_IND
Benjamin Li <[email protected]>
wcn36xx: ensure pairing of init_scan/finish_scan and start_scan/end_scan
Colin Ian King <[email protected]>
drm/virtio: fix another potential integer overflow on shift of a int
Colin Ian King <[email protected]>
drm/virtio: fix potential integer overflow on shift of a int
Maxime Ripard <[email protected]>
drm/bridge: sn65dsi83: Fix bridge removal
Maxime Ripard <[email protected]>
drm/vc4: crtc: Make sure the HDMI controller is powered when disabling
Maxime Ripard <[email protected]>
drm/vc4: hdmi: Rework the pre_crtc_configure error handling
Maxime Ripard <[email protected]>
drm/vc4: hdmi: Make sure the controller is powered up during bind
Maxime Ripard <[email protected]>
drm/vc4: hdmi: Make sure the controller is powered in detect
Maxime Ripard <[email protected]>
drm/vc4: hdmi: Move the HSM clock enable to runtime_pm
Maxime Ripard <[email protected]>
drm/vc4: hdmi: Set a default HSM rate
Maxime Ripard <[email protected]>
clk: bcm-2835: Remove rounding up the dividers
Maxime Ripard <[email protected]>
clk: bcm-2835: Pick the closest clock rate
Wang Hai <[email protected]>
Bluetooth: cmtp: fix possible panic when cmtp_init_sockets() fails
Soenke Huster <[email protected]>
Bluetooth: virtio_bt: fix memory leak in virtbt_rx_handle()
Brian Norris <[email protected]>
drm/rockchip: dsi: Disable PLL clock on bind error
Brian Norris <[email protected]>
drm/rockchip: dsi: Fix unbalanced clock on probe error
Brian Norris <[email protected]>
drm/panel: innolux-p079zca: Delete panel on attach() failure
Brian Norris <[email protected]>
drm/panel: kingdisplay-kd097d04: Delete panel on attach() failure
Wang Hai <[email protected]>
drm: fix null-ptr-deref in drm_dev_init_release()
Dan Carpenter <[email protected]>
drm/bridge: display-connector: fix an uninitialized pointer in probe()
Luiz Augusto von Dentz <[email protected]>
Bluetooth: L2CAP: Fix not initializing sk_peer_pid
Tedd Ho-Jeong An <[email protected]>
Bluetooth: mgmt: Fix Experimental Feature Changed event
Tedd Ho-Jeong An <[email protected]>
Bluetooth: hci_vhci: Fix to set the force_wakeup value
xinhui pan <[email protected]>
drm/ttm: Put BO in its memory manager's lru list
Brian Norris <[email protected]>
drm/rockchip: dsi: Reconfigure hardware on resume()
Brian Norris <[email protected]>
drm/rockchip: dsi: Hold pm-runtime across bind/unbind
Gang Li <[email protected]>
shmem: fix a race between shmem_unused_huge_shrink and shmem_evict_inode
Wen Gong <[email protected]>
ath11k: add string type to search board data in board-2.bin for WCN6855
Baoquan He <[email protected]>
mm/page_alloc.c: do not warn allocation failure on zone DMA if no managed pages
Baoquan He <[email protected]>
dma/pool: create dma atomic pool only if dma zone has managed pages
Baoquan He <[email protected]>
mm_zone: add function to check if managed dma zone exists
Yifeng Li <[email protected]>
PCI: Add function 1 DMA alias quirk for Marvell 88SE9125 SATA controller
Thomas Hellström <[email protected]>
dma_fence_array: Fix PENDING_ERROR leak in dma_fence_array_signaled()
Peng Hao <[email protected]>
virtio/virtio_mem: handle a possible NULL as a memcpy parameter
Hao Xu <[email protected]>
io_uring: fix no lock protection for ctx->cq_extra
Dmitry Osipenko <[email protected]>
drm/tegra: Add back arm_iommu_detach_device()
Dmitry Osipenko <[email protected]>
gpu: host1x: Add back arm_iommu_detach_device()
Yunfei Wang <[email protected]>
iommu/io-pgtable-arm-v7s: Add error handle for page table allocation failure
Hari Prasath <[email protected]>
ARM: dts: at91: update alternate function of signal PD20
D Scott Phillips <[email protected]>
arm64: errata: Fix exec handling in erratum 1418040 workaround
Sumeet Pawnikar <[email protected]>
thermal/drivers/int340x: Fix RFIM mailbox write commands
Dan Williams <[email protected]>
cxl/pmem: Fix module reload vs workqueue state
Dan Williams <[email protected]>
cxl/pmem: Fix reference counting for delayed work
Manivannan Sadhasivam <[email protected]>
bus: mhi: core: Fix race while handling SYS_ERR at power up
Bhaumik Bhatt <[email protected]>
bus: mhi: core: Fix reading wake_capable channel configuration
Loic Poulain <[email protected]>
bus: mhi: pci_generic: Graceful shutdown on freeze
Christophe Leroy <[email protected]>
lkdtm: Fix content of section containing lkdtm_rodata_do_nothing()
Jonathan Cameron <[email protected]>
iio: trigger: Fix a scheduling whilst atomic issue seen on tsc2046
Jonathan Cameron <[email protected]>
iio: adc: ti-adc081c: Partial revert of removal of ACPI IDs
Alexander Usyskin <[email protected]>
mei: hbm: fix client dma reply status
Johan Hovold <[email protected]>
can: softing_cs: softingcs_probe(): fix memleak on registration failure
Hans Verkuil <[email protected]>
media: cec-pin: fix interrupt en/disable handling
Johan Hovold <[email protected]>
media: stk1160: fix control-message timeouts
Johan Hovold <[email protected]>
media: pvrusb2: fix control-message timeouts
Johan Hovold <[email protected]>
media: redrat3: fix control-message timeouts
Michael Kuron <[email protected]>
media: dib0700: fix undefined behavior in tuner shutdown
Johan Hovold <[email protected]>
media: s2255: fix control-message timeouts
Johan Hovold <[email protected]>
media: cpia2: fix control-message timeouts
Johan Hovold <[email protected]>
media: em28xx: fix control-message timeouts
Johan Hovold <[email protected]>
media: mceusb: fix control-message timeouts
Johan Hovold <[email protected]>
media: flexcop-usb: fix control-message timeouts
Hans Verkuil <[email protected]>
media: v4l2-ioctl.c: readbuffers depends on V4L2_CAP_READWRITE
Sakari Ailus <[email protected]>
media: ov8865: Disable only enabled regulators on error path
Hans Verkuil <[email protected]>
media: cec: fix a deadlock situation
Namjae Jeon <[email protected]>
ksmbd: add reserved room in ipc request/response
Namjae Jeon <[email protected]>
ksmbd: limits exceeding the maximum allowable outstanding requests
Namjae Jeon <[email protected]>
ksmbd: move credit charge deduction under processing request
Namjae Jeon <[email protected]>
ksmbd: add support for smb2 max credit parameter
Namjae Jeon <[email protected]>
ksmbd: fix guest connection failure with nautilus
Dan Carpenter <[email protected]>
ksmbd: uninitialized variable in create_socket()
Mohammad Athari Bin Ismail <[email protected]>
net: phy: marvell: add Marvell specific PHY loopback
Mateusz Jończyk <[email protected]>
rtc: cmos: take rtc_lock while reading from CMOS
Willy Tarreau <[email protected]>
tools/nolibc: fix incorrect truncation of exit code
Willy Tarreau <[email protected]>
tools/nolibc: i386: fix initial stack alignment
Jakub Kicinski <[email protected]>
crypto: x86/aesni - don't require alignment of data
Ammar Faizi <[email protected]>
tools/nolibc: x86-64: Fix startup code bug
Lucas De Marchi <[email protected]>
x86/gpu: Reserve stolen memory for first integrated Intel GPU
Jisheng Zhang <[email protected]>
riscv: mm: fix wrong phys_ram_base value for RV64
Nick Kossifidis <[email protected]>
riscv: use hart id instead of cpu id on machine_kexec
Nick Kossifidis <[email protected]>
riscv: Don't use va_pa_offset on kdump
Nick Kossifidis <[email protected]>
riscv: try to allocate crashkern region from 32bit addressible memory
Sean Christopherson <[email protected]>
RISC-V: Use common riscv_cpuid_to_hartid_mask() for both SMP=y and SMP=n
Alexandre Ghiti <[email protected]>
riscv: Get rid of MAXPHYSMEM configs
Paul Cercueil <[email protected]>
mtd: rawnand: ingenic: JZ4740 needs 'oob_first' read page function
Paul Cercueil <[email protected]>
mtd: rawnand: Export nand_read_page_hwecc_oob_first()
Paul Cercueil <[email protected]>
mtd: rawnand: davinci: Rewrite function description
Paul Cercueil <[email protected]>
mtd: rawnand: davinci: Avoid duplicated page read
Paul Cercueil <[email protected]>
mtd: rawnand: davinci: Don't calculate ECC when reading page
Andreas Oetken <[email protected]>
mtd: Fixed breaking list in __mtd_del_partition.
Stefan Riedmueller <[email protected]>
mtd: rawnand: gpmi: Remove explicit default gpmi clock setting for i.MX6
Christian Eggers <[email protected]>
mtd: rawnand: gpmi: Add ERR007117 protection for nfc_apply_timings
Krzysztof Kozlowski <[email protected]>
nfc: llcp: fix NULL error pointer dereference on sendmsg() after failed bind()
Jaegeuk Kim <[email protected]>
f2fs: avoid EINVAL by SBI_NEED_FSCK when pinning a file
Chao Yu <[email protected]>
f2fs: fix to do sanity check on last xattr entry in __f2fs_setxattr()
Chao Yu <[email protected]>
f2fs: fix to do sanity check in is_alive()
Chao Yu <[email protected]>
f2fs: fix to do sanity check on inode type during garbage collection
Shyam Prasad N <[email protected]>
cifs: free ntlmsspblob allocated in negotiate
Takashi Iwai <[email protected]>
ALSA: core: Fix SSID quirk lookup for subvendor=0
Jason Gerecke <[email protected]>
HID: wacom: Avoid using stale array indicies to read contact count
Jason Gerecke <[email protected]>
HID: wacom: Ignore the confidence flag when a touch is removed
Jason Gerecke <[email protected]>
HID: wacom: Reset expected and received contact counts at the same time
Jann Horn <[email protected]>
HID: uhid: Fix worker destroying device without any protection
Karl Kurbjun <[email protected]>
HID: Ignore battery for Elan touchscreen on HP Envy X360 15t-dr100
Marcelo Tosatti <[email protected]>
KVM: VMX: switch blocked_vcpu_on_cpu_lock to raw spinlock
David Matlack <[email protected]>
KVM: x86/mmu: Fix write-protection of PTs mapped by the TDP MMU
-------------
Diffstat:
Documentation/admin-guide/cifs/usage.rst | 7 +-
Documentation/admin-guide/devices.txt | 8 +-
Documentation/admin-guide/hw-vuln/spectre.rst | 2 +-
.../bindings/display/amlogic,meson-dw-hdmi.yaml | 5 +
.../bindings/display/amlogic,meson-vpu.yaml | 6 +
.../devicetree/bindings/input/hid-over-i2c.txt | 2 +
.../devicetree/bindings/thermal/thermal-zones.yaml | 9 +-
.../devicetree/bindings/watchdog/samsung-wdt.yaml | 5 +-
Documentation/driver-api/dmaengine/dmatest.rst | 7 +-
Documentation/driver-api/firewire.rst | 4 +-
.../acpi/dsd/data-node-references.rst | 10 +-
Documentation/trace/coresight/coresight-config.rst | 16 +-
Makefile | 4 +-
arch/arm/Kconfig.debug | 14 +-
arch/arm/boot/compressed/efi-header.S | 22 +-
arch/arm/boot/compressed/head.S | 3 +-
arch/arm/boot/dts/armada-38x.dtsi | 4 +-
arch/arm/boot/dts/gemini-nas4220b.dts | 2 +-
arch/arm/boot/dts/omap3-n900.dts | 50 +-
arch/arm/boot/dts/qcom-sdx55.dtsi | 6 +-
arch/arm/boot/dts/sama7g5-pinfunc.h | 2 +-
arch/arm/boot/dts/stm32f429-disco.dts | 2 +-
arch/arm/configs/cm_x300_defconfig | 1 -
arch/arm/configs/ezx_defconfig | 1 -
arch/arm/configs/imote2_defconfig | 1 -
arch/arm/configs/nhk8815_defconfig | 1 -
arch/arm/configs/pxa_defconfig | 1 -
arch/arm/configs/spear13xx_defconfig | 1 -
arch/arm/configs/spear3xx_defconfig | 1 -
arch/arm/configs/spear6xx_defconfig | 1 -
arch/arm/include/debug/imx-uart.h | 18 +-
arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c | 5 +-
arch/arm/net/bpf_jit_32.c | 5 +-
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 2 +-
.../boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 2 +-
arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi | 3 +
arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts | 14 +-
arch/arm64/boot/dts/marvell/cn9130.dtsi | 15 +
arch/arm64/boot/dts/nvidia/tegra186.dtsi | 2 +-
arch/arm64/boot/dts/nvidia/tegra194.dtsi | 5 +-
arch/arm64/boot/dts/qcom/ipq6018.dtsi | 2 +-
arch/arm64/boot/dts/qcom/msm8916.dtsi | 4 +-
arch/arm64/boot/dts/qcom/msm8996.dtsi | 3 -
arch/arm64/boot/dts/qcom/sc7280.dtsi | 10 +-
.../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 27 +
arch/arm64/boot/dts/qcom/sm6350.dtsi | 4 +-
arch/arm64/boot/dts/qcom/sm8350.dtsi | 6 +-
arch/arm64/boot/dts/renesas/cat875.dtsi | 1 +
arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 6 +-
arch/arm64/boot/dts/renesas/r8a774b1.dtsi | 6 +-
arch/arm64/boot/dts/renesas/r8a774e1.dtsi | 6 +-
arch/arm64/boot/dts/renesas/r8a77951.dtsi | 6 +-
arch/arm64/boot/dts/renesas/r8a77960.dtsi | 6 +-
arch/arm64/boot/dts/renesas/r8a77961.dtsi | 6 +-
arch/arm64/boot/dts/renesas/r8a77965.dtsi | 6 +-
arch/arm64/boot/dts/renesas/r8a77980.dtsi | 4 +-
arch/arm64/boot/dts/renesas/r8a779a0.dtsi | 10 +-
.../boot/dts/rockchip/rk3399-rock-pi-4b-plus.dts | 7 +-
arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4b.dts | 7 +-
arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4c.dts | 7 +-
arch/arm64/boot/dts/ti/k3-am642.dtsi | 2 +-
arch/arm64/boot/dts/ti/k3-j7200-main.dtsi | 2 +-
arch/arm64/boot/dts/ti/k3-j7200.dtsi | 6 +-
arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 2 +-
arch/arm64/boot/dts/ti/k3-j721e.dtsi | 6 +-
arch/arm64/include/asm/extable.h | 9 -
arch/arm64/include/asm/memory.h | 5 +-
arch/arm64/include/asm/mte-kasan.h | 8 +-
arch/arm64/kernel/module.c | 4 +-
arch/arm64/kernel/process.c | 39 +-
arch/arm64/kernel/traps.c | 2 +-
arch/arm64/lib/clear_page.S | 10 +
arch/arm64/lib/mte.S | 8 +-
arch/arm64/mm/ptdump.c | 2 -
arch/arm64/net/bpf_jit_comp.c | 17 +-
arch/mips/Kconfig | 6 +-
arch/mips/bcm63xx/clk.c | 6 +
arch/mips/boot/compressed/Makefile | 2 +-
arch/mips/boot/compressed/clz_ctz.c | 2 +
arch/mips/cavium-octeon/octeon-platform.c | 2 +
arch/mips/cavium-octeon/octeon-usb.c | 1 +
arch/mips/configs/fuloong2e_defconfig | 1 -
arch/mips/configs/malta_qemu_32r6_defconfig | 1 -
arch/mips/configs/maltaaprp_defconfig | 1 -
arch/mips/configs/maltasmvp_defconfig | 1 -
arch/mips/configs/maltasmvp_eva_defconfig | 1 -
arch/mips/configs/maltaup_defconfig | 1 -
arch/mips/include/asm/local.h | 9 +-
.../asm/mach-loongson64/kernel-entry-init.h | 4 +-
arch/mips/include/asm/octeon/cvmx-bootinfo.h | 4 +-
arch/mips/lantiq/clk.c | 6 +
arch/mips/net/bpf_jit_comp32.c | 3 +-
arch/mips/net/bpf_jit_comp64.c | 2 +-
arch/openrisc/include/asm/syscalls.h | 2 +
arch/openrisc/kernel/entry.S | 5 +
arch/parisc/include/asm/special_insns.h | 44 +-
arch/parisc/kernel/traps.c | 2 +-
arch/powerpc/boot/dts/fsl/qoriq-fman3l-0.dtsi | 2 +
arch/powerpc/configs/ppc6xx_defconfig | 1 -
arch/powerpc/configs/pseries_defconfig | 1 -
arch/powerpc/include/asm/hw_irq.h | 40 +
arch/powerpc/kernel/btext.c | 4 +-
arch/powerpc/kernel/fadump.c | 8 +
arch/powerpc/kernel/head_40x.S | 9 +-
arch/powerpc/kernel/interrupt.c | 2 +-
arch/powerpc/kernel/interrupt_64.S | 10 +-
arch/powerpc/kernel/module.c | 11 +-
arch/powerpc/kernel/prom_init.c | 2 +-
arch/powerpc/kernel/smp.c | 42 +
arch/powerpc/kernel/watchdog.c | 41 +-
arch/powerpc/kvm/book3s_hv.c | 8 +-
arch/powerpc/kvm/book3s_hv_nested.c | 2 +-
arch/powerpc/mm/book3s64/radix_pgtable.c | 4 +-
arch/powerpc/mm/kasan/book3s_32.c | 3 +-
arch/powerpc/mm/pgtable_64.c | 14 +-
arch/powerpc/net/bpf_jit_comp32.c | 4 +-
arch/powerpc/net/bpf_jit_comp64.c | 4 +-
arch/powerpc/perf/core-book3s.c | 58 +-
arch/powerpc/platforms/cell/iommu.c | 1 +
arch/powerpc/platforms/cell/pervasive.c | 1 +
arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 1 +
arch/powerpc/platforms/powermac/low_i2c.c | 3 +
arch/powerpc/platforms/powernv/opal-lpc.c | 1 +
arch/powerpc/sysdev/xive/spapr.c | 3 +
arch/riscv/Kconfig | 23 +-
arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi | 3 -
arch/riscv/configs/defconfig | 1 +
arch/riscv/configs/nommu_k210_defconfig | 2 -
arch/riscv/configs/nommu_k210_sdcard_defconfig | 2 -
arch/riscv/configs/nommu_virt_defconfig | 1 -
arch/riscv/configs/rv32_defconfig | 1 +
arch/riscv/include/asm/smp.h | 10 +-
arch/riscv/kernel/kexec_relocate.S | 20 +-
arch/riscv/kernel/machine_kexec.c | 3 +-
arch/riscv/kernel/setup.c | 10 +
arch/riscv/kernel/smp.c | 10 -
arch/riscv/kvm/main.c | 8 +
arch/riscv/mm/init.c | 19 +-
arch/riscv/net/bpf_jit_comp32.c | 6 +-
arch/riscv/net/bpf_jit_comp64.c | 7 +-
arch/s390/kernel/module.c | 5 +-
arch/s390/kvm/kvm-s390.c | 2 +-
arch/s390/mm/pgalloc.c | 4 +-
arch/s390/net/bpf_jit_comp.c | 6 +-
arch/sh/configs/titan_defconfig | 1 -
arch/sparc/net/bpf_jit_comp_64.c | 2 +-
arch/um/.gitignore | 1 +
arch/um/drivers/virt-pci.c | 8 +-
arch/um/drivers/virtio_uml.c | 4 +
arch/um/include/asm/delay.h | 4 +-
arch/um/include/asm/irqflags.h | 4 +-
arch/um/include/shared/longjmp.h | 2 +-
arch/um/include/shared/os.h | 4 +-
arch/um/include/shared/registers.h | 4 +-
arch/um/kernel/ksyms.c | 2 +-
arch/um/os-Linux/registers.c | 4 +-
arch/um/os-Linux/sigio.c | 6 +-
arch/um/os-Linux/signal.c | 8 +-
arch/um/os-Linux/start_up.c | 2 +-
arch/x86/boot/compressed/Makefile | 7 +-
arch/x86/configs/i386_defconfig | 1 +
arch/x86/configs/x86_64_defconfig | 1 +
arch/x86/crypto/aesni-intel_glue.c | 4 +-
arch/x86/hyperv/mmu.c | 19 +-
arch/x86/include/asm/realmode.h | 1 +
arch/x86/include/asm/topology.h | 2 +-
arch/x86/include/asm/uaccess.h | 5 +-
arch/x86/kernel/cpu/mce/core.c | 42 +-
arch/x86/kernel/cpu/mce/inject.c | 2 +-
arch/x86/kernel/cpu/mce/severity.c | 33 +-
arch/x86/kernel/early-quirks.c | 10 +-
arch/x86/kernel/module.c | 7 +-
arch/x86/kernel/reboot.c | 12 +-
arch/x86/kvm/cpuid.c | 90 +-
arch/x86/kvm/mmu/tdp_mmu.c | 6 +-
arch/x86/kvm/vmx/posted_intr.c | 25 +-
arch/x86/kvm/x86.c | 30 +-
arch/x86/net/bpf_jit_comp.c | 10 +-
arch/x86/net/bpf_jit_comp32.c | 4 +-
arch/x86/realmode/init.c | 26 +
arch/x86/um/syscalls_64.c | 3 +-
block/bfq-iosched.c | 44 +-
block/blk-flush.c | 4 +-
block/blk-mq-tag.c | 40 +-
block/blk-pm.c | 22 +-
block/genhd.c | 15 +-
block/mq-deadline.c | 4 +-
crypto/jitterentropy.c | 3 +-
drivers/acpi/acpica/exfield.c | 7 +-
drivers/acpi/acpica/exoparg1.c | 3 +-
drivers/acpi/acpica/hwesleep.c | 4 +-
drivers/acpi/acpica/hwsleep.c | 4 +-
drivers/acpi/acpica/hwxfsleep.c | 2 -
drivers/acpi/acpica/utdelete.c | 1 +
drivers/acpi/battery.c | 22 +
drivers/acpi/bus.c | 4 +-
drivers/acpi/cppc_acpi.c | 2 +-
drivers/acpi/ec.c | 57 +-
drivers/acpi/internal.h | 2 +
drivers/acpi/scan.c | 13 +-
drivers/acpi/x86/utils.c | 116 ++-
drivers/android/binder.c | 98 ++-
drivers/base/core.c | 3 +-
drivers/base/power/runtime.c | 41 +-
drivers/base/property.c | 4 +-
drivers/base/regmap/regmap.c | 1 +
drivers/base/swnode.c | 2 +-
drivers/block/floppy.c | 6 +-
drivers/block/null_blk/main.c | 8 +-
drivers/bluetooth/btintel.c | 26 +-
drivers/bluetooth/btmtksdio.c | 2 +
drivers/bluetooth/btusb.c | 5 +
drivers/bluetooth/hci_bcm.c | 7 +-
drivers/bluetooth/hci_qca.c | 9 +-
drivers/bluetooth/hci_vhci.c | 4 +
drivers/bluetooth/virtio_bt.c | 3 +
drivers/bus/mhi/core/init.c | 1 +
drivers/bus/mhi/core/pm.c | 35 +-
drivers/bus/mhi/pci_generic.c | 2 +-
drivers/char/mwave/3780i.h | 2 +-
drivers/char/random.c | 19 +-
drivers/char/tpm/tpm-chip.c | 18 +-
drivers/char/tpm/tpm_tis_core.c | 14 +-
drivers/clk/bcm/clk-bcm2835.c | 13 +-
drivers/clk/clk-bm1880.c | 20 +-
drivers/clk/clk-si5341.c | 2 +-
drivers/clk/clk-stm32f4.c | 4 -
drivers/clk/clk.c | 18 +
drivers/clk/imx/clk-imx8mn.c | 6 +-
drivers/clk/meson/gxbb.c | 44 +-
drivers/clk/qcom/gcc-sc7280.c | 2 +-
drivers/clk/renesas/rzg2l-cpg.c | 17 +-
drivers/clk/samsung/clk-exynos850.c | 70 +-
drivers/counter/104-quad-8.c | 82 +-
drivers/cpufreq/cpufreq.c | 4 +-
drivers/cpufreq/intel_pstate.c | 24 +-
drivers/cpufreq/qcom-cpufreq-hw.c | 7 +-
drivers/crypto/atmel-aes.c | 6 +-
drivers/crypto/caam/caamalg.c | 6 +
drivers/crypto/caam/caamalg_qi2.c | 2 +-
drivers/crypto/caam/caamhash.c | 3 +
drivers/crypto/caam/caampkc.c | 3 +
drivers/crypto/ccp/sev-dev.c | 30 +-
drivers/crypto/hisilicon/hpre/hpre_crypto.c | 2 +-
drivers/crypto/hisilicon/qm.c | 5 +-
drivers/crypto/keembay/keembay-ocs-ecc.c | 1 +
drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c | 9 +-
.../crypto/marvell/octeontx2/otx2_cptpf_ucode.c | 3 +-
drivers/crypto/omap-aes.c | 2 +-
drivers/crypto/qat/qat_common/adf_pf2vf_msg.c | 12 +-
drivers/crypto/qce/aead.c | 2 +-
drivers/crypto/qce/sha.c | 2 +-
drivers/crypto/qce/skcipher.c | 2 +-
drivers/crypto/stm32/stm32-crc32.c | 4 +-
drivers/crypto/stm32/stm32-cryp.c | 938 ++++++++-------------
drivers/crypto/stm32/stm32-hash.c | 6 +-
drivers/cxl/core/bus.c | 6 +-
drivers/cxl/core/pmem.c | 8 +-
drivers/cxl/cxl.h | 10 +-
drivers/cxl/pmem.c | 46 +-
drivers/dax/super.c | 6 +-
drivers/dma-buf/dma-fence-array.c | 6 +-
drivers/dma-buf/heaps/cma_heap.c | 6 +-
drivers/dma/at_xdmac.c | 57 +-
drivers/dma/idxd/device.c | 12 +-
drivers/dma/mmp_pdma.c | 6 -
drivers/dma/pxa_dma.c | 7 -
drivers/dma/stm32-mdma.c | 2 +-
drivers/dma/uniphier-xdmac.c | 5 +-
drivers/edac/synopsys_edac.c | 3 +-
drivers/firmware/efi/efi-init.c | 5 +
drivers/firmware/google/Kconfig | 6 +-
drivers/firmware/sysfb_simplefb.c | 8 +-
drivers/gpio/gpio-aspeed-sgpio.c | 32 +-
drivers/gpio/gpio-aspeed.c | 52 +-
drivers/gpio/gpio-idt3243x.c | 4 +-
drivers/gpio/gpio-mpc8xxx.c | 4 +-
drivers/gpio/gpiolib-acpi.c | 15 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 6 +
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 1 -
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 4 +
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 6 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 5 +-
drivers/gpu/drm/amd/amdgpu/cik.c | 4 +
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 4 +
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 13 +-
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 18 +-
drivers/gpu/drm/amd/amdgpu/vi.c | 4 +
drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 3 +
drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 138 ++-
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 46 +-
.../drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 5 +-
drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 3 +-
.../amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 11 +-
.../drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 11 +-
drivers/gpu/drm/amd/display/dc/core/dc.c | 3 +-
drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +
.../gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c | 3 +-
.../gpu/drm/amd/display/dc/dcn31/dcn31_resource.c | 3 +-
.../amd/display/dc/irq/dcn20/irq_service_dcn20.c | 25 -
.../amd/display/dc/irq/dcn20/irq_service_dcn20.h | 2 -
.../amd/display/dc/irq/dcn21/irq_service_dcn21.c | 25 -
.../amd/display/dc/irq/dcn21/irq_service_dcn21.h | 2 -
drivers/gpu/drm/amd/display/dc/irq/irq_service.c | 2 +-
drivers/gpu/drm/amd/display/dc/irq/irq_service.h | 4 -
drivers/gpu/drm/amd/pm/amdgpu_pm.c | 6 +
drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c | 14 +-
drivers/gpu/drm/bridge/display-connector.c | 2 +-
.../drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c | 40 +-
.../gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c | 10 +-
drivers/gpu/drm/bridge/synopsys/dw-hdmi-audio.h | 4 +-
.../gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c | 9 +-
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 12 +-
drivers/gpu/drm/bridge/ti-sn65dsi83.c | 2 +-
drivers/gpu/drm/bridge/ti-sn65dsi86.c | 1 +
drivers/gpu/drm/drm_atomic_helper.c | 2 +-
drivers/gpu/drm/drm_dp_helper.c | 40 +-
drivers/gpu/drm/drm_drv.c | 9 +-
drivers/gpu/drm/drm_gem_cma_helper.c | 17 +-
drivers/gpu/drm/drm_gem_shmem_helper.c | 17 +-
drivers/gpu/drm/drm_gem_vram_helper.c | 4 +-
drivers/gpu/drm/drm_panel_orientation_quirks.c | 6 +
drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 6 +
drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 1 +
drivers/gpu/drm/etnaviv/etnaviv_sched.c | 4 +-
drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c | 10 +-
drivers/gpu/drm/i915/gem/i915_gem_pages.c | 1 -
drivers/gpu/drm/i915/pxp/intel_pxp_tee.c | 5 +-
drivers/gpu/drm/lima/lima_device.c | 1 +
drivers/gpu/drm/lima/lima_gem.c | 2 +-
drivers/gpu/drm/msm/Kconfig | 1 +
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 4 +-
drivers/gpu/drm/msm/dsi/dsi.c | 10 +-
drivers/gpu/drm/msm/dsi/dsi.h | 1 -
drivers/gpu/drm/msm/dsi/dsi_manager.c | 17 -
drivers/gpu/drm/msm/msm_gem_submit.c | 2 +-
drivers/gpu/drm/nouveau/dispnv04/disp.c | 4 +-
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c | 37 +-
.../gpu/drm/panel/panel-feiyang-fy07024di26a30d.c | 8 +-
drivers/gpu/drm/panel/panel-innolux-p079zca.c | 10 +-
drivers/gpu/drm/panel/panel-jdi-lt070me05000.c | 8 +-
drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c | 8 +-
drivers/gpu/drm/panel/panel-novatek-nt36672a.c | 8 +-
.../gpu/drm/panel/panel-panasonic-vvx10f034n00.c | 8 +-
drivers/gpu/drm/panel/panel-ronbo-rb070d30.c | 8 +-
.../drm/panel/panel-samsung-s6e88a0-ams452ef01.c | 1 +
drivers/gpu/drm/panel/panel-samsung-sofef00.c | 1 +
drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c | 8 +-
drivers/gpu/drm/panfrost/panfrost_gem.c | 2 +-
drivers/gpu/drm/radeon/radeon_kms.c | 42 +-
drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 31 +-
drivers/gpu/drm/rcar-du/rcar_du_drv.c | 6 +-
drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 82 +-
drivers/gpu/drm/scheduler/sched_entity.c | 15 +-
drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c | 4 +-
drivers/gpu/drm/tegra/drm.c | 15 +
drivers/gpu/drm/tegra/gr2d.c | 33 +-
drivers/gpu/drm/tegra/submit.c | 4 +-
drivers/gpu/drm/tegra/vic.c | 7 +-
drivers/gpu/drm/ttm/ttm_bo.c | 2 +
drivers/gpu/drm/v3d/v3d_bo.c | 4 +-
drivers/gpu/drm/vboxvideo/vbox_main.c | 4 +-
drivers/gpu/drm/vc4/vc4_crtc.c | 31 +-
drivers/gpu/drm/vc4/vc4_drv.h | 29 +-
drivers/gpu/drm/vc4/vc4_hdmi.c | 136 ++-
drivers/gpu/drm/vc4/vc4_hvs.c | 26 +-
drivers/gpu/drm/vc4/vc4_kms.c | 3 +-
drivers/gpu/drm/vc4/vc4_txp.c | 4 +-
drivers/gpu/drm/vgem/vgem_drv.c | 2 +-
drivers/gpu/drm/virtio/virtgpu_ioctl.c | 4 +-
drivers/gpu/drm/virtio/virtgpu_object.c | 2 +-
drivers/gpu/drm/vmwgfx/Makefile | 3 +-
drivers/gpu/drm/vmwgfx/ttm_memory.c | 99 +--
drivers/gpu/drm/vmwgfx/ttm_memory.h | 6 +-
drivers/gpu/drm/vmwgfx/vmwgfx_cmd.c | 7 +
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 48 +-
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 20 +-
drivers/gpu/drm/vmwgfx/vmwgfx_mob.c | 12 +-
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 4 +-
drivers/gpu/drm/vmwgfx/vmwgfx_system_manager.c | 90 ++
drivers/gpu/drm/vmwgfx/vmwgfx_thp.c | 184 ----
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 58 +-
drivers/gpu/host1x/Kconfig | 1 +
drivers/gpu/host1x/dev.c | 15 +
drivers/hid/hid-apple.c | 2 +-
drivers/hid/hid-ids.h | 1 +
drivers/hid/hid-input.c | 8 +
drivers/hid/hid-magicmouse.c | 95 ++-
drivers/hid/hid-uclogic-params.c | 31 +-
drivers/hid/hid-vivaldi.c | 34 +-
drivers/hid/i2c-hid/i2c-hid-acpi.c | 2 +-
drivers/hid/i2c-hid/i2c-hid-core.c | 4 +-
drivers/hid/i2c-hid/i2c-hid-of-goodix.c | 2 +-
drivers/hid/i2c-hid/i2c-hid-of.c | 10 +-
drivers/hid/i2c-hid/i2c-hid.h | 2 +-
drivers/hid/uhid.c | 29 +-
drivers/hid/wacom_wac.c | 39 +-
drivers/hsi/hsi_core.c | 1 +
drivers/hwmon/mr75203.c | 2 +-
drivers/i2c/busses/i2c-designware-pcidrv.c | 8 +-
drivers/i2c/busses/i2c-i801.c | 15 +-
drivers/i2c/busses/i2c-mpc.c | 23 +-
drivers/i3c/master.c | 3 +-
drivers/i3c/master/dw-i3c-master.c | 4 +
drivers/i3c/master/mipi-i3c-hci/dat_v1.c | 4 +-
drivers/iio/adc/ti-adc081c.c | 22 +-
drivers/iio/chemical/sunrise_co2.c | 4 +-
drivers/iio/industrialio-trigger.c | 36 +-
drivers/infiniband/core/cma.c | 12 +-
drivers/infiniband/core/device.c | 3 +-
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 6 +-
drivers/infiniband/hw/bnxt_re/qplib_rcfw.h | 1 -
drivers/infiniband/hw/cxgb4/qp.c | 1 +
drivers/infiniband/hw/hns/hns_roce_main.c | 5 +-
drivers/infiniband/hw/qedr/verbs.c | 2 +
drivers/infiniband/sw/rxe/rxe_opcode.c | 2 +-
drivers/infiniband/ulp/rtrs/rtrs-clt.c | 2 +-
drivers/input/touchscreen/ti_am335x_tsc.c | 8 +-
drivers/interconnect/qcom/icc-rpm.c | 1 +
drivers/iommu/amd/amd_iommu_types.h | 2 -
drivers/iommu/amd/init.c | 107 +--
drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 2 +-
drivers/iommu/io-pgtable-arm-v7s.c | 6 +-
drivers/iommu/io-pgtable-arm.c | 9 +-
drivers/iommu/iommu.c | 3 +-
drivers/iommu/iova.c | 3 +-
drivers/irqchip/irq-gic-v3.c | 16 +
drivers/leds/leds-lp55xx-common.c | 4 +-
drivers/mailbox/imx-mailbox.c | 4 +-
drivers/mailbox/mailbox-mpfs.c | 2 +-
drivers/mailbox/mtk-cmdq-mailbox.c | 2 +-
drivers/mailbox/pcc.c | 10 +-
drivers/md/dm-linear.c | 2 +-
drivers/md/dm-log-writes.c | 2 +-
drivers/md/dm-stripe.c | 2 +-
drivers/md/dm-writecache.c | 2 +-
drivers/md/dm.c | 6 +-
drivers/md/md.c | 27 +-
drivers/md/md.h | 2 +
drivers/md/persistent-data/dm-btree.c | 8 +-
drivers/md/persistent-data/dm-space-map-common.c | 5 +
drivers/md/raid0.c | 38 +-
drivers/md/raid5.c | 41 +-
drivers/media/Kconfig | 8 +-
drivers/media/cec/core/cec-adap.c | 38 +-
drivers/media/cec/core/cec-api.c | 6 +
drivers/media/cec/core/cec-core.c | 3 +
drivers/media/cec/core/cec-pin.c | 31 +-
drivers/media/common/saa7146/saa7146_fops.c | 2 +-
.../media/common/videobuf2/videobuf2-dma-contig.c | 8 +-
drivers/media/dvb-core/dmxdev.c | 18 +-
drivers/media/dvb-frontends/dib8000.c | 4 +-
drivers/media/i2c/imx274.c | 5 +
drivers/media/i2c/ov8865.c | 16 +-
drivers/media/pci/b2c2/flexcop-pci.c | 3 +
drivers/media/pci/intel/ipu3/cio2-bridge.c | 4 +-
drivers/media/pci/saa7146/hexium_gemini.c | 7 +-
drivers/media/pci/saa7146/hexium_orion.c | 8 +-
drivers/media/pci/saa7146/mxb.c | 8 +-
drivers/media/platform/aspeed-video.c | 14 +-
drivers/media/platform/coda/coda-common.c | 8 +-
drivers/media/platform/coda/coda-jpeg.c | 21 +-
drivers/media/platform/coda/imx-vdoa.c | 6 +-
drivers/media/platform/imx-pxp.c | 4 +-
.../media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c | 2 +
.../media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 2 +-
drivers/media/platform/qcom/venus/core.c | 11 +-
drivers/media/platform/qcom/venus/pm_helpers.c | 32 +-
drivers/media/platform/rcar-vin/rcar-csi2.c | 18 +-
drivers/media/platform/rcar-vin/rcar-v4l2.c | 15 +-
.../media/platform/rockchip/rkisp1/rkisp1-dev.c | 2 +-
drivers/media/radio/si470x/radio-si470x-i2c.c | 3 +-
drivers/media/rc/igorplugusb.c | 4 +-
drivers/media/rc/mceusb.c | 8 +-
drivers/media/rc/redrat3.c | 22 +-
drivers/media/tuners/msi001.c | 7 +
drivers/media/tuners/si2157.c | 2 +-
drivers/media/usb/b2c2/flexcop-usb.c | 10 +-
drivers/media/usb/b2c2/flexcop-usb.h | 12 +-
drivers/media/usb/cpia2/cpia2_usb.c | 4 +-
drivers/media/usb/dvb-usb/dib0700_core.c | 2 -
drivers/media/usb/dvb-usb/dw2102.c | 338 +++++---
drivers/media/usb/dvb-usb/m920x.c | 12 +-
drivers/media/usb/em28xx/em28xx-cards.c | 18 +-
drivers/media/usb/em28xx/em28xx-core.c | 4 +-
drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 8 +-
drivers/media/usb/s2255/s2255drv.c | 4 +-
drivers/media/usb/stk1160/stk1160-core.c | 4 +-
drivers/media/usb/uvc/uvc_ctrl.c | 4 +-
drivers/media/usb/uvc/uvc_v4l2.c | 6 +-
drivers/media/usb/uvc/uvcvideo.h | 2 +-
drivers/media/v4l2-core/v4l2-ioctl.c | 4 +-
drivers/memory/renesas-rpc-if.c | 2 +-
drivers/mfd/atmel-flexcom.c | 11 +-
drivers/mfd/intel_soc_pmic_core.c | 28 +-
drivers/mfd/tps65910.c | 22 +-
drivers/misc/eeprom/at25.c | 13 +-
.../misc/habanalabs/common/command_submission.c | 22 +-
drivers/misc/habanalabs/common/firmware_if.c | 17 +-
drivers/misc/habanalabs/common/habanalabs.h | 2 +
drivers/misc/lattice-ecp3-config.c | 12 +-
drivers/misc/lkdtm/Makefile | 2 +-
drivers/misc/mei/hbm.c | 20 +-
drivers/mmc/core/sdio.c | 4 +-
drivers/mmc/host/meson-mx-sdhc-mmc.c | 5 +
drivers/mmc/host/meson-mx-sdio.c | 5 +
drivers/mmc/host/mtk-sd.c | 64 +-
drivers/mmc/host/omap_hsmmc.c | 36 -
drivers/mmc/host/sdhci-pci-gli.c | 11 +
drivers/mmc/host/tmio_mmc_core.c | 15 +-
drivers/mtd/hyperbus/rpc-if.c | 8 +-
drivers/mtd/mtdcore.c | 4 +-
drivers/mtd/mtdpart.c | 2 +-
drivers/mtd/nand/raw/davinci_nand.c | 73 +-
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 37 +-
drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c | 5 +
drivers/mtd/nand/raw/nand_base.c | 67 ++
drivers/mtd/spi-nor/core.c | 19 +-
drivers/mtd/spi-nor/xilinx.c | 18 +-
drivers/net/amt.c | 2 +-
drivers/net/bonding/bond_main.c | 40 +-
drivers/net/can/at91_can.c | 6 -
drivers/net/can/c_can/c_can_main.c | 5 -
drivers/net/can/cc770/cc770.c | 3 -
drivers/net/can/dev/dev.c | 4 -
drivers/net/can/dev/rx-offload.c | 6 +-
drivers/net/can/flexcan.c | 150 ++--
drivers/net/can/ifi_canfd/ifi_canfd.c | 5 -
drivers/net/can/kvaser_pciefd.c | 5 -
drivers/net/can/m_can/m_can.c | 7 -
drivers/net/can/mscan/mscan.c | 9 +-
drivers/net/can/pch_can.c | 3 -
drivers/net/can/peak_canfd/peak_canfd.c | 4 -
drivers/net/can/rcar/rcar_can.c | 6 +-
drivers/net/can/rcar/rcar_canfd.c | 9 +-
drivers/net/can/sja1000/sja1000.c | 2 -
drivers/net/can/softing/softing_cs.c | 2 +-
drivers/net/can/softing/softing_fw.c | 11 +-
drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c | 6 +-
drivers/net/can/sun4i_can.c | 7 +-
drivers/net/can/usb/ems_usb.c | 2 -
drivers/net/can/usb/esd_usb2.c | 2 -
drivers/net/can/usb/etas_es58x/es58x_core.c | 7 -
drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 2 -
drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c | 8 -
drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 4 -
drivers/net/can/usb/peak_usb/pcan_usb.c | 2 -
drivers/net/can/usb/peak_usb/pcan_usb_fd.c | 3 -
drivers/net/can/usb/peak_usb/pcan_usb_pro.c | 2 -
drivers/net/can/usb/ucan.c | 6 +-
drivers/net/can/usb/usb_8dev.c | 2 -
drivers/net/can/xilinx_can.c | 16 +-
drivers/net/dsa/hirschmann/hellcreek.c | 87 +-
drivers/net/dsa/rtl8365mb.c | 15 +-
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 +
drivers/net/ethernet/broadcom/bnxt/bnxt.h | 3 +-
drivers/net/ethernet/broadcom/bnxt/bnxt_coredump.c | 4 +-
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 9 +-
drivers/net/ethernet/broadcom/bnxt/bnxt_hwrm.c | 2 +-
drivers/net/ethernet/broadcom/bnxt/bnxt_hwrm.h | 3 +-
drivers/net/ethernet/broadcom/genet/bcmgenet.c | 10 +-
drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.c | 3 +-
drivers/net/ethernet/cortina/gemini.c | 9 +-
drivers/net/ethernet/freescale/fman/mac.c | 21 +-
drivers/net/ethernet/freescale/xgmac_mdio.c | 28 +-
drivers/net/ethernet/i825xx/sni_82596.c | 3 +-
drivers/net/ethernet/intel/igc/igc_main.c | 4 +-
drivers/net/ethernet/lantiq_etop.c | 4 +-
drivers/net/ethernet/marvell/octeontx2/af/ptp.c | 2 +
.../net/ethernet/marvell/octeontx2/af/rvu_cpt.c | 5 +-
.../ethernet/marvell/octeontx2/af/rvu_devlink.c | 2 +-
.../net/ethernet/marvell/octeontx2/nic/otx2_vf.c | 5 +-
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 55 +-
drivers/net/ethernet/mediatek/mtk_eth_soc.h | 16 +-
drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 36 +-
.../net/ethernet/mellanox/mlx5/core/en/tc_tun.c | 5 +-
.../ethernet/mellanox/mlx5/core/en/tc_tun_encap.c | 2 +
.../net/ethernet/mellanox/mlx5/core/en/xsk/pool.c | 4 +-
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 19 +-
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 3 +
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 7 +-
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 120 ++-
.../net/ethernet/mellanox/mlx5/core/esw/legacy.c | 2 +-
.../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 28 +-
drivers/net/ethernet/mellanox/mlx5/core/lag/mp.c | 6 +-
drivers/net/ethernet/mellanox/mlx5/core/main.c | 8 +-
.../net/ethernet/mellanox/mlx5/core/sf/dev/dev.c | 5 +-
.../mellanox/mlx5/core/steering/dr_matcher.c | 53 +-
drivers/net/ethernet/mellanox/mlxsw/cmd.h | 12 +
drivers/net/ethernet/mellanox/mlxsw/pci.c | 7 +-
drivers/net/ethernet/mscc/ocelot.c | 31 +-
drivers/net/ethernet/mscc/ocelot_flower.c | 44 +-
drivers/net/ethernet/mscc/ocelot_net.c | 6 +-
drivers/net/ethernet/renesas/ravb_main.c | 6 +-
drivers/net/ethernet/rocker/rocker_ofdpa.c | 3 +-
.../ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 7 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +
drivers/net/ethernet/ti/cpsw.c | 6 +-
drivers/net/ethernet/ti/cpsw_new.c | 6 +-
drivers/net/ethernet/ti/cpsw_priv.c | 2 +-
drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 135 +--
drivers/net/ipa/ipa_endpoint.c | 7 +-
drivers/net/phy/marvell.c | 62 +-
drivers/net/phy/mdio_bus.c | 2 +-
drivers/net/phy/micrel.c | 36 +-
drivers/net/phy/phy-core.c | 2 +-
drivers/net/phy/sfp.c | 25 +-
drivers/net/ppp/ppp_generic.c | 7 +-
drivers/net/usb/mcs7830.c | 12 +-
drivers/net/usb/smsc95xx.c | 3 +-
drivers/net/wireless/ath/ar5523/ar5523.c | 4 +
drivers/net/wireless/ath/ath10k/core.c | 19 +-
drivers/net/wireless/ath/ath10k/htt_tx.c | 3 +
drivers/net/wireless/ath/ath10k/hw.h | 3 +
drivers/net/wireless/ath/ath10k/txrx.c | 2 -
drivers/net/wireless/ath/ath10k/wmi.c | 27 +-
drivers/net/wireless/ath/ath11k/ahb.c | 28 +-
drivers/net/wireless/ath/ath11k/core.c | 42 +-
drivers/net/wireless/ath/ath11k/core.h | 15 +-
drivers/net/wireless/ath/ath11k/dp.c | 38 +-
drivers/net/wireless/ath/ath11k/dp.h | 4 +-
drivers/net/wireless/ath/ath11k/dp_rx.c | 16 +-
drivers/net/wireless/ath/ath11k/dp_tx.c | 2 +-
drivers/net/wireless/ath/ath11k/hal.c | 50 +-
drivers/net/wireless/ath/ath11k/hal.h | 3 +
drivers/net/wireless/ath/ath11k/hal_rx.c | 2 +-
drivers/net/wireless/ath/ath11k/hw.c | 2 -
drivers/net/wireless/ath/ath11k/hw.h | 3 +
drivers/net/wireless/ath/ath11k/mac.c | 59 +-
drivers/net/wireless/ath/ath11k/pci.c | 34 +-
drivers/net/wireless/ath/ath11k/qmi.h | 2 +-
drivers/net/wireless/ath/ath11k/reg.c | 103 +--
drivers/net/wireless/ath/ath11k/wmi.c | 5 +-
drivers/net/wireless/ath/ath9k/hif_usb.c | 7 +
drivers/net/wireless/ath/ath9k/htc.h | 2 +
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 13 +
drivers/net/wireless/ath/ath9k/wmi.c | 4 +
drivers/net/wireless/ath/wcn36xx/dxe.c | 49 +-
drivers/net/wireless/ath/wcn36xx/main.c | 34 +-
drivers/net/wireless/ath/wcn36xx/smd.c | 10 +-
drivers/net/wireless/ath/wcn36xx/txrx.c | 41 +-
drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 1 +
drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 2 +-
drivers/net/wireless/intel/iwlwifi/fw/api/power.h | 8 +-
drivers/net/wireless/intel/iwlwifi/fw/dump.c | 9 +
drivers/net/wireless/intel/iwlwifi/fw/img.c | 6 +-
drivers/net/wireless/intel/iwlwifi/fw/img.h | 4 +
drivers/net/wireless/intel/iwlwifi/iwl-csr.h | 5 +-
drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 17 +-
drivers/net/wireless/intel/iwlwifi/iwl-io.c | 2 +-
.../net/wireless/intel/iwlwifi/mvm/ftm-initiator.c | 4 +-
drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 18 +-
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 17 +
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 27 +
drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 23 +-
.../net/wireless/intel/iwlwifi/mvm/time-event.c | 36 +-
drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 7 +-
drivers/net/wireless/intel/iwlwifi/queue/tx.c | 1 +
drivers/net/wireless/marvell/mwifiex/sta_event.c | 8 +-
drivers/net/wireless/marvell/mwifiex/usb.c | 3 +-
drivers/net/wireless/mediatek/mt76/debugfs.c | 2 +-
drivers/net/wireless/mediatek/mt76/mac80211.c | 7 +-
drivers/net/wireless/mediatek/mt76/mt7603/mac.c | 4 +
drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 9 +-
drivers/net/wireless/mediatek/mt76/mt7615/main.c | 12 +-
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 174 ++--
.../net/wireless/mediatek/mt76/mt7615/pci_init.c | 8 +-
.../net/wireless/mediatek/mt76/mt7615/testmode.c | 4 +-
.../net/wireless/mediatek/mt76/mt76_connac_mac.c | 3 -
.../net/wireless/mediatek/mt76/mt76_connac_mcu.c | 64 +-
.../net/wireless/mediatek/mt76/mt76_connac_mcu.h | 77 +-
drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 9 +-
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 81 +-
drivers/net/wireless/mediatek/mt76/mt7915/mcu.h | 8 +
.../net/wireless/mediatek/mt76/mt7921/debugfs.c | 12 +-
drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 13 +-
drivers/net/wireless/mediatek/mt76/mt7921/main.c | 30 +-
drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 116 ++-
drivers/net/wireless/mediatek/mt76/mt7921/mcu.h | 27 +
drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h | 2 +
drivers/net/wireless/mediatek/mt76/mt7921/pci.c | 21 +-
.../net/wireless/mediatek/mt76/mt7921/pci_mac.c | 4 +
.../net/wireless/mediatek/mt76/mt7921/pci_mcu.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt7921/sdio.c | 48 +-
drivers/net/wireless/mediatek/mt76/sdio.c | 3 +-
drivers/net/wireless/mediatek/mt76/sdio_txrx.c | 3 +-
drivers/net/wireless/microchip/wilc1000/netdev.c | 1 -
drivers/net/wireless/microchip/wilc1000/sdio.c | 2 +
drivers/net/wireless/microchip/wilc1000/spi.c | 2 +
drivers/net/wireless/realtek/rtw88/main.c | 2 +-
drivers/net/wireless/realtek/rtw88/pci.c | 61 +-
drivers/net/wireless/realtek/rtw88/pci.h | 2 +
drivers/net/wireless/realtek/rtw88/rtw8821c.h | 2 +-
drivers/net/wireless/realtek/rtw88/rtw8822b.c | 2 +-
drivers/net/wireless/realtek/rtw88/rtw8822c.c | 2 +-
drivers/net/wireless/realtek/rtw89/mac80211.c | 1 +
drivers/net/wireless/realtek/rtw89/phy.c | 33 +-
drivers/net/wireless/rsi/rsi_91x_main.c | 4 +
drivers/net/wireless/rsi/rsi_91x_usb.c | 9 +-
drivers/net/wireless/rsi/rsi_usb.h | 2 +
drivers/net/wwan/mhi_wwan_mbim.c | 4 +-
drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 16 +-
drivers/nvmem/core.c | 2 +
drivers/of/base.c | 11 +-
drivers/of/fdt.c | 25 +-
drivers/of/unittest.c | 21 +-
drivers/parisc/pdc_stable.c | 4 +-
drivers/pci/controller/dwc/pcie-designware.c | 7 +-
drivers/pci/controller/dwc/pcie-qcom.c | 12 +-
drivers/pci/controller/pci-aardvark.c | 10 +-
drivers/pci/controller/pci-mvebu.c | 260 +++++-
drivers/pci/controller/pci-xgene.c | 2 +-
drivers/pci/controller/pcie-apple.c | 7 +-
drivers/pci/controller/pcie-mediatek-gen3.c | 8 +
drivers/pci/controller/pcie-mt7621.c | 2 +
drivers/pci/controller/pcie-rcar-host.c | 10 +-
drivers/pci/hotplug/pciehp.h | 3 +
drivers/pci/hotplug/pciehp_core.c | 2 +-
drivers/pci/hotplug/pciehp_hpc.c | 28 +-
drivers/pci/msi.c | 26 +-
drivers/pci/pci-bridge-emul.c | 70 +-
drivers/pci/quirks.c | 3 +
drivers/pcmcia/cs.c | 8 +-
drivers/pcmcia/rsrc_nonstatic.c | 6 +
drivers/perf/arm-cmn.c | 5 +-
drivers/phy/cadence/phy-cadence-sierra.c | 31 +-
drivers/phy/mediatek/phy-mtk-mipi-dsi.c | 2 +
drivers/phy/mediatek/phy-mtk-tphy.c | 162 ++++
drivers/phy/socionext/phy-uniphier-usb3ss.c | 10 +-
drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | 2 +
drivers/pinctrl/mediatek/pinctrl-paris.c | 2 +-
drivers/pinctrl/pinctrl-apple-gpio.c | 2 +-
drivers/pinctrl/pinctrl-rockchip.c | 2 +-
drivers/platform/x86/wmi.c | 17 +-
drivers/power/reset/mt6323-poweroff.c | 3 +
drivers/ptp/ptp_vclock.c | 10 +-
drivers/regulator/da9121-regulator.c | 5 +
drivers/regulator/qcom-labibb-regulator.c | 2 +-
drivers/regulator/qcom_smd-regulator.c | 100 ++-
drivers/remoteproc/imx_rproc.c | 1 +
drivers/rpmsg/rpmsg_core.c | 20 +-
drivers/rtc/dev.c | 6 +-
drivers/rtc/rtc-cmos.c | 3 +
drivers/rtc/rtc-pxa.c | 4 +
drivers/scsi/hisi_sas/hisi_sas_main.c | 8 +-
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 1 +
drivers/scsi/lpfc/lpfc.h | 2 +-
drivers/scsi/lpfc/lpfc_attr.c | 62 +-
drivers/scsi/lpfc/lpfc_els.c | 11 +-
drivers/scsi/lpfc/lpfc_hbadisc.c | 8 +-
drivers/scsi/lpfc/lpfc_init.c | 8 +-
drivers/scsi/lpfc/lpfc_nportdisc.c | 6 +
drivers/scsi/lpfc/lpfc_sli.c | 6 -
drivers/scsi/mpi3mr/mpi3mr.h | 3 +-
drivers/scsi/mpi3mr/mpi3mr_fw.c | 4 +-
drivers/scsi/pm8001/pm8001_hwi.c | 4 +-
drivers/scsi/scsi.c | 4 +-
drivers/scsi/scsi_debugfs.c | 1 +
drivers/scsi/scsi_pm.c | 2 +-
drivers/scsi/sr.c | 2 +-
drivers/scsi/sr_vendor.c | 4 +-
drivers/scsi/ufs/tc-dwc-g210-pci.c | 1 -
drivers/scsi/ufs/ufs-mediatek.c | 2 +-
drivers/scsi/ufs/ufshcd-pci.c | 2 -
drivers/scsi/ufs/ufshcd-pltfrm.c | 2 -
drivers/scsi/ufs/ufshcd.c | 22 +-
drivers/soc/imx/gpcv2.c | 3 +-
drivers/soc/mediatek/mtk-scpsys.c | 15 +-
drivers/soc/qcom/cpr.c | 2 +-
drivers/soc/ti/pruss.c | 2 +-
drivers/spi/spi-geni-qcom.c | 32 +-
drivers/spi/spi-hisi-kunpeng.c | 15 +-
drivers/spi/spi-meson-spifc.c | 1 +
drivers/spi/spi-uniphier.c | 11 +-
drivers/spi/spi.c | 13 +-
drivers/staging/greybus/audio_topology.c | 15 +
drivers/staging/media/atomisp/i2c/ov2680.h | 24 -
drivers/staging/media/atomisp/pci/atomisp_cmd.c | 82 +-
drivers/staging/media/atomisp/pci/atomisp_fops.c | 11 +
.../media/atomisp/pci/atomisp_gmin_platform.c | 2 +-
drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 188 ++++-
drivers/staging/media/atomisp/pci/atomisp_subdev.c | 15 +-
drivers/staging/media/atomisp/pci/atomisp_subdev.h | 3 +
drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 13 +-
drivers/staging/media/atomisp/pci/atomisp_v4l2.h | 3 +-
drivers/staging/media/atomisp/pci/sh_css.c | 27 +-
drivers/staging/media/atomisp/pci/sh_css_mipi.c | 41 +-
drivers/staging/media/atomisp/pci/sh_css_params.c | 8 +-
drivers/staging/media/hantro/hantro_drv.c | 3 +-
drivers/staging/media/hantro/hantro_h1_jpeg_enc.c | 2 +-
drivers/staging/media/hantro/hantro_hw.h | 3 +-
.../media/hantro/rockchip_vpu2_hw_jpeg_enc.c | 17 +
drivers/staging/media/hantro/rockchip_vpu_hw.c | 5 +-
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_module.c | 16 +-
drivers/staging/rtl8192e/rtllib_softmac.c | 6 +-
drivers/tee/tee_core.c | 4 +-
drivers/thermal/imx8mm_thermal.c | 3 +
drivers/thermal/imx_thermal.c | 145 ++--
.../int340x_thermal/processor_thermal_device.h | 3 +-
.../intel/int340x_thermal/processor_thermal_mbox.c | 100 ++-
.../intel/int340x_thermal/processor_thermal_rfim.c | 23 +-
drivers/thunderbolt/acpi.c | 13 +
drivers/tty/mxser.c | 44 +-
drivers/tty/serial/8250/8250_bcm7271.c | 11 +-
drivers/tty/serial/8250/8250_dw.c | 3 +
drivers/tty/serial/amba-pl010.c | 3 -
drivers/tty/serial/amba-pl011.c | 29 +-
drivers/tty/serial/atmel_serial.c | 14 +
drivers/tty/serial/imx.c | 7 +-
drivers/tty/serial/liteuart.c | 2 +-
drivers/tty/serial/serial_core.c | 7 +-
drivers/tty/serial/stm32-usart.c | 6 +-
drivers/tty/serial/uartlite.c | 2 +-
drivers/uio/uio_dmem_genirq.c | 6 +-
drivers/usb/core/hub.c | 5 +-
drivers/usb/dwc2/gadget.c | 13 +-
drivers/usb/dwc2/hcd.c | 7 +-
drivers/usb/dwc3/dwc3-meson-g12a.c | 17 +-
drivers/usb/dwc3/dwc3-qcom.c | 7 +-
drivers/usb/gadget/function/f_fs.c | 4 +-
drivers/usb/gadget/function/u_audio.c | 28 +-
drivers/usb/host/ehci-brcm.c | 6 +-
drivers/usb/host/uhci-platform.c | 3 +-
drivers/usb/misc/ftdi-elan.c | 1 +
drivers/vdpa/ifcvf/ifcvf_base.c | 41 +-
drivers/vdpa/ifcvf/ifcvf_base.h | 9 +-
drivers/vdpa/ifcvf/ifcvf_main.c | 24 +-
drivers/vdpa/mlx5/net/mlx5_vnet.c | 8 +-
drivers/video/backlight/qcom-wled.c | 122 +--
drivers/virtio/virtio_mem.c | 2 +-
drivers/virtio/virtio_ring.c | 4 +-
drivers/w1/slaves/w1_ds28e04.c | 26 +-
drivers/xen/gntdev.c | 6 +-
fs/btrfs/backref.c | 21 +-
fs/btrfs/ctree.c | 19 +-
fs/btrfs/dev-replace.c | 2 +-
fs/btrfs/disk-io.c | 2 +
fs/btrfs/extent-tree.c | 58 +-
fs/btrfs/inode.c | 11 +
fs/btrfs/qgroup.c | 19 +
fs/btrfs/volumes.c | 2 +-
fs/btrfs/zoned.c | 91 +-
fs/btrfs/zoned.h | 13 +-
fs/cifs/sess.c | 13 +-
fs/debugfs/file.c | 2 +-
fs/dlm/lock.c | 9 +
fs/dlm/lowcomms.c | 44 +-
fs/ext4/ext4.h | 1 +
fs/ext4/ext4_jbd2.c | 2 +
fs/ext4/extents.c | 2 -
fs/ext4/fast_commit.c | 18 +-
fs/ext4/inode.c | 51 +-
fs/ext4/ioctl.c | 2 -
fs/ext4/mballoc.c | 48 +-
fs/ext4/migrate.c | 23 +-
fs/ext4/super.c | 27 +-
fs/f2fs/checkpoint.c | 4 +-
fs/f2fs/compress.c | 50 +-
fs/f2fs/data.c | 7 +-
fs/f2fs/f2fs.h | 11 +
fs/f2fs/file.c | 10 +-
fs/f2fs/gc.c | 8 +-
fs/f2fs/inode.c | 5 +
fs/f2fs/segment.h | 3 +-
fs/f2fs/super.c | 44 +
fs/f2fs/sysfs.c | 4 +-
fs/f2fs/xattr.c | 11 +-
fs/fuse/file.c | 2 +-
fs/hugetlbfs/inode.c | 7 +-
fs/io_uring.c | 4 +
fs/jffs2/file.c | 40 +-
fs/ksmbd/connection.c | 1 +
fs/ksmbd/connection.h | 4 +-
fs/ksmbd/ksmbd_netlink.h | 12 +-
fs/ksmbd/smb2misc.c | 18 +-
fs/ksmbd/smb2ops.c | 16 +-
fs/ksmbd/smb2pdu.c | 87 +-
fs/ksmbd/smb2pdu.h | 1 +
fs/ksmbd/smb_common.h | 1 +
fs/ksmbd/transport_ipc.c | 2 +
fs/ksmbd/transport_tcp.c | 3 +-
fs/nfsd/nfs3xdr.c | 44 +-
fs/nfsd/nfs4state.c | 6 +-
fs/nfsd/vfs.c | 4 +
fs/ubifs/super.c | 1 -
fs/udf/ialloc.c | 2 +
include/acpi/acpi_bus.h | 5 +-
include/acpi/actypes.h | 10 +-
include/asm-generic/bitops/find.h | 5 +
include/drm/drm_drv.h | 5 +-
include/drm/gpu_scheduler.h | 12 +-
include/linux/blk-pm.h | 2 +-
include/linux/bpf.h | 2 +-
include/linux/bpf_verifier.h | 7 +
include/linux/hid.h | 2 +
include/linux/iio/trigger.h | 2 +
include/linux/kasan.h | 4 +-
include/linux/mmzone.h | 9 +
include/linux/mtd/rawnand.h | 2 +
include/linux/mtd/spi-nor.h | 2 -
include/linux/netfilter_netdev.h | 2 +-
include/linux/of_fdt.h | 2 +
include/linux/pm_runtime.h | 3 +
include/linux/psi_types.h | 13 +-
include/linux/ptp_clock_kernel.h | 12 +-
include/linux/sbitmap.h | 11 +
include/linux/skbuff.h | 4 +-
include/linux/stmmac.h | 1 +
include/linux/vmalloc.h | 7 +
include/media/cec.h | 11 +-
include/net/inet_frag.h | 11 +-
include/net/ipv6_frag.h | 3 +-
include/net/pkt_sched.h | 4 +-
include/net/sch_generic.h | 5 +
include/net/xfrm.h | 7 +-
include/sound/hda_codec.h | 8 +-
include/trace/events/cgroup.h | 12 +-
include/trace/events/sunrpc.h | 13 +-
include/uapi/linux/bpf.h | 2 +-
include/uapi/linux/xfrm.h | 1 +
include/uapi/misc/habanalabs.h | 18 +-
kernel/audit.c | 18 +-
kernel/bpf/bloom_filter.c | 6 +
kernel/bpf/btf.c | 3 +-
kernel/bpf/core.c | 3 +-
kernel/bpf/inode.c | 14 +-
kernel/bpf/verifier.c | 28 +-
kernel/dma/pool.c | 4 +-
kernel/locking/ww_rt_mutex.c | 2 +-
kernel/rcu/rcutorture.c | 5 +
kernel/rcu/tree.c | 4 +-
kernel/rcu/tree_exp.h | 1 +
kernel/sched/cpuacct.c | 79 +-
kernel/sched/cputime.c | 4 +-
kernel/sched/fair.c | 4 +-
kernel/sched/psi.c | 45 +-
kernel/sched/rt.c | 23 +-
kernel/sched/stats.h | 5 +-
kernel/signal.c | 20 +-
kernel/time/clocksource.c | 50 +-
kernel/trace/bpf_trace.c | 6 +-
kernel/trace/trace_events_synth.c | 13 +-
kernel/trace/trace_kprobe.c | 5 +-
kernel/trace/trace_osnoise.c | 20 +-
kernel/trace/trace_probe.c | 2 +
kernel/trace/trace_syscalls.c | 6 +-
kernel/trace/trace_uprobe.c | 5 +
kernel/tsacct.c | 7 +-
lib/kunit/test.c | 18 +-
lib/logic_iomem.c | 19 +-
lib/mpi/mpi-mod.c | 2 +
lib/sbitmap.c | 25 +-
lib/test_bpf.c | 4 +-
lib/test_hmm.c | 24 +
lib/test_meminit.c | 1 +
mm/hmm.c | 5 +-
mm/kasan/quarantine.c | 11 +
mm/kasan/shadow.c | 9 +-
mm/page_alloc.c | 19 +-
mm/page_isolation.c | 2 +-
mm/shmem.c | 37 +-
mm/vmalloc.c | 3 +-
net/ax25/af_ax25.c | 10 +-
net/batman-adv/netlink.c | 30 +-
net/bluetooth/cmtp/core.c | 4 +-
net/bluetooth/hci_core.c | 1 +
net/bluetooth/hci_event.c | 37 +-
net/bluetooth/hci_request.c | 2 +-
net/bluetooth/hci_sock.c | 16 +-
net/bluetooth/hci_sysfs.c | 2 +
net/bluetooth/l2cap_sock.c | 45 +-
net/bluetooth/mgmt.c | 29 +-
net/bridge/br_netfilter_hooks.c | 7 +-
net/core/dev.c | 6 +
net/core/devlink.c | 2 -
net/core/filter.c | 8 +-
net/core/net-sysfs.c | 3 +
net/core/net_namespace.c | 4 +-
net/core/sock.c | 2 +
net/core/sock_map.c | 21 +-
net/dsa/switch.c | 4 +-
net/ipv4/fib_semantics.c | 47 +-
net/ipv4/inet_fragment.c | 8 +-
net/ipv4/ip_fragment.c | 3 +-
net/ipv4/ip_gre.c | 5 +-
net/ipv4/netfilter/ipt_CLUSTERIP.c | 5 +-
net/ipv4/tcp_bpf.c | 27 +
net/ipv6/ip6_gre.c | 5 +-
net/mac80211/rx.c | 2 +-
net/mctp/test/route-test.c | 7 +-
net/mptcp/options.c | 10 +-
net/mptcp/pm_netlink.c | 18 +-
net/mptcp/protocol.c | 4 +-
net/netfilter/nft_payload.c | 3 +
net/netfilter/nft_set_pipapo.c | 8 +
net/netrom/af_netrom.c | 12 +-
net/nfc/llcp_sock.c | 5 +
net/openvswitch/flow.c | 16 +-
net/sched/act_ct.c | 6 +
net/sched/cls_api.c | 2 +
net/sched/sch_api.c | 2 +-
net/sched/sch_generic.c | 1 +
net/smc/af_smc.c | 8 +-
net/smc/smc_core.c | 29 +-
net/smc/smc_core.h | 2 +-
net/socket.c | 9 +-
net/sunrpc/svc_xprt.c | 2 +-
net/unix/garbage.c | 14 +-
net/unix/scm.c | 6 +-
net/xfrm/xfrm_compat.c | 6 +-
net/xfrm/xfrm_interface.c | 14 +-
net/xfrm/xfrm_output.c | 30 +-
net/xfrm/xfrm_policy.c | 24 +-
net/xfrm/xfrm_state.c | 23 +-
net/xfrm/xfrm_user.c | 41 +-
samples/bpf/Makefile | 18 +-
samples/bpf/Makefile.target | 11 -
samples/bpf/lwt_len_hist_kern.c | 7 -
samples/bpf/xdp_sample_user.h | 2 +
scripts/dtc/dtx_diff | 8 +-
scripts/sphinx-pre-install | 3 +
security/selinux/hooks.c | 12 +-
sound/core/jack.c | 3 +
sound/core/misc.c | 2 +-
sound/core/oss/pcm_oss.c | 2 +-
sound/core/pcm.c | 6 +-
sound/core/seq/seq_queue.c | 14 +-
sound/hda/hdac_stream.c | 14 +-
sound/pci/hda/hda_bind.c | 5 +
sound/pci/hda/hda_codec.c | 45 +-
sound/pci/hda/hda_controller.c | 1 -
sound/pci/hda/hda_local.h | 1 +
sound/pci/hda/patch_cs8409-tables.c | 3 +
sound/pci/hda/patch_cs8409.c | 9 +-
sound/pci/hda/patch_cs8409.h | 1 +
sound/soc/amd/Kconfig | 2 +-
sound/soc/codecs/Kconfig | 3 +-
sound/soc/codecs/cs42l42.c | 22 +
sound/soc/codecs/cs42l42.h | 2 +
sound/soc/codecs/rt5663.c | 12 +-
sound/soc/fsl/fsl_asrc.c | 69 +-
sound/soc/fsl/fsl_mqs.c | 2 +-
sound/soc/fsl/imx-card.c | 32 +-
sound/soc/fsl/imx-hdmi.c | 2 +
sound/soc/generic/test-component.c | 5 +-
sound/soc/intel/boards/sof_sdw.c | 2 +-
sound/soc/intel/catpt/dsp.c | 14 +-
sound/soc/intel/skylake/skl-pcm.c | 1 -
sound/soc/mediatek/mt8173/mt8173-max98090.c | 3 +
sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c | 2 +
sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c | 2 +
sound/soc/mediatek/mt8173/mt8173-rt5650.c | 2 +
sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c | 6 +-
.../mt8183/mt8183-mt6358-ts3a227-max98357.c | 7 +-
.../mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c | 6 +-
sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 2 +-
sound/soc/mediatek/mt8195/mt8195-dai-pcm.c | 73 +-
sound/soc/mediatek/mt8195/mt8195-reg.h | 1 +
sound/soc/samsung/idma.c | 2 +
sound/soc/sof/intel/hda-codec.c | 3 +-
sound/soc/sof/intel/hda-pcm.c | 86 +-
sound/soc/sof/intel/hda.c | 9 +-
sound/soc/sof/intel/hda.h | 6 +
sound/soc/sof/ipc.c | 3 +-
sound/soc/sof/pcm.c | 5 +-
sound/soc/sof/sof-audio.c | 109 ++-
sound/soc/sof/sof-audio.h | 6 +-
sound/soc/sof/topology.c | 17 -
sound/soc/uniphier/Kconfig | 2 -
sound/usb/format.c | 2 +-
sound/usb/mixer_quirks.c | 2 +-
sound/usb/quirks.c | 2 +-
tools/bpf/bpftool/Documentation/Makefile | 1 -
tools/bpf/bpftool/Documentation/bpftool-btf.rst | 2 +-
tools/bpf/bpftool/Documentation/bpftool-cgroup.rst | 2 +-
tools/bpf/bpftool/Documentation/bpftool-gen.rst | 2 +-
tools/bpf/bpftool/Documentation/bpftool-link.rst | 2 +-
tools/bpf/bpftool/Documentation/bpftool-map.rst | 6 +-
tools/bpf/bpftool/Documentation/bpftool-prog.rst | 8 +-
tools/bpf/bpftool/Documentation/bpftool.rst | 6 +-
tools/bpf/bpftool/Makefile | 1 -
tools/bpf/bpftool/main.c | 2 +
tools/bpf/bpftool/prog.c | 15 +-
tools/bpf/resolve_btfids/main.c | 5 +-
tools/include/nolibc/nolibc.h | 33 +-
tools/include/uapi/linux/bpf.h | 2 +-
tools/lib/bpf/btf.c | 55 +-
tools/lib/bpf/btf.h | 2 +-
tools/lib/bpf/btf_dump.c | 2 +-
tools/lib/bpf/gen_loader.c | 12 +-
tools/lib/bpf/libbpf.c | 65 +-
tools/lib/bpf/libbpf.h | 1 -
tools/lib/bpf/linker.c | 6 +-
tools/perf/Makefile.config | 5 +-
tools/perf/tests/shell/stat_all_metricgroups.sh | 2 +-
tools/perf/util/cputopo.c | 3 +-
tools/perf/util/debug.c | 2 +-
tools/perf/util/evsel.c | 25 +-
tools/perf/util/metricgroup.c | 4 +-
tools/perf/util/probe-event.c | 3 +
tools/testing/kunit/kunit_json.py | 2 +
tools/testing/kunit/kunit_tool_test.py | 6 +
tools/testing/selftests/bpf/btf_helpers.c | 9 +-
tools/testing/selftests/bpf/prog_tests/bpf_iter.c | 5 +-
.../selftests/bpf/prog_tests/migrate_reuseport.c | 4 +-
tools/testing/selftests/bpf/prog_tests/skb_ctx.c | 2 +
.../testing/selftests/bpf/prog_tests/tc_redirect.c | 7 +
tools/testing/selftests/bpf/xdpxceiver.c | 6 +-
tools/testing/selftests/clone3/clone3.c | 6 +
.../selftests/ftrace/test.d/kprobe/profile.tc | 2 +-
tools/testing/selftests/kselftest_harness.h | 2 +-
tools/testing/selftests/kvm/.gitignore | 2 +-
tools/testing/selftests/kvm/Makefile | 4 +-
.../selftests/kvm/include/x86_64/processor.h | 7 +
tools/testing/selftests/kvm/lib/x86_64/processor.c | 33 +-
.../kvm/x86_64/{get_cpuid_test.c => cpuid_test.c} | 30 +
.../selftests/powerpc/security/spectre_v2.c | 2 +-
tools/testing/selftests/powerpc/signal/.gitignore | 1 +
tools/testing/selftests/powerpc/signal/Makefile | 1 +
.../selftests/powerpc/signal/sigreturn_kernel.c | 132 +++
.../selftests/vm/charge_reserved_hugetlb.sh | 34 +-
tools/testing/selftests/vm/hmm-tests.c | 42 +
.../selftests/vm/hugetlb_reparenting_test.sh | 21 +-
tools/testing/selftests/vm/write_hugetlb_memory.sh | 2 +-
virt/kvm/kvm_main.c | 5 +-
1127 files changed, 10720 insertions(+), 6000 deletions(-)Greg Kroah-Hartman
maintainerPATCH 1/1039 KVM: x86/mmu: Fix write-protection of PTs mapped by the TDP MMU
From: David Matlack <[email protected]>
commit 7c8a4742c4abe205ec9daf416c9d42fd6b406e8e upstream.
When the TDP MMU is write-protection GFNs for page table protection (as opposed to for dirty logging, or due to the HVA not being writable), it checks if the SPTE is already write-protected and if so skips modifying the SPTE and the TLB flush.
This behavior is incorrect because it fails to check if the SPTE is write-protected for page table protection, i.e. fails to check that MMU-writable is '0'. If the SPTE was write-protected for dirty logging but not page table protection, the SPTE could locklessly be made writable, and vCPUs could still be running with writable mappings cached in their TLB.
Fix this by only skipping setting the SPTE if the SPTE is already write-protected *and* MMU-writable is already clear. Technically, checking only MMU-writable would suffice; a SPTE cannot be writable without MMU-writable being set. But check both to be paranoid and because it arguably yields more readable code.
Message-Id: <[email protected]>
--- arch/x86/kvm/mmu/tdp_mmu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/kvm/mmu/tdp_mmu.c +3 -3
@@ -1442,12 +1442,12 @@ static bool write_protect_gfn(struct kvm !is_last_spte(iter.old_spte, iter.level))continue ; -if (!is_writable_pte (iter.old_spte)) -break ; - new_spte = iter.old_spte & ~(PT_WRITABLE_MASK | shadow_mmu_writable_mask); +if (new_spte == iter.old_spte) +break ; +tdp_mmu_set_spte (kvm, &iter, new_spte); spte_set = true; }
Greg Kroah-Hartman
maintainerPATCH 2/1039 KVM: VMX: switch blocked_vcpu_on_cpu_lock to raw spinlock
In reply to Greg Kroah-HartmanFrom: Marcelo Tosatti <[email protected]>
commit 5f02ef741a785678930f3ff0a8b6b2b0ef1bb402 upstream.
blocked_vcpu_on_cpu_lock is taken from hard interrupt context (pi_wakeup_handler), therefore it cannot sleep.
Switch it to a raw spinlock.
Fixes:
[41297.066254] BUG: scheduling while atomic: CPU 0/KVM/635218/0x00010001 [41297.066323] Preemption disabled at: [41297.066324] [<ffffffff902ee47f>] irq_enter_rcu+0xf/0x60 [41297.066339] Call Trace: [41297.066342] <IRQ> [41297.066346] dump_stack_lvl+0x34/0x44 [41297.066353] ? irq_enter_rcu+0xf/0x60 [41297.066356] __schedule_bug.cold+0x7d/0x8b [41297.066361] __schedule+0x439/0x5b0 [41297.066365] ? task_blocks_on_rt_mutex.constprop.0.isra.0+0x1b0/0x440 [41297.066369] schedule_rtlock+0x1e/0x40 [41297.066371] rtlock_slowlock_locked+0xf1/0x260 [41297.066374] rt_spin_lock+0x3b/0x60 [41297.066378] pi_wakeup_handler+0x31/0x90 [kvm_intel] [41297.066388] sysvec_kvm_posted_intr_wakeup_ipi+0x9d/0xd0 [41297.066392] </IRQ> [41297.066392] asm_sysvec_kvm_posted_intr_wakeup_ipi+0x12/0x20
...
--- arch/x86/kvm/vmx/posted_intr.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
arch/x86/kvm/vmx/posted_intr.c +8 -8
@@ -15,7 +15,7 @@* can find which vCPU should be waken up. */ static DEFINE_PER_CPU(struct list_head, blocked_vcpu_on_cpu); -static DEFINE_PER_CPU(spinlock_t, blocked_vcpu_on_cpu_lock); +static DEFINE_PER_CPU(raw_spinlock_t, blocked_vcpu_on_cpu_lock);static inline struct pi_desc *vcpu_to_pi_desc (struct kvm_vcpu *vcpu) {
@@ -121,9 +121,9 @@ static void __pi_post_block(struct kvm_v new.control) != old.control);if (!WARN_ON_ONCE (vcpu->pre_pcpu ==-1 )) { -spin_lock (&per_cpu (blocked_vcpu_on_cpu_lock, vcpu->pre_pcpu)); +raw_spin_lock (&per_cpu (blocked_vcpu_on_cpu_lock, vcpu->pre_pcpu));list_del (&vcpu->blocked_vcpu_list); -spin_unlock (&per_cpu (blocked_vcpu_on_cpu_lock, vcpu->pre_pcpu)); +raw_spin_unlock (&per_cpu (blocked_vcpu_on_cpu_lock, vcpu->pre_pcpu)); vcpu->pre_pcpu =-1 ; } }
@@ -154,11 +154,11 @@ int pi_pre_block(struct kvm_vcpu *vcpu)local_irq_disable ();if (!WARN_ON_ONCE (vcpu->pre_pcpu !=-1 )) { vcpu->pre_pcpu = vcpu->cpu; -spin_lock (&per_cpu (blocked_vcpu_on_cpu_lock, vcpu->pre_pcpu)); +raw_spin_lock (&per_cpu (blocked_vcpu_on_cpu_lock, vcpu->pre_pcpu));list_add_tail (&vcpu->blocked_vcpu_list, &per_cpu (blocked_vcpu_on_cpu, vcpu->pre_pcpu)); -spin_unlock (&per_cpu (blocked_vcpu_on_cpu_lock, vcpu->pre_pcpu)); +raw_spin_unlock (&per_cpu (blocked_vcpu_on_cpu_lock, vcpu->pre_pcpu)); } do {
@@ -215,7 +215,7 @@ void pi_wakeup_handler(void)struct kvm_vcpu *vcpu;int cpu =smp_processor_id (); -spin_lock (&per_cpu (blocked_vcpu_on_cpu_lock, cpu)); +raw_spin_lock (&per_cpu (blocked_vcpu_on_cpu_lock, cpu));list_for_each_entry (vcpu, &per_cpu (blocked_vcpu_on_cpu, cpu), blocked_vcpu_list) {struct pi_desc *pi_desc =vcpu_to_pi_desc (vcpu);
@@ -223,13 +223,13 @@ void pi_wakeup_handler(void)if (pi_test_on (pi_desc) ==1 )kvm_vcpu_kick (vcpu); } -spin_unlock (&per_cpu (blocked_vcpu_on_cpu_lock, cpu)); +raw_spin_unlock (&per_cpu (blocked_vcpu_on_cpu_lock, cpu)); }void __init pi_init_cpu (int cpu) {INIT_LIST_HEAD (&per_cpu (blocked_vcpu_on_cpu, cpu)); -spin_lock_init (&per_cpu (blocked_vcpu_on_cpu_lock, cpu)); +raw_spin_lock_init (&per_cpu (blocked_vcpu_on_cpu_lock, cpu)); }bool pi_has_pending_interrupt (struct kvm_vcpu *vcpu)
Greg Kroah-Hartman
maintainerPATCH 3/1039 HID: Ignore battery for Elan touchscreen on HP Envy X360 15t-dr100
In reply to Greg Kroah-HartmanFrom: Karl Kurbjun <[email protected]>
commit f3193ea1b6779023334faa72b214ece457e02656 upstream.
Battery status on Elan tablet driver is reported for the HP ENVY x360 15t-dr100. There is no separate battery for the Elan controller resulting in a battery level report of 0% or 1% depending on whether a stylus has interacted with the screen. These low battery level reports causes a variety of bad behavior in desktop environments. This patch adds the appropriate quirk to indicate that the batery status is unused for this target.
--- drivers/hid/hid-ids.h | 1 + drivers/hid/hid-input.c | 2 ++ 2 files changed, 3 insertions(+)
drivers/hid/hid-ids.h +1 -0
@@ -398,6 +398,7 @@#define USB_DEVICE_ID_HP_X2 0x074d#define USB_DEVICE_ID_HP_X2_10_COVER 0x0755#define I2C_DEVICE_ID_HP_ENVY_X360_15 0x2d05 +#define I2C_DEVICE_ID_HP_ENVY_X360_15T_DR100 0x29CF#define I2C_DEVICE_ID_HP_SPECTRE_X360_15 0x2817#define USB_DEVICE_ID_ASUS_UX550VE_TOUCHSCREEN 0x2544#define USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN 0x2706
drivers/hid/hid-input.c +2 -0
@@ -329,6 +329,8 @@ static const struct hid_device_id hid_ba HID_BATTERY_QUIRK_IGNORE }, {HID_I2C_DEVICE (USB_VENDOR_ID_ELAN ,I2C_DEVICE_ID_HP_ENVY_X360_15 ), HID_BATTERY_QUIRK_IGNORE }, + { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_ENVY_X360_15T_DR100), + HID_BATTERY_QUIRK_IGNORE }, { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_SPECTRE_X360_15), HID_BATTERY_QUIRK_IGNORE }, { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_SURFACE_GO_TOUCHSCREEN),
Greg Kroah-Hartman
maintainerPATCH 4/1039 HID: uhid: Fix worker destroying device without any protection
In reply to Greg Kroah-HartmanFrom: Jann Horn <[email protected]>
commit 4ea5763fb79ed89b3bdad455ebf3f33416a81624 upstream.
uhid has to run hid_add_device() from workqueue context while allowing parallel use of the userspace API (which is protected with ->devlock). But hid_add_device() can fail. Currently, that is handled by immediately destroying the associated HID device, without using ->devlock - but if there are concurrent requests from userspace, that's wrong and leads to NULL dereferences and/or memory corruption (via use-after-free).
Fix it by leaving the HID device as-is in the worker. We can clean it up later, either in the UHID_DESTROY command handler or in the ->release() handler.
--- drivers/hid/uhid.c | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-)
drivers/hid/uhid.c +25 -4
@@ -28,11 +28,22 @@struct uhid_device {struct mutex devlock; + +/* This flag tracks whether the HID device is usable for commands from +* userspace. The flag is already set before hid_add_device(), which +* runs in workqueue context, to allow hid_add_device() to communicate +* with userspace. +* However, if hid_add_device() fails, the flag is cleared without +* holding devlock. +* We guarantee that if @running changes from true to false while you're +* holding @devlock, it's still fine to access @hid. +*/ bool running;__u8 *rd_data;uint rd_size; +/* When this is NULL, userspace may use UHID_CREATE/UHID_CREATE2. */ struct hid_device *hid;struct uhid_event input_buf;
@@ -63,9 +74,18 @@ static void uhid_device_add_worker(strucif (ret) {hid_err (uhid->hid,"Cannot register HID device: error %d\n" , ret); -hid_destroy_device (uhid->hid); - uhid->hid =NULL ; +/* We used to call hid_destroy_device() here, but that's really +* messy to get right because we have to coordinate with +* concurrent writes from userspace that might be in the middle +* of using uhid->hid. +* Just leave uhid->hid as-is for now, and clean it up when +* userspace tries to close or reinitialize the uhid instance. +* +* However, we do have to clear the ->running flag and do a +* wakeup to make sure userspace knows that the device is gone. +*/ uhid->running = false; +wake_up_interruptible (&uhid->report_wait); } }
@@ -474,7 +494,7 @@ static int uhid_dev_create2(struct uhid_void *rd_data;int ret; -if (uhid->running) +if (uhid->hid)return -EALREADY ; rd_size = ev->u.create2.rd_size;
@@ -556,7 +576,7 @@ static int uhid_dev_create(struct uhid_dstatic int uhid_dev_destroy (struct uhid_device *uhid) { -if (!uhid->running) +if (!uhid->hid)return -EINVAL ; uhid->running = false;
@@ -565,6 +585,7 @@ static int uhid_dev_destroy(struct uhid_cancel_work_sync (&uhid->worker);hid_destroy_device (uhid->hid); + uhid->hid =NULL ;kfree (uhid->rd_data);return 0 ;
Greg Kroah-Hartman
maintainerPATCH 5/1039 HID: wacom: Reset expected and received contact counts at the same time
In reply to Greg Kroah-HartmanFrom: Jason Gerecke <[email protected]>
commit 546e41ac994cc185ef3de610ca849a294b5df3ba upstream.
These two values go hand-in-hand and must be valid for the driver to behave correctly. We are currently lazy about updating the values and rely on the "expected" code flow to take care of making sure they're valid at the point they're needed. The "expected" flow changed somewhat with commit f8b6a74719b5 ("HID: wacom: generic: Support multiple tools per report"), however. This led to problems with the DTH-2452 due (in part) to *all* contacts being fully processed -- even those past the expected contact count. Specifically, the received count gets reset to 0 once all expected fingers are processed, but not the expected count. The rest of the contacts in the report are then *also* processed since now the driver thinks we've only processed 0 of N expected contacts.
Later commits such as 7fb0413baa7f (HID: wacom: Use "Confidence" flag to prevent reporting invalid contacts) worked around the DTH-2452 issue by skipping the invalid contacts at the end of the report, but this is not a complete fix. The confidence flag cannot be relied on when a contact is removed (see the following patch), and dealing with that condition re-introduces the DTH-2452 issue unless we also address this contact count laziness. By resetting expected and received counts at the same time we ensure the driver understands that there are 0 more contacts expected in the report. Similarly, we also make sure to reset the received count if for some reason we're out of sync in the pre-report phase.
--- drivers/hid/wacom_wac.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/hid/wacom_wac.c +5 -1
@@ -2692,11 +2692,14 @@ static void wacom_wac_finger_pre_report( hid_data->cc_index >= 0) {struct hid_field *field = report->field[hid_data->cc_index];int value = field->value[hid_data->cc_value_index]; - if (value) +if (value) { hid_data->num_expected = value; + hid_data->num_received =0 ; + } } else { hid_data->num_expected = wacom_wac->features.touch_max; + hid_data->num_received =0 ; } }
@@ -2724,6 +2727,7 @@ static void wacom_wac_finger_report(struinput_sync (input); wacom_wac->hid_data.num_received =0 ; + wacom_wac->hid_data.num_expected =0 ;/* keep touch state for pen event */ wacom_wac->shared->touch_down =wacom_wac_finger_count_touches (wacom_wac);
Greg Kroah-Hartman
maintainerPATCH 6/1039 HID: wacom: Ignore the confidence flag when a touch is removed
In reply to Greg Kroah-HartmanFrom: Jason Gerecke <[email protected]>
commit df03e9bd6d4806619b4cdc91a3d7695818a8e2b7 upstream.
AES hardware may internally re-classify a contact that it thought was intentional as a palm. Intentional contacts are reported as "down" with the confidence bit set. When this re-classification occurs, however, the state transitions to "up" with the confidence bit cleared. This kind of transition appears to be legal according to Microsoft docs, but we do not handle it correctly. Because the confidence bit is clear, we don't call wacom_wac_finger_slot and update userspace. This causes hung touches that confuse userspace and interfere with pen arbitration.
This commit adds a special case to ignore the confidence flag if a contact is reported as removed. This ensures we do not leave a hung touch if one of these re-classification events occured. Ideally we'd have some way to also let userspace know that the touch has been re-classified as a palm and needs to be canceled, but that's not possible right now :)
--- drivers/hid/wacom_wac.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-)
drivers/hid/wacom_wac.c +26 -3
@@ -2588,6 +2588,24 @@ static void wacom_wac_finger_slot(struct } } +static bool wacom_wac_slot_is_active (struct input_dev *dev,int key) +{ +struct input_mt *mt = dev->mt; +struct input_mt_slot *s; + +if (!mt) +return false; + +for (s = mt->slots; s != mt->slots + mt->num_slots; s++) { +if (s->key == key && +input_mt_get_value (s,ABS_MT_TRACKING_ID ) >=0 ) { +return true; + } + } + +return false; +} +static void wacom_wac_finger_event (struct hid_device *hdev,struct hid_field *field,struct hid_usage *usage,__s32 value) {
@@ -2638,9 +2656,14 @@ static void wacom_wac_finger_event(struc }if (usage->usage_index +1 == field->report_count) { -if (equivalent_usage == wacom_wac->hid_data.last_slot_field && - wacom_wac->hid_data.confidence) -wacom_wac_finger_slot (wacom_wac, wacom_wac->touch_input); +if (equivalent_usage == wacom_wac->hid_data.last_slot_field) { +bool touch_removed =wacom_wac_slot_is_active (wacom_wac->touch_input, + wacom_wac->hid_data.id) && !wacom_wac->hid_data.tipswitch; + +if (wacom_wac->hid_data.confidence || touch_removed) { +wacom_wac_finger_slot (wacom_wac, wacom_wac->touch_input); + } + } } }
Greg Kroah-Hartman
maintainerPATCH 7/1039 HID: wacom: Avoid using stale array indicies to read contact count
In reply to Greg Kroah-HartmanFrom: Jason Gerecke <[email protected]>
commit 20f3cf5f860f9f267a6a6e5642d3d0525edb1814 upstream.
If we ever see a touch report with contact count data we initialize several variables used to read the contact count in the pre-report phase. These variables are never reset if we process a report which doesn't contain a contact count, however. This can cause the pre- report function to trigger a read of arbitrary memory (e.g. NULL if we're lucky) and potentially crash the driver.
This commit restores resetting of the variables back to default "none" values that were used prior to the commit mentioned below.
--- drivers/hid/wacom_wac.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/hid/wacom_wac.c +4 -0
@@ -2682,6 +2682,10 @@ static void wacom_wac_finger_pre_report( hid_data->confidence = true; + hid_data->cc_report =0 ; + hid_data->cc_index =-1 ; + hid_data->cc_value_index =-1 ; +for (i =0 ; i < report->maxfield; i++) {struct hid_field *field = report->field[i];int j;
Greg Kroah-Hartman
maintainerPATCH 8/1039 ALSA: core: Fix SSID quirk lookup for subvendor=0
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
commit 5576c4f24c56722a2d9fb9c447d896e5b312078b upstream.
Some weird devices set the codec SSID vendor ID 0, and snd_pci_quirk_lookup_id() loop aborts at the point although it should still try matching with the SSID device ID. This resulted in a missing quirk for some old Macs.
Fix the loop termination condition to check both subvendor and subdevice.
--- sound/core/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/core/misc.c +1 -1
@@ -112,7 +112,7 @@ snd_pci_quirk_lookup_id(u16 vendor, u16 {const struct snd_pci_quirk *q; -for (q = list; q->subvendor; q++) { +for (q = list; q->subvendor || q->subdevice; q++) {if (q->subvendor != vendor)continue ; if (!q->subdevice ||
Greg Kroah-Hartman
maintainerPATCH 9/1039 cifs: free ntlmsspblob allocated in negotiate
In reply to Greg Kroah-HartmanFrom: Shyam Prasad N <[email protected]>
commit e3548aaf41a200c2af359462be23bcdd76efd795 upstream.
One of my previous fixes:
cifs: send workstation name during ntlmssp session setup ...changed the prototype of build_ntlmssp_negotiate_blob from being allocated by the caller to being allocated within the function. The caller needs to free this object too. While SMB2 version of the caller did it, I forgot to free for the SMB1 version. Fixing that here.
--- fs/cifs/sess.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
fs/cifs/sess.c +8 -5
@@ -1354,7 +1354,7 @@ sess_auth_rawntlmssp_negotiate(struct se &blob_len, ses, sess_data->nls_cp);if (rc) - goto out; + goto out_free_ntlmsspblob; sess_data->iov[1 ].iov_len = blob_len; sess_data->iov[1 ].iov_base = ntlmsspblob;
@@ -1362,7 +1362,7 @@ sess_auth_rawntlmssp_negotiate(struct se rc =_sess_auth_rawntlmssp_assemble_req (sess_data);if (rc) - goto out; + goto out_free_ntlmsspblob; rc =sess_sendreceive (sess_data);
@@ -1376,14 +1376,14 @@ sess_auth_rawntlmssp_negotiate(struct se rc =0 ;if (rc) - goto out; + goto out_free_ntlmsspblob;cifs_dbg (FYI ,"rawntlmssp session setup challenge phase\n" );if (smb_buf->WordCount !=4 ) { rc = -EIO ;cifs_dbg (VFS ,"bad word count %d\n" , smb_buf->WordCount); - goto out; + goto out_free_ntlmsspblob; } ses->Suid = smb_buf->Uid;/* UID left in wire format (le) */
@@ -1397,10 +1397,13 @@ sess_auth_rawntlmssp_negotiate(struct secifs_dbg (VFS ,"bad security blob length %d\n" , blob_len); rc = -EINVAL ; - goto out; + goto out_free_ntlmsspblob; } rc =decode_ntlmssp_challenge (bcc_ptr, blob_len, ses); + +out_free_ntlmsspblob: +kfree (ntlmsspblob); out:sess_free_buffer (sess_data);
Greg Kroah-Hartman
maintainerPATCH 10/1039 f2fs: fix to do sanity check on inode type during garbage collection
In reply to Greg Kroah-HartmanFrom: Chao Yu <[email protected]>
commit 9056d6489f5a41cfbb67f719d2c0ce61ead72d9f upstream.
As report by Wenqing Liu in bugzilla:
https://bugzilla.kernel.org/show_bug.cgi?id=215231
- Overview
kernel NULL pointer dereference triggered in folio_mark_dirty() when mount and operate on a crafted f2fs image
- Reproduce
tested on kernel 5.16-rc3, 5.15.X under root
1. mkdir mnt
2. mount -t f2fs tmp1.img mnt
3. touch tmp
4. cp tmp mnt
F2FS-fs (loop0): sanity_check_inode: inode (ino=49) extent info [5942, 4294180864, 4] is incorrect, run fsck to fix F2FS-fs (loop0): f2fs_check_nid_range: out-of-range nid=31340049, run fsck to fix.
BUG: kernel NULL pointer dereference, address: 0000000000000000 folio_mark_dirty+0x33/0x50 move_data_page+0x2dd/0x460 [f2fs] do_garbage_collect+0xc18/0x16a0 [f2fs] f2fs_gc+0x1d3/0xd90 [f2fs] f2fs_balance_fs+0x13a/0x570 [f2fs] f2fs_create+0x285/0x840 [f2fs] path_openat+0xe6d/0x1040 do_filp_open+0xc5/0x140 do_sys_openat2+0x23a/0x310 do_sys_open+0x57/0x80
The root cause is for special file: e.g. character, block, fifo or socket file, f2fs doesn't assign address space operations pointer array for mapping->a_ops field, so, in a fuzzed image, SSA table indicates a data block belong to special file, when f2fs tries to migrate that block, it causes NULL pointer access once move_data_page() calls a_ops->set_dirty_page().
--- fs/f2fs/gc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/f2fs/gc.c +2 -1
@@ -1457,7 +1457,8 @@ next_step: if (phase == 3) { inode = f2fs_iget(sb, dni.ino); - if (IS_ERR(inode) || is_bad_inode(inode)) + if (IS_ERR(inode) || is_bad_inode(inode) || + special_file(inode->i_mode)) continue; if (!down_write_trylock(
Greg Kroah-Hartman
maintainerPATCH 11/1039 f2fs: fix to do sanity check in is_alive()
In reply to Greg Kroah-HartmanFrom: Chao Yu <[email protected]>
commit 77900c45ee5cd5da63bd4d818a41dbdf367e81cd upstream.
In fuzzed image, SSA table may indicate that a data block belongs to invalid node, which node ID is out-of-range (0, 1, 2 or max_nid), in order to avoid migrating inconsistent data in such corrupted image, let's do sanity check anyway before data block migration.
--- fs/f2fs/gc.c | 3 +++ 1 file changed, 3 insertions(+)
fs/f2fs/gc.c +3 -0
@@ -1026,6 +1026,9 @@ static bool is_alive(struct f2fs_sb_infoset_sbi_flag (sbi,SBI_NEED_FSCK ); } +if (f2fs_check_nid_range (sbi, dni->ino)) +return false; + *nofs =ofs_of_node (node_page); source_blkaddr =data_blkaddr (NULL , node_page, ofs_in_node);f2fs_put_page (node_page,1 );
Greg Kroah-Hartman
maintainerPATCH 12/1039 f2fs: fix to do sanity check on last xattr entry in __f2fs_setxattr()
In reply to Greg Kroah-HartmanFrom: Chao Yu <[email protected]>
commit 645a3c40ca3d40cc32b4b5972bf2620f2eb5dba6 upstream.
As Wenqing Liu reported in bugzilla:
https://bugzilla.kernel.org/show_bug.cgi?id=215235
- Overview
page fault in f2fs_setxattr() when mount and operate on corrupted image
- Reproduce
tested on kernel 5.16-rc3, 5.15.X under root
1. unzip tmp7.zip
2. ./single.sh f2fs 7
Sometimes need to run the script several times
- Kernel dump
loop0: detected capacity change from 0 to 131072 F2FS-fs (loop0): Found nat_bits in checkpoint F2FS-fs (loop0): Mounted with checkpoint version = 7548c2ee
BUG: unable to handle page fault for address: ffffe47bc7123f48 RIP: 0010:kfree+0x66/0x320 Call Trace: __f2fs_setxattr+0x2aa/0xc00 [f2fs] f2fs_setxattr+0xfa/0x480 [f2fs] __f2fs_set_acl+0x19b/0x330 [f2fs] __vfs_removexattr+0x52/0x70 __vfs_removexattr_locked+0xb1/0x140 vfs_removexattr+0x56/0x100 removexattr+0x57/0x80 path_removexattr+0xa3/0xc0 __x64_sys_removexattr+0x17/0x20 do_syscall_64+0x37/0xb0 entry_SYSCALL_64_after_hwframe+0x44/0xae
The root cause is in __f2fs_setxattr(), we missed to do sanity check on last xattr entry, result in out-of-bound memory access during updating inconsistent xattr data of target inode.
After the fix, it can detect such xattr inconsistency as below:
F2FS-fs (loop11): inode (7) has invalid last xattr entry, entry_size: 60676 F2FS-fs (loop11): inode (8) has corrupted xattr
F2FS-fs (loop11): inode (8) has corrupted xattr
F2FS-fs (loop11): inode (8) has invalid last xattr entry, entry_size: 47736
--- fs/f2fs/xattr.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
fs/f2fs/xattr.c +10 -1
@@ -684,8 +684,17 @@ static int __f2fs_setxattr(struct inode } last = here; -while (!IS_XATTR_LAST_ENTRY (last)) +while (!IS_XATTR_LAST_ENTRY (last)) { +if ((void *)(last) +sizeof (__u32) > last_base_addr || + (void *)XATTR_NEXT_ENTRY (last) > last_base_addr) { +f2fs_err (F2FS_I_SB (inode),"inode (%lu) has invalid last xattr entry, entry_size: %zu" , + inode->i_ino,ENTRY_SIZE (last)); +set_sbi_flag (F2FS_I_SB (inode),SBI_NEED_FSCK ); + error = -EFSCORRUPTED ; + goto exit; + } last =XATTR_NEXT_ENTRY (last); + } newsize =XATTR_ALIGN (sizeof (struct f2fs_xattr_entry ) + len + size);
Greg Kroah-Hartman
maintainerPATCH 13/1039 f2fs: avoid EINVAL by SBI_NEED_FSCK when pinning a file
In reply to Greg Kroah-HartmanFrom: Jaegeuk Kim <[email protected]>
commit 19bdba5265624ba6b9d9dd936a0c6ccc167cfe80 upstream.
Android OTA failed due to SBI_NEED_FSCK flag when pinning the file. Let's avoid it since we can do in-place-updates.
--- fs/f2fs/data.c | 7 +++++-- fs/f2fs/file.c | 10 +++++----- 2 files changed, 10 insertions(+), 7 deletions(-)
fs/f2fs/data.c +5 -2
@@ -2617,6 +2617,11 @@ bool f2fs_should_update_outplace(struct {struct f2fs_sb_info *sbi =F2FS_I_SB (inode); +/* The below cases were checked when setting it. */ +if (f2fs_is_pinned_file (inode)) +return false; +if (fio &&is_sbi_flag_set (sbi,SBI_NEED_FSCK )) +return true;if (f2fs_lfs_mode (sbi))return true;if (S_ISDIR (inode->i_mode))
@@ -2625,8 +2630,6 @@ bool f2fs_should_update_outplace(structreturn true;if (f2fs_is_atomic_file (inode))return true; -if (is_sbi_flag_set (sbi,SBI_NEED_FSCK )) -return true;/* swap file is migrating in aligned write mode */ if (is_inode_flag_set (inode,FI_ALIGNED_WRITE ))
fs/f2fs/file.c +5 -5
@@ -3143,17 +3143,17 @@ static int f2fs_ioc_set_pin_file(structinode_lock (inode); -if (f2fs_should_update_outplace (inode,NULL )) { - ret = -EINVAL ; - goto out; - } -if (!pin) {clear_inode_flag (inode,FI_PIN_FILE );f2fs_i_gc_failures_write (inode,0 ); goto done; } +if (f2fs_should_update_outplace (inode,NULL )) { + ret = -EINVAL ; + goto out; + } +if (f2fs_pin_file_control (inode, false)) { ret = -EAGAIN ; goto out;
Greg Kroah-Hartman
maintainerPATCH 14/1039 nfc: llcp: fix NULL error pointer dereference on sendmsg() after failed bind()
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
commit dded08927ca3c31a5c37f8e7f95fe98770475dd4 upstream.
Syzbot detected a NULL pointer dereference of nfc_llcp_sock->dev pointer (which is a 'struct nfc_dev *') with calls to llcp_sock_sendmsg() after a failed llcp_sock_bind(). The message being sent is a SOCK_DGRAM.
KASAN report:
BUG: KASAN: null-ptr-deref in nfc_alloc_send_skb+0x2d/0xc0 Read of size 4 at addr 00000000000005c8 by task llcp_sock_nfc_a/899 CPU: 5 PID: 899 Comm: llcp_sock_nfc_a Not tainted 5.16.0-rc6-next-20211224-00001-gc6437fbf18b0 #125 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-2 04/01/2014 Call Trace: <TASK> dump_stack_lvl+0x45/0x59 ? nfc_alloc_send_skb+0x2d/0xc0 __kasan_report.cold+0x117/0x11c ? mark_lock+0x480/0x4f0 ? nfc_alloc_send_skb+0x2d/0xc0 kasan_report+0x38/0x50 nfc_alloc_send_skb+0x2d/0xc0 nfc_llcp_send_ui_frame+0x18c/0x2a0 ? nfc_llcp_send_i_frame+0x230/0x230 ? __local_bh_enable_ip+0x86/0xe0 ? llcp_sock_connect+0x470/0x470 ? llcp_sock_connect+0x470/0x470 sock_sendmsg+0x8e/0xa0 ____sys_sendmsg+0x253/0x3f0 ...
The issue was visible only with multiple simultaneous calls to bind() and sendmsg(), which resulted in most of the bind() calls to fail. The bind() was failing on checking if there is available WKS/SDP/SAP (respective bit in 'struct nfc_llcp_local' fields). When there was no available WKS/SDP/SAP, the bind returned error but the sendmsg() to such socket was able to trigger mentioned NULL pointer dereference of nfc_llcp_sock->dev.
The code looks simply racy and currently it protects several paths against race with checks for (!nfc_llcp_sock->local) which is NULL-ified in error paths of bind(). The llcp_sock_sendmsg() did not have such check but called function nfc_llcp_send_ui_frame() had, although not protected with lock_sock().
Therefore the race could look like (same socket is used all the time):
CPU0 CPU1
==== ====
llcp_sock_bind()
- lock_sock()
- success
- release_sock()
- return 0
llcp_sock_sendmsg()
- lock_sock()
- release_sock()
llcp_sock_bind(), same socket
- lock_sock()
- error
- nfc_llcp_send_ui_frame()
- if (!llcp_sock->local)
- llcp_sock->local = NULL
- nfc_put_device(dev)
- dereference llcp_sock->dev
- release_sock()
- return -ERRNO
The nfc_llcp_send_ui_frame() checked llcp_sock->local outside of the lock, which is racy and ineffective check. Instead, its caller llcp_sock_sendmsg(), should perform the check inside lock_sock().
--- net/nfc/llcp_sock.c | 5 +++++ 1 file changed, 5 insertions(+)
net/nfc/llcp_sock.c +5 -0
@@ -789,6 +789,11 @@ static int llcp_sock_sendmsg(struct socklock_sock (sk); +if (!llcp_sock->local) { +release_sock (sk); +return -ENODEV ; + } +if (sk->sk_type ==SOCK_DGRAM ) { DECLARE_SOCKADDR(struct sockaddr_nfc_llcp *, addr, msg->msg_name);
Greg Kroah-Hartman
maintainerPATCH 15/1039 mtd: rawnand: gpmi: Add ERR007117 protection for nfc_apply_timings
In reply to Greg Kroah-HartmanFrom: Christian Eggers <[email protected]>
commit f53d4c109a666bf1a4883b45d546fba079258717 upstream.
gpmi_io clock needs to be gated off when changing the parent/dividers of enfc_clk_root (i.MX6Q/i.MX6UL) respectively qspi2_clk_root (i.MX6SX). Otherwise this rate change can lead to an unresponsive GPMI core which results in DMA timeouts and failed driver probe:
[ 4.072318] gpmi-nand 112000.gpmi-nand: DMA timeout, last DMA ... [ 4.370355] gpmi-nand 112000.gpmi-nand: Chip: 0, Error -110 ... [ 4.375988] gpmi-nand 112000.gpmi-nand: Chip: 0, Error -22 [ 4.381524] gpmi-nand 112000.gpmi-nand: Error in ECC-based read: -22 [ 4.387988] gpmi-nand 112000.gpmi-nand: Chip: 0, Error -22 [ 4.393535] gpmi-nand 112000.gpmi-nand: Chip: 0, Error -22
...
Other than stated in i.MX 6 erratum ERR007117, it should be sufficient to gate only gpmi_io because all other bch/nand clocks are derived from different clock roots.
The i.MX6 reference manuals state that changing clock muxers can cause glitches but are silent about changing dividers. But tests showed that these glitches can definitely happen on i.MX6ULL. For i.MX7D/8MM in turn, the manual guarantees that no glitches can happen when changing dividers.
--- drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-)
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c +25 -3
@@ -713,14 +713,32 @@ static void gpmi_nfc_compute_timings(str (use_half_period ?BM_GPMI_CTRL1_HALF_PERIOD :0 ); } -static void gpmi_nfc_apply_timings (struct gpmi_nand_data *this) +static int gpmi_nfc_apply_timings (struct gpmi_nand_data *this) {struct gpmi_nfc_hardware_timing *hw = &this->hw;struct resources *r = &this->resources;void __iomem *gpmi_regs = r->gpmi_regs;unsigned int dll_wait_time_us; +int ret; + +/* Clock dividers do NOT guarantee a clean clock signal on its output +* during the change of the divide factor on i.MX6Q/UL/SX. On i.MX7/8, +* all clock dividers provide these guarantee. +*/ +if (GPMI_IS_MX6Q (this) ||GPMI_IS_MX6SX (this)) +clk_disable_unprepare (r->clock[0 ]); + + ret =clk_set_rate (r->clock[0 ], hw->clk_rate); +if (ret) { +dev_err (this->dev,"cannot set clock rate to %lu Hz: %d\n" , hw->clk_rate, ret); +return ret; + } -clk_set_rate (r->clock[0 ], hw->clk_rate); +if (GPMI_IS_MX6Q (this) ||GPMI_IS_MX6SX (this)) { + ret =clk_prepare_enable (r->clock[0 ]); +if (ret) +return ret; + }writel (hw->timing0, gpmi_regs +HW_GPMI_TIMING0 );writel (hw->timing1, gpmi_regs +HW_GPMI_TIMING1 );
@@ -739,6 +757,8 @@ static void gpmi_nfc_apply_timings(struc/* Wait for the DLL to settle. */ udelay (dll_wait_time_us); + +return 0 ; } static int gpmi_setup_interface(struct nand_chip *chip, int chipnr,
@@ -2278,7 +2298,9 @@ static int gpmi_nfc_exec_op(struct nand_*/ if (this->hw.must_apply_timings) { this->hw.must_apply_timings = false; -gpmi_nfc_apply_timings (this); + ret =gpmi_nfc_apply_timings (this); +if (ret) +return ret; }dev_dbg (this->dev,"%s: %d instructions\n" , __func__, op->ninstrs);
Greg Kroah-Hartman
maintainerPATCH 16/1039 mtd: rawnand: gpmi: Remove explicit default gpmi clock setting for i.MX6
In reply to Greg Kroah-HartmanFrom: Stefan Riedmueller <[email protected]>
commit aa1baa0e6c1aa4872e481dce4fc7fd6f3dd8496b upstream.
There is no need to explicitly set the default gpmi clock rate during boot for the i.MX 6 since this is done during nand_detect anyway.
--- drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 9 --------- 1 file changed, 9 deletions(-)
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c +0 -9
@@ -1052,15 +1052,6 @@ static int gpmi_get_clks(struct gpmi_nan r->clock[i] = clk; } -if (GPMI_IS_MX6 (this)) -/* -* Set the default value for the gpmi clock. -* -* If you want to use the ONFI nand which is in the -* Synchronous Mode, you should change the clock as you need. -*/ -clk_set_rate (r->clock[0 ],22000000 ); -return 0 ; err_clock:
Greg Kroah-Hartman
maintainerPATCH 17/1039 mtd: Fixed breaking list in __mtd_del_partition.
In reply to Greg Kroah-HartmanFrom: Andreas Oetken <[email protected]>
commit 2966daf7d253d9904b337b040dd7a43472858b8a upstream.
Not the child partition should be removed from the partition list but the partition itself. Otherwise the partition list gets broken and any subsequent remove operations leads to a kernel panic.
--- drivers/mtd/mtdpart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/mtdpart.c +1 -1
@@ -312,7 +312,7 @@ static int __mtd_del_partition(struct mtif (err)return err; -list_del (&child->part.node); +list_del (&mtd->part.node);free_partition (mtd);return 0 ;
Greg Kroah-Hartman
maintainerPATCH 18/1039 mtd: rawnand: davinci: Dont calculate ECC when reading page
In reply to Greg Kroah-HartmanFrom: Paul Cercueil <[email protected]>
commit 71e89591502d737c10db2bd4d8fcfaa352552afb upstream.
The function nand_davinci_read_page_hwecc_oob_first() does read the ECC data from the OOB area. Therefore it does not need to calculate the ECC as it is already available.
--- drivers/mtd/nand/raw/davinci_nand.c | 3 --- 1 file changed, 3 deletions(-)
drivers/mtd/nand/raw/davinci_nand.c +0 -3
@@ -394,7 +394,6 @@ static int nand_davinci_read_page_hwecc_int eccsteps = chip->ecc.steps;uint8_t *p = buf;uint8_t *ecc_code = chip->ecc.code_buf; -uint8_t *ecc_calc = chip->ecc.calc_buf;unsigned int max_bitflips =0 ;/* Read the OOB area first */
@@ -420,8 +419,6 @@ static int nand_davinci_read_page_hwecc_if (ret)return ret; - chip->ecc.calculate (chip, p, &ecc_calc[i]); - stat = chip->ecc.correct (chip, p, &ecc_code[i],NULL );if (stat == -EBADMSG && (chip->ecc.options &NAND_ECC_GENERIC_ERASED_CHECK )) {
Greg Kroah-Hartman
maintainerPATCH 19/1039 mtd: rawnand: davinci: Avoid duplicated page read
In reply to Greg Kroah-HartmanFrom: Paul Cercueil <[email protected]>
commit 9c9d709965385de5a99f84b14bd5860e1541729e upstream.
The function nand_davinci_read_page_hwecc_oob_first() first reads the OOB data, extracts the ECC information, programs the ECC hardware before reading the actual data in a loop.
Right after the OOB data was read, it called nand_read_page_op() to reset the read cursor to the beginning of the page. This caused the first page to be read twice: in that call, and later in the loop.
Address that issue by changing the call to nand_read_page_op() to nand_change_read_column_op(), which will only reset the read cursor.
--- drivers/mtd/nand/raw/davinci_nand.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mtd/nand/raw/davinci_nand.c +2 -1
@@ -401,7 +401,8 @@ static int nand_davinci_read_page_hwecc_if (ret)return ret; - ret =nand_read_page_op (chip, page,0 ,NULL ,0 ); +/* Move read cursor to start of page */ + ret =nand_change_read_column_op (chip,0 ,NULL ,0 , false);if (ret)return ret;
Greg Kroah-Hartman
maintainerPATCH 20/1039 mtd: rawnand: davinci: Rewrite function description
In reply to Greg Kroah-HartmanFrom: Paul Cercueil <[email protected]>
commit 0697f8441faad552fbeb02d74454b5e7bcc956a2 upstream.
The original comment that describes the function nand_davinci_read_page_hwecc_oob_first() is very obscure and it is hard to understand what it is for.
--- drivers/mtd/nand/raw/davinci_nand.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/mtd/nand/raw/davinci_nand.c +4 -6
@@ -372,17 +372,15 @@ correct: }/** -* nand_read_page_hwecc_oob_first - hw ecc, read oob first +* nand_davinci_read_page_hwecc_oob_first - Hardware ECC page read with ECC +* data read from OOB area * @chip: nand chip info structure * @buf: buffer to store read data * @oob_required: caller requires OOB data read to chip->oob_poi * @page: page number to read * -* Hardware ECC for large page chips, require OOB to be read first. For this -* ECC mode, the write_page method is re-used from ECC_HW. These methods -* read/write ECC from the OOB area, unlike the ECC_HW_SYNDROME support with -* multiple ECC steps, follows the "infix ECC" scheme and reads/writes ECC from -* the data area, by overwriting the NAND manufacturer bad block markings. +* Hardware ECC for large page chips, which requires the ECC data to be +* extracted from the OOB before the actual data is read. */ static int nand_davinci_read_page_hwecc_oob_first(struct nand_chip *chip, uint8_t *buf,
Greg Kroah-Hartman
maintainerPATCH 21/1039 mtd: rawnand: Export nand_read_page_hwecc_oob_first()
In reply to Greg Kroah-HartmanFrom: Paul Cercueil <[email protected]>
commit d8466f73010faf71effb21228ae1cbf577dab130 upstream.
Move the function nand_read_page_hwecc_oob_first() (previously nand_davinci_read_page_hwecc_oob_first()) to nand_base.c, and export it as a GPL symbol, so that it can be used by more modules.
--- drivers/mtd/nand/raw/davinci_nand.c | 69 ------------------------------------ drivers/mtd/nand/raw/nand_base.c | 67 ++++++++++++++++++++++++++++++++++ include/linux/mtd/rawnand.h | 2 + 3 files changed, 70 insertions(+), 68 deletions(-)
drivers/mtd/nand/raw/davinci_nand.c +1 -68
@@ -371,73 +371,6 @@ correct:return corrected; } -/** -* nand_davinci_read_page_hwecc_oob_first - Hardware ECC page read with ECC -* data read from OOB area -* @chip: nand chip info structure -* @buf: buffer to store read data -* @oob_required: caller requires OOB data read to chip->oob_poi -* @page: page number to read -* -* Hardware ECC for large page chips, which requires the ECC data to be -* extracted from the OOB before the actual data is read. -*/ -static int nand_davinci_read_page_hwecc_oob_first (struct nand_chip *chip, -uint8_t *buf, -int oob_required,int page) -{ -struct mtd_info *mtd =nand_to_mtd (chip); -int i, eccsize = chip->ecc.size, ret; -int eccbytes = chip->ecc.bytes; -int eccsteps = chip->ecc.steps; -uint8_t *p = buf; -uint8_t *ecc_code = chip->ecc.code_buf; -unsigned int max_bitflips =0 ; - -/* Read the OOB area first */ - ret =nand_read_oob_op (chip, page,0 , chip->oob_poi, mtd->oobsize); -if (ret) -return ret; - -/* Move read cursor to start of page */ - ret =nand_change_read_column_op (chip,0 ,NULL ,0 , false); -if (ret) -return ret; - - ret =mtd_ooblayout_get_eccbytes (mtd, ecc_code, chip->oob_poi,0 , - chip->ecc.total); -if (ret) -return ret; - -for (i =0 ; eccsteps; eccsteps--, i += eccbytes, p += eccsize) { -int stat; - - chip->ecc.hwctl (chip,NAND_ECC_READ ); - - ret =nand_read_data_op (chip, p, eccsize, false, false); -if (ret) -return ret; - - stat = chip->ecc.correct (chip, p, &ecc_code[i],NULL ); -if (stat == -EBADMSG && - (chip->ecc.options &NAND_ECC_GENERIC_ERASED_CHECK )) { -/* check for empty pages with bitflips */ - stat =nand_check_erased_ecc_chunk (p, eccsize, - &ecc_code[i], - eccbytes,NULL ,0 , - chip->ecc.strength); - } - -if (stat <0 ) { - mtd->ecc_stats.failed++; - }else { - mtd->ecc_stats.corrected += stat; - max_bitflips = max_t(unsigned int, max_bitflips, stat); - } - } -return max_bitflips; -} -/*----------------------------------------------------------------------*/ /* An ECC layout for using 4-bit ECC with small-page flash, storing
@@ -647,7 +580,7 @@ static int davinci_nand_attach_chip(stru }else if (chunks ==4 || chunks ==8 ) {mtd_set_ooblayout (mtd,nand_get_large_page_ooblayout ()); - chip->ecc.read_page = nand_davinci_read_page_hwecc_oob_first; + chip->ecc.read_page = nand_read_page_hwecc_oob_first; }else {return -EIO ; }
drivers/mtd/nand/raw/nand_base.c +67 -0
73 lines not on this page · raw message
include/linux/mtd/rawnand.h +2 -0
@@ -1539,6 +1539,8 @@ int nand_read_data_op(struct nand_chip * bool force_8bit, bool check_only);int nand_write_data_op (struct nand_chip *chip,const void *buf,unsigned int len,bool force_8bit); +int nand_read_page_hwecc_oob_first (struct nand_chip *chip,uint8_t *buf, +int oob_required,int page);/* Scan and identify a NAND device */ int nand_scan_with_ids(struct nand_chip *chip, unsigned int max_chips,
Greg Kroah-Hartman
maintainerPATCH 22/1039 mtd: rawnand: ingenic: JZ4740 needs oob_first read page function
In reply to Greg Kroah-HartmanFrom: Paul Cercueil <[email protected]>
commit 0171480007d64f663aae9226303f1b1e4621229e upstream.
The ECC engine on the JZ4740 SoC requires the ECC data to be read before the page; using the default page reading function does not work. Indeed, the old JZ4740 NAND driver (removed in 5.4) did use the 'OOB first' flag that existed back then.
Use the newly created nand_read_page_hwecc_oob_first() to address this issue.
This issue was not found when the new ingenic-nand driver was developed, most likely because the Device Tree used had the nand-ecc-mode set to "hw_oob_first", which seems to not be supported anymore.
--- drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c +5 -0
@@ -32,6 +32,7 @@ struct jz_soc_info {unsigned long addr_offset;unsigned long cmd_offset;const struct mtd_ooblayout_ops *oob_layout; +bool oob_first; };struct ingenic_nand_cs {
@@ -240,6 +241,9 @@ static int ingenic_nand_attach_chip(struif (chip->bbt_options &NAND_BBT_USE_FLASH ) chip->bbt_options |=NAND_BBT_NO_OOB ; +if (nfc->soc_info->oob_first) + chip->ecc.read_page = nand_read_page_hwecc_oob_first; +/* For legacy reasons we use a different layout on the qi,lb60 board. */ if (of_machine_is_compatible ("qi,lb60" ))mtd_set_ooblayout (mtd, &qi_lb60_ooblayout_ops);
@@ -534,6 +538,7 @@ static const struct jz_soc_info jz4740_s .data_offset = 0x00000000, .cmd_offset = 0x00008000, .addr_offset = 0x00010000, + .oob_first = true, };static const struct jz_soc_info jz4725b_soc_info = {
Greg Kroah-Hartman
maintainerPATCH 23/1039 riscv: Get rid of MAXPHYSMEM configs
In reply to Greg Kroah-HartmanFrom: Alexandre Ghiti <[email protected]>
commit db1503d355a79d1d4255a9996f20e72848b74a56 upstream.
CONFIG_MAXPHYSMEM_* are actually never used, even the nommu defconfigs selecting the MAXPHYSMEM_2GB had no effects on PAGE_OFFSET since it was preempted by !MMU case right before.
In addition, the move of the kernel mapping at the end of the address space broke the use of MAXPHYSMEM_2G with MMU since it defines PAGE_OFFSET at the same address as the kernel mapping.
--- arch/riscv/Kconfig | 23 ++--------------------- arch/riscv/configs/nommu_k210_defconfig | 2 -- arch/riscv/configs/nommu_k210_sdcard_defconfig | 2 -- arch/riscv/configs/nommu_virt_defconfig | 1 - 4 files changed, 2 insertions(+), 26 deletions(-)
arch/riscv/Kconfig +2 -21
@@ -158,10 +158,9 @@ config PA_BITS config PAGE_OFFSET hex - default 0xC0000000 if 32BIT && MAXPHYSMEM_1GB + default 0xC0000000 if 32BIT default 0x80000000 if 64BIT && !MMU - default 0xffffffff80000000 if 64BIT && MAXPHYSMEM_2GB - default 0xffffffe000000000 if 64BIT && MAXPHYSMEM_128GB + default 0xffffffe000000000 if 64BIT config KASAN_SHADOW_OFFSET hex
@@ -270,24 +269,6 @@ config MODULE_SECTIONS bool select HAVE_MOD_ARCH_SPECIFIC -choice - prompt "Maximum Physical Memory" - default MAXPHYSMEM_1GB if 32BIT - default MAXPHYSMEM_2GB if 64BIT && CMODEL_MEDLOW - default MAXPHYSMEM_128GB if 64BIT && CMODEL_MEDANY - - config MAXPHYSMEM_1GB - depends on 32BIT - bool "1GiB" - config MAXPHYSMEM_2GB - depends on 64BIT && CMODEL_MEDLOW - bool "2GiB" - config MAXPHYSMEM_128GB - depends on 64BIT && CMODEL_MEDANY - bool "128GiB" -endchoice - - config SMP bool "Symmetric Multi-Processing" help
arch/riscv/configs/nommu_k210_defconfig +0 -2
@@ -29,8 +29,6 @@ CONFIG_EMBEDDED=y CONFIG_SLOB=y # CONFIG_MMU is not set CONFIG_SOC_CANAAN=y -CONFIG_SOC_CANAAN_K210_DTB_SOURCE="k210_generic" -CONFIG_MAXPHYSMEM_2GB=y CONFIG_SMP=y CONFIG_NR_CPUS=2 CONFIG_CMDLINE="earlycon console=ttySIF0"
arch/riscv/configs/nommu_k210_sdcard_defconfig +0 -2
@@ -21,8 +21,6 @@ CONFIG_EMBEDDED=y CONFIG_SLOB=y # CONFIG_MMU is not set CONFIG_SOC_CANAAN=y -CONFIG_SOC_CANAAN_K210_DTB_SOURCE="k210_generic" -CONFIG_MAXPHYSMEM_2GB=y CONFIG_SMP=y CONFIG_NR_CPUS=2 CONFIG_CMDLINE="earlycon console=ttySIF0 rootdelay=2 root=/dev/mmcblk0p1 ro"
arch/riscv/configs/nommu_virt_defconfig +0 -1
@@ -27,7 +27,6 @@ CONFIG_SLOB=y # CONFIG_SLAB_MERGE_DEFAULT is not set # CONFIG_MMU is not set CONFIG_SOC_VIRT=y -CONFIG_MAXPHYSMEM_2GB=y CONFIG_SMP=y CONFIG_CMDLINE="root=/dev/vda rw earlycon=uart8250,mmio,0x10000000,115200n8 console=ttyS0" CONFIG_CMDLINE_FORCE=y
Greg Kroah-Hartman
maintainerPATCH 24/1039 RISC-V: Use common riscv_cpuid_to_hartid_mask() for both SMP=y and SMP=n
In reply to Greg Kroah-HartmanFrom: Sean Christopherson <[email protected]>
commit 869c70609248102f3a2e95a39b6233ff6ea2c932 upstream.
Use what is currently the SMP=y version of riscv_cpuid_to_hartid_mask() for both SMP=y and SMP=n to fix a build failure with KVM=m and SMP=n due to boot_cpu_hartid not being exported. This also fixes a second bug where the SMP=n version assumes the sole CPU in the system is in the incoming mask, which may not hold true in kvm_riscv_vcpu_sbi_ecall() if the KVM guest VM has multiple vCPUs (on a SMP=n system).
--- arch/riscv/include/asm/smp.h | 10 ++-------- arch/riscv/kernel/setup.c | 10 ++++++++++ arch/riscv/kernel/smp.c | 10 ---------- 3 files changed, 12 insertions(+), 18 deletions(-)
arch/riscv/include/asm/smp.h +2 -8
@@ -43,7 +43,6 @@ void arch_send_call_function_ipi_mask(stvoid arch_send_call_function_single_ipi (int cpu);int riscv_hartid_to_cpuid (int hartid); -void riscv_cpuid_to_hartid_mask (const struct cpumask *in,struct cpumask *out);/* Set custom IPI operations */ void riscv_set_ipi_ops (const struct riscv_ipi_ops *ops);
@@ -85,13 +84,6 @@ static inline unsigned long cpuid_to_harreturn boot_cpu_hartid; } -static inline void riscv_cpuid_to_hartid_mask (const struct cpumask *in, -struct cpumask *out) -{ -cpumask_clear (out); -cpumask_set_cpu (boot_cpu_hartid, out); -} -static inline void riscv_set_ipi_ops (const struct riscv_ipi_ops *ops) { }
@@ -102,6 +94,8 @@ static inline void riscv_clear_ipi(void)#endif /* CONFIG_SMP */ +void riscv_cpuid_to_hartid_mask (const struct cpumask *in,struct cpumask *out); +#if defined(CONFIG_HOTPLUG_CPU ) && (CONFIG_SMP )bool cpu_has_hotplug (unsigned int cpu);#else
arch/riscv/kernel/setup.c +10 -0
@@ -59,6 +59,16 @@ atomic_t hart_lottery __section(".sdata"unsigned long boot_cpu_hartid; static DEFINE_PER_CPU(struct cpu, cpu_devices); +void riscv_cpuid_to_hartid_mask (const struct cpumask *in,struct cpumask *out) +{ +int cpu; + +cpumask_clear (out); +for_each_cpu (cpu, in) +cpumask_set_cpu (cpuid_to_hartid_map (cpu), out); +} +EXPORT_SYMBOL_GPL (riscv_cpuid_to_hartid_mask); +/* * Place kernel memory regions on the resource tree so that * kexec-tools can retrieve them from /proc/iomem. While there
arch/riscv/kernel/smp.c +0 -10
@@ -59,16 +59,6 @@ int riscv_hartid_to_cpuid(int hartid)return -ENOENT ; } -void riscv_cpuid_to_hartid_mask (const struct cpumask *in,struct cpumask *out) -{ -int cpu; - -cpumask_clear (out); -for_each_cpu (cpu, in) -cpumask_set_cpu (cpuid_to_hartid_map (cpu), out); -} -EXPORT_SYMBOL_GPL (riscv_cpuid_to_hartid_mask); -bool arch_match_cpu_phys_id (int cpu,u64 phys_id) {return phys_id ==cpuid_to_hartid_map (cpu);
Greg Kroah-Hartman
maintainerPATCH 25/1039 riscv: try to allocate crashkern region from 32bit addressible memory
In reply to Greg Kroah-HartmanFrom: Nick Kossifidis <[email protected]>
commit decf89f86ecd3c3c3de81c562010d5797bea3de1 upstream.
When allocating crash kernel region without explicitly specifying its base address/size, memblock_phys_alloc_range will attempt to allocate memory top to bottom (memblock.bottom_up is false), so the crash kernel region will end up in highmem on 64bit systems. This way swiotlb can't work on the crash kernel, since there won't be any 32bit addressible memory available for the bounce buffers.
Try to allocate 32bit addressible memory if available, for the crash kernel by restricting the top search address to be less than SZ_4G. If that fails fallback to the previous behavior.
I tested this on HiFive Unmatched where the pci-e controller needs swiotlb to work, with this patch it's possible to access the pci-e controller on crash kernel and mount the rootfs from the nvme.
--- arch/riscv/mm/init.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)
arch/riscv/mm/init.c +13 -4
@@ -812,13 +812,22 @@ static void __init reserve_crashkernel(v/* * Current riscv boot protocol requires 2MB alignment for * RV64 and 4MB alignment for RV32 (hugepage size) +* +* Try to alloc from 32bit addressible physical memory so that +* swiotlb can work on the crash kernel. */ crash_base =memblock_phys_alloc_range (crash_size,PMD_SIZE , - search_start, search_end); + search_start, +min (search_end, (unsigned long )SZ_4G ));if (crash_base ==0 ) { -pr_warn ("crashkernel: couldn't allocate %lldKB\n" , - crash_size >>10 ); -return ; +/* Try again without restricting region to 32bit addressible memory */ + crash_base =memblock_phys_alloc_range (crash_size,PMD_SIZE , + search_start, search_end); +if (crash_base ==0 ) { +pr_warn ("crashkernel: couldn't allocate %lldKB\n" , + crash_size >>10 ); +return ; + } } pr_info("crashkernel: reserved 0x%016llx - 0x%016llx (%lld MB)\n",
Greg Kroah-Hartman
maintainerPATCH 26/1039 riscv: Dont use va_pa_offset on kdump
In reply to Greg Kroah-HartmanFrom: Nick Kossifidis <[email protected]>
commit a11c07f032a0e9a562a32ece73af96b0e754c4b3 upstream.
On kdump instead of using an intermediate step to relocate the kernel, that lives in a "control buffer" outside the current kernel's mapping, we jump to the crash kernel directly by calling riscv_kexec_norelocate(). The current implementation uses va_pa_offset while switching to physical addressing, however since we moved the kernel outside the linear mapping this won't work anymore since riscv_kexec_norelocate() is part of the kernel mapping and we should use kernel_map.va_kernel_pa_offset, and also take XIP kernel into account.
We don't really need to use va_pa_offset on riscv_kexec_norelocate, we can just set STVEC to the physical address of the new kernel instead and let the hart jump to the new kernel on the next instruction after setting SATP to zero. This fixes kdump and is also simpler/cleaner.
I tested this on the latest qemu and HiFive Unmatched and works as expected.
--- arch/riscv/kernel/kexec_relocate.S | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-)
arch/riscv/kernel/kexec_relocate.S +9 -11
@@ -159,25 +159,15 @@ SYM_CODE_START(riscv_kexec_norelocate) * s0: (const) Phys address to jump to * s1: (const) Phys address of the FDT image * s2: (const) The hartid of the current hart - * s3: (const) kernel_map.va_pa_offset, used when switching MMU off */ mv s0, a1 mv s1, a2 mv s2, a3 - mv s3, a4 /* Disable / cleanup interrupts */ csrw CSR_SIE, zero csrw CSR_SIP, zero - /* Switch to physical addressing */ - la s4, 1f - sub s4, s4, s3 - csrw CSR_STVEC, s4 - csrw CSR_SATP, zero - -.align 2 -1: /* Pass the arguments to the next kernel / Cleanup*/ mv a0, s2 mv a1, s1
@@ -214,7 +204,15 @@ SYM_CODE_START(riscv_kexec_norelocate) csrw CSR_SCAUSE, zero csrw CSR_SSCRATCH, zero - jalr zero, a2, 0 + /* + * Switch to physical addressing + * This will also trigger a jump to CSR_STVEC + * which in this case is the address of the new + * kernel. + */ + csrw CSR_STVEC, a2 + csrw CSR_SATP, zero + SYM_CODE_END(riscv_kexec_norelocate) .section ".rodata"
Greg Kroah-Hartman
maintainerPATCH 27/1039 riscv: use hart id instead of cpu id on machine_kexec
In reply to Greg Kroah-HartmanFrom: Nick Kossifidis <[email protected]>
commit 0e105f1d0037d677dff3c697d22f9551e6c39af8 upstream.
raw_smp_processor_id() doesn't return the hart id as stated in arch/riscv/include/asm/smp.h, use smp_processor_id() instead to get the cpu id, and cpuid_to_hartid_map() to pass the hart id to the next kernel. This fixes kexec on HiFive Unleashed/Unmatched where cpu ids and hart ids don't match (on qemu-virt they match).
--- arch/riscv/kernel/machine_kexec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/riscv/kernel/machine_kexec.c +2 -1
@@ -169,7 +169,8 @@ machine_kexec(struct kimage *image)struct kimage_arch *internal = &image->arch;unsigned long jump_addr = (unsigned long ) image->start;unsigned long first_ind_entry = (unsigned long ) &image->head; -unsigned long this_hart_id =raw_smp_processor_id (); +unsigned long this_cpu_id =smp_processor_id (); +unsigned long this_hart_id =cpuid_to_hartid_map (this_cpu_id);unsigned long fdt_addr = internal->fdt_addr;void *control_code_buffer =page_address (image->control_code_page);riscv_kexec_method kexec_method =NULL ;
Greg Kroah-Hartman
maintainerPATCH 28/1039 riscv: mm: fix wrong phys_ram_base value for RV64
In reply to Greg Kroah-HartmanFrom: Jisheng Zhang <[email protected]>
commit b0fd4b1bf995172b9efcee23600d4f69571c321c upstream.
Currently, if 64BIT and !XIP_KERNEL, the phys_ram_base is always 0, no matter the real start of dram reported by memblock is.
--- arch/riscv/mm/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/mm/init.c +1 -1
@@ -187,10 +187,10 @@ static void __init setup_bootmem(void) phys_ram_end =memblock_end_of_DRAM (); -#ifndef CONFIG_64BIT #ifndef CONFIG_XIP_KERNEL phys_ram_base =memblock_start_of_DRAM ();#endif +#ifndef CONFIG_64BIT /* * memblock allocator is not aware of the fact that last 4K bytes of * the addressable memory can not be mapped because of IS_ERR_VALUE
Greg Kroah-Hartman
maintainerPATCH 29/1039 x86/gpu: Reserve stolen memory for first integrated Intel GPU
In reply to Greg Kroah-HartmanFrom: Lucas De Marchi <[email protected]>
commit 9c494ca4d3a535f9ca11ad6af1813983c1c6cbdd upstream.
"Stolen memory" is memory set aside for use by an Intel integrated GPU. The intel_graphics_quirks() early quirk reserves this memory when it is called for a GPU that appears in the intel_early_ids[] table of integrated GPUs.
Previously intel_graphics_quirks() was marked as QFLAG_APPLY_ONCE, so it was called only for the first Intel GPU found. If a discrete GPU happened to be enumerated first, intel_graphics_quirks() was called for it but not for any integrated GPU found later. Therefore, stolen memory for such an integrated GPU was never reserved.
For example, this problem occurs in this Alderlake-P (integrated) + DG2 (discrete) topology where the DG2 is found first, but stolen memory is associated with the integrated GPU:
- 00:01.0 Bridge
`- 03:00.0 DG2 discrete GPU
- 00:02.0 Integrated GPU (with stolen memory)
Remove the QFLAG_APPLY_ONCE flag and call intel_graphics_quirks() for every Intel GPU. Reserve stolen memory for the first GPU that appears in intel_early_ids[].
[bhelgaas: commit log, add code comment, squash in
https://lore.kernel.org/r/20220118190558.2ququ4vdfjuahicm@ldmartin-desk2]
--- arch/x86/kernel/early-quirks.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
arch/x86/kernel/early-quirks.c +9 -1
@@ -515,6 +515,7 @@ static const struct intel_early_ops gen1 .stolen_size = gen9_stolen_size, }; +/* Intel integrated GPUs for which we need to reserve "stolen memory" */ static const struct pci_device_id intel_early_ids[]__initconst = {INTEL_I830_IDS (&i830_early_ops),INTEL_I845G_IDS (&i845_early_ops),
@@ -591,6 +592,13 @@ static void __init intel_graphics_quirksu16 device;int i; +/* +* Reserve "stolen memory" for an integrated GPU. If we've already +* found one, there's nothing to do for other (discrete) GPUs. +*/ +if (resource_size (&intel_graphics_stolen_res)) +return ; + device =read_pci_config_16 (num, slot, func,PCI_DEVICE_ID );for (i =0 ; i <ARRAY_SIZE (intel_early_ids); i++) {
@@ -703,7 +711,7 @@ static struct chipset early_qrk[] __init {PCI_VENDOR_ID_INTEL ,0x3406 ,PCI_CLASS_BRIDGE_HOST , PCI_BASE_CLASS_BRIDGE, 0, intel_remapping_check }, { PCI_VENDOR_ID_INTEL, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA, PCI_ANY_ID, - QFLAG_APPLY_ONCE, intel_graphics_quirks }, + 0, intel_graphics_quirks },/* * HPET on the current version of the Baytrail platform has accuracy * problems: it will halt in deep idle state - so we disable it.
Greg Kroah-Hartman
maintainerPATCH 30/1039 tools/nolibc: x86-64: Fix startup code bug
In reply to Greg Kroah-HartmanFrom: Ammar Faizi <[email protected]>
commit 937ed91c712273131de6d2a02caafd3ee84e0c72 upstream.
Before this patch, the _start function looks like this:
```
0000000000001170 <_start>:
1170: pop %rdi
1171: mov %rsp,%rsi
1174: lea 0x8(%rsi,%rdi,8),%rdx
1179: and $0xfffffffffffffff0,%rsp
117d: sub $0x8,%rsp
1181: call 1000 <main>
1186: movzbq %al,%rdi
118a: mov $0x3c,%rax
1191: syscall
1193: hlt
1194: data16 cs nopw 0x0(%rax,%rax,1)
119f: nop
```Note the "and" to %rsp with $-16, it makes the %rsp be 16-byte aligned, but then there is a "sub" with $0x8 which makes the %rsp no longer 16-byte aligned, then it calls main. That's the bug!
What actually the x86-64 System V ABI mandates is that right before the "call", the %rsp must be 16-byte aligned, not after the "call". So the "sub" with $0x8 here breaks the alignment. Remove it.
An example where this rule matters is when the callee needs to align its stack at 16-byte for aligned move instruction, like movdqa and movaps. If the callee can't align its stack properly, it will result in segmentation fault.
x86-64 System V ABI also mandates the deepest stack frame should be zero. Just to be safe, let's zero the %rbp on startup as the content of %rbp may be unspecified when the program starts. Now it looks like this:
```
0000000000001170 <_start>:
1170: pop %rdi
1171: mov %rsp,%rsi
1174: lea 0x8(%rsi,%rdi,8),%rdx
1179: xor %ebp,%ebp # zero the %rbp
117b: and $0xfffffffffffffff0,%rsp # align the %rsp
117f: call 1000 <main>
1184: movzbq %al,%rdi
1188: mov $0x3c,%rax
118f: syscall
1191: hlt
1192: data16 cs nopw 0x0(%rax,%rax,1)
119d: nopl (%rax)
```[wt: I did this on purpose due to a misunderstanding of the spec, other
archs will thus have to be rechecked, particularly i386]
--- tools/include/nolibc/nolibc.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
tools/include/nolibc/nolibc.h +8 -2
@@ -399,14 +399,20 @@ struct stat { })/* startup code */ +/* +* x86-64 System V ABI mandates: +* 1) %rsp must be 16-byte aligned right before the function call. +* 2) The deepest stack frame should be zero (the %rbp). +* +*/ asm(".section .text\n" ".global _start\n" "_start:\n" "pop %rdi\n" // argc (first arg, %rdi) "mov %rsp, %rsi\n" // argv[] (second arg, %rsi) "lea 8(%rsi,%rdi,8),%rdx\n" // then a NULL then envp (third arg, %rdx) -"and $-16, %rsp\n" // x86 ABI : esp must be 16-byte aligned when -"sub $8, %rsp\n" // entering the callee +"xor %ebp, %ebp\n" // zero the stack frame +"and $-16, %rsp\n" // x86 ABI : esp must be 16-byte aligned before call "call main\n" // main() returns the status code, we'll exit with it. "movzb %al, %rdi\n" // retrieve exit code from 8 lower bits "mov $60, %rax\n" // NR_exit == 60
Greg Kroah-Hartman
maintainerPATCH 31/1039 crypto: x86/aesni - dont require alignment of data
In reply to Greg Kroah-HartmanFrom: Jakub Kicinski <[email protected]>
commit d480a26bdf872529919e7c30e17f79d0d7b8c4da upstream.
x86 AES-NI routines can deal with unaligned data. Crypto context (key, iv etc.) have to be aligned but we take care of that separately by copying it onto the stack. We were feeding unaligned data into crypto routines up until commit 83c83e658863 ("crypto: aesni - refactor scatterlist processing") switched to use the full skcipher API which uses cra_alignmask to decide data alignment.
This fixes 21% performance regression in kTLS.
Tested by booting with CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y (and running thru various kTLS packets).
--- arch/x86/crypto/aesni-intel_glue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/crypto/aesni-intel_glue.c +2 -2
@@ -1107,7 +1107,7 @@ static struct aead_alg aesni_aeads[] = { .cra_flags = CRYPTO_ALG_INTERNAL, .cra_blocksize = 1, .cra_ctxsize = sizeof(struct aesni_rfc4106_gcm_ctx), - .cra_alignmask = AESNI_ALIGN - 1, + .cra_alignmask = 0, .cra_module = THIS_MODULE, }, }, {
@@ -1124,7 +1124,7 @@ static struct aead_alg aesni_aeads[] = { .cra_flags = CRYPTO_ALG_INTERNAL, .cra_blocksize = 1, .cra_ctxsize = sizeof(struct generic_gcmaes_ctx), - .cra_alignmask = AESNI_ALIGN - 1, + .cra_alignmask = 0, .cra_module = THIS_MODULE, }, } };
Greg Kroah-Hartman
maintainerPATCH 32/1039 tools/nolibc: i386: fix initial stack alignment
In reply to Greg Kroah-HartmanFrom: Willy Tarreau <[email protected]>
commit ebbe0d8a449d183fa43b42d84fcb248e25303985 upstream.
After re-checking in the spec and comparing stack offsets with glibc, The last pushed argument must be 16-byte aligned (i.e. aligned before the call) so that in the callee esp+4 is multiple of 16, so the principle is the 32-bit equivalent to what Ammar fixed for x86_64. It's possible that 32-bit code using SSE2 or MMX could have been affected. In addition the frame pointer ought to be zero at the deepest level.
--- tools/include/nolibc/nolibc.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
tools/include/nolibc/nolibc.h +9 -1
@@ -583,13 +583,21 @@ struct sys_stat_struct { })/* startup code */ +/* +* i386 System V ABI mandates: +* 1) last pushed argument must be 16-byte aligned. +* 2) The deepest stack frame should be set to zero +* +*/ asm(".section .text\n" ".global _start\n" "_start:\n" "pop %eax\n" // argc (first arg, %eax) "mov %esp, %ebx\n" // argv[] (second arg, %ebx) "lea 4(%ebx,%eax,4),%ecx\n" // then a NULL then envp (third arg, %ecx) -"and $-16, %esp\n" // x86 ABI : esp must be 16-byte aligned when +"xor %ebp, %ebp\n" // zero the stack frame +"and $-16, %esp\n" // x86 ABI : esp must be 16-byte aligned before +"sub $4, %esp\n" // the call instruction (args are aligned) "push %ecx\n" // push all registers on the stack so that we "push %ebx\n" // support both regparm and plain stack modes "push %eax\n"
Greg Kroah-Hartman
maintainerPATCH 33/1039 tools/nolibc: fix incorrect truncation of exit code
In reply to Greg Kroah-HartmanFrom: Willy Tarreau <[email protected]>
commit de0244ae40ae91145faaf164a4252347607c3711 upstream.
Ammar Faizi reported that our exit code handling is wrong. We truncate it to the lowest 8 bits but the syscall itself is expected to take a regular 32-bit signed integer, not an unsigned char. It's the kernel that later truncates it to the lowest 8 bits. The difference is visible in strace, where the program below used to show exit(255) instead of exit(-1):
int main(void)
{
return -1;
}This patch applies the fix to all archs. x86_64, i386, arm64, armv7 and mips were all tested and confirmed to work fine now. Risc-v was not tested but the change is trivial and exactly the same as for other archs.
--- tools/include/nolibc/nolibc.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)
tools/include/nolibc/nolibc.h +5 -8
@@ -414,7 +414,7 @@ asm(".section .text\n""xor %ebp, %ebp\n" // zero the stack frame "and $-16, %rsp\n" // x86 ABI : esp must be 16-byte aligned before call "call main\n" // main() returns the status code, we'll exit with it. -"movzb %al, %rdi\n" // retrieve exit code from 8 lower bits +"mov %eax, %edi\n" // retrieve exit code (32 bit) "mov $60, %rax\n" // NR_exit == 60 "syscall\n" // really exit "hlt\n" // ensure it does not return
@@ -602,9 +602,9 @@ asm(".section .text\n""push %ebx\n" // support both regparm and plain stack modes "push %eax\n" "call main\n" // main() returns the status code in %eax -"movzbl %al, %ebx\n" // retrieve exit code from lower 8 bits -"movl $1, %eax\n" // NR_exit == 1 -"int $0x80\n" // exit now +"mov %eax, %ebx\n" // retrieve exit code (32-bit int) +"movl $1, %eax\n" // NR_exit == 1 +"int $0x80\n" // exit now "hlt\n" // ensure it does not "");
@@ -788,7 +788,6 @@ asm(".section .text\n""and %r3, %r1, $-8\n" // AAPCS : sp must be 8-byte aligned in the "mov %sp, %r3\n" // callee, an bl doesn't push (lr=pc) "bl main\n" // main() returns the status code, we'll exit with it. -"and %r0, %r0, $0xff\n" // limit exit code to 8 bits "movs r7, $1\n" // NR_exit == 1 "svc $0x00\n" "");
@@ -985,7 +984,6 @@ asm(".section .text\n""add x2, x2, x1\n" // + argv "and sp, x1, -16\n" // sp must be 16-byte aligned in the callee "bl main\n" // main() returns the status code, we'll exit with it. -"and x0, x0, 0xff\n" // limit exit code to 8 bits "mov x8, 93\n" // NR_exit == 93 "svc #0\n" "");
@@ -1190,7 +1188,7 @@ asm(".section .text\n""addiu $sp,$sp,-16\n" // the callee expects to save a0..a3 there! "jal main\n" // main() returns the status code, we'll exit with it. "nop\n" // delayed slot -"and $a0, $v0, 0xff\n" // limit exit code to 8 bits +"move $a0, $v0\n" // retrieve 32-bit exit code from v0 "li $v0, 4001\n" // NR_exit == 4001 "syscall\n" ".end __start\n"
@@ -1388,7 +1386,6 @@ asm(".section .text\n""add a2,a2,a1\n" // + argv "andi sp,a1,-16\n" // sp must be 16-byte aligned "call main\n" // main() returns the status code, we'll exit with it. -"andi a0, a0, 0xff\n" // limit exit code to 8 bits "li a7, 93\n" // NR_exit == 93 "ecall\n" "");
Greg Kroah-Hartman
maintainerPATCH 34/1039 rtc: cmos: take rtc_lock while reading from CMOS
In reply to Greg Kroah-HartmanFrom: Mateusz Jończyk <[email protected]>
commit 454f47ff464325223129b9b5b8d0b61946ec704d upstream.
Reading from the CMOS involves writing to the index register and then reading from the data register. Therefore access to the CMOS has to be serialized with rtc_lock. This invocation of CMOS_READ was not serialized, which could cause trouble when other code is accessing CMOS at the same time.
Use spin_lock_irq() like the rest of the function.
Nothing in kernel modifies the RTC_DM_BINARY bit, so there could be a separate pair of spin_lock_irq() / spin_unlock_irq() before doing the math.
--- drivers/rtc/rtc-cmos.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/rtc/rtc-cmos.c +3 -0
@@ -457,7 +457,10 @@ static int cmos_set_alarm(struct device min = t->time.tm_min; sec = t->time.tm_sec; +spin_lock_irq (&rtc_lock); rtc_control =CMOS_READ (RTC_CONTROL ); +spin_unlock_irq (&rtc_lock); +if (!(rtc_control &RTC_DM_BINARY ) ||RTC_ALWAYS_BCD ) {/* Writing 0xff means "don't care" or "match all". */ mon = (mon <=12 ) ?bin2bcd (mon) :0xff ;
Greg Kroah-Hartman
maintainerPATCH 35/1039 net: phy: marvell: add Marvell specific PHY loopback
In reply to Greg Kroah-HartmanFrom: Mohammad Athari Bin Ismail <[email protected]>
commit 020a45aff1190c32b1087cd75b57fbf6bff46ea6 upstream.
Existing genphy_loopback() is not applicable for Marvell PHY. Besides configuring bit-6 and bit-13 in Page 0 Register 0 (Copper Control Register), it is also required to configure same bits in Page 2 Register 21 (MAC Specific Control Register 2) according to speed of the loopback is operating.
Tested working on Marvell88E1510 PHY for all speeds (1000/100/10Mbps).
FIXME: Based on trial and error test, it seem 1G need to have delay between soft reset and loopback enablement.
--- drivers/net/phy/marvell.c | 56 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-)
drivers/net/phy/marvell.c +55 -1
@@ -189,6 +189,8 @@#define MII_88E1510_GEN_CTRL_REG_1_MODE_RGMII_SGMII 0x4#define MII_88E1510_GEN_CTRL_REG_1_RESET 0x8000/* Soft reset */ +#define MII_88E1510_MSCR_2 0x15 +#define MII_VCT5_TX_RX_MDI0_COUPLING 0x10#define MII_VCT5_TX_RX_MDI1_COUPLING 0x11#define MII_VCT5_TX_RX_MDI2_COUPLING 0x12
@@ -1932,6 +1934,58 @@ static void marvell_get_stats(struct phy data[i] =marvell_get_stat (phydev, i); } +static int m88e1510_loopback (struct phy_device *phydev,bool enable) +{ +int err; + +if (enable) { +u16 bmcr_ctl =0 , mscr2_ctl =0 ; + +if (phydev->speed ==SPEED_1000 ) + bmcr_ctl =BMCR_SPEED1000 ; +else if (phydev->speed ==SPEED_100 ) + bmcr_ctl =BMCR_SPEED100 ; + +if (phydev->duplex ==DUPLEX_FULL ) + bmcr_ctl |=BMCR_FULLDPLX ; + + err =phy_write (phydev,MII_BMCR , bmcr_ctl); +if (err <0 ) +return err; + +if (phydev->speed ==SPEED_1000 ) + mscr2_ctl =BMCR_SPEED1000 ; +else if (phydev->speed ==SPEED_100 ) + mscr2_ctl =BMCR_SPEED100 ; + + err =phy_modify_paged (phydev,MII_MARVELL_MSCR_PAGE , +MII_88E1510_MSCR_2 ,BMCR_SPEED1000 | +BMCR_SPEED100 , mscr2_ctl); +if (err <0 ) +return err; + +/* Need soft reset to have speed configuration takes effect */ + err =genphy_soft_reset (phydev); +if (err <0 ) +return err; + +/* FIXME: Based on trial and error test, it seem 1G need to have +* delay between soft reset and loopback enablement. +*/ +if (phydev->speed ==SPEED_1000 ) +msleep (1000 ); + +return phy_modify (phydev,MII_BMCR ,BMCR_LOOPBACK , +BMCR_LOOPBACK ); + }else { + err =phy_modify (phydev,MII_BMCR ,BMCR_LOOPBACK ,0 ); +if (err <0 ) +return err; + +return phy_config_aneg (phydev); + } +} +static int marvell_vct5_wait_complete (struct phy_device *phydev) {int i;
@@ -3078,7 +3132,7 @@ static struct phy_driver marvell_drivers .get_sset_count = marvell_get_sset_count, .get_strings = marvell_get_strings, .get_stats = marvell_get_stats, - .set_loopback = genphy_loopback, + .set_loopback = m88e1510_loopback, .get_tunable = m88e1011_get_tunable, .set_tunable = m88e1011_set_tunable, .cable_test_start = marvell_vct7_cable_test_start,
Greg Kroah-Hartman
maintainerPATCH 36/1039 ksmbd: uninitialized variable in create_socket()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
commit b207602fb04537cb21ac38fabd7577eca2fa05ae upstream.
The "ksmbd_socket" variable is not initialized on this error path.
--- fs/ksmbd/transport_tcp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/ksmbd/transport_tcp.c +2 -1
@@ -404,7 +404,7 @@ static int create_socket(struct interfac &ksmbd_socket);if (ret) {pr_err ("Can't create socket for ipv4: %d\n" , ret); - goto out_error; + goto out_clear; } sin.sin_family =PF_INET ;
@@ -462,6 +462,7 @@ static int create_socket(struct interfac out_error:tcp_destroy_socket (ksmbd_socket); +out_clear: iface->ksmbd_socket =NULL ;return ret; }
Greg Kroah-Hartman
maintainerPATCH 37/1039 ksmbd: fix guest connection failure with nautilus
In reply to Greg Kroah-HartmanFrom: Namjae Jeon <[email protected]>
commit ac090d9c90b087d6fb714e54b2a6dd1e6c373ed6 upstream.
MS-SMB2 describe session sign like the following. Session.SigningRequired MUST be set to TRUE under the following conditions:
- If the SMB2_NEGOTIATE_SIGNING_REQUIRED bit is set in the SecurityMode field of the client request.
- If the SMB2_SESSION_FLAG_IS_GUEST bit is not set in the SessionFlags field and Session.IsAnonymous is FALSE and either Connection.ShouldSign or global RequireMessageSigning is TRUE.
When trying guest account connection using nautilus, The login failure happened on session setup. ksmbd does not allow this connection when the user is a guest and the connection sign is set. Just do not set session sign instead of error response as described in the specification. And this change improves the guest connection in Nautilus.
--- fs/ksmbd/smb2pdu.c | 64 ++++++++++++++++++++++++----------------------------- 1 file changed, 30 insertions(+), 34 deletions(-)
fs/ksmbd/smb2pdu.c +30 -34
@@ -1455,11 +1455,6 @@ static int ntlm_authenticate(struct ksmb sess->user = user;if (user_guest (sess->user)) { -if (conn->sign) { -ksmbd_debug (SMB ,"Guest login not allowed when signing enabled\n" ); -return -EPERM ; - } - rsp->SessionFlags =SMB2_SESSION_FLAG_IS_GUEST_LE ; }else {struct authenticate_message *authblob;
@@ -1472,38 +1467,39 @@ static int ntlm_authenticate(struct ksmbksmbd_debug (SMB ,"authentication failed\n" );return -EPERM ; } + } -/* -* If session state is SMB2_SESSION_VALID, We can assume -* that it is reauthentication. And the user/password -* has been verified, so return it here. -*/ -if (sess->state ==SMB2_SESSION_VALID ) { -if (conn->binding) - goto binding_session; -return 0 ; - } +/* +* If session state is SMB2_SESSION_VALID, We can assume +* that it is reauthentication. And the user/password +* has been verified, so return it here. +*/ +if (sess->state ==SMB2_SESSION_VALID ) { +if (conn->binding) + goto binding_session; +return 0 ; + } -if ((conn->sign || server_conf.enforced_signing) || - (req->SecurityMode &SMB2_NEGOTIATE_SIGNING_REQUIRED )) - sess->sign = true; - -if (smb3_encryption_negotiated (conn) && - !(req->Flags &SMB2_SESSION_REQ_FLAG_BINDING )) { - rc = conn->ops->generate_encryptionkey (sess); -if (rc) { -ksmbd_debug (SMB , -"SMB3 encryption key generation failed\n" ); -return -EINVAL ; - } - sess->enc = true; - rsp->SessionFlags =SMB2_SESSION_FLAG_ENCRYPT_DATA_LE ; -/* -* signing is disable if encryption is enable -* on this session -*/ - sess->sign = false; +if ((rsp->SessionFlags !=SMB2_SESSION_FLAG_IS_GUEST_LE && + (conn->sign || server_conf.enforced_signing)) || + (req->SecurityMode &SMB2_NEGOTIATE_SIGNING_REQUIRED )) + sess->sign = true; + +if (smb3_encryption_negotiated (conn) && + !(req->Flags &SMB2_SESSION_REQ_FLAG_BINDING )) { + rc = conn->ops->generate_encryptionkey (sess); +if (rc) { +ksmbd_debug (SMB , +"SMB3 encryption key generation failed\n" ); +return -EINVAL ; } + sess->enc = true; + rsp->SessionFlags =SMB2_SESSION_FLAG_ENCRYPT_DATA_LE ; +/* +* signing is disable if encryption is enable +* on this session +*/ + sess->sign = false; } binding_session:
Greg Kroah-Hartman
maintainerPATCH 38/1039 ksmbd: add support for smb2 max credit parameter
In reply to Greg Kroah-HartmanFrom: Namjae Jeon <[email protected]>
commit 004443b3f6d722b455cf963ed7c3edd7f4772405 upstream.
Add smb2 max credits parameter to adjust maximum credits value to limit number of outstanding requests.
--- fs/ksmbd/connection.h | 1 - fs/ksmbd/ksmbd_netlink.h | 1 + fs/ksmbd/smb2misc.c | 2 +- fs/ksmbd/smb2ops.c | 16 ++++++++++++---- fs/ksmbd/smb2pdu.c | 8 ++++---- fs/ksmbd/smb2pdu.h | 1 + fs/ksmbd/smb_common.h | 1 + fs/ksmbd/transport_ipc.c | 2 ++ 8 files changed, 22 insertions(+), 10 deletions(-)
fs/ksmbd/connection.h +0 -1
@@ -62,7 +62,6 @@ struct ksmbd_conn {/* References which are made for this Server object*/ atomic_t r_count;unsigned short total_credits; -unsigned short max_credits;spinlock_t credits_lock;wait_queue_head_t req_running_q;/* Lock to protect requests list*/
fs/ksmbd/ksmbd_netlink.h +1 -0
@@ -103,6 +103,7 @@ struct ksmbd_startup_request {* we set the SPARSE_FILES bit (0x40). */ __u32 sub_auth[3 ];/* Subauth value for Security ID */ +__u32 smb2_max_credits;/* MAX credits */ __u32 ifc_list_sz;/* interfaces list size */ __s8 ____payload[]; };
fs/ksmbd/smb2misc.c +1 -1
@@ -326,7 +326,7 @@ static int smb2_validate_credit_charge(sksmbd_debug (SMB ,"Insufficient credit charge, given: %d, needed: %d\n" , credit_charge, calc_credit_num);return 1 ; - }else if (credit_charge > conn->max_credits) { + }else if (credit_charge > conn->vals->max_credits) {ksmbd_debug (SMB ,"Too large credit charge: %d\n" , credit_charge);return 1 ; }
fs/ksmbd/smb2ops.c +12 -4
@@ -19,6 +19,7 @@ static struct smb_version_values smb21_s .max_read_size = SMB21_DEFAULT_IOSIZE, .max_write_size = SMB21_DEFAULT_IOSIZE, .max_trans_size = SMB21_DEFAULT_IOSIZE, + .max_credits = SMB2_MAX_CREDITS, .large_lock_type = 0, .exclusive_lock_type = SMB2_LOCKFLAG_EXCLUSIVE, .shared_lock_type = SMB2_LOCKFLAG_SHARED,
@@ -44,6 +45,7 @@ static struct smb_version_values smb30_s .max_read_size = SMB3_DEFAULT_IOSIZE, .max_write_size = SMB3_DEFAULT_IOSIZE, .max_trans_size = SMB3_DEFAULT_TRANS_SIZE, + .max_credits = SMB2_MAX_CREDITS, .large_lock_type = 0, .exclusive_lock_type = SMB2_LOCKFLAG_EXCLUSIVE, .shared_lock_type = SMB2_LOCKFLAG_SHARED,
@@ -70,6 +72,7 @@ static struct smb_version_values smb302_ .max_read_size = SMB3_DEFAULT_IOSIZE, .max_write_size = SMB3_DEFAULT_IOSIZE, .max_trans_size = SMB3_DEFAULT_TRANS_SIZE, + .max_credits = SMB2_MAX_CREDITS, .large_lock_type = 0, .exclusive_lock_type = SMB2_LOCKFLAG_EXCLUSIVE, .shared_lock_type = SMB2_LOCKFLAG_SHARED,
@@ -96,6 +99,7 @@ static struct smb_version_values smb311_ .max_read_size = SMB3_DEFAULT_IOSIZE, .max_write_size = SMB3_DEFAULT_IOSIZE, .max_trans_size = SMB3_DEFAULT_TRANS_SIZE, + .max_credits = SMB2_MAX_CREDITS, .large_lock_type = 0, .exclusive_lock_type = SMB2_LOCKFLAG_EXCLUSIVE, .shared_lock_type = SMB2_LOCKFLAG_SHARED,
@@ -197,7 +201,6 @@ void init_smb2_1_server(struct ksmbd_con conn->ops = &smb2_0_server_ops; conn->cmds = smb2_0_server_cmds; conn->max_cmds =ARRAY_SIZE (smb2_0_server_cmds); - conn->max_credits =SMB2_MAX_CREDITS ; conn->signing_algorithm =SIGNING_ALG_HMAC_SHA256_LE ;if (server_conf.flags &KSMBD_GLOBAL_FLAG_SMB2_LEASES )
@@ -215,7 +218,6 @@ void init_smb3_0_server(struct ksmbd_con conn->ops = &smb3_0_server_ops; conn->cmds = smb2_0_server_cmds; conn->max_cmds =ARRAY_SIZE (smb2_0_server_cmds); - conn->max_credits =SMB2_MAX_CREDITS ; conn->signing_algorithm =SIGNING_ALG_AES_CMAC_LE ;if (server_conf.flags &KSMBD_GLOBAL_FLAG_SMB2_LEASES )
@@ -240,7 +242,6 @@ void init_smb3_02_server(struct ksmbd_co conn->ops = &smb3_0_server_ops; conn->cmds = smb2_0_server_cmds; conn->max_cmds =ARRAY_SIZE (smb2_0_server_cmds); - conn->max_credits =SMB2_MAX_CREDITS ; conn->signing_algorithm =SIGNING_ALG_AES_CMAC_LE ;if (server_conf.flags &KSMBD_GLOBAL_FLAG_SMB2_LEASES )
@@ -265,7 +266,6 @@ int init_smb3_11_server(struct ksmbd_con conn->ops = &smb3_11_server_ops; conn->cmds = smb2_0_server_cmds; conn->max_cmds =ARRAY_SIZE (smb2_0_server_cmds); - conn->max_credits =SMB2_MAX_CREDITS ; conn->signing_algorithm =SIGNING_ALG_AES_CMAC_LE ;if (server_conf.flags &KSMBD_GLOBAL_FLAG_SMB2_LEASES )
@@ -304,3 +304,11 @@ void init_smb2_max_trans_size(unsigned i smb302_server_values.max_trans_size = sz; smb311_server_values.max_trans_size = sz; } + +void init_smb2_max_credits (unsigned int sz) +{ + smb21_server_values.max_credits = sz; + smb30_server_values.max_credits = sz; + smb302_server_values.max_credits = sz; + smb311_server_values.max_credits = sz; +}
fs/ksmbd/smb2pdu.c +4 -4
@@ -308,7 +308,7 @@ int smb2_set_rsp_credits(struct ksmbd_wo hdr->CreditCharge = req_hdr->CreditCharge; -if (conn->total_credits > conn->max_credits) { +if (conn->total_credits > conn->vals->max_credits) { hdr->CreditRequest =0 ;pr_err ("Total credits overflow: %d\n" , conn->total_credits);return -EINVAL ;
@@ -329,12 +329,12 @@ int smb2_set_rsp_credits(struct ksmbd_woif (hdr->Command ==SMB2_NEGOTIATE ) aux_max =0 ;else - aux_max = conn->max_credits - credit_charge; + aux_max = conn->vals->max_credits - credit_charge; aux_credits = min_t(unsigned short, aux_credits, aux_max); credits_granted = credit_charge + aux_credits; -if (conn->max_credits - conn->total_credits < credits_granted) - credits_granted = conn->max_credits - +if (conn->vals->max_credits - conn->total_credits < credits_granted) + credits_granted = conn->vals->max_credits - conn->total_credits; conn->total_credits += credits_granted;
fs/ksmbd/smb2pdu.h +1 -0
@@ -980,6 +980,7 @@ int init_smb3_11_server(struct ksmbd_convoid init_smb2_max_read_size (unsigned int sz);void init_smb2_max_write_size (unsigned int sz);void init_smb2_max_trans_size (unsigned int sz); +void init_smb2_max_credits (unsigned int sz);bool is_smb2_neg_cmd (struct ksmbd_work *work);bool is_smb2_rsp (struct ksmbd_work *work);
fs/ksmbd/smb_common.h +1 -0
@@ -365,6 +365,7 @@ struct smb_version_values {__u32 max_read_size;__u32 max_write_size;__u32 max_trans_size; +__u32 max_credits;__u32 large_lock_type;__u32 exclusive_lock_type;__u32 shared_lock_type;
fs/ksmbd/transport_ipc.c +2 -0
@@ -301,6 +301,8 @@ static int ipc_server_config_on_startup(init_smb2_max_write_size (req->smb2_max_write);if (req->smb2_max_trans)init_smb2_max_trans_size (req->smb2_max_trans); +if (req->smb2_max_credits) +init_smb2_max_credits (req->smb2_max_credits); ret =ksmbd_set_netbios_name (req->netbios_name); ret |=ksmbd_set_server_string (req->server_string);
Greg Kroah-Hartman
maintainerPATCH 39/1039 ksmbd: move credit charge deduction under processing request
In reply to Greg Kroah-HartmanFrom: Namjae Jeon <[email protected]>
commit 914d7e5709ac59ded70bea7956d408fe2acd7c3c upstream.
Moves the credit charge deduction from total_credits under the processing a request. When repeating smb2 lock request and other command request, there will be a problem that ->total_credits does not decrease.
--- fs/ksmbd/smb2misc.c | 7 ++----- fs/ksmbd/smb2pdu.c | 16 ++++++++++------ 2 files changed, 12 insertions(+), 11 deletions(-)
fs/ksmbd/smb2misc.c +2 -5
@@ -289,7 +289,7 @@ static int smb2_validate_credit_charge(sunsigned int req_len =0 , expect_resp_len =0 , calc_credit_num, max_len;unsigned short credit_charge =le16_to_cpu (hdr->CreditCharge);void *__hdr = hdr; -int ret; +int ret =0 ;switch (hdr->Command) {case SMB2_QUERY_INFO :
@@ -332,10 +332,7 @@ static int smb2_validate_credit_charge(s }spin_lock (&conn->credits_lock); -if (credit_charge <= conn->total_credits) { - conn->total_credits -= credit_charge; - ret =0 ; - }else { +if (credit_charge > conn->total_credits) {ksmbd_debug (SMB ,"Insufficient credits granted, given: %u, granted: %u\n" , credit_charge, conn->total_credits); ret =1 ;
fs/ksmbd/smb2pdu.c +10 -6
@@ -299,9 +299,8 @@ int smb2_set_rsp_credits(struct ksmbd_wostruct smb2_hdr *req_hdr =ksmbd_req_buf_next (work);struct smb2_hdr *hdr =ksmbd_resp_buf_next (work);struct ksmbd_conn *conn = work->conn; -unsigned short credits_requested; +unsigned short credits_requested, aux_max;unsigned short credit_charge, credits_granted =0 ; -unsigned short aux_max, aux_credits;if (work->send_no_response)return 0 ;
@@ -316,6 +315,13 @@ int smb2_set_rsp_credits(struct ksmbd_wo credit_charge = max_t(unsigned short,le16_to_cpu (req_hdr->CreditCharge),1 ); +if (credit_charge > conn->total_credits) { +ksmbd_debug (SMB ,"Insufficient credits granted, given: %u, granted: %u\n" , + credit_charge, conn->total_credits); +return -EINVAL ; + } + + conn->total_credits -= credit_charge; credits_requested = max_t(unsigned short,le16_to_cpu (req_hdr->CreditRequest),1 );
@@ -325,13 +331,11 @@ int smb2_set_rsp_credits(struct ksmbd_wo* TODO: Need to adjuct CreditRequest value according to * current cpu load */ - aux_credits = credits_requested -1 ;if (hdr->Command ==SMB2_NEGOTIATE ) - aux_max =0 ; + aux_max =1 ;else aux_max = conn->vals->max_credits - credit_charge; - aux_credits = min_t(unsigned short, aux_credits, aux_max); - credits_granted = credit_charge + aux_credits; + credits_granted = min_t(unsigned short, credits_requested, aux_max);if (conn->vals->max_credits - conn->total_credits < credits_granted) credits_granted = conn->vals->max_credits -
Greg Kroah-Hartman
maintainerPATCH 40/1039 ksmbd: limits exceeding the maximum allowable outstanding requests
In reply to Greg Kroah-HartmanFrom: Namjae Jeon <[email protected]>
commit b589f5db6d4af8f14d70e31e1276b4c017668a26 upstream.
If the client ignores the CreditResponse received from the server and continues to send the request, ksmbd limits the requests if it exceeds smb2 max credits.
--- fs/ksmbd/connection.c | 1 + fs/ksmbd/connection.h | 3 ++- fs/ksmbd/smb2misc.c | 9 +++++++++ fs/ksmbd/smb2pdu.c | 1 + 4 files changed, 13 insertions(+), 1 deletion(-)
fs/ksmbd/connection.c +1 -0
@@ -62,6 +62,7 @@ struct ksmbd_conn *ksmbd_conn_alloc(voidatomic_set (&conn->req_running,0 );atomic_set (&conn->r_count,0 ); conn->total_credits =1 ; + conn->outstanding_credits =1 ;init_waitqueue_head (&conn->req_running_q);INIT_LIST_HEAD (&conn->conns_list);
fs/ksmbd/connection.h +2 -1
@@ -61,7 +61,8 @@ struct ksmbd_conn {atomic_t req_running;/* References which are made for this Server object*/ atomic_t r_count; -unsigned short total_credits; +unsigned int total_credits; +unsigned int outstanding_credits;spinlock_t credits_lock;wait_queue_head_t req_running_q;/* Lock to protect requests list*/
fs/ksmbd/smb2misc.c +9 -0
@@ -337,7 +337,16 @@ static int smb2_validate_credit_charge(s credit_charge, conn->total_credits); ret =1 ; } + +if ((u64 )conn->outstanding_credits + credit_charge > conn->vals->max_credits) { +ksmbd_debug (SMB ,"Limits exceeding the maximum allowable outstanding requests, given : %u, pending : %u\n" , + credit_charge, conn->outstanding_credits); + ret =1 ; + }else + conn->outstanding_credits += credit_charge; +spin_unlock (&conn->credits_lock); +return ret; }
fs/ksmbd/smb2pdu.c +1 -0
@@ -322,6 +322,7 @@ int smb2_set_rsp_credits(struct ksmbd_wo } conn->total_credits -= credit_charge; + conn->outstanding_credits -= credit_charge; credits_requested = max_t(unsigned short,le16_to_cpu (req_hdr->CreditRequest),1 );
Greg Kroah-Hartman
maintainerPATCH 41/1039 ksmbd: add reserved room in ipc request/response
In reply to Greg Kroah-HartmanFrom: Namjae Jeon <[email protected]>
commit 41dbda16a0902798e732abc6599de256b9dc3b27 upstream.
Whenever new parameter is added to smb configuration, It is possible to break the execution of the IPC daemon by mismatch size of request/response. This patch tries to reserve space in ipc request/response in advance to prevent that.
--- fs/ksmbd/ksmbd_netlink.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
fs/ksmbd/ksmbd_netlink.h +10 -1
@@ -104,6 +104,7 @@ struct ksmbd_startup_request {*/ __u32 sub_auth[3 ];/* Subauth value for Security ID */ __u32 smb2_max_credits;/* MAX credits */ +__u32 reserved[128 ];/* Reserved room */ __u32 ifc_list_sz;/* interfaces list size */ __s8 ____payload[]; };
@@ -114,7 +115,7 @@ struct ksmbd_startup_request {* IPC request to shutdown ksmbd server. */ struct ksmbd_shutdown_request { -__s32 reserved; +__s32 reserved[16 ]; };/*
@@ -123,6 +124,7 @@ struct ksmbd_shutdown_request {struct ksmbd_login_request {__u32 handle;__s8 account[KSMBD_REQ_MAX_ACCOUNT_NAME_SZ ];/* user account name */ +__u32 reserved[16 ];/* Reserved room */ };/*
@@ -136,6 +138,7 @@ struct ksmbd_login_response {__u16 status;__u16 hash_sz;/* hash size */ __s8 hash[KSMBD_REQ_MAX_HASH_SZ ];/* password hash */ +__u32 reserved[16 ];/* Reserved room */ };/*
@@ -144,6 +147,7 @@ struct ksmbd_login_response {struct ksmbd_share_config_request {__u32 handle;__s8 share_name[KSMBD_REQ_MAX_SHARE_NAME ];/* share name */ +__u32 reserved[16 ];/* Reserved room */ };/*
@@ -158,6 +162,7 @@ struct ksmbd_share_config_response {__u16 force_directory_mode;__u16 force_uid;__u16 force_gid; +__u32 reserved[128 ];/* Reserved room */ __u32 veto_list_sz;__s8 ____payload[]; };
@@ -188,6 +193,7 @@ struct ksmbd_tree_connect_request {__s8 account[KSMBD_REQ_MAX_ACCOUNT_NAME_SZ ];__s8 share[KSMBD_REQ_MAX_SHARE_NAME ];__s8 peer_addr[64 ]; +__u32 reserved[16 ];/* Reserved room */ };/*
@@ -197,6 +203,7 @@ struct ksmbd_tree_connect_response {__u32 handle;__u16 status;__u16 connection_flags; +__u32 reserved[16 ];/* Reserved room */ };/*
@@ -205,6 +212,7 @@ struct ksmbd_tree_connect_response {struct ksmbd_tree_disconnect_request {__u64 session_id;/* session id */ __u64 connect_id;/* tree connection id */ +__u32 reserved[16 ];/* Reserved room */ };/*
@@ -213,6 +221,7 @@ struct ksmbd_tree_disconnect_request {struct ksmbd_logout_request {__s8 account[KSMBD_REQ_MAX_ACCOUNT_NAME_SZ ];/* user account name */ __u32 account_flags; +__u32 reserved[16 ];/* Reserved room */ };/*
Greg Kroah-Hartman
maintainerPATCH 42/1039 media: cec: fix a deadlock situation
In reply to Greg Kroah-HartmanFrom: Hans Verkuil <[email protected]>
commit a9e6107616bb8108aa4fc22584a05e69761a91f7 upstream.
The cec_devnode struct has a lock meant to serialize access to the fields of this struct. This lock is taken during device node (un)registration and when opening or releasing a filehandle to the device node. When the last open filehandle is closed the cec adapter might be disabled by calling the adap_enable driver callback with the devnode.lock held.
However, if during that callback a message or event arrives then the driver will call one of the cec_queue_event() variants in cec-adap.c, and those will take the same devnode.lock to walk the open filehandle list.
This obviously causes a deadlock.
This is quite easy to reproduce with the cec-gpio driver since that uses the cec-pin framework which generated lots of events and uses a kernel thread for the processing, so when adap_enable is called the thread is still running and can generate events.
But I suspect that it might also happen with other drivers if an interrupt arrives signaling e.g. a received message before adap_enable had a chance to disable the interrupts.
This patch adds a new mutex to serialize access to the fhs list. When adap_enable() is called the devnode.lock mutex is held, but not devnode.lock_fhs. The event functions in cec-adap.c will now use devnode.lock_fhs instead of devnode.lock, ensuring that it is safe to call those functions from the adap_enable callback.
This specific issue only happens if the last open filehandle is closed and the physical address is invalid. This is not something that happens during normal operation, but it does happen when monitoring CEC traffic (e.g. cec-ctl --monitor) with an unconfigured CEC adapter.
--- drivers/media/cec/core/cec-adap.c | 38 +++++++++++++++++++++----------------- drivers/media/cec/core/cec-api.c | 6 ++++++ drivers/media/cec/core/cec-core.c | 3 +++ include/media/cec.h | 11 +++++++++-- 4 files changed, 39 insertions(+), 19 deletions(-)
drivers/media/cec/core/cec-adap.c +21 -17
@@ -161,10 +161,10 @@ static void cec_queue_event(struct cec_au64 ts =ktime_get_ns ();struct cec_fh *fh; -mutex_lock (&adap->devnode.lock); +mutex_lock (&adap->devnode.lock_fhs);list_for_each_entry (fh, &adap->devnode.fhs, list)cec_queue_event_fh (fh, ev, ts); -mutex_unlock (&adap->devnode.lock); +mutex_unlock (&adap->devnode.lock_fhs); }/* Notify userspace that the CEC pin changed state at the given time. */
@@ -178,11 +178,12 @@ void cec_queue_pin_cec_event(struct cec_ };struct cec_fh *fh; -mutex_lock (&adap->devnode.lock); -list_for_each_entry (fh, &adap->devnode.fhs, list) +mutex_lock (&adap->devnode.lock_fhs); +list_for_each_entry (fh, &adap->devnode.fhs, list) {if (fh->mode_follower ==CEC_MODE_MONITOR_PIN )cec_queue_event_fh (fh, &ev,ktime_to_ns (ts)); -mutex_unlock (&adap->devnode.lock); + } +mutex_unlock (&adap->devnode.lock_fhs); }EXPORT_SYMBOL_GPL (cec_queue_pin_cec_event);
@@ -195,10 +196,10 @@ void cec_queue_pin_hpd_event(struct cec_ };struct cec_fh *fh; -mutex_lock (&adap->devnode.lock); +mutex_lock (&adap->devnode.lock_fhs);list_for_each_entry (fh, &adap->devnode.fhs, list)cec_queue_event_fh (fh, &ev,ktime_to_ns (ts)); -mutex_unlock (&adap->devnode.lock); +mutex_unlock (&adap->devnode.lock_fhs); }EXPORT_SYMBOL_GPL (cec_queue_pin_hpd_event);
@@ -211,10 +212,10 @@ void cec_queue_pin_5v_event(struct cec_a };struct cec_fh *fh; -mutex_lock (&adap->devnode.lock); +mutex_lock (&adap->devnode.lock_fhs);list_for_each_entry (fh, &adap->devnode.fhs, list)cec_queue_event_fh (fh, &ev,ktime_to_ns (ts)); -mutex_unlock (&adap->devnode.lock); +mutex_unlock (&adap->devnode.lock_fhs); }EXPORT_SYMBOL_GPL (cec_queue_pin_5v_event);
@@ -286,12 +287,12 @@ static void cec_queue_msg_monitor(structu32 monitor_mode = valid_la ?CEC_MODE_MONITOR :CEC_MODE_MONITOR_ALL ; -mutex_lock (&adap->devnode.lock); +mutex_lock (&adap->devnode.lock_fhs);list_for_each_entry (fh, &adap->devnode.fhs, list) {if (fh->mode_follower >= monitor_mode)cec_queue_msg_fh (fh, msg); } -mutex_unlock (&adap->devnode.lock); +mutex_unlock (&adap->devnode.lock_fhs); }/*
@@ -302,12 +303,12 @@ static void cec_queue_msg_followers(stru {struct cec_fh *fh; -mutex_lock (&adap->devnode.lock); +mutex_lock (&adap->devnode.lock_fhs);list_for_each_entry (fh, &adap->devnode.fhs, list) {if (fh->mode_follower ==CEC_MODE_FOLLOWER )cec_queue_msg_fh (fh, msg); } -mutex_unlock (&adap->devnode.lock); +mutex_unlock (&adap->devnode.lock_fhs); }/* Notify userspace of an adapter state change. */
@@ -1573,6 +1574,7 @@ void __cec_s_phys_addr(struct cec_adapte/* Disabling monitor all mode should always succeed */ if (adap->monitor_all_cnt)WARN_ON (call_op (adap, adap_monitor_all_enable, false)); +/* serialize adap_enable */ mutex_lock (&adap->devnode.lock);if (adap->needs_hpd ||list_empty (&adap->devnode.fhs)) {WARN_ON (adap->ops->adap_enable (adap, false));
@@ -1584,14 +1586,16 @@ void __cec_s_phys_addr(struct cec_adaptereturn ; } +/* serialize adap_enable */ mutex_lock (&adap->devnode.lock); adap->last_initiator =0xff ; adap->transmit_in_progress = false; -if ((adap->needs_hpd ||list_empty (&adap->devnode.fhs)) && - adap->ops->adap_enable (adap, true)) { -mutex_unlock (&adap->devnode.lock); -return ; +if (adap->needs_hpd ||list_empty (&adap->devnode.fhs)) { +if (adap->ops->adap_enable (adap, true)) { +mutex_unlock (&adap->devnode.lock); +return ; + } } if (adap->monitor_all_cnt &&
drivers/media/cec/core/cec-api.c +6 -0
@@ -586,6 +586,7 @@ static int cec_open(struct inode *inode,return err; } +/* serialize adap_enable */ mutex_lock (&devnode->lock); if (list_empty(&devnode->fhs) && !adap->needs_hpd &&
@@ -624,7 +625,9 @@ static int cec_open(struct inode *inode, }#endif +mutex_lock (&devnode->lock_fhs);list_add (&fh->list, &devnode->fhs); +mutex_unlock (&devnode->lock_fhs);mutex_unlock (&devnode->lock);return 0 ;
@@ -653,8 +656,11 @@ static int cec_release(struct inode *inocec_monitor_all_cnt_dec (adap);mutex_unlock (&adap->lock); +/* serialize adap_enable */ mutex_lock (&devnode->lock); +mutex_lock (&devnode->lock_fhs);list_del (&fh->list); +mutex_unlock (&devnode->lock_fhs);if (cec_is_registered (adap) &&list_empty (&devnode->fhs) && !adap->needs_hpd && adap->phys_addr ==CEC_PHYS_ADDR_INVALID ) {WARN_ON (adap->ops->adap_enable (adap, false));
drivers/media/cec/core/cec-core.c +3 -0
@@ -169,8 +169,10 @@ static void cec_devnode_unregister(struc devnode->registered = false; devnode->unregistered = true; +mutex_lock (&devnode->lock_fhs);list_for_each_entry (fh, &devnode->fhs, list)wake_up_interruptible (&fh->wait); +mutex_unlock (&devnode->lock_fhs);mutex_unlock (&devnode->lock);
@@ -272,6 +274,7 @@ struct cec_adapter *cec_allocate_adapter/* adap->devnode initialization */ INIT_LIST_HEAD (&adap->devnode.fhs); +mutex_init (&adap->devnode.lock_fhs);mutex_init (&adap->devnode.lock); adap->kthread =kthread_run (cec_thread_func, adap,"cec-%s" , name);
include/media/cec.h +9 -2
@@ -26,13 +26,17 @@* @dev: cec device * @cdev: cec character device * @minor: device node minor number +* @lock: lock to serialize open/release and registration * @registered: the device was correctly registered * @unregistered: the device was unregistered +* @lock_fhs: lock to control access to @fhs * @fhs: the list of open filehandles (cec_fh) -* @lock: lock to control access to this structure * * This structure represents a cec-related device node. * +* To add or remove filehandles from @fhs the @lock must be taken first, +* followed by @lock_fhs. It is safe to access @fhs if either lock is held. +* * The @parent is a physical device. It must be set by core or device drivers * before registering the node. */
@@ -43,10 +47,13 @@ struct cec_devnode {/* device info */ int minor; +/* serialize open/release and registration */ +struct mutex lock;bool registered;bool unregistered; +/* protect access to fhs */ +struct mutex lock_fhs;struct list_head fhs; -struct mutex lock; };struct cec_adapter ;
Greg Kroah-Hartman
maintainerPATCH 43/1039 media: ov8865: Disable only enabled regulators on error path
In reply to Greg Kroah-HartmanFrom: Sakari Ailus <[email protected]>
commit cbe0b3af73bf72fad197756f026084404e2bcdc7 upstream.
If powering on the sensor failed, the entire power-off sequence was run independently of how far the power-on sequence proceeded before the error. This lead to disabling regulators and/or clock that was not enabled.
Fix this by disabling only clocks and regulators that were enabled previously.
--- drivers/media/i2c/ov8865.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
drivers/media/i2c/ov8865.c +7 -5
@@ -2330,27 +2330,27 @@ static int ov8865_sensor_power(struct ovif (ret) {dev_err (sensor->dev,"failed to enable DOVDD regulator\n" ); - goto disable; +return ret; } ret =regulator_enable (sensor->avdd);if (ret) {dev_err (sensor->dev,"failed to enable AVDD regulator\n" ); - goto disable; + goto disable_dovdd; } ret =regulator_enable (sensor->dvdd);if (ret) {dev_err (sensor->dev,"failed to enable DVDD regulator\n" ); - goto disable; + goto disable_avdd; } ret =clk_prepare_enable (sensor->extclk);if (ret) {dev_err (sensor->dev,"failed to enable EXTCLK clock\n" ); - goto disable; + goto disable_dvdd; }gpiod_set_value_cansleep (sensor->reset,0 );
@@ -2359,14 +2359,16 @@ static int ov8865_sensor_power(struct ov/* Time to enter streaming mode according to power timings. */ usleep_range (10000 ,12000 ); }else { -disable:gpiod_set_value_cansleep (sensor->powerdown,1 );gpiod_set_value_cansleep (sensor->reset,1 );clk_disable_unprepare (sensor->extclk); +disable_dvdd:regulator_disable (sensor->dvdd); +disable_avdd:regulator_disable (sensor->avdd); +disable_dovdd:regulator_disable (sensor->dovdd); }
Greg Kroah-Hartman
maintainerPATCH 44/1039 media: v4l2-ioctl.c: readbuffers depends on V4L2_CAP_READWRITE
In reply to Greg Kroah-HartmanFrom: Hans Verkuil <[email protected]>
commit cd9d9377ed235b294a492a094e1666178a5e78fd upstream.
If V4L2_CAP_READWRITE is not set, then readbuffers must be set to 0, otherwise v4l2-compliance will complain.
A note on the Fixes tag below: this patch does not really fix that commit, but it can be applied from that commit onwards. For older code there is no guarantee that device_caps is set, so even though this patch would apply, it will not work reliably.
--- drivers/media/v4l2-core/v4l2-ioctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/media/v4l2-core/v4l2-ioctl.c +3 -1
@@ -2090,6 +2090,7 @@ static int v4l_prepare_buf(const structstatic int v4l_g_parm (const struct v4l2_ioctl_ops *ops,struct file *file,void *fh,void *arg) { +struct video_device *vfd =video_devdata (file);struct v4l2_streamparm *p = arg;v4l2_std_id std;int ret =check_fmt (file, p->type);
@@ -2101,7 +2102,8 @@ static int v4l_g_parm(const struct v4l2_if (p->type !=V4L2_BUF_TYPE_VIDEO_CAPTURE && p->type !=V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE )return -EINVAL ; - p->parm.capture.readbuffers =2 ; +if (vfd->device_caps &V4L2_CAP_READWRITE ) + p->parm.capture.readbuffers =2 ; ret = ops->vidioc_g_std (file, fh, &std);if (ret ==0 )v4l2_video_std_frame_period (std, &p->parm.capture.timeperframe);
Greg Kroah-Hartman
maintainerPATCH 45/1039 media: flexcop-usb: fix control-message timeouts
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit cd1798a387825cc4a51282f5a611ad05bb1ad75f upstream.
USB control-message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ.
Note that the driver was multiplying some of the timeout values with HZ twice resulting in 3000-second timeouts with HZ=1000.
Also note that two of the timeout defines are currently unused.
--- drivers/media/usb/b2c2/flexcop-usb.c | 10 +++++----- drivers/media/usb/b2c2/flexcop-usb.h | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-)
drivers/media/usb/b2c2/flexcop-usb.c +5 -5
@@ -87,7 +87,7 @@ static int flexcop_usb_readwrite_dw(stru0 , fc_usb->data,sizeof (u32), - B2C2_WAIT_FOR_OPERATION_RDW * HZ); + B2C2_WAIT_FOR_OPERATION_RDW);if (ret !=sizeof (u32)) { err("error while %s dword from %d (%d).", read ? "reading" :
@@ -155,7 +155,7 @@ static int flexcop_usb_v8_memory_req(str wIndex, fc_usb->data, buflen, - nWaitTime * HZ); + nWaitTime);if (ret != buflen) ret = -EIO ;
@@ -248,13 +248,13 @@ static int flexcop_usb_i2c_req(struct fl/* DKT 020208 - add this to support special case of DiSEqC */ case USB_FUNC_I2C_CHECKWRITE : pipe =B2C2_USB_CTRL_PIPE_OUT ; - nWaitTime =2 ; + nWaitTime =2000 ; request_type |=USB_DIR_OUT ;break ;case USB_FUNC_I2C_READ :case USB_FUNC_I2C_REPEATREAD : pipe =B2C2_USB_CTRL_PIPE_IN ; - nWaitTime =2 ; + nWaitTime =2000 ; request_type |=USB_DIR_IN ;break ;default :
@@ -281,7 +281,7 @@ static int flexcop_usb_i2c_req(struct fl wIndex, fc_usb->data, buflen, - nWaitTime * HZ); + nWaitTime);if (ret != buflen) ret = -EIO ;
drivers/media/usb/b2c2/flexcop-usb.h +6 -6
@@ -91,13 +91,13 @@ typedef enum {UTILITY_SRAM_TESTVERIFY =0x16 , } flexcop_usb_utility_function_t; -#define B2C2_WAIT_FOR_OPERATION_RW (1*HZ) -#define B2C2_WAIT_FOR_OPERATION_RDW (3*HZ) -#define B2C2_WAIT_FOR_OPERATION_WDW (1*HZ) +#define B2C2_WAIT_FOR_OPERATION_RW 1000 +#define B2C2_WAIT_FOR_OPERATION_RDW 3000 +#define B2C2_WAIT_FOR_OPERATION_WDW 1000 -#define B2C2_WAIT_FOR_OPERATION_V8READ (3*HZ) -#define B2C2_WAIT_FOR_OPERATION_V8WRITE (3*HZ) -#define B2C2_WAIT_FOR_OPERATION_V8FLASH (3*HZ) +#define B2C2_WAIT_FOR_OPERATION_V8READ 3000 +#define B2C2_WAIT_FOR_OPERATION_V8WRITE 3000 +#define B2C2_WAIT_FOR_OPERATION_V8FLASH 3000 typedef enum { V8_MEMORY_PAGE_DVB_CI = 0x20,
Greg Kroah-Hartman
maintainerPATCH 46/1039 media: mceusb: fix control-message timeouts
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit 16394e998cbb050730536bdf7e89f5a70efbd974 upstream.
USB control-message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ.
--- drivers/media/rc/mceusb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/media/rc/mceusb.c +4 -4
@@ -1430,7 +1430,7 @@ static void mceusb_gen1_init(struct mceu*/ ret =usb_control_msg (ir->usbdev,usb_rcvctrlpipe (ir->usbdev,0 ),USB_REQ_SET_ADDRESS ,USB_TYPE_VENDOR ,0 ,0 , - data,USB_CTRL_MSG_SZ ,HZ *3 ); + data,USB_CTRL_MSG_SZ ,3000 );dev_dbg (dev,"set address - ret = %d" , ret);dev_dbg (dev,"set address - data[0] = %d, data[1] = %d" , data[0 ], data[1 ]);
@@ -1438,20 +1438,20 @@ static void mceusb_gen1_init(struct mceu/* set feature: bit rate 38400 bps */ ret =usb_control_msg (ir->usbdev,usb_sndctrlpipe (ir->usbdev,0 ),USB_REQ_SET_FEATURE ,USB_TYPE_VENDOR , -0xc04e ,0x0000 ,NULL ,0 ,HZ *3 ); +0xc04e ,0x0000 ,NULL ,0 ,3000 );dev_dbg (dev,"set feature - ret = %d" , ret);/* bRequest 4: set char length to 8 bits */ ret =usb_control_msg (ir->usbdev,usb_sndctrlpipe (ir->usbdev,0 ),4 ,USB_TYPE_VENDOR , -0x0808 ,0x0000 ,NULL ,0 ,HZ *3 ); +0x0808 ,0x0000 ,NULL ,0 ,3000 );dev_dbg (dev,"set char length - retB = %d" , ret);/* bRequest 2: set handshaking to use DTR/DSR */ ret =usb_control_msg (ir->usbdev,usb_sndctrlpipe (ir->usbdev,0 ),2 ,USB_TYPE_VENDOR , -0x0000 ,0x0100 ,NULL ,0 ,HZ *3 ); +0x0000 ,0x0100 ,NULL ,0 ,3000 );dev_dbg (dev,"set handshake - retC = %d" , ret);/* device resume */
Greg Kroah-Hartman
maintainerPATCH 47/1039 media: em28xx: fix control-message timeouts
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit d9b7e8df3aa9b8c10708aab60e72e79ac08237e4 upstream.
USB control-message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ.
--- drivers/media/usb/em28xx/em28xx-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/usb/em28xx/em28xx-core.c +2 -2
@@ -89,7 +89,7 @@ int em28xx_read_reg_req_len(struct em28xmutex_lock (&dev->ctrl_urb_lock); ret =usb_control_msg (udev, pipe, req,USB_DIR_IN |USB_TYPE_VENDOR |USB_RECIP_DEVICE , -0x0000 , reg, dev->urb_buf, len,HZ ); +0x0000 , reg, dev->urb_buf, len,1000 );if (ret <0 ) { em28xx_regdbg("(pipe 0x%08x): IN: %02x %02x %02x %02x %02x %02x %02x %02x failed with error %i\n", pipe,
@@ -158,7 +158,7 @@ int em28xx_write_regs_req(struct em28xxmemcpy (dev->urb_buf, buf, len); ret =usb_control_msg (udev, pipe, req,USB_DIR_OUT |USB_TYPE_VENDOR |USB_RECIP_DEVICE , -0x0000 , reg, dev->urb_buf, len,HZ ); +0x0000 , reg, dev->urb_buf, len,1000 );mutex_unlock (&dev->ctrl_urb_lock);if (ret <0 ) {
Greg Kroah-Hartman
maintainerPATCH 48/1039 media: cpia2: fix control-message timeouts
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit 10729be03327f53258cb196362015ad5c6eabe02 upstream.
USB control-message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ.
--- drivers/media/usb/cpia2/cpia2_usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/usb/cpia2/cpia2_usb.c +2 -2
@@ -550,7 +550,7 @@ static int write_packet(struct usb_devic0 ,/* index */ buf,/* buffer */ size, - HZ); + 1000);kfree (buf);return ret;
@@ -582,7 +582,7 @@ static int read_packet(struct usb_device0 ,/* index */ buf,/* buffer */ size, - HZ); + 1000);if (ret >=0 )memcpy (registers, buf, size);
Greg Kroah-Hartman
maintainerPATCH 49/1039 media: s2255: fix control-message timeouts
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit f71d272ad4e354097020a4e6b1dc6e4b59feb50f upstream.
USB control-message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ.
Use the common control-message timeout define for the five-second timeouts.
--- drivers/media/usb/s2255/s2255drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/usb/s2255/s2255drv.c +2 -2
@@ -1882,7 +1882,7 @@ static long s2255_vendor_req(struct s225USB_TYPE_VENDOR |USB_RECIP_DEVICE |USB_DIR_IN , Value, Index, buf, - TransferBufferLength, HZ * 5); + TransferBufferLength, USB_CTRL_SET_TIMEOUT);if (r >=0 )memcpy (TransferBuffer, buf, TransferBufferLength);
@@ -1891,7 +1891,7 @@ static long s2255_vendor_req(struct s225 r =usb_control_msg (dev->udev,usb_sndctrlpipe (dev->udev,0 ), Request,USB_TYPE_VENDOR |USB_RECIP_DEVICE , Value, Index, buf, - TransferBufferLength,HZ *5 ); + TransferBufferLength,USB_CTRL_SET_TIMEOUT ); }kfree (buf);return r;
Greg Kroah-Hartman
maintainerPATCH 50/1039 media: dib0700: fix undefined behavior in tuner shutdown
In reply to Greg Kroah-HartmanFrom: Michael Kuron <[email protected]>
commit f7b77ebe6d2f49c7747b2d619586d1aa33f9ea91 upstream.
This fixes a problem where closing the tuner would leave it in a state where it would not tune to any channel when reopened. This problem was discovered as part of https://github.com/hselasky/webcamd/issues/16.
Since adap->id is 0 or 1, this bit-shift overflows, which is undefined behavior. The driver still worked in practice as the overflow would in most environments result in 0, which rendered the line a no-op. When running the driver as part of webcamd however, the overflow could lead to 0xff due to optimizations by the compiler, which would, in the end, improperly shut down the tuner.
The bug is a regression introduced in the commit referenced below. The present patch causes identical behavior to before that commit for adap->id equal to 0 or 1. The driver does not contain support for dib0700 devices with more adapters, assuming such even exist.
Tests have been performed with the Xbox One Digital TV Tuner on amd64. Not all dib0700 devices are expected to be affected by the regression; this code path is only taken by those with incorrect endpoint numbers.
--- drivers/media/usb/dvb-usb/dib0700_core.c | 2 -- 1 file changed, 2 deletions(-)
drivers/media/usb/dvb-usb/dib0700_core.c +0 -2
@@ -618,8 +618,6 @@ int dib0700_streaming_ctrl(struct dvb_usdeb_info ("the endpoint number (%i) is not correct, use the adapter id instead" , adap->fe_adap[0 ].stream.props.endpoint);if (onoff) st->channel_state |=1 << (adap->id); -else - st->channel_state |=1 << ~(adap->id); }else {if (onoff) st->channel_state |=1 << (adap->fe_adap[0 ].stream.props.endpoint-2 );
Greg Kroah-Hartman
maintainerPATCH 51/1039 media: redrat3: fix control-message timeouts
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit 2adc965c8bfa224e11ecccf9c92fd458c4236428 upstream.
USB control-message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ.
--- drivers/media/rc/redrat3.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
drivers/media/rc/redrat3.c +11 -11
@@ -404,7 +404,7 @@ static int redrat3_send_cmd(int cmd, str udev = rr3->udev; res =usb_control_msg (udev,usb_rcvctrlpipe (udev,0 ), cmd,USB_TYPE_VENDOR |USB_RECIP_DEVICE |USB_DIR_IN , -0x0000 ,0x0000 , data,sizeof (u8),HZ *10 ); +0x0000 ,0x0000 , data,sizeof (u8),10000 );if (res <0 ) { dev_err(rr3->dev, "%s: Error sending rr3 cmd res %d, data %d",
@@ -480,7 +480,7 @@ static u32 redrat3_get_timeout(struct re pipe =usb_rcvctrlpipe (rr3->udev,0 ); ret =usb_control_msg (rr3->udev, pipe,RR3_GET_IR_PARAM ,USB_TYPE_VENDOR |USB_RECIP_DEVICE |USB_DIR_IN , -RR3_IR_IO_SIG_TIMEOUT ,0 , tmp, len,HZ *5 ); +RR3_IR_IO_SIG_TIMEOUT ,0 , tmp, len,5000 );if (ret != len)dev_warn (rr3->dev,"Failed to read timeout from hardware\n" );else {
@@ -510,7 +510,7 @@ static int redrat3_set_timeout(struct rc ret =usb_control_msg (udev,usb_sndctrlpipe (udev,0 ),RR3_SET_IR_PARAM ,USB_TYPE_VENDOR |USB_RECIP_DEVICE |USB_DIR_OUT ,RR3_IR_IO_SIG_TIMEOUT ,0 , timeout,sizeof (*timeout), -HZ *25 ); +25000 );dev_dbg (dev,"set ir parm timeout %d ret 0x%02x\n" ,be32_to_cpu (*timeout), ret);
@@ -542,32 +542,32 @@ static void redrat3_reset(struct redrat3 *val =0x01 ; rc =usb_control_msg (udev, rxpipe,RR3_RESET ,USB_TYPE_VENDOR |USB_RECIP_DEVICE |USB_DIR_IN , -RR3_CPUCS_REG_ADDR ,0 , val, len,HZ *25 ); +RR3_CPUCS_REG_ADDR ,0 , val, len,25000 );dev_dbg (dev,"reset returned 0x%02x\n" , rc); *val = length_fuzz; rc =usb_control_msg (udev, txpipe,RR3_SET_IR_PARAM ,USB_TYPE_VENDOR |USB_RECIP_DEVICE |USB_DIR_OUT , -RR3_IR_IO_LENGTH_FUZZ ,0 , val, len,HZ *25 ); +RR3_IR_IO_LENGTH_FUZZ ,0 , val, len,25000 );dev_dbg (dev,"set ir parm len fuzz %d rc 0x%02x\n" , *val, rc); *val = (65536 - (minimum_pause *2000 )) /256 ; rc =usb_control_msg (udev, txpipe,RR3_SET_IR_PARAM ,USB_TYPE_VENDOR |USB_RECIP_DEVICE |USB_DIR_OUT , -RR3_IR_IO_MIN_PAUSE ,0 , val, len,HZ *25 ); +RR3_IR_IO_MIN_PAUSE ,0 , val, len,25000 );dev_dbg (dev,"set ir parm min pause %d rc 0x%02x\n" , *val, rc); *val = periods_measure_carrier; rc =usb_control_msg (udev, txpipe,RR3_SET_IR_PARAM ,USB_TYPE_VENDOR |USB_RECIP_DEVICE |USB_DIR_OUT , -RR3_IR_IO_PERIODS_MF ,0 , val, len,HZ *25 ); +RR3_IR_IO_PERIODS_MF ,0 , val, len,25000 );dev_dbg (dev,"set ir parm periods measure carrier %d rc 0x%02x" , *val, rc); *val =RR3_DRIVER_MAXLENS ; rc =usb_control_msg (udev, txpipe,RR3_SET_IR_PARAM ,USB_TYPE_VENDOR |USB_RECIP_DEVICE |USB_DIR_OUT , -RR3_IR_IO_MAX_LENGTHS ,0 , val, len,HZ *25 ); +RR3_IR_IO_MAX_LENGTHS ,0 , val, len,25000 );dev_dbg (dev,"set ir parm max lens %d rc 0x%02x\n" , *val, rc);kfree (val);
@@ -585,7 +585,7 @@ static void redrat3_get_firmware_rev(str rc =usb_control_msg (rr3->udev,usb_rcvctrlpipe (rr3->udev,0 ),RR3_FW_VERSION ,USB_TYPE_VENDOR |USB_RECIP_DEVICE |USB_DIR_IN , -0 ,0 , buffer,RR3_FW_VERSION_LEN ,HZ *5 ); +0 ,0 , buffer,RR3_FW_VERSION_LEN ,5000 );if (rc >=0 )dev_info (rr3->dev,"Firmware rev: %s" , buffer);
@@ -825,14 +825,14 @@ static int redrat3_transmit_ir(struct rc pipe =usb_sndbulkpipe (rr3->udev, rr3->ep_out->bEndpointAddress); ret =usb_bulk_msg (rr3->udev, pipe, irdata, - sendbuf_len, &ret_len,10 *HZ ); + sendbuf_len, &ret_len,10000 );dev_dbg (dev,"sent %d bytes, (ret %d)\n" , ret_len, ret);/* now tell the hardware to transmit what we sent it */ pipe =usb_rcvctrlpipe (rr3->udev,0 ); ret =usb_control_msg (rr3->udev, pipe,RR3_TX_SEND_SIGNAL ,USB_TYPE_VENDOR |USB_RECIP_DEVICE |USB_DIR_IN , -0 ,0 , irdata,2 ,HZ *10 ); +0 ,0 , irdata,2 ,10000 );if (ret <0 )dev_err (dev,"Error: control msg send failed, rc %d\n" , ret);
Greg Kroah-Hartman
maintainerPATCH 52/1039 media: pvrusb2: fix control-message timeouts
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit b82bf9b9dc305d7d3d93eab106d70dbf2171b43e upstream.
USB control-message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ.
--- drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/media/usb/pvrusb2/pvrusb2-hdw.c +4 -4
@@ -1467,7 +1467,7 @@ static int pvr2_upload_firmware1(structfor (address =0 ; address < fwsize; address +=0x800 ) {memcpy (fw_ptr, fw_entry->data + address,0x800 ); ret +=usb_control_msg (hdw->usb_dev, pipe,0xa0 ,0x40 , address, -0 , fw_ptr,0x800 ,HZ ); +0 , fw_ptr,0x800 ,1000 ); }trace_firmware ("Upload done, releasing device's CPU" );
@@ -1605,7 +1605,7 @@ int pvr2_upload_firmware2(struct pvr2_hd ((u32 *)fw_ptr)[icnt] =swab32 (((u32 *)fw_ptr)[icnt]); ret |=usb_bulk_msg (hdw->usb_dev, pipe, fw_ptr,bcnt, - &actual_length,HZ ); + &actual_length,1000 ); ret |= (actual_length != bcnt);if (ret)break ; fw_done += bcnt;
@@ -3438,7 +3438,7 @@ void pvr2_hdw_cpufw_set_enabled(struct p0xa0 ,0xc0 , address,0 , hdw->fw_buffer+address, - 0x800,HZ); + 0x800,1000);if (ret <0 )break ; }
@@ -3977,7 +3977,7 @@ void pvr2_hdw_cpureset_assert(struct pvr/* Write the CPUCS register on the 8051. The lsb of the register is the reset bit; a 1 asserts reset while a 0 clears it. */ pipe =usb_sndctrlpipe (hdw->usb_dev,0 ); - ret =usb_control_msg (hdw->usb_dev,pipe,0xa0 ,0x40 ,0xe600 ,0 ,da,1 ,HZ ); + ret =usb_control_msg (hdw->usb_dev,pipe,0xa0 ,0x40 ,0xe600 ,0 ,da,1 ,1000 );if (ret <0 ) {pvr2_trace (PVR2_TRACE_ERROR_LEGS ,"cpureset_assert(%d) error=%d" ,val,ret);
Greg Kroah-Hartman
maintainerPATCH 53/1039 media: stk1160: fix control-message timeouts
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit 6aa6e70cdb5b863a57bad61310bf89b6617a5d2d upstream.
USB control-message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ.
--- drivers/media/usb/stk1160/stk1160-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/usb/stk1160/stk1160-core.c +2 -2
@@ -65,7 +65,7 @@ int stk1160_read_reg(struct stk1160 *devreturn -ENOMEM ; ret =usb_control_msg (dev->udev, pipe,0x00 ,USB_DIR_IN |USB_TYPE_VENDOR |USB_RECIP_DEVICE , -0x00 , reg, buf,sizeof (u8),HZ ); +0x00 , reg, buf,sizeof (u8),1000 );if (ret <0 ) {stk1160_err ("read failed on reg 0x%x (%d)\n" , reg, ret);
@@ -85,7 +85,7 @@ int stk1160_write_reg(struct stk1160 *de ret =usb_control_msg (dev->udev, pipe,0x01 ,USB_DIR_OUT |USB_TYPE_VENDOR |USB_RECIP_DEVICE , - value, reg,NULL ,0 ,HZ ); + value, reg,NULL ,0 ,1000 );if (ret <0 ) {stk1160_err ("write failed on reg 0x%x (%d)\n" , reg, ret);
Greg Kroah-Hartman
maintainerPATCH 54/1039 media: cec-pin: fix interrupt en/disable handling
In reply to Greg Kroah-HartmanFrom: Hans Verkuil <[email protected]>
commit 713bdfa10b5957053811470d298def9537d9ff13 upstream.
The en/disable_irq() functions keep track of the 'depth': i.e. if interrupts are disabled twice, then it needs to enable_irq() calls to enable them again. The cec-pin framework didn't take this into accound and could disable irqs multiple times, and it expected that a single enable_irq() would enable them again.
Move all calls to en/disable_irq() to the kthread where it is easy to keep track of the current irq state and ensure that multiple en/disable_irq calls never happen.
If interrupts where disabled twice, then they would never turn on again, leaving the CEC adapter in a dead state.
--- drivers/media/cec/core/cec-pin.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-)
drivers/media/cec/core/cec-pin.c +18 -13
@@ -1033,6 +1033,7 @@ static int cec_pin_thread_func(void *_ad {struct cec_adapter *adap = _adap;struct cec_pin *pin = adap->pin; +bool irq_enabled = false;for (;;) { wait_event_interruptible(pin->kthread_waitq,
@@ -1060,6 +1061,7 @@ static int cec_pin_thread_func(void *_ad ns_to_ktime(pin->work_rx_msg.rx_ts)); msg->len =0 ; } +if (pin->work_tx_status) {unsigned int tx_status = pin->work_tx_status;
@@ -1083,27 +1085,39 @@ static int cec_pin_thread_func(void *_adswitch (atomic_xchg (&pin->work_irq_change,CEC_PIN_IRQ_UNCHANGED )) {case CEC_PIN_IRQ_DISABLE : - pin->ops->disable_irq (adap); +if (irq_enabled) { + pin->ops->disable_irq (adap); + irq_enabled = false; + }cec_pin_high (pin);cec_pin_to_idle (pin);hrtimer_start (&pin->timer,ns_to_ktime (0 ),HRTIMER_MODE_REL );break ;case CEC_PIN_IRQ_ENABLE : +if (irq_enabled) +break ; pin->enable_irq_failed = !pin->ops->enable_irq (adap);if (pin->enable_irq_failed) {cec_pin_to_idle (pin);hrtimer_start (&pin->timer,ns_to_ktime (0 ),HRTIMER_MODE_REL ); + }else { + irq_enabled = true; }break ;default :break ; } -if (kthread_should_stop ())break ; } +if (pin->ops->disable_irq && irq_enabled) + pin->ops->disable_irq (adap); +hrtimer_cancel (&pin->timer); +cec_pin_read (pin); +cec_pin_to_idle (pin); + pin->state =CEC_ST_OFF ;return 0 ; }
@@ -1130,13 +1144,7 @@ static int cec_pin_adap_enable(struct cehrtimer_start (&pin->timer,ns_to_ktime (0 ),HRTIMER_MODE_REL ); }else { -if (pin->ops->disable_irq) - pin->ops->disable_irq (adap); -hrtimer_cancel (&pin->timer);kthread_stop (pin->kthread); -cec_pin_read (pin); -cec_pin_to_idle (pin); - pin->state =CEC_ST_OFF ; }return 0 ; }
@@ -1157,11 +1165,8 @@ void cec_pin_start_timer(struct cec_pinif (pin->state !=CEC_ST_RX_IRQ )return ; -atomic_set (&pin->work_irq_change,CEC_PIN_IRQ_UNCHANGED ); - pin->ops->disable_irq (pin->adap); -cec_pin_high (pin); -cec_pin_to_idle (pin); -hrtimer_start (&pin->timer,ns_to_ktime (0 ),HRTIMER_MODE_REL ); +atomic_set (&pin->work_irq_change,CEC_PIN_IRQ_DISABLE ); +wake_up_interruptible (&pin->kthread_waitq); } static int cec_pin_adap_transmit(struct cec_adapter *adap, u8 attempts,
Greg Kroah-Hartman
maintainerPATCH 55/1039 can: softing_cs: softingcs_probe(): fix memleak on registration failure
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit ced4913efb0acc844ed65cc01d091a85d83a2082 upstream.
In case device registration fails during probe, the driver state and the embedded platform device structure needs to be freed using platform_device_put() to properly free all resources (e.g. the device name).
--- drivers/net/can/softing/softing_cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/can/softing/softing_cs.c +1 -1
@@ -293,7 +293,7 @@ static int softingcs_probe(struct pcmciareturn 0 ; platform_failed: -kfree (dev); +platform_device_put (pdev); mem_failed: pcmcia_bad: pcmcia_failed:
Greg Kroah-Hartman
maintainerPATCH 56/1039 mei: hbm: fix client dma reply status
In reply to Greg Kroah-HartmanFrom: Alexander Usyskin <[email protected]>
commit 6b0b80ac103b2a40c72a47c301745fd1f4ef4697 upstream.
Don't blindly copy status value received from the firmware into internal client status field,
It may be positive and ERR_PTR(ret) will translate it into an invalid address and the caller will crash.
Put the error code into the client status on failure.
--- drivers/misc/mei/hbm.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-)
drivers/misc/mei/hbm.c +14 -6
@@ -672,10 +672,14 @@ static void mei_hbm_cl_dma_map_res(strucif (!cl)return ; -dev_dbg (dev->dev,"cl dma map result = %d\n" , res->status); - cl->status = res->status; -if (!cl->status) +if (res->status) { +dev_err (dev->dev,"cl dma map failed %d\n" , res->status); + cl->status = -EFAULT ; + }else { +dev_dbg (dev->dev,"cl dma map succeeded\n" ); cl->dma_mapped =1 ; + cl->status =0 ; + }wake_up (&cl->wait); }
@@ -698,10 +702,14 @@ static void mei_hbm_cl_dma_unmap_res(strif (!cl)return ; -dev_dbg (dev->dev,"cl dma unmap result = %d\n" , res->status); - cl->status = res->status; -if (!cl->status) +if (res->status) { +dev_err (dev->dev,"cl dma unmap failed %d\n" , res->status); + cl->status = -EFAULT ; + }else { +dev_dbg (dev->dev,"cl dma unmap succeeded\n" ); cl->dma_mapped =0 ; + cl->status =0 ; + }wake_up (&cl->wait); }
Greg Kroah-Hartman
maintainerPATCH 57/1039 iio: adc: ti-adc081c: Partial revert of removal of ACPI IDs
In reply to Greg Kroah-HartmanFrom: Jonathan Cameron <[email protected]>
commit c9791a94384af07592d29504004d2255dbaf8663 upstream.
Unfortuanately a non standards compliant ACPI ID is known to be in the wild on some AAEON boards.
Partly revert the removal of these IDs so that ADC081C will again work + add a comment to that affect for future reference.
Whilst here use generic firmware properties rather than the ACPI specific handling previously found in this driver.
--- drivers/iio/adc/ti-adc081c.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-)
drivers/iio/adc/ti-adc081c.c +17 -5
@@ -19,6 +19,7 @@#include <linux/i2c.h> #include <linux/module.h> #include <linux/mod_devicetable.h> +#include <linux/property.h> #include <linux/iio/iio.h> #include <linux/iio/buffer.h>
@@ -156,13 +157,16 @@ static int adc081c_probe(struct i2c_clie {struct iio_dev *iio;struct adc081c *adc; -struct adcxx1c_model *model; +const struct adcxx1c_model *model;int err;if (!i2c_check_functionality (client->adapter,I2C_FUNC_SMBUS_WORD_DATA ))return -EOPNOTSUPP ; - model = &adcxx1c_models[id->driver_data]; +if (dev_fwnode (&client->dev)) + model =device_get_match_data (&client->dev); +else + model = &adcxx1c_models[id->driver_data]; iio =devm_iio_device_alloc (&client->dev,sizeof (*adc));if (!iio)
@@ -210,10 +214,17 @@ static const struct i2c_device_id adc081 };MODULE_DEVICE_TABLE (i2c, adc081c_id); +static const struct acpi_device_id adc081c_acpi_match[] = { +/* Used on some AAEON boards */ + {"ADC081C" , (kernel_ulong_t)&adcxx1c_models[ADC081C ] }, + { } +}; +MODULE_DEVICE_TABLE (acpi, adc081c_acpi_match); +static const struct of_device_id adc081c_of_match[] = { - { .compatible ="ti,adc081c" }, - { .compatible ="ti,adc101c" }, - { .compatible ="ti,adc121c" }, + { .compatible ="ti,adc081c" , .data = &adcxx1c_models[ADC081C ] }, + { .compatible ="ti,adc101c" , .data = &adcxx1c_models[ADC101C ] }, + { .compatible ="ti,adc121c" , .data = &adcxx1c_models[ADC121C ] }, { } };MODULE_DEVICE_TABLE (of, adc081c_of_match);
@@ -222,6 +233,7 @@ static struct i2c_driver adc081c_driver .driver = { .name = "adc081c", .of_match_table = adc081c_of_match, + .acpi_match_table = adc081c_acpi_match, }, .probe = adc081c_probe, .id_table = adc081c_id,
Greg Kroah-Hartman
maintainerPATCH 58/1039 iio: trigger: Fix a scheduling whilst atomic issue seen on tsc2046
In reply to Greg Kroah-HartmanFrom: Jonathan Cameron <[email protected]>
commit 9020ef659885f2622cfb386cc229b6d618362895 upstream.
IIO triggers are software IRQ chips that split an incoming IRQ into separate IRQs routed to all devices using the trigger. When all consumers are done then a trigger callback reenable() is called. There are a few circumstances under which this can happen in atomic context.
1) A single user of the trigger that calls the iio_trigger_done() function from interrupt context.
2) A race between disconnecting the last device from a trigger and the trigger itself sucessfully being disabled.
To avoid a resulting scheduling whilst atomic, close this second corner by using schedule_work() to ensure the reenable is not done in atomic context.
Note that drivers must be careful to manage the interaction of set_state() and reenable() callbacks to ensure appropriate reference counting if they are relying on the same hardware controls.
Deliberately taking this the slow path rather than via a fixes tree because the error has hard to hit and I would like it to soak for a while before hitting a release kernel.
--- drivers/iio/industrialio-trigger.c | 36 +++++++++++++++++++++++++++++++++++- include/linux/iio/trigger.h | 2 ++ 2 files changed, 37 insertions(+), 1 deletion(-)
drivers/iio/industrialio-trigger.c +35 -1
@@ -162,6 +162,39 @@ static struct iio_trigger *iio_trigger_areturn trig; } +static void iio_reenable_work_fn (struct work_struct *work) +{ + struct iio_trigger *trig = container_of(work, struct iio_trigger, + reenable_work); + +/* +* This 'might' occur after the trigger state is set to disabled - +* in that case the driver should skip reenabling. +*/ + trig->ops->reenable (trig); +} + +/* +* In general, reenable callbacks may need to sleep and this path is +* not performance sensitive, so just queue up a work item +* to reneable the trigger for us. +* +* Races that can cause this. +* 1) A handler occurs entirely in interrupt context so the counter +* the final decrement is still in this interrupt. +* 2) The trigger has been removed, but one last interrupt gets through. +* +* For (1) we must call reenable, but not in atomic context. +* For (2) it should be safe to call reenanble, if drivers never blindly +* reenable after state is off. +*/ +static void iio_trigger_notify_done_atomic (struct iio_trigger *trig) +{ +if (atomic_dec_and_test (&trig->use_count) && trig->ops && + trig->ops->reenable) +schedule_work (&trig->reenable_work); +} +void iio_trigger_poll (struct iio_trigger *trig) {int i;
@@ -173,7 +206,7 @@ void iio_trigger_poll(struct iio_triggerif (trig->subirqs[i].enabled)generic_handle_irq (trig->subirq_base + i);else -iio_trigger_notify_done (trig); +iio_trigger_notify_done_atomic (trig); } } }
@@ -535,6 +568,7 @@ struct iio_trigger *viio_trigger_alloc(s trig->dev.type = &iio_trig_type; trig->dev.bus = &iio_bus_type;device_initialize (&trig->dev); +INIT_WORK (&trig->reenable_work, iio_reenable_work_fn);mutex_init (&trig->pool_lock); trig->subirq_base = irq_alloc_descs(-1, 0,
include/linux/iio/trigger.h +2 -0
@@ -55,6 +55,7 @@ struct iio_trigger_ops {* @attached_own_device:[INTERN] if we are using our own device as trigger, * i.e. if we registered a poll function to the same * device as the one providing the trigger. +* @reenable_work: [INTERN] work item used to ensure reenable can sleep. **/ struct iio_trigger {const struct iio_trigger_ops *ops;
@@ -74,6 +75,7 @@ struct iio_trigger {unsigned long pool[BITS_TO_LONGS (CONFIG_IIO_CONSUMERS_PER_TRIGGER )];struct mutex pool_lock;bool attached_own_device; +struct work_struct reenable_work; };
Greg Kroah-Hartman
maintainerPATCH 59/1039 lkdtm: Fix content of section containing lkdtm_rodata_do_nothing()
In reply to Greg Kroah-HartmanFrom: Christophe Leroy <[email protected]>
commit bc93a22a19eb2b68a16ecf04cdf4b2ed65aaf398 upstream.
On a kernel without CONFIG_STRICT_KERNEL_RWX, running EXEC_RODATA test leads to "Illegal instruction" failure.
Looking at the content of rodata_objcopy.o, we see that the function content zeroes only:
Disassembly of section .rodata: 0000000000000000 <.lkdtm_rodata_do_nothing>: 0: 00 00 00 00 .long 0x0
Add the contents flag in order to keep the content of the section while renaming it.
Disassembly of section .rodata: 0000000000000000 <.lkdtm_rodata_do_nothing>: 0: 4e 80 00 20 blr
--- drivers/misc/lkdtm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/lkdtm/Makefile +1 -1
@@ -20,7 +20,7 @@ CFLAGS_REMOVE_rodata.o += $(CC_FLAGS_LT OBJCOPYFLAGS := OBJCOPYFLAGS_rodata_objcopy.o := \ - --rename-section .noinstr.text=.rodata,alloc,readonly,load + --rename-section .noinstr.text=.rodata,alloc,readonly,load,contents targets += rodata.o rodata_objcopy.o $(obj)/rodata_objcopy.o: $(obj)/rodata.o FORCE $(call if_changed,objcopy)
Greg Kroah-Hartman
maintainerPATCH 60/1039 bus: mhi: pci_generic: Graceful shutdown on freeze
In reply to Greg Kroah-HartmanFrom: Loic Poulain <[email protected]>
commit f77097ec8c0141a4b5cf3722a246be0cb5677e29 upstream.
There is no reason for shutting down MHI ungracefully on freeze, this causes the MHI host stack & device stack to not be aligned anymore since the proper MHI reset sequence is not performed for ungraceful shutdown.
--- drivers/bus/mhi/pci_generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bus/mhi/pci_generic.c +1 -1
@@ -1018,7 +1018,7 @@ static int __maybe_unused mhi_pci_freeze* context. */ if (test_and_clear_bit (MHI_PCI_DEV_STARTED , &mhi_pdev->status)) { -mhi_power_down (mhi_cntrl, false); +mhi_power_down (mhi_cntrl, true);mhi_unprepare_after_power_down (mhi_cntrl); }
Greg Kroah-Hartman
maintainerPATCH 61/1039 bus: mhi: core: Fix reading wake_capable channel configuration
In reply to Greg Kroah-HartmanFrom: Bhaumik Bhatt <[email protected]>
commit 42c4668f7efe1485dfc382517b412c0c6ab102b8 upstream.
The 'wake-capable' entry in channel configuration is not set when parsing the configuration specified by the controller driver. Add the missing entry to ensure channel is correctly specified as a 'wake-capable' channel.
--- drivers/bus/mhi/core/init.c | 1 + 1 file changed, 1 insertion(+)
drivers/bus/mhi/core/init.c +1 -0
@@ -788,6 +788,7 @@ static int parse_ch_cfg(struct mhi_contr mhi_chan->offload_ch = ch_cfg->offload_channel; mhi_chan->db_cfg.reset_req = ch_cfg->doorbell_mode_switch; mhi_chan->pre_alloc = ch_cfg->auto_queue; + mhi_chan->wake_capable = ch_cfg->wake_capable;/* * If MHI host allocates buffers, then the channel direction
Greg Kroah-Hartman
maintainerPATCH 62/1039 bus: mhi: core: Fix race while handling SYS_ERR at power up
In reply to Greg Kroah-HartmanFrom: Manivannan Sadhasivam <[email protected]>
commit d651ce8e917fa1bf6cfab8dca74c512edffc35d3 upstream.
During SYS_ERR condition, as a response to the MHI_RESET from host, some devices tend to issue BHI interrupt without clearing the SYS_ERR state in the device. This creates a race condition and causes a failure in booting up the device.
The issue is seen on the Sierra Wireless EM9191 modem during SYS_ERR handling in mhi_async_power_up(). Once the host detects that the device is in SYS_ERR state, it issues MHI_RESET and waits for the device to process the reset request. During this time, the device triggers the BHI interrupt to the host without clearing SYS_ERR condition. So the host starts handling the SYS_ERR condition again.
To fix this issue, let's register the IRQ handler only after handling the SYS_ERR check to avoid getting spurious IRQs from the device.
--- drivers/bus/mhi/core/pm.c | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-)
drivers/bus/mhi/core/pm.c +12 -23
@@ -1053,7 +1053,7 @@ int mhi_async_power_up(struct mhi_controenum mhi_ee_type current_ee;enum dev_st_transition next_state;struct device *dev = &mhi_cntrl->mhi_dev->dev; -u32 val; +u32 interval_us =25000 ;/* poll register field every 25 milliseconds */ int ret;dev_info (dev,"Requested to power ON\n" );
@@ -1070,10 +1070,6 @@ int mhi_async_power_up(struct mhi_contromutex_lock (&mhi_cntrl->pm_mutex); mhi_cntrl->pm_state =MHI_PM_DISABLE ; - ret =mhi_init_irq_setup (mhi_cntrl); -if (ret) - goto error_setup_irq; -/* Setup BHI INTVEC */ write_lock_irq (&mhi_cntrl->pm_lock);mhi_write_reg (mhi_cntrl, mhi_cntrl->bhi,BHI_INTVEC ,0 );
@@ -1087,7 +1083,7 @@ int mhi_async_power_up(struct mhi_controdev_err (dev,"%s is not a valid EE for power on\n" ,TO_MHI_EXEC_STR (current_ee)); ret = -EIO ; - goto error_async_power_up; + goto error_exit; } state =mhi_get_mhi_state (mhi_cntrl);
@@ -1096,20 +1092,12 @@ int mhi_async_power_up(struct mhi_controif (state ==MHI_STATE_SYS_ERR ) {mhi_set_mhi_state (mhi_cntrl,MHI_STATE_RESET ); - ret =wait_event_timeout (mhi_cntrl->state_event, -MHI_PM_IN_FATAL_STATE (mhi_cntrl->pm_state) || -mhi_read_reg_field (mhi_cntrl, - mhi_cntrl->regs, -MHICTRL , -MHICTRL_RESET_MASK , -MHICTRL_RESET_SHIFT , - &val) || - !val, -msecs_to_jiffies (mhi_cntrl->timeout_ms)); -if (!ret) { - ret = -EIO ; + ret =mhi_poll_reg_field (mhi_cntrl, mhi_cntrl->regs,MHICTRL , +MHICTRL_RESET_MASK ,MHICTRL_RESET_SHIFT ,0 , + interval_us); +if (ret) {dev_info (dev,"Failed to reset MHI due to syserr state\n" ); - goto error_async_power_up; + goto error_exit; }/*
@@ -1119,6 +1107,10 @@ int mhi_async_power_up(struct mhi_contromhi_write_reg (mhi_cntrl, mhi_cntrl->bhi,BHI_INTVEC ,0 ); } + ret =mhi_init_irq_setup (mhi_cntrl); +if (ret) + goto error_exit; +/* Transition to next state */ next_state =MHI_IN_PBL (current_ee) ?DEV_ST_TRANSITION_PBL :DEV_ST_TRANSITION_READY ;
@@ -1131,10 +1123,7 @@ int mhi_async_power_up(struct mhi_controreturn 0 ; -error_async_power_up: -mhi_deinit_free_irq (mhi_cntrl); - -error_setup_irq: +error_exit: mhi_cntrl->pm_state =MHI_PM_DISABLE ;mutex_unlock (&mhi_cntrl->pm_mutex);
Greg Kroah-Hartman
maintainerPATCH 63/1039 cxl/pmem: Fix reference counting for delayed work
In reply to Greg Kroah-HartmanFrom: Dan Williams <[email protected]>
commit 08b9e0ab8af48895337192e683de44ab1e1b7427 upstream.
There is a potential race between queue_work() returning and the queued-work running that could result in put_device() running before get_device(). Introduce the cxl_nvdimm_bridge_state_work() helper that takes the reference unconditionally, but drops it if no new work was queued, to keep the references balanced.
--- drivers/cxl/pmem.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)
drivers/cxl/pmem.c +13 -4
@@ -266,14 +266,24 @@ static void cxl_nvb_update_state(structput_device (&cxl_nvb->dev); } +static void cxl_nvdimm_bridge_state_work (struct cxl_nvdimm_bridge *cxl_nvb) +{ +/* +* Take a reference that the workqueue will drop if new work +* gets queued. +*/ +get_device (&cxl_nvb->dev); +if (!queue_work (cxl_pmem_wq, &cxl_nvb->state_work)) +put_device (&cxl_nvb->dev); +} +static void cxl_nvdimm_bridge_remove (struct device *dev) {struct cxl_nvdimm_bridge *cxl_nvb =to_cxl_nvdimm_bridge (dev);if (cxl_nvb->state ==CXL_NVB_ONLINE ) cxl_nvb->state =CXL_NVB_OFFLINE ; -if (queue_work (cxl_pmem_wq, &cxl_nvb->state_work)) -get_device (&cxl_nvb->dev); +cxl_nvdimm_bridge_state_work (cxl_nvb); }static int cxl_nvdimm_bridge_probe (struct device *dev)
@@ -294,8 +304,7 @@ static int cxl_nvdimm_bridge_probe(struc } cxl_nvb->state =CXL_NVB_ONLINE ; -if (queue_work (cxl_pmem_wq, &cxl_nvb->state_work)) -get_device (&cxl_nvb->dev); +cxl_nvdimm_bridge_state_work (cxl_nvb);return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 64/1039 cxl/pmem: Fix module reload vs workqueue state
In reply to Greg Kroah-HartmanFrom: Dan Williams <[email protected]>
commit 53989fad1286e652ea3655ae3367ba698da8d2ff upstream.
A test of the form:
while true; do modprobe -r cxl_pmem; modprobe cxl_pmem; done
May lead to a crash signature of the form:
BUG: unable to handle page fault for address: ffffffffc0660030
#PF: supervisor instruction fetch in kernel mode
#PF: error_code(0x0010) - not-present page
[..]
Workqueue: cxl_pmem 0xffffffffc0660030
RIP: 0010:0xffffffffc0660030
Code: Unable to access opcode bytes at RIP 0xffffffffc0660006.
[..]
Call Trace:
? process_one_work+0x4ec/0x9c0
? pwq_dec_nr_in_flight+0x100/0x100
? rwlock_bug.part.0+0x60/0x60
? worker_thread+0x2eb/0x700In that report the 0xffffffffc0660030 address corresponds to the former function address of cxl_nvb_update_state() from a previous load of the module, not the current address. Fix that by arranging for ->state_work in the 'struct cxl_nvdimm_bridge' object to be reinitialized on cxl_pmem module reload.
Details:
Recall that CXL subsystem wants to link a CXL memory expander device to an NVDIMM sub-hierarchy when both a persistent memory range has been registered by the CXL platform driver (cxl_acpi) *and* when that CXL memory expander has published persistent memory capacity (Get Partition Info). To this end the cxl_nvdimm_bridge driver arranges to rescan the CXL bus when either of those conditions change. The helper bus_rescan_devices() can not be called underneath the device_lock() for any device on that bus, so the cxl_nvdimm_bridge driver uses a workqueue for the rescan.
Typically a driver allocates driver data to hold a 'struct work_struct' for a driven device, but for a workqueue that may run after ->remove() returns, driver data will have been freed. The 'struct cxl_nvdimm_bridge' object holds the state and work_struct directly. Unfortunately it was only arranging for that infrastructure to be initialized once per device creation rather than the necessary once per workqueue (cxl_pmem_wq) creation.
Introduce is_cxl_nvdimm_bridge() and cxl_nvdimm_bridge_reset() in support of invalidating stale references to a recently destroyed cxl_pmem_wq.
--- drivers/cxl/core/pmem.c | 8 +++++++- drivers/cxl/cxl.h | 8 ++++++++ drivers/cxl/pmem.c | 29 +++++++++++++++++++++++++++-- 3 files changed, 42 insertions(+), 3 deletions(-)
drivers/cxl/core/pmem.c +7 -1
@@ -51,10 +51,16 @@ struct cxl_nvdimm_bridge *to_cxl_nvdimm_ }EXPORT_SYMBOL_GPL (to_cxl_nvdimm_bridge); -__mock int match_nvdimm_bridge(struct device *dev, const void *data) +bool is_cxl_nvdimm_bridge (struct device *dev) {return dev->type == &cxl_nvdimm_bridge_type; } +EXPORT_SYMBOL_NS_GPL (is_cxl_nvdimm_bridge,CXL ); + +__mock int match_nvdimm_bridge(struct device *dev, const void *data) +{ +return is_cxl_nvdimm_bridge (dev); +}struct cxl_nvdimm_bridge *cxl_find_nvdimm_bridge (struct cxl_nvdimm *cxl_nvd) {
drivers/cxl/cxl.h +8 -0
@@ -196,6 +196,13 @@ struct cxl_decoder { }; +/** +* enum cxl_nvdimm_brige_state - state machine for managing bus rescans +* @CXL_NVB_NEW: Set at bridge create and after cxl_pmem_wq is destroyed +* @CXL_NVB_DEAD: Set at brige unregistration to preclude async probing +* @CXL_NVB_ONLINE: Target state after successful ->probe() +* @CXL_NVB_OFFLINE: Target state after ->remove() or failed ->probe() +*/ enum cxl_nvdimm_brige_state {CXL_NVB_NEW ,CXL_NVB_DEAD ,
@@ -308,6 +315,7 @@ struct cxl_nvdimm_bridge *devm_cxl_add_n struct cxl_port *port);struct cxl_nvdimm *to_cxl_nvdimm (struct device *dev);bool is_cxl_nvdimm (struct device *dev); +bool is_cxl_nvdimm_bridge (struct device *dev);int devm_cxl_add_nvdimm (struct device *host,struct cxl_memdev *cxlmd);struct cxl_nvdimm_bridge *cxl_find_nvdimm_bridge (struct cxl_nvdimm *cxl_nvd);
drivers/cxl/pmem.c +27 -2
@@ -316,6 +316,31 @@ static struct cxl_driver cxl_nvdimm_brid .id = CXL_DEVICE_NVDIMM_BRIDGE, }; +/* +* Return all bridges to the CXL_NVB_NEW state to invalidate any +* ->state_work referring to the now destroyed cxl_pmem_wq. +*/ +static int cxl_nvdimm_bridge_reset (struct device *dev,void *data) +{ +struct cxl_nvdimm_bridge *cxl_nvb; + +if (!is_cxl_nvdimm_bridge (dev)) +return 0 ; + + cxl_nvb =to_cxl_nvdimm_bridge (dev); +device_lock (dev); + cxl_nvb->state =CXL_NVB_NEW ; +device_unlock (dev); + +return 0 ; +} + +static void destroy_cxl_pmem_wq (void ) +{ +destroy_workqueue (cxl_pmem_wq); +bus_for_each_dev (&cxl_bus_type,NULL ,NULL , cxl_nvdimm_bridge_reset); +} +static __init int cxl_pmem_init (void ) {int rc;
@@ -341,7 +366,7 @@ static __init int cxl_pmem_init(void) err_nvdimm:cxl_driver_unregister (&cxl_nvdimm_bridge_driver); err_bridge: -destroy_workqueue (cxl_pmem_wq); +destroy_cxl_pmem_wq ();return rc; }
@@ -349,7 +374,7 @@ static __exit void cxl_pmem_exit(void) {cxl_driver_unregister (&cxl_nvdimm_driver);cxl_driver_unregister (&cxl_nvdimm_bridge_driver); -destroy_workqueue (cxl_pmem_wq); +destroy_cxl_pmem_wq (); }MODULE_LICENSE ("GPL v2" );
Greg Kroah-Hartman
maintainerPATCH 65/1039 thermal/drivers/int340x: Fix RFIM mailbox write commands
In reply to Greg Kroah-HartmanFrom: Sumeet Pawnikar <[email protected]>
commit 2685c77b80a80c57e2a25a726b82fb31e6e212ab upstream.
The existing mail mechanism only supports writing of workload types.
However, mailbox command for RFIM (cmd = 0x08) also requires write operation which is ignored. This results in failing to store RFI restriction.
Fixint this requires enhancing mailbox writes for non workload commands too, so remove the check for MBOX_CMD_WORKLOAD_TYPE_WRITE in mailbox write to allow this other write commands to be supoorted.
At the same time, however, we have to make sure that there is no impact on read commands, by avoiding to write anything into the mailbox data register.
To properly implement that, add two separate functions for mbox read and write commands for the processor thermal workload command type. This helps to distinguish the read and write workload command types from each other while sending mbox commands.
--- drivers/thermal/intel/int340x_thermal/processor_thermal_device.h | 3 drivers/thermal/intel/int340x_thermal/processor_thermal_mbox.c | 100 +++++----- drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c | 23 +- 3 files changed, 73 insertions(+), 53 deletions(-)
drivers/thermal/intel/int340x_thermal/processor_thermal_device.h +2 -1
@@ -80,7 +80,8 @@ void proc_thermal_rfim_remove(struct pciint proc_thermal_mbox_add (struct pci_dev *pdev,struct proc_thermal_device *proc_priv);void proc_thermal_mbox_remove (struct pci_dev *pdev); -int processor_thermal_send_mbox_cmd (struct pci_dev *pdev,u16 cmd_id,u32 cmd_data,u64 *cmd_resp); +int processor_thermal_send_mbox_read_cmd (struct pci_dev *pdev,u16 id,u64 *resp); +int processor_thermal_send_mbox_write_cmd (struct pci_dev *pdev,u16 id,u32 data);int proc_thermal_add (struct device *dev,struct proc_thermal_device *priv);void proc_thermal_remove (struct proc_thermal_device *proc_priv);int proc_thermal_suspend (struct device *dev);
drivers/thermal/intel/int340x_thermal/processor_thermal_mbox.c +59 -41
167 lines not on this page · raw message
drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c +12 -11
@@ -9,6 +9,8 @@#include <linux/pci.h> #include "processor_thermal_device.h" +MODULE_IMPORT_NS (INT340X_THERMAL ); +struct mmio_reg {int read_only;u32 offset;
@@ -194,8 +196,7 @@ static ssize_t rfi_restriction_store(strstruct device_attribute *attr, const char *buf, size_t count) { - u16 cmd_id = 0x0008; -u64 cmd_resp; + u16 id = 0x0008;u32 input;int ret;
@@ -203,7 +204,7 @@ static ssize_t rfi_restriction_store(strif (ret)return ret; - ret =processor_thermal_send_mbox_cmd (to_pci_dev (dev), cmd_id, input, &cmd_resp); + ret =processor_thermal_send_mbox_write_cmd (to_pci_dev (dev), id, input);if (ret)return ret;
@@ -214,30 +215,30 @@ static ssize_t rfi_restriction_show(strustruct device_attribute *attr, char *buf) { - u16 cmd_id = 0x0007; -u64 cmd_resp; + u16 id = 0x0007; +u64 resp;int ret; - ret =processor_thermal_send_mbox_cmd (to_pci_dev (dev), cmd_id,0 , &cmd_resp); + ret =processor_thermal_send_mbox_read_cmd (to_pci_dev (dev), id, &resp);if (ret)return ret; -return sprintf (buf,"%llu\n" , cmd_resp); +return sprintf (buf,"%llu\n" , resp); }static ssize_t ddr_data_rate_show (struct device *dev,struct device_attribute *attr,char *buf) { -u16 cmd_id =0x0107 ; -u64 cmd_resp; +u16 id =0x0107 ; +u64 resp;int ret; - ret =processor_thermal_send_mbox_cmd (to_pci_dev (dev), cmd_id,0 , &cmd_resp); + ret =processor_thermal_send_mbox_read_cmd (to_pci_dev (dev), id, &resp);if (ret)return ret; -return sprintf (buf,"%llu\n" , cmd_resp); +return sprintf (buf,"%llu\n" , resp); }static DEVICE_ATTR_RW (rfi_restriction);
Greg Kroah-Hartman
maintainerPATCH 66/1039 arm64: errata: Fix exec handling in erratum 1418040 workaround
In reply to Greg Kroah-HartmanFrom: D Scott Phillips <[email protected]>
commit 38e0257e0e6f4fef2aa2966b089b56a8b1cfb75c upstream.
The erratum 1418040 workaround enables CNTVCT_EL1 access trapping in EL0 when executing compat threads. The workaround is applied when switching between tasks, but the need for the workaround could also change at an exec(), when a non-compat task execs a compat binary or vice versa. Apply the workaround in arch_setup_new_exec().
This leaves a small window of time between SET_PERSONALITY and arch_setup_new_exec where preemption could occur and confuse the old workaround logic that compares TIF_32BIT between prev and next. Instead, we can just read cntkctl to make sure it's in the state that the next task needs. I measured cntkctl read time to be about the same as a mov from a general-purpose register on N1. Update the workaround logic to examine the current value of cntkctl instead of the previous task's compat state.
--- arch/arm64/kernel/process.c | 39 ++++++++++++++++----------------------- 1 file changed, 16 insertions(+), 23 deletions(-)
arch/arm64/kernel/process.c +16 -23
@@ -439,34 +439,26 @@ static void entry_task_switch(struct tas/* * ARM erratum 1418040 handling, affecting the 32bit view of CNTVCT. -* Assuming the virtual counter is enabled at the beginning of times: -* -* - disable access when switching from a 64bit task to a 32bit task -* - enable access when switching from a 32bit task to a 64bit task +* Ensure access is disabled when switching to a 32bit task, ensure +* access is enabled when switching to a 64bit task. */ -static void erratum_1418040_thread_switch (struct task_struct *prev, -struct task_struct *next) +static void erratum_1418040_thread_switch (struct task_struct *next) { -bool prev32, next32; -u64 val; - -if (!IS_ENABLED (CONFIG_ARM64_ERRATUM_1418040 )) -return ; - - prev32 =is_compat_thread (task_thread_info (prev)); - next32 =is_compat_thread (task_thread_info (next)); - -if (prev32 == next32 || !this_cpu_has_cap (ARM64_WORKAROUND_1418040 )) +if (!IS_ENABLED (CONFIG_ARM64_ERRATUM_1418040 ) || + !this_cpu_has_cap (ARM64_WORKAROUND_1418040 ))return ; - val =read_sysreg (cntkctl_el1); - -if (!next32) - val |=ARCH_TIMER_USR_VCT_ACCESS_EN ; +if (is_compat_thread (task_thread_info (next))) +sysreg_clear_set (cntkctl_el1,ARCH_TIMER_USR_VCT_ACCESS_EN ,0 );else - val &= ~ARCH_TIMER_USR_VCT_ACCESS_EN ; +sysreg_clear_set (cntkctl_el1,0 ,ARCH_TIMER_USR_VCT_ACCESS_EN ); +} -write_sysreg (val, cntkctl_el1); +static void erratum_1418040_new_exec (void ) +{ +preempt_disable (); +erratum_1418040_thread_switch (current); +preempt_enable (); }/*
@@ -501,7 +493,7 @@ __notrace_funcgraph struct task_struct *contextidr_thread_switch (next);entry_task_switch (next);ssbs_thread_switch (next); -erratum_1418040_thread_switch (prev, next); +erratum_1418040_thread_switch (next);ptrauth_thread_switch_user (next);/*
@@ -611,6 +603,7 @@ void arch_setup_new_exec(void) current->mm->context.flags = mmflags;ptrauth_thread_init_user ();mte_thread_init_user (); +erratum_1418040_new_exec ();if (task_spec_ssb_noexec (current)) { arch_prctl_spec_ctrl_set(current, PR_SPEC_STORE_BYPASS,
Greg Kroah-Hartman
maintainerPATCH 67/1039 ARM: dts: at91: update alternate function of signal PD20
In reply to Greg Kroah-HartmanFrom: Hari Prasath <[email protected]>
commit 12f332d2dd3187472f595b678246adb10d886bd0 upstream.
The alternate function of PD20 is 4 as per the datasheet of sama7g5 and not 5 as defined earlier.
--- arch/arm/boot/dts/sama7g5-pinfunc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/sama7g5-pinfunc.h +1 -1
@@ -765,7 +765,7 @@#define PIN_PD20__PCK0 PINMUX_PIN(PIN_PD20, 1, 3)#define PIN_PD20__FLEXCOM2_IO3 PINMUX_PIN(PIN_PD20, 2, 2)#define PIN_PD20__PWMH3 PINMUX_PIN(PIN_PD20, 3, 4) -#define PIN_PD20__CANTX4 PINMUX_PIN(PIN_PD20, 5, 2) +#define PIN_PD20__CANTX4 PINMUX_PIN(PIN_PD20, 4, 2)#define PIN_PD20__FLEXCOM5_IO0 PINMUX_PIN(PIN_PD20, 6, 5)#define PIN_PD21 117#define PIN_PD21__GPIO PINMUX_PIN(PIN_PD21, 0, 0)
Greg Kroah-Hartman
maintainerPATCH 68/1039 iommu/io-pgtable-arm-v7s: Add error handle for page table allocation failure
In reply to Greg Kroah-HartmanFrom: Yunfei Wang <[email protected]>
commit a556cfe4cabc6d79cbb7733f118bbb420b376fe6 upstream.
In __arm_v7s_alloc_table function:
iommu call kmem_cache_alloc to allocate page table, this function allocate memory may fail, when kmem_cache_alloc fails to allocate table, call virt_to_phys will be abnomal and return unexpected phys and goto out_free, then call kmem_cache_free to release table will trigger KE, __get_free_pages and free_pages have similar problem, so add error handle for page table allocation failure.
--- drivers/iommu/io-pgtable-arm-v7s.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/iommu/io-pgtable-arm-v7s.c +5 -1
@@ -246,13 +246,17 @@ static void *__arm_v7s_alloc_table(int l __GFP_ZERO | ARM_V7S_TABLE_GFP_DMA, get_order(size)); else if (lvl == 2) table =kmem_cache_zalloc (data->l2_tables, gfp); + +if (!table) +return NULL ; + phys =virt_to_phys (table);if (phys != (arm_v7s_iopte )phys) {/* Doesn't fit in PTE */ dev_err (dev,"Page table does not fit in PTE: %pa" , &phys); goto out_free; } -if (table && !cfg->coherent_walk) { +if (!cfg->coherent_walk) { dma =dma_map_single (dev, table, size,DMA_TO_DEVICE );if (dma_mapping_error (dev, dma)) goto out_free;
Greg Kroah-Hartman
maintainerPATCH 69/1039 gpu: host1x: Add back arm_iommu_detach_device()
In reply to Greg Kroah-HartmanFrom: Dmitry Osipenko <[email protected]>
commit d5185965c3b59073c4520bad7dd2adf725b9abba upstream.
Host1x DMA buffer isn't mapped properly when CONFIG_ARM_DMA_USE_IOMMU=y. The memory management code of Host1x driver has a longstanding overhaul overdue and it's not obvious where the problem is in this case. Hence let's add back the old workaround which we already had sometime before. It explicitly detaches Host1x device from the offending implicit IOMMU domain. This fixes a completely broken Host1x DMA in case of ARM32 multiplatform kernel config.
--- drivers/gpu/host1x/dev.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
drivers/gpu/host1x/dev.c +15 -0
@@ -18,6 +18,10 @@#include <trace/events/host1x.h> #undef CREATE_TRACE_POINTS +#if IS_ENABLED (CONFIG_ARM_DMA_USE_IOMMU ) +#include <asm/dma-iommu.h> +#endif +#include "bus.h" #include "channel.h" #include "debug.h"
@@ -238,6 +242,17 @@ static struct iommu_domain *host1x_iommustruct iommu_domain *domain =iommu_get_domain_for_dev (host->dev);int err; +#if IS_ENABLED (CONFIG_ARM_DMA_USE_IOMMU ) +if (host->dev->archdata.mapping) { +struct dma_iommu_mapping *mapping = +to_dma_iommu_mapping (host->dev); +arm_iommu_detach_device (host->dev); +arm_iommu_release_mapping (mapping); + + domain =iommu_get_domain_for_dev (host->dev); + } +#endif +/* * We may not always want to enable IOMMU support (for example if the * host1x firewall is already enabled and we don't support addressing
Greg Kroah-Hartman
maintainerPATCH 70/1039 drm/tegra: Add back arm_iommu_detach_device()
In reply to Greg Kroah-HartmanFrom: Dmitry Osipenko <[email protected]>
commit d210919dbdc8a82c676cc3e3c370b1802be63124 upstream.
DMA buffers of 2D/3D engines aren't mapped properly when CONFIG_ARM_DMA_USE_IOMMU=y. The memory management code of Tegra DRM driver has a longstanding overhaul overdue and it's not obvious where the problem is in this case. Hence let's add back the old workaround which we already had sometime before. It explicitly detaches DRM devices from the offending implicit IOMMU domain. This fixes a completely broken 2d/3d drivers in case of ARM32 multiplatform kernel config.
--- drivers/gpu/drm/tegra/drm.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
drivers/gpu/drm/tegra/drm.c +15 -0
@@ -21,6 +21,10 @@#include <drm/drm_prime.h> #include <drm/drm_vblank.h> +#if IS_ENABLED (CONFIG_ARM_DMA_USE_IOMMU ) +#include <asm/dma-iommu.h> +#endif +#include "dc.h" #include "drm.h" #include "gem.h"
@@ -936,6 +940,17 @@ int host1x_client_iommu_attach(struct hostruct iommu_group *group =NULL ;int err; +#if IS_ENABLED (CONFIG_ARM_DMA_USE_IOMMU ) +if (client->dev->archdata.mapping) { +struct dma_iommu_mapping *mapping = +to_dma_iommu_mapping (client->dev); +arm_iommu_detach_device (client->dev); +arm_iommu_release_mapping (mapping); + + domain =iommu_get_domain_for_dev (client->dev); + } +#endif +/* * If the host1x client is already attached to an IOMMU domain that is * not the shared IOMMU domain, don't try to attach it to a different
Greg Kroah-Hartman
maintainerPATCH 71/1039 io_uring: fix no lock protection for ctx->cq_extra
In reply to Greg Kroah-HartmanFrom: Hao Xu <[email protected]>
commit e302f1046f4c209291b07ff7bc4d15ca26891f16 upstream.
ctx->cq_extra should be protected by completion lock so that the req_need_defer() does the right check.
--- fs/io_uring.c | 3 +++ 1 file changed, 3 insertions(+)
fs/io_uring.c +3 -0
@@ -6544,12 +6544,15 @@ static __cold void io_drain_req(struct iu32 seq =io_get_sequence (req);/* Still need defer if there is pending req in defer list. */ +spin_lock (&ctx->completion_lock);if (!req_need_defer (req, seq) &&list_empty_careful (&ctx->defer_list)) { +spin_unlock (&ctx->completion_lock); queue: ctx->drain_active = false;io_req_task_queue (req);return ; } +spin_unlock (&ctx->completion_lock); ret =io_req_prep_async (req);if (ret) {
Greg Kroah-Hartman
maintainerPATCH 72/1039 virtio/virtio_mem: handle a possible NULL as a memcpy parameter
In reply to Greg Kroah-HartmanFrom: Peng Hao <[email protected]>
commit cf4a4493ff70874f8af26d75d4346c591c298e89 upstream.
There is a check for vm->sbm.sb_states before, and it should check it here as well.
--- drivers/virtio/virtio_mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/virtio/virtio_mem.c +1 -1
@@ -592,7 +592,7 @@ static int virtio_mem_sbm_sb_states_prepreturn -ENOMEM ;mutex_lock (&vm->hotplug_mutex); -if (new_bitmap) +if (vm->sbm.sb_states)memcpy (new_bitmap, vm->sbm.sb_states, old_pages *PAGE_SIZE ); old_bitmap = vm->sbm.sb_states;
Greg Kroah-Hartman
maintainerPATCH 73/1039 dma_fence_array: Fix PENDING_ERROR leak in dma_fence_array_signaled()
In reply to Greg Kroah-HartmanFrom: Thomas Hellström <[email protected]>
commit 95d35838880fb040ccb9fe4a48816bd0c8b62df5 upstream.
If a dma_fence_array is reported signaled by a call to dma_fence_is_signaled(), it may leak the PENDING_ERROR status.
Fix this by clearing the PENDING_ERROR status if we return true in dma_fence_array_signaled().
v2:
- Update Cc list, and add R-b.
--- drivers/dma-buf/dma-fence-array.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/dma-buf/dma-fence-array.c +5 -1
@@ -104,7 +104,11 @@ static bool dma_fence_array_signaled(str {struct dma_fence_array *array =to_dma_fence_array (fence); -return atomic_read (&array->num_pending) <=0 ; +if (atomic_read (&array->num_pending) >0 ) +return false; + +dma_fence_array_clear_pending_error (array); +return true; }static void dma_fence_array_release (struct dma_fence *fence)
Greg Kroah-Hartman
maintainerPATCH 74/1039 PCI: Add function 1 DMA alias quirk for Marvell 88SE9125 SATA controller
In reply to Greg Kroah-HartmanFrom: Yifeng Li <[email protected]>
commit e445375882883f69018aa669b67cbb37ec873406 upstream.
Like other SATA controller chips in the Marvell 88SE91xx series, the Marvell 88SE9125 has the same DMA requester ID hardware bug that prevents it from working under IOMMU. Add it to the list of devices that need the quirk.
Without this patch, device initialization fails with DMA errors:
ata8: softreset failed (1st FIS failed)
DMAR: DRHD: handling fault status reg 2
DMAR: [DMA Write NO_PASID] Request device [03:00.1] fault addr 0xfffc0000 [fault reason 0x02] Present bit in context entry is clear
DMAR: DRHD: handling fault status reg 2
DMAR: [DMA Read NO_PASID] Request device [03:00.1] fault addr 0xfffc0000 [fault reason 0x02] Present bit in context entry is clear
After applying the patch, the controller can be successfully initialized:
ata8: SATA link up 1.5 Gbps (SStatus 113 SControl 330)
ata8.00: ATAPI: PIONEER BD-RW BDR-207M, 1.21, max UDMA/100
ata8.00: configured for UDMA/100
scsi 7:0:0:0: CD-ROM PIONEER BD-RW BDR-207M 1.21 PQ: 0 ANSI: 5
--- drivers/pci/quirks.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/pci/quirks.c +3 -0
@@ -4103,6 +4103,9 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_M quirk_dma_func1_alias);DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_MARVELL_EXT ,0x9123 , quirk_dma_func1_alias); +/* https://bugzilla.kernel.org/show_bug.cgi?id=42679#c136 */ +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_MARVELL_EXT ,0x9125 , + quirk_dma_func1_alias);DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_MARVELL_EXT ,0x9128 , quirk_dma_func1_alias);/* https://bugzilla.kernel.org/show_bug.cgi?id=42679#c14 */
Greg Kroah-Hartman
maintainerPATCH 75/1039 mm_zone: add function to check if managed dma zone exists
In reply to Greg Kroah-HartmanFrom: Baoquan He <[email protected]>
commit 62b3107073646e0946bd97ff926832bafb846d17 upstream.
Patch series "Handle warning of allocation failure on DMA zone w/o managed pages", v4.
**Problem observed:
On x86_64, when crash is triggered and entering into kdump kernel, page allocation failure can always be seen.
---------------------------------
DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
swapper/0: page allocation failure: order:5, mode:0xcc1(GFP_KERNEL|GFP_DMA), nodemask=(null),cpuset=/,mems_allowed=0
CPU: 0 PID: 1 Comm: swapper/0 Call Trace: dump_stack+0x7f/0xa1 warn_alloc.cold+0x72/0xd6 ...... __alloc_pages+0x24d/0x2c0 ...... dma_atomic_pool_init+0xdb/0x176 do_one_initcall+0x67/0x320 ? rcu_read_lock_sched_held+0x3f/0x80 kernel_init_freeable+0x290/0x2dc ? rest_init+0x24f/0x24f kernel_init+0xa/0x111 ret_from_fork+0x22/0x30 Mem-Info: ------------------------------------
***Root cause:
In the current kernel, it assumes that DMA zone must have managed pages and try to request pages if CONFIG_ZONE_DMA is enabled. While this is not always true. E.g in kdump kernel of x86_64, only low 1M is presented and locked down at very early stage of boot, so that this low 1M won't be added into buddy allocator to become managed pages of DMA zone. This exception will always cause page allocation failure if page is requested from DMA zone.
***Investigation:
This failure happens since below commit merged into linus's tree.
1a6a9044b967 x86/setup: Remove CONFIG_X86_RESERVE_LOW and reservelow= options 23721c8e92f7 x86/crash: Remove crash_reserve_low_1M()
f1d4d47c5851 x86/setup: Always reserve the first 1M of RAM
7c321eb2b843 x86/kdump: Remove the backup region handling
6f599d84231f x86/kdump: Always reserve the low 1M when the crashkernel option is specified
Before them, on x86_64, the low 640K area will be reused by kdump kernel. So in kdump kernel, the content of low 640K area is copied into a backup region for dumping before jumping into kdump. Then except of those firmware reserved region in [0, 640K], the left area will be added into buddy allocator to become available managed pages of DMA zone.
However, after above commits applied, in kdump kernel of x86_64, the low 1M is reserved by memblock, but not released to buddy allocator. So any later page allocation requested from DMA zone will fail.
At the beginning, if crashkernel is reserved, the low 1M need be locked down because AMD SME encrypts memory making the old backup region mechanims impossible when switching into kdump kernel.
Later, it was also observed that there are BIOSes corrupting memory under 1M. To solve this, in commit f1d4d47c5851, the entire region of low 1M is always reserved after the real mode trampoline is allocated.
Besides, recently, Intel engineer mentioned their TDX (Trusted domain extensions) which is under development in kernel also needs to lock down the low 1M. So we can't simply revert above commits to fix the page allocation failure from DMA zone as someone suggested.
***Solution:
Currently, only DMA atomic pool and dma-kmalloc will initialize and request page allocation with GFP_DMA during bootup.
So only initializ DMA atomic pool when DMA zone has available managed pages, otherwise just skip the initialization.
For dma-kmalloc(), for the time being, let's mute the warning of allocation failure if requesting pages from DMA zone while no manged pages. Meanwhile, change code to use dma_alloc_xx/dma_map_xx API to replace kmalloc(GFP_DMA), or do not use GFP_DMA when calling kmalloc() if not necessary. Christoph is posting patches to fix those under drivers/scsi/. Finally, we can remove the need of dma-kmalloc() as people suggested.
This patch (of 3):
In some places of the current kernel, it assumes that dma zone must have managed pages if CONFIG_ZONE_DMA is enabled. While this is not always true. E.g in kdump kernel of x86_64, only low 1M is presented and locked down at very early stage of boot, so that there's no managed pages at all in DMA zone. This exception will always cause page allocation failure if page is requested from DMA zone.
Here add function has_managed_dma() and the relevant helper functions to check if there's DMA zone with managed pages. It will be used in later patches.
--- include/linux/mmzone.h | 9 +++++++++ mm/page_alloc.c | 15 +++++++++++++++ 2 files changed, 24 insertions(+)
include/linux/mmzone.h +9 -0
@@ -1047,6 +1047,15 @@ static inline int is_highmem_idx(enum zo#endif } +#ifdef CONFIG_ZONE_DMA +bool has_managed_dma (void ); +#else +static inline bool has_managed_dma (void ) +{ +return false; +} +#endif +/** * is_highmem - helper function to quickly check if a struct zone is a * highmem zone or not. This is an attempt to keep references
mm/page_alloc.c +15 -0
@@ -9460,3 +9460,18 @@ bool take_page_off_buddy(struct page *pa return ret; }#endif + +#ifdef CONFIG_ZONE_DMA +bool has_managed_dma (void ) +{ +struct pglist_data *pgdat; + +for_each_online_pgdat (pgdat) { +struct zone *zone = &pgdat->node_zones[ZONE_DMA ]; + +if (managed_zone (zone)) +return true; + } +return false; +} +#endif /* CONFIG_ZONE_DMA */
Greg Kroah-Hartman
maintainerPATCH 76/1039 dma/pool: create dma atomic pool only if dma zone has managed pages
In reply to Greg Kroah-HartmanFrom: Baoquan He <[email protected]>
commit a674e48c5443d12a8a43c3ac42367aa39505d506 upstream.
Currently three dma atomic pools are initialized as long as the relevant kernel codes are built in. While in kdump kernel of x86_64, this is not right when trying to create atomic_pool_dma, because there's no managed pages in DMA zone. In the case, DMA zone only has low 1M memory presented and locked down by memblock allocator. So no pages are added into buddy of DMA zone. Please check commit f1d4d47c5851 ("x86/setup:
Always reserve the first 1M of RAM").
Then in kdump kernel of x86_64, it always prints below failure message:
DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
swapper/0: page allocation failure: order:5, mode:0xcc1(GFP_KERNEL|GFP_DMA), nodemask=(null),cpuset=/,mems_allowed=0
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.13.0-0.rc5.20210611git929d931f2b40.42.fc35.x86_64 #1 Hardware name: Dell Inc. PowerEdge R910/0P658H, BIOS 2.12.0 06/04/2018 Call Trace: dump_stack+0x7f/0xa1 warn_alloc.cold+0x72/0xd6 __alloc_pages_slowpath.constprop.0+0xf29/0xf50 __alloc_pages+0x24d/0x2c0 alloc_page_interleave+0x13/0xb0 atomic_pool_expand+0x118/0x210 __dma_atomic_pool_init+0x45/0x93 dma_atomic_pool_init+0xdb/0x176 do_one_initcall+0x67/0x320 kernel_init_freeable+0x290/0x2dc kernel_init+0xa/0x111 ret_from_fork+0x22/0x30 Mem-Info: ...... DMA: failed to allocate 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocation DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
Here, let's check if DMA zone has managed pages, then create atomic_pool_dma if yes. Otherwise just skip it.
--- kernel/dma/pool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/dma/pool.c +2 -2
@@ -203,7 +203,7 @@ static int __init dma_atomic_pool_init(v GFP_KERNEL);if (!atomic_pool_kernel) ret = -ENOMEM ; -if (IS_ENABLED (CONFIG_ZONE_DMA )) { +if (has_managed_dma ()) { atomic_pool_dma =__dma_atomic_pool_init (atomic_pool_size,GFP_KERNEL |GFP_DMA );if (!atomic_pool_dma)
@@ -226,7 +226,7 @@ static inline struct gen_pool *dma_guessif (prev ==NULL ) {if (IS_ENABLED (CONFIG_ZONE_DMA32 ) && (gfp &GFP_DMA32 ))return atomic_pool_dma32; -if (IS_ENABLED (CONFIG_ZONE_DMA ) && (gfp &GFP_DMA )) +if (atomic_pool_dma && (gfp &GFP_DMA ))return atomic_pool_dma;return atomic_pool_kernel; }
Greg Kroah-Hartman
maintainerPATCH 77/1039 mm/page_alloc.c: do not warn allocation failure on zone DMA if no managed pages
In reply to Greg Kroah-HartmanFrom: Baoquan He <[email protected]>
commit c4dc63f0032c77464fbd4e7a6afc22fa6913c4a7 upstream.
In kdump kernel of x86_64, page allocation failure is observed:
kworker/u2:2: page allocation failure: order:0, mode:0xcc1(GFP_KERNEL|GFP_DMA), nodemask=(null),cpuset=/,mems_allowed=0
CPU: 0 PID: 55 Comm: kworker/u2:2 Not tainted 5.16.0-rc4+ #5 Hardware name: AMD Dinar/Dinar, BIOS RDN1505B 06/05/2013 Workqueue: events_unbound async_run_entry_fn Call Trace: <TASK> dump_stack_lvl+0x48/0x5e warn_alloc.cold+0x72/0xd6 __alloc_pages_slowpath.constprop.0+0xc69/0xcd0 __alloc_pages+0x1df/0x210 new_slab+0x389/0x4d0 ___slab_alloc+0x58f/0x770 __slab_alloc.constprop.0+0x4a/0x80 kmem_cache_alloc_trace+0x24b/0x2c0 sr_probe+0x1db/0x620 ...... device_add+0x405/0x920 ...... __scsi_add_device+0xe5/0x100 ata_scsi_scan_host+0x97/0x1d0 async_run_entry_fn+0x30/0x130 process_one_work+0x1e8/0x3c0 worker_thread+0x50/0x3b0 ? rescuer_thread+0x350/0x350 kthread+0x16b/0x190 ? set_kthread_struct+0x40/0x40 ret_from_fork+0x22/0x30 </TASK> Mem-Info: ......
The above failure happened when calling kmalloc() to allocate buffer with GFP_DMA. It requests to allocate slab page from DMA zone while no managed pages at all in there.
sr_probe()
--> get_capabilities()
--> buffer = kmalloc(512, GFP_KERNEL | GFP_DMA);
Because in the current kernel, dma-kmalloc will be created as long as CONFIG_ZONE_DMA is enabled. However, kdump kernel of x86_64 doesn't have managed pages on DMA zone since commit 6f599d84231f ("x86/kdump: Always reserve the low 1M when the crashkernel option is specified"). The failure can be always reproduced.
For now, let's mute the warning of allocation failure if requesting pages from DMA zone while no managed pages.
[[email protected]: fix warning]
--- mm/page_alloc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
mm/page_alloc.c +3 -1
@@ -4204,7 +4204,9 @@ void warn_alloc(gfp_t gfp_mask, nodemaskva_list args; static DEFINE_RATELIMIT_STATE(nopage_rs, 10*HZ, 1); -if ((gfp_mask & __GFP_NOWARN) || !__ratelimit (&nopage_rs)) +if ((gfp_mask & __GFP_NOWARN) || + !__ratelimit (&nopage_rs) || + ((gfp_mask & __GFP_DMA) && !has_managed_dma ()))return ;va_start (args, fmt);
Greg Kroah-Hartman
maintainerPATCH 78/1039 ath11k: add string type to search board data in board-2.bin for WCN6855
In reply to Greg Kroah-HartmanFrom: Wen Gong <[email protected]>
commit fc95d10ac41d75c14a81afcc8722333d8b2cf80f upstream.
Currently ath11k only support string type with bus, chip id and board id such as "bus=ahb,qmi-chip-id=1,qmi-board-id=4" for ahb bus chip and "bus=pci,qmi-chip-id=0,qmi-board-id=255" for PCIe bus chip in board-2.bin. For WCN6855, it is not enough to distinguish all different chips.
This is to add a new string type which include bus, chip id, board id, vendor, device, subsystem-vendor and subsystem-device for WCN6855.
ath11k will first load board-2.bin and search in it for the board data with the above parameters, if matched one board data, then download it to firmware, if not matched any one, then ath11k will download the file board.bin to firmware.
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
--- drivers/net/wireless/ath/ath11k/core.c | 27 +++++++++++++++++++++------ drivers/net/wireless/ath/ath11k/core.h | 13 +++++++++++++ drivers/net/wireless/ath/ath11k/pci.c | 10 ++++++++++ 3 files changed, 44 insertions(+), 6 deletions(-)
drivers/net/wireless/ath/ath11k/core.c +21 -6
@@ -392,11 +392,26 @@ static int ath11k_core_create_board_namescnprintf (variant,sizeof (variant),",variant=%s" , ab->qmi.target.bdf_ext); -scnprintf (name, name_len, -"bus=%s,qmi-chip-id=%d,qmi-board-id=%d%s" , -ath11k_bus_str (ab->hif.bus), - ab->qmi.target.chip_id, - ab->qmi.target.board_id, variant); +switch (ab->id.bdf_search) { +case ATH11K_BDF_SEARCH_BUS_AND_BOARD : +scnprintf (name, name_len, +"bus=%s,vendor=%04x,device=%04x,subsystem-vendor=%04x,subsystem-device=%04x,qmi-chip-id=%d,qmi-board-id=%d%s" , +ath11k_bus_str (ab->hif.bus), + ab->id.vendor, ab->id.device, + ab->id.subsystem_vendor, + ab->id.subsystem_device, + ab->qmi.target.chip_id, + ab->qmi.target.board_id, + variant); +break ; +default : +scnprintf (name, name_len, +"bus=%s,qmi-chip-id=%d,qmi-board-id=%d%s" , +ath11k_bus_str (ab->hif.bus), + ab->qmi.target.chip_id, + ab->qmi.target.board_id, variant); +break ; + }ath11k_dbg (ab,ATH11K_DBG_BOOT ,"boot using board name '%s'\n" , name);
@@ -633,7 +648,7 @@ static int ath11k_core_fetch_board_data_return 0 ; } -#define BOARD_NAME_SIZE 100 +#define BOARD_NAME_SIZE 200int ath11k_core_fetch_bdf (struct ath11k_base *ab,struct ath11k_board_data *bd) {char boardname[BOARD_NAME_SIZE ];
drivers/net/wireless/ath/ath11k/core.h +13 -0
@@ -47,6 +47,11 @@ enum ath11k_supported_bw { ATH11K_BW_160 = 3, }; +enum ath11k_bdf_search { +ATH11K_BDF_SEARCH_DEFAULT , +ATH11K_BDF_SEARCH_BUS_AND_BOARD , +}; +enum wme_ac {WME_AC_BE ,WME_AC_BK ,
@@ -759,6 +764,14 @@ struct ath11k_base {struct completion htc_suspend; +struct { +enum ath11k_bdf_search bdf_search; +u32 vendor; +u32 device; +u32 subsystem_vendor; +u32 subsystem_device; + } id; +/* must be last */ u8 drv_priv[0 ]__aligned(sizeof(void *)) ; };
drivers/net/wireless/ath/ath11k/pci.c +10 -0
@@ -1251,6 +1251,15 @@ static int ath11k_pci_probe(struct pci_d goto err_free_core; } +ath11k_dbg (ab,ATH11K_DBG_BOOT ,"pci probe %04x:%04x %04x:%04x\n" , + pdev->vendor, pdev->device, + pdev->subsystem_vendor, pdev->subsystem_device); + + ab->id.vendor = pdev->vendor; + ab->id.device = pdev->device; + ab->id.subsystem_vendor = pdev->subsystem_vendor; + ab->id.subsystem_device = pdev->subsystem_device; +switch (pci_dev->device) {case QCA6390_DEVICE_ID : ath11k_pci_read_hw_version(ab, &soc_hw_version_major,
@@ -1273,6 +1282,7 @@ static int ath11k_pci_probe(struct pci_d ab->hw_rev =ATH11K_HW_QCN9074_HW10 ;break ;case WCN6855_DEVICE_ID : + ab->id.bdf_search =ATH11K_BDF_SEARCH_BUS_AND_BOARD ;ath11k_pci_read_hw_version (ab, &soc_hw_version_major, &soc_hw_version_minor);switch (soc_hw_version_major) {
Greg Kroah-Hartman
maintainerPATCH 79/1039 shmem: fix a race between shmem_unused_huge_shrink and shmem_evict_inode
In reply to Greg Kroah-HartmanFrom: Gang Li <[email protected]>
commit 62c9827cbb996c2c04f615ecd783ce28bcea894b upstream.
Fix a data race in commit 779750d20b93 ("shmem: split huge pages beyond i_size under memory pressure").
Here are call traces causing race:
Call Trace 1:
shmem_unused_huge_shrink+0x3ae/0x410
? __list_lru_walk_one.isra.5+0x33/0x160
super_cache_scan+0x17c/0x190
shrink_slab.part.55+0x1ef/0x3f0
shrink_node+0x10e/0x330
kswapd+0x380/0x740
kthread+0xfc/0x130
? mem_cgroup_shrink_node+0x170/0x170
? kthread_create_on_node+0x70/0x70
ret_from_fork+0x1f/0x30Call Trace 2:
shmem_evict_inode+0xd8/0x190
evict+0xbe/0x1c0
do_unlinkat+0x137/0x330
do_syscall_64+0x76/0x120
entry_SYSCALL_64_after_hwframe+0x3d/0xa2A simple explanation:
Image there are 3 items in the local list (@list). In the first traversal, A is not deleted from @list.
1) A->B->C
^
|
pos (leave)In the second traversal, B is deleted from @list. Concurrently, A is deleted from @list through shmem_evict_inode() since last reference counter of inode is dropped by other thread. Then the @list is corrupted.
2) A->B->C
^ ^
| |
evict pos (drop)We should make sure the inode is either on the global list or deleted from any local list before iput().
Fixed by moving inodes back to global list before we put them.
[[email protected]: coding style fixes]
--- mm/shmem.c | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-)
mm/shmem.c +21 -16
@@ -554,7 +554,7 @@ static unsigned long shmem_unused_huge_sstruct shmem_inode_info *info;struct page *page;unsigned long batch = sc ? sc->nr_to_scan :128 ; -int removed =0 , split =0 ; +int split =0 ;if (list_empty (&sbinfo->shrinklist))return SHRINK_STOP ;
@@ -569,7 +569,6 @@ static unsigned long shmem_unused_huge_s/* inode is about to be evicted */ if (!inode) {list_del_init (&info->shrinklist); - removed++; goto next; }
@@ -577,12 +576,12 @@ static unsigned long shmem_unused_huge_sif (round_up (inode->i_size,PAGE_SIZE ) ==round_up (inode->i_size,HPAGE_PMD_SIZE )) {list_move (&info->shrinklist, &to_remove); - removed++; goto next; }list_move (&info->shrinklist, &list); next: + sbinfo->shrinklist_len--;if (!--batch)break ; }
@@ -602,7 +601,7 @@ next: inode = &info->vfs_inode;if (nr_to_split && split >= nr_to_split) - goto leave; + goto move_back; page =find_get_page (inode->i_mapping, (inode->i_size &HPAGE_PMD_MASK ) >>PAGE_SHIFT );
@@ -616,38 +615,44 @@ next: }/* -* Leave the inode on the list if we failed to lock -* the page at this time. +* Move the inode on the list back to shrinklist if we failed +* to lock the page at this time. * * Waiting for the lock may lead to deadlock in the * reclaim path. */ if (!trylock_page (page)) {put_page (page); - goto leave; + goto move_back; } ret =split_huge_page (page);unlock_page (page);put_page (page); -/* If split failed leave the inode on the list */ +/* If split failed move the inode on the list back to shrinklist */ if (ret) - goto leave; + goto move_back; split++; drop:list_del_init (&info->shrinklist); - removed++; -leave: + goto put; +move_back: +/* +* Make sure the inode is either on the global list or deleted +* from any local list before iput() since it could be deleted +* in another thread once we put the inode (then the local list +* is corrupted). +*/ +spin_lock (&sbinfo->shrinklist_lock); +list_move (&info->shrinklist, &sbinfo->shrinklist); + sbinfo->shrinklist_len++; +spin_unlock (&sbinfo->shrinklist_lock); +put:iput (inode); } -spin_lock (&sbinfo->shrinklist_lock); -list_splice_tail (&list, &sbinfo->shrinklist); - sbinfo->shrinklist_len -= removed; -spin_unlock (&sbinfo->shrinklist_lock); -return split; }
Greg Kroah-Hartman
maintainerPATCH 80/1039 drm/rockchip: dsi: Hold pm-runtime across bind/unbind
In reply to Greg Kroah-HartmanFrom: Brian Norris <[email protected]>
commit 514db871922f103886ad4d221cf406b4fcc5e74a upstream.
In commit 43c2de1002d2 ("drm/rockchip: dsi: move all lane config except LCDC mux to bind()"), we moved most HW configuration to bind(), but we didn't move the runtime PM management. Therefore, depending on initial boot state, runtime-PM workqueue delays, and other timing factors, we may disable our power domain in between the hardware configuration (bind()) and when we enable the display. This can cause us to lose hardware state and fail to configure our display. For example:
dw-mipi-dsi-rockchip ff968000.mipi: failed to write command FIFO panel-innolux-p079zca ff960000.mipi.0: failed to write command 0
or:
dw-mipi-dsi-rockchip ff968000.mipi: failed to write command FIFO panel-kingdisplay-kd097d04 ff960000.mipi.0: failed write init cmds: -110
We should match the runtime PM to the lifetime of the bind()/unbind() cycle.
Tested on Acer Chrometab 10 (RK3399 Gru-Scarlet), with panel drivers built either as modules or built-in.
Side notes: it seems one is more likely to see this problem when the panel driver is built into the kernel. I've also seen this problem bisect down to commits that simply changed Kconfig dependencies, because it changed the order in which driver init functions were compiled into the kernel, and therefore the ordering and timing of built-in device probe.
--- drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 37 ++++++++++++------------ 1 file changed, 19 insertions(+), 18 deletions(-)
drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c +19 -18
@@ -772,10 +772,6 @@ static void dw_mipi_dsi_encoder_enable(sif (mux <0 )return ; -pm_runtime_get_sync (dsi->dev); -if (dsi->slave) -pm_runtime_get_sync (dsi->slave->dev); -/* * For the RK3399, the clk of grf must be enabled before writing grf * register. And for RK3288 or other soc, this grf_clk must be NULL,
@@ -794,20 +790,10 @@ static void dw_mipi_dsi_encoder_enable(sclk_disable_unprepare (dsi->grf_clk); } -static void dw_mipi_dsi_encoder_disable (struct drm_encoder *encoder) -{ -struct dw_mipi_dsi_rockchip *dsi =to_dsi (encoder); - -if (dsi->slave) -pm_runtime_put (dsi->slave->dev); -pm_runtime_put (dsi->dev); -} -static const struct drm_encoder_helper_funcs dw_mipi_dsi_encoder_helper_funcs = { .atomic_check = dw_mipi_dsi_encoder_atomic_check, .enable = dw_mipi_dsi_encoder_enable, - .disable = dw_mipi_dsi_encoder_disable, }; static int rockchip_dsi_drm_create_encoder(struct dw_mipi_dsi_rockchip *dsi,
@@ -937,10 +923,14 @@ static int dw_mipi_dsi_rockchip_bind(strput_device (second); } +pm_runtime_get_sync (dsi->dev); +if (dsi->slave) +pm_runtime_get_sync (dsi->slave->dev); + ret =clk_prepare_enable (dsi->pllref_clk);if (ret) {DRM_DEV_ERROR (dev,"Failed to enable pllref_clk: %d\n" , ret); -return ret; + goto out_pm_runtime; }/*
@@ -952,7 +942,7 @@ static int dw_mipi_dsi_rockchip_bind(str ret =clk_prepare_enable (dsi->grf_clk);if (ret) {DRM_DEV_ERROR (dsi->dev,"Failed to enable grf_clk: %d\n" , ret); -return ret; + goto out_pm_runtime; }dw_mipi_dsi_rockchip_config (dsi);
@@ -964,16 +954,23 @@ static int dw_mipi_dsi_rockchip_bind(str ret =rockchip_dsi_drm_create_encoder (dsi, drm_dev);if (ret) {DRM_DEV_ERROR (dev,"Failed to create drm encoder\n" ); -return ret; + goto out_pm_runtime; } ret =dw_mipi_dsi_bind (dsi->dmd, &dsi->encoder);if (ret) {DRM_DEV_ERROR (dev,"Failed to bind: %d\n" , ret); -return ret; + goto out_pm_runtime; }return 0 ; + +out_pm_runtime: +pm_runtime_put (dsi->dev); +if (dsi->slave) +pm_runtime_put (dsi->slave->dev); + +return ret; } static void dw_mipi_dsi_rockchip_unbind(struct device *dev,
@@ -988,6 +985,10 @@ static void dw_mipi_dsi_rockchip_unbind(dw_mipi_dsi_unbind (dsi->dmd);clk_disable_unprepare (dsi->pllref_clk); + +pm_runtime_put (dsi->dev); +if (dsi->slave) +pm_runtime_put (dsi->slave->dev); }static const struct component_ops dw_mipi_dsi_rockchip_ops = {
Greg Kroah-Hartman
maintainerPATCH 81/1039 drm/rockchip: dsi: Reconfigure hardware on resume()
In reply to Greg Kroah-HartmanFrom: Brian Norris <[email protected]>
commit e584cdc1549932f87a2707b56bc588cfac5d89e0 upstream.
Since commit 43c2de1002d2 ("drm/rockchip: dsi: move all lane config except LCDC mux to bind()"), we perform most HW configuration in the bind() function. This configuration may be lost on suspend/resume, so we need to call it again. That may lead to errors like this after system suspend/resume:
dw-mipi-dsi-rockchip ff968000.mipi: failed to write command FIFO panel-kingdisplay-kd097d04 ff960000.mipi.0: failed write init cmds: -110
Tested on Acer Chromebook Tab 10 (RK3399 Gru-Scarlet).
Note that early mailing list versions of this driver borrowed Rockchip's downstream/BSP solution, to do HW configuration in mode_set() (which *is* called at the appropriate pre-enable() times), but that was discarded along the way. I've avoided that still, because mode_set() documentation doesn't suggest this kind of purpose as far as I can tell.
--- drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 37 ++++++++++++++++++++++++ 1 file changed, 37 insertions(+)
drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c +37 -0
@@ -267,6 +267,8 @@ struct dw_mipi_dsi_rockchip {struct dw_mipi_dsi *dmd;const struct rockchip_dw_dsi_chip_data *cdata;struct dw_mipi_dsi_plat_data pdata; + +bool dsi_bound; };struct dphy_pll_parameter_map {
@@ -963,6 +965,8 @@ static int dw_mipi_dsi_rockchip_bind(str goto out_pm_runtime; } + dsi->dsi_bound = true; +return 0 ; out_pm_runtime:
@@ -982,6 +986,8 @@ static void dw_mipi_dsi_rockchip_unbind(if (dsi->is_slave)return ; + dsi->dsi_bound = false; +dw_mipi_dsi_unbind (dsi->dmd);clk_disable_unprepare (dsi->pllref_clk);
@@ -1276,6 +1282,36 @@ static const struct phy_ops dw_mipi_dsi_ .exit = dw_mipi_dsi_dphy_exit, }; +static int __maybe_unused dw_mipi_dsi_rockchip_resume (struct device *dev) +{ +struct dw_mipi_dsi_rockchip *dsi =dev_get_drvdata (dev); +int ret; + +/* +* Re-configure DSI state, if we were previously initialized. We need +* to do this before rockchip_drm_drv tries to re-enable() any panels. +*/ +if (dsi->dsi_bound) { + ret =clk_prepare_enable (dsi->grf_clk); +if (ret) { +DRM_DEV_ERROR (dsi->dev,"Failed to enable grf_clk: %d\n" , ret); +return ret; + } + +dw_mipi_dsi_rockchip_config (dsi); +if (dsi->slave) +dw_mipi_dsi_rockchip_config (dsi->slave); + +clk_disable_unprepare (dsi->grf_clk); + } + +return 0 ; +} + +static const struct dev_pm_ops dw_mipi_dsi_rockchip_pm_ops = { +SET_LATE_SYSTEM_SLEEP_PM_OPS (NULL , dw_mipi_dsi_rockchip_resume) +}; +static int dw_mipi_dsi_rockchip_probe (struct platform_device *pdev) {struct device *dev = &pdev->dev;
@@ -1593,6 +1629,7 @@ struct platform_driver dw_mipi_dsi_rockc .remove = dw_mipi_dsi_rockchip_remove, .driver = { .of_match_table = dw_mipi_dsi_rockchip_dt_ids, + .pm = &dw_mipi_dsi_rockchip_pm_ops, .name = "dw-mipi-dsi-rockchip", }, };
Greg Kroah-Hartman
maintainerPATCH 82/1039 drm/ttm: Put BO in its memory managers lru list
In reply to Greg Kroah-HartmanFrom: xinhui pan <[email protected]>
commit 781050b0a3164934857c300bb0bc291e38c26b6f upstream.
After we move BO to a new memory region, we should put it to the new memory manager's lru list regardless we unlock the resv or not.
--- drivers/gpu/drm/ttm/ttm_bo.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/ttm/ttm_bo.c +2 -0
@@ -727,6 +727,8 @@ int ttm_mem_evict_first(struct ttm_devic ret =ttm_bo_evict (bo, ctx);if (locked)ttm_bo_unreserve (bo); +else +ttm_bo_move_to_lru_tail_unlocked (bo);ttm_bo_put (bo);return ret;
Greg Kroah-Hartman
maintainerPATCH 83/1039 Bluetooth: hci_vhci: Fix to set the force_wakeup value
In reply to Greg Kroah-HartmanFrom: Tedd Ho-Jeong An <[email protected]>
[ Upstream commit 8b89637dbac2d73d9f3dadf91b4a7dcdb1fc23af ]
This patch sets the wakeup state of the vhci driver when the force_wakeup is updated.
--- drivers/bluetooth/hci_vhci.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/bluetooth/hci_vhci.c +2 -0
@@ -176,6 +176,8 @@ static ssize_t force_wakeup_write(struct file *file,if (data->wakeup == enable)return -EALREADY ; + data->wakeup = enable; +return count; }
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 84/1039 Bluetooth: mgmt: Fix Experimental Feature Changed event
In reply to Greg Kroah-HartmanFrom: Tedd Ho-Jeong An <[email protected]>
[ Upstream commit b15bfa4df63529150df9ff0585675f728436e0c1 ]
This patch fixes the controller index in the Experimental Features Changed event for the offload_codec and the quality_report features to use the actual hdev index instead of non-controller index(0xffff) so the client can receive the event and know which controller the event is for.
--- net/bluetooth/mgmt.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
net/bluetooth/mgmt.c +9 -6
@@ -3927,7 +3927,9 @@ static int exp_debug_feature_changed(bool enabled, struct sock *skip) }#endif -static int exp_quality_report_feature_changed (bool enabled,struct sock *skip) +static int exp_quality_report_feature_changed (bool enabled, +struct hci_dev *hdev, +struct sock *skip) {struct mgmt_ev_exp_feature_changed ev;
@@ -3935,7 +3937,7 @@ static int exp_quality_report_feature_changed(bool enabled, struct sock *skip)memcpy (ev.uuid, quality_report_uuid,16 ); ev.flags =cpu_to_le32 (enabled ?BIT (0 ) :0 ); -return mgmt_limited_event (MGMT_EV_EXP_FEATURE_CHANGED ,NULL , +return mgmt_limited_event (MGMT_EV_EXP_FEATURE_CHANGED , hdev, &ev,sizeof (ev),HCI_MGMT_EXP_FEATURE_EVENTS , skip); }
@@ -4156,14 +4158,15 @@ static int set_quality_report_func(struct sock *sk, struct hci_dev *hdev, &rp, sizeof(rp));if (changed) -exp_quality_report_feature_changed (val, sk); +exp_quality_report_feature_changed (val, hdev, sk); unlock_quality_report:hci_req_sync_unlock (hdev);return err; } -static int exp_offload_codec_feature_changed (bool enabled,struct sock *skip) +static int exp_offload_codec_feature_changed (bool enabled,struct hci_dev *hdev, +struct sock *skip) {struct mgmt_ev_exp_feature_changed ev;
@@ -4171,7 +4174,7 @@ static int exp_offload_codec_feature_changed(bool enabled, struct sock *skip)memcpy (ev.uuid, offload_codecs_uuid,16 ); ev.flags =cpu_to_le32 (enabled ?BIT (0 ) :0 ); -return mgmt_limited_event (MGMT_EV_EXP_FEATURE_CHANGED ,NULL , +return mgmt_limited_event (MGMT_EV_EXP_FEATURE_CHANGED , hdev, &ev,sizeof (ev),HCI_MGMT_EXP_FEATURE_EVENTS , skip); }
@@ -4229,7 +4232,7 @@ static int set_offload_codec_func(struct sock *sk, struct hci_dev *hdev, &rp, sizeof(rp));if (changed) -exp_offload_codec_feature_changed (val, sk); +exp_offload_codec_feature_changed (val, hdev, sk);return err; }
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 85/1039 Bluetooth: L2CAP: Fix not initializing sk_peer_pid
In reply to Greg Kroah-HartmanFrom: Luiz Augusto von Dentz <[email protected]>
[ Upstream commit f5ff291098f70a70b344df1e388596755c3c8315 ]
In order to group sockets being connected using L2CAP_MODE_EXT_FLOWCTL the pid is used but sk_peer_pid was not being initialized as it is currently only done for af_unix.
--- net/bluetooth/l2cap_sock.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
net/bluetooth/l2cap_sock.c +19 -0
@@ -172,6 +172,21 @@ done:return err; } +static void l2cap_sock_init_pid (struct sock *sk) +{ +struct l2cap_chan *chan =l2cap_pi (sk)->chan; + +/* Only L2CAP_MODE_EXT_FLOWCTL ever need to access the PID in order to +* group the channels being requested. +*/ +if (chan->mode !=L2CAP_MODE_EXT_FLOWCTL ) +return ; + +spin_lock (&sk->sk_peer_lock); + sk->sk_peer_pid =get_pid (task_tgid (current)); +spin_unlock (&sk->sk_peer_lock); +} +static int l2cap_sock_connect (struct socket *sock,struct sockaddr *addr,int alen,int flags) {
@@ -243,6 +258,8 @@ static int l2cap_sock_connect(struct socket *sock, struct sockaddr *addr,if (chan->psm &&bdaddr_type_is_le (chan->src_type) && !chan->mode) chan->mode =L2CAP_MODE_LE_FLOWCTL ; +l2cap_sock_init_pid (sk); + err =l2cap_chan_connect (chan, la.l2_psm,__le16_to_cpu (la.l2_cid), &la.l2_bdaddr, la.l2_bdaddr_type);if (err)
@@ -298,6 +315,8 @@ static int l2cap_sock_listen(struct socket *sock, int backlog) goto done; } +l2cap_sock_init_pid (sk); + sk->sk_max_ack_backlog = backlog; sk->sk_ack_backlog =0 ;
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 86/1039 drm/bridge: display-connector: fix an uninitialized pointer in probe()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit 189723fbe9aca18d6f7d638c59a40288030932b5 ]
The "label" pointer is used for debug output. The code assumes that it is either NULL or valid, but it is never set to NULL. It is either valid or uninitialized.
--- drivers/gpu/drm/bridge/display-connector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/bridge/display-connector.c +1 -1
@@ -107,7 +107,7 @@ static int display_connector_probe(struct platform_device *pdev) {struct display_connector *conn;unsigned int type; -const char *label; +const char *label =NULL ;int ret; conn =devm_kzalloc (&pdev->dev,sizeof (*conn),GFP_KERNEL );
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 87/1039 drm: fix null-ptr-deref in drm_dev_init_release()
In reply to Greg Kroah-HartmanFrom: Wang Hai <[email protected]>
[ Upstream commit acf20ed020ffa4d6cc8347e8d356509b95df3cbe ]
I got a null-ptr-deref report:
[drm:drm_dev_init [drm]] *ERROR* Cannot allocate anonymous inode: -12
==================================================================
BUG: KASAN: null-ptr-deref in iput+0x3c/0x4a0 ... Call Trace: dump_stack_lvl+0x6c/0x8b kasan_report.cold+0x64/0xdb __asan_load8+0x69/0x90 iput+0x3c/0x4a0 drm_dev_init_release+0x39/0xb0 [drm] drm_managed_release+0x158/0x2d0 [drm] drm_dev_init+0x3a7/0x4c0 [drm] __devm_drm_dev_alloc+0x55/0xd0 [drm] mi0283qt_probe+0x8a/0x2b5 [mi0283qt] spi_probe+0xeb/0x130
...
entry_SYSCALL_64_after_hwframe+0x44/0xae
If drm_fs_inode_new() fails in drm_dev_init(), dev->anon_inode will point to PTR_ERR(...) instead of NULL. This will result in null-ptr-deref when drm_fs_inode_free(dev->anon_inode) is called.
drm_dev_init()
drm_fs_inode_new() // fail, dev->anon_inode = PTR_ERR(...) drm_managed_release() drm_dev_init_release() drm_fs_inode_free() // access non-existent anon_inode
Define a temp variable and assign it to dev->anon_inode if the temp variable is not PTR_ERR.
--- drivers/gpu/drm/drm_drv.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/gpu/drm/drm_drv.c +6 -3
@@ -581,6 +581,7 @@ static int drm_dev_init(struct drm_device *dev,const struct drm_driver *driver, struct device *parent) { + struct inode *inode;int ret;if (!drm_core_init_complete) {
@@ -617,13 +618,15 @@ static int drm_dev_init(struct drm_device *dev,if (ret)return ret; - dev->anon_inode =drm_fs_inode_new (); -if (IS_ERR (dev->anon_inode)) { - ret =PTR_ERR (dev->anon_inode); + inode =drm_fs_inode_new (); +if (IS_ERR (inode)) { + ret =PTR_ERR (inode);DRM_ERROR ("Cannot allocate anonymous inode: %d\n" , ret); goto err; } + dev->anon_inode = inode; +if (drm_core_check_feature (dev,DRIVER_RENDER )) { ret =drm_minor_alloc (dev,DRM_MINOR_RENDER );if (ret)
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 88/1039 drm/panel: kingdisplay-kd097d04: Delete panel on attach() failure
In reply to Greg Kroah-HartmanFrom: Brian Norris <[email protected]>
[ Upstream commit 5f31dbeae8a88f31c3eb4eb526ab4807c40da241 ]
If we fail to attach (e.g., because 1 of 2 dual-DSI controllers aren't ready), we leave a dangling drm_panel reference to freed memory. Clean that up on failure.
--- drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c +7 -1
@@ -406,7 +406,13 @@ static int kingdisplay_panel_probe(struct mipi_dsi_device *dsi)if (err <0 )return err; -return mipi_dsi_attach (dsi); + err =mipi_dsi_attach (dsi); +if (err <0 ) { +kingdisplay_panel_del (kingdisplay); +return err; + } + +return 0 ; }static int kingdisplay_panel_remove (struct mipi_dsi_device *dsi)
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 89/1039 drm/panel: innolux-p079zca: Delete panel on attach() failure
In reply to Greg Kroah-HartmanFrom: Brian Norris <[email protected]>
[ Upstream commit 32a267e9c057e1636e7afdd20599aa5741a73079 ]
If we fail to attach (e.g., because 1 of 2 dual-DSI controllers aren't ready), we leave a dangling drm_panel reference to freed memory. Clean that up on failure.
This problem exists since the driver's introduction, but is especially relevant after refactored for dual-DSI variants.
--- drivers/gpu/drm/panel/panel-innolux-p079zca.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/gpu/drm/panel/panel-innolux-p079zca.c +9 -1
@@ -484,6 +484,7 @@ static void innolux_panel_del(struct innolux_panel *innolux)static int innolux_panel_probe (struct mipi_dsi_device *dsi) {const struct panel_desc *desc; +struct innolux_panel *innolux;int err; desc =of_device_get_match_data (&dsi->dev);
@@ -495,7 +496,14 @@ static int innolux_panel_probe(struct mipi_dsi_device *dsi)if (err <0 )return err; -return mipi_dsi_attach (dsi); + err =mipi_dsi_attach (dsi); +if (err <0 ) { + innolux =mipi_dsi_get_drvdata (dsi); +innolux_panel_del (innolux); +return err; + } + +return 0 ; }static int innolux_panel_remove (struct mipi_dsi_device *dsi)
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 90/1039 drm/rockchip: dsi: Fix unbalanced clock on probe error
In reply to Greg Kroah-HartmanFrom: Brian Norris <[email protected]>
[ Upstream commit 251888398753924059f3bb247a44153a2853137f ]
Our probe() function never enabled this clock, so we shouldn't disable it if we fail to probe the bridge.
Noted by inspection.
--- drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c +1 -5
@@ -1433,14 +1433,10 @@ static int dw_mipi_dsi_rockchip_probe(stif (ret != -EPROBE_DEFER )DRM_DEV_ERROR (dev,"Failed to probe dw_mipi_dsi: %d\n" , ret); - goto err_clkdisable; +return ret; }return 0 ; - -err_clkdisable: -clk_disable_unprepare (dsi->pllref_clk); -return ret; }static int dw_mipi_dsi_rockchip_remove (struct platform_device *pdev)
Greg Kroah-Hartman
maintainerPATCH 91/1039 drm/rockchip: dsi: Disable PLL clock on bind error
In reply to Greg Kroah-HartmanFrom: Brian Norris <[email protected]>
[ Upstream commit 5a614570172e1c9f59035d259dd735acd4f1c01b ]
Fix some error handling here noticed in review of other changes.
--- drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c +5 -3
@@ -944,7 +944,7 @@ static int dw_mipi_dsi_rockchip_bind(str ret =clk_prepare_enable (dsi->grf_clk);if (ret) {DRM_DEV_ERROR (dsi->dev,"Failed to enable grf_clk: %d\n" , ret); - goto out_pm_runtime; + goto out_pll_clk; }dw_mipi_dsi_rockchip_config (dsi);
@@ -956,19 +956,21 @@ static int dw_mipi_dsi_rockchip_bind(str ret =rockchip_dsi_drm_create_encoder (dsi, drm_dev);if (ret) {DRM_DEV_ERROR (dev,"Failed to create drm encoder\n" ); - goto out_pm_runtime; + goto out_pll_clk; } ret =dw_mipi_dsi_bind (dsi->dmd, &dsi->encoder);if (ret) {DRM_DEV_ERROR (dev,"Failed to bind: %d\n" , ret); - goto out_pm_runtime; + goto out_pll_clk; } dsi->dsi_bound = true;return 0 ; +out_pll_clk: +clk_disable_unprepare (dsi->pllref_clk); out_pm_runtime:pm_runtime_put (dsi->dev);if (dsi->slave)
Greg Kroah-Hartman
maintainerPATCH 92/1039 Bluetooth: virtio_bt: fix memory leak in virtbt_rx_handle()
In reply to Greg Kroah-HartmanFrom: Soenke Huster <[email protected]>
[ Upstream commit 1d0688421449718c6c5f46e458a378c9b530ba18 ]
On the reception of packets with an invalid packet type, the memory of the allocated socket buffers is never freed. Add a default case that frees these to avoid a memory leak.
--- drivers/bluetooth/virtio_bt.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/bluetooth/virtio_bt.c +3 -0
@@ -202,6 +202,9 @@ static void virtbt_rx_handle(struct virtio_bluetooth *vbt, struct sk_buff *skb)hci_skb_pkt_type (skb) = pkt_type;hci_recv_frame (vbt->hdev, skb);break ; +default : +kfree_skb (skb); +break ; } }
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 93/1039 Bluetooth: cmtp: fix possible panic when cmtp_init_sockets() fails
In reply to Greg Kroah-HartmanFrom: Wang Hai <[email protected]>
[ Upstream commit 2a7ca7459d905febf519163bd9e3eed894de6bb7 ]
I got a kernel BUG report when doing fault injection test:
------------[ cut here ]------------ kernel BUG at lib/list_debug.c:45! ... RIP: 0010:__list_del_entry_valid.cold+0x12/0x4d ... Call Trace: proto_unregister+0x83/0x220 cmtp_cleanup_sockets+0x37/0x40 [cmtp] cmtp_exit+0xe/0x1f [cmtp] do_syscall_64+0x35/0xb0 entry_SYSCALL_64_after_hwframe+0x44/0xae
If cmtp_init_sockets() in cmtp_init() fails, cmtp_init() still returns success. This will cause a kernel bug when accessing uncreated ctmp related data when the module exits.
--- net/bluetooth/cmtp/core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
net/bluetooth/cmtp/core.c +1 -3
@@ -501,9 +501,7 @@ static int __init cmtp_init(void) {BT_INFO ("CMTP (CAPI Emulation) ver %s" ,VERSION ); -cmtp_init_sockets (); - -return 0 ; +return cmtp_init_sockets (); } static void __exit cmtp_exit(void)
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 94/1039 clk: bcm-2835: Pick the closest clock rate
In reply to Greg Kroah-HartmanFrom: Maxime Ripard <[email protected]>
[ Upstream commit 5517357a4733d7cf7c17fc79d0530cfa47add372 ]
The driver currently tries to pick the closest rate that is lower than the rate being requested.
This causes an issue with clk_set_min_rate() since it actively checks for the rounded rate to be above the minimum that was just set.
Let's change the logic a bit to pick the closest rate to the requested rate, no matter if it's actually higher or lower.
--- drivers/clk/bcm/clk-bcm2835.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/bcm/clk-bcm2835.c +1 -1
@@ -1216,7 +1216,7 @@ static int bcm2835_clock_determine_rate(struct clk_hw *hw, rate =bcm2835_clock_choose_div_and_prate (hw, i, req->rate, &div, &prate, &avgrate); -if (rate > best_rate && rate <= req->rate) { +if (abs (req->rate - rate) <abs (req->rate - best_rate)) { best_parent = parent; best_prate = prate; best_rate = rate;
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 95/1039 clk: bcm-2835: Remove rounding up the dividers
In reply to Greg Kroah-HartmanFrom: Maxime Ripard <[email protected]>
[ Upstream commit 8ca011ef4af48a7af7b15afd8a4a44039dd04cea ]
The driver, once it found a divider, tries to round it up by increasing the least significant bit of the fractional part by one when the round_up argument is set and there's a remainder.
However, since it increases the divider it will actually reduce the clock rate below what we were asking for, leading to issues with clk_set_min_rate() that will complain that our rounded clock rate is below the minimum of the rate.
Since the dividers are fairly precise already, let's remove that part so that we can have clk_set_min_rate() working.
This is effectively a revert of 9c95b32ca093 ("clk: bcm2835: add a round up ability to the clock divisor").
--- drivers/clk/bcm/clk-bcm2835.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)
drivers/clk/bcm/clk-bcm2835.c +3 -8
@@ -932,8 +932,7 @@ static int bcm2835_clock_is_on(struct clk_hw *hw)static u32 bcm2835_clock_choose_div (struct clk_hw *hw,unsigned long rate, -unsigned long parent_rate, -bool round_up) +unsigned long parent_rate) {struct bcm2835_clock *clock =bcm2835_clock_from_hw (hw);const struct bcm2835_clock_data *data = clock->data;
@@ -945,10 +944,6 @@ static u32 bcm2835_clock_choose_div(struct clk_hw *hw, rem =do_div (temp, rate); div = temp; - -/* Round up and mask off the unused bits */ -if (round_up && ((div & unused_frac_mask) !=0 || rem !=0 )) - div += unused_frac_mask +1 ; div &= ~unused_frac_mask;/* different clamping limits apply for a mash clock */
@@ -1079,7 +1074,7 @@ static int bcm2835_clock_set_rate(struct clk_hw *hw,struct bcm2835_clock *clock =bcm2835_clock_from_hw (hw);struct bcm2835_cprman *cprman = clock->cprman;const struct bcm2835_clock_data *data = clock->data; -u32 div =bcm2835_clock_choose_div (hw, rate, parent_rate, false); +u32 div =bcm2835_clock_choose_div (hw, rate, parent_rate);u32 ctl;spin_lock (&cprman->regs_lock);
@@ -1130,7 +1125,7 @@ static unsigned long bcm2835_clock_choose_div_and_prate(struct clk_hw *hw,if (!(BIT (parent_idx) & data->set_rate_parent)) { *prate =clk_hw_get_rate (parent); - *div =bcm2835_clock_choose_div (hw, rate, *prate, true); + *div =bcm2835_clock_choose_div (hw, rate, *prate); *avgrate =bcm2835_clock_rate_from_divisor (clock, *prate, *div);
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 96/1039 drm/vc4: hdmi: Set a default HSM rate
In reply to Greg Kroah-HartmanFrom: Maxime Ripard <[email protected]>
[ Upstream commit 3e85b81591609bb794bb00cd619b20965b5b38cd ]
When the firmware doesn't setup the HSM rate (such as when booting without an HDMI cable plugged in), its rate is 0 and thus any register access results in a CPU stall, even though HSM is enabled.
Let's enforce a minimum rate at boot to avoid this issue.
--- drivers/gpu/drm/vc4/vc4_hdmi.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
drivers/gpu/drm/vc4/vc4_hdmi.c +14 -0
@@ -94,6 +94,7 @@# define VC4_HD_M_SW_RST BIT(2)# define VC4_HD_M_ENABLE BIT(0) +#define HSM_MIN_CLOCK_FREQ 120000000#define CEC_CLOCK_FREQ 40000#define HDMI_14_MAX_TMDS_CLK (340 * 1000 * 1000)
@@ -2162,6 +2163,19 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data) vc4_hdmi->disable_4kp60 = true; } +/* +* If we boot without any cable connected to the HDMI connector, +* the firmware will skip the HSM initialization and leave it +* with a rate of 0, resulting in a bus lockup when we're +* accessing the registers even if it's enabled. +* +* Let's put a sensible default at runtime_resume so that we +* don't end up in this situation. +*/ + ret =clk_set_min_rate (vc4_hdmi->hsm_clock,HSM_MIN_CLOCK_FREQ ); +if (ret) + goto err_put_ddc; +if (vc4_hdmi->variant->reset) vc4_hdmi->variant->reset (vc4_hdmi);
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 97/1039 drm/vc4: hdmi: Move the HSM clock enable to runtime_pm
In reply to Greg Kroah-HartmanFrom: Maxime Ripard <[email protected]>
[ Upstream commit c86b41214362e8e715e1343e16d5d6af0562db05 ]
In order to access the HDMI controller, we need to make sure the HSM clock is enabled. If we were to access it with the clock disabled, the CPU would completely hang, resulting in an hard crash.
Since we have different code path that would require it, let's move that clock enable / disable to runtime_pm that will take care of the reference counting for us.
Since we also want to change the HSM clock rate and it's only valid while the clock is disabled, we need to move the clk_set_min_rate() call on the HSM clock above pm_runtime_get_and_sync().
--- drivers/gpu/drm/vc4/vc4_hdmi.c | 70 +++++++++++++++++++++------------- 1 file changed, 44 insertions(+), 26 deletions(-)
drivers/gpu/drm/vc4/vc4_hdmi.c +44 -26
@@ -628,7 +628,6 @@ static void vc4_hdmi_encoder_post_crtc_powerdown(struct drm_encoder *encoder, vc4_hdmi->variant->phy_disable (vc4_hdmi);clk_disable_unprepare (vc4_hdmi->pixel_bvb_clock); -clk_disable_unprepare (vc4_hdmi->hsm_clock);clk_disable_unprepare (vc4_hdmi->pixel_clock); ret =pm_runtime_put (&vc4_hdmi->pdev->dev);
@@ -894,28 +893,10 @@ static void vc4_hdmi_encoder_pre_crtc_configure(struct drm_encoder *encoder,conn_state_to_vc4_hdmi_conn_state (conn_state);struct drm_display_mode *mode = &encoder->crtc->state->adjusted_mode;struct vc4_hdmi *vc4_hdmi =encoder_to_vc4_hdmi (encoder); -unsigned long bvb_rate, pixel_rate, hsm_rate; +unsigned long pixel_rate = vc4_conn_state->pixel_rate; +unsigned long bvb_rate, hsm_rate;int ret; - ret =pm_runtime_resume_and_get (&vc4_hdmi->pdev->dev); -if (ret <0 ) { -DRM_ERROR ("Failed to retain power domain: %d\n" , ret); -return ; - } - - pixel_rate = vc4_conn_state->pixel_rate; - ret =clk_set_rate (vc4_hdmi->pixel_clock, pixel_rate); -if (ret) { -DRM_ERROR ("Failed to set pixel clock rate: %d\n" , ret); -return ; - } - - ret =clk_prepare_enable (vc4_hdmi->pixel_clock); -if (ret) { -DRM_ERROR ("Failed to turn on pixel clock: %d\n" , ret); -return ; - } -/* * As stated in RPi's vc4 firmware "HDMI state machine (HSM) clock must * be faster than pixel clock, infinitesimally faster, tested in
@@ -939,10 +920,21 @@ static void vc4_hdmi_encoder_pre_crtc_configure(struct drm_encoder *encoder,return ; } - ret =clk_prepare_enable (vc4_hdmi->hsm_clock); + ret =pm_runtime_resume_and_get (&vc4_hdmi->pdev->dev); +if (ret <0 ) { +DRM_ERROR ("Failed to retain power domain: %d\n" , ret); +return ; + } + + ret =clk_set_rate (vc4_hdmi->pixel_clock, pixel_rate);if (ret) { -DRM_ERROR ("Failed to turn on HSM clock: %d\n" , ret); -clk_disable_unprepare (vc4_hdmi->pixel_clock); +DRM_ERROR ("Failed to set pixel clock rate: %d\n" , ret); +return ; + } + + ret =clk_prepare_enable (vc4_hdmi->pixel_clock); +if (ret) { +DRM_ERROR ("Failed to turn on pixel clock: %d\n" , ret);return ; }
@@ -958,7 +950,6 @@ static void vc4_hdmi_encoder_pre_crtc_configure(struct drm_encoder *encoder, ret =clk_set_min_rate (vc4_hdmi->pixel_bvb_clock, bvb_rate);if (ret) {DRM_ERROR ("Failed to set pixel bvb clock rate: %d\n" , ret); -clk_disable_unprepare (vc4_hdmi->hsm_clock);clk_disable_unprepare (vc4_hdmi->pixel_clock);return ; }
@@ -966,7 +957,6 @@ static void vc4_hdmi_encoder_pre_crtc_configure(struct drm_encoder *encoder, ret =clk_prepare_enable (vc4_hdmi->pixel_bvb_clock);if (ret) {DRM_ERROR ("Failed to turn on pixel bvb clock: %d\n" , ret); -clk_disable_unprepare (vc4_hdmi->hsm_clock);clk_disable_unprepare (vc4_hdmi->pixel_clock);return ; }
@@ -2100,6 +2090,27 @@ static int vc5_hdmi_init_resources(struct vc4_hdmi *vc4_hdmi)return 0 ; } +static int __maybe_unused vc4_hdmi_runtime_suspend (struct device *dev) +{ +struct vc4_hdmi *vc4_hdmi =dev_get_drvdata (dev); + +clk_disable_unprepare (vc4_hdmi->hsm_clock); + +return 0 ; +} + +static int vc4_hdmi_runtime_resume (struct device *dev) +{ +struct vc4_hdmi *vc4_hdmi =dev_get_drvdata (dev); +int ret; + + ret =clk_prepare_enable (vc4_hdmi->hsm_clock); +if (ret) +return ret; + +return 0 ; +} +static int vc4_hdmi_bind (struct device *dev,struct device *master,void *data) {const struct vc4_hdmi_variant *variant =of_device_get_match_data (dev);
@@ -2367,11 +2378,18 @@ static const struct of_device_id vc4_hdmi_dt_match[] = { {} }; +static const struct dev_pm_ops vc4_hdmi_pm_ops = { +SET_RUNTIME_PM_OPS (vc4_hdmi_runtime_suspend, + vc4_hdmi_runtime_resume, +NULL ) +}; +struct platform_driver vc4_hdmi_driver = { .probe = vc4_hdmi_dev_probe, .remove = vc4_hdmi_dev_remove, .driver = { .name ="vc4_hdmi" , .of_match_table = vc4_hdmi_dt_match, + .pm = &vc4_hdmi_pm_ops, }, };
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 98/1039 drm/vc4: hdmi: Make sure the controller is powered in detect
In reply to Greg Kroah-HartmanFrom: Maxime Ripard <[email protected]>
[ Upstream commit 0f5251339eda7f7eb7bd4467607ae1d01b24e129 ]
If the HPD GPIO is not available and drm_probe_ddc fails, we end up reading the HDMI_HOTPLUG register, but the controller might be powered off resulting in a CPU hang. Make sure we have the power domain and the HSM clock powered during the detect cycle to prevent the hang from happening.
--- drivers/gpu/drm/vc4/vc4_hdmi.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/vc4/vc4_hdmi.c +4 -0
@@ -168,6 +168,8 @@ vc4_hdmi_connector_detect(struct drm_connector *connector, bool force)struct vc4_hdmi *vc4_hdmi =connector_to_vc4_hdmi (connector);bool connected = false; +WARN_ON (pm_runtime_resume_and_get (&vc4_hdmi->pdev->dev)); +if (vc4_hdmi->hpd_gpio &&gpiod_get_value_cansleep (vc4_hdmi->hpd_gpio)) { connected = true;
@@ -188,10 +190,12 @@ vc4_hdmi_connector_detect(struct drm_connector *connector, bool force) } } +pm_runtime_put (&vc4_hdmi->pdev->dev);return connector_status_connected; }cec_phys_addr_invalidate (vc4_hdmi->cec_adap); +pm_runtime_put (&vc4_hdmi->pdev->dev);return connector_status_disconnected; }
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 99/1039 drm/vc4: hdmi: Make sure the controller is powered up during bind
In reply to Greg Kroah-HartmanFrom: Maxime Ripard <[email protected]>
[ Upstream commit 9c6e4f6ed1d61d5f46946e5c151ceb279eedadb1 ]
In the bind hook, we actually need the device to have the HSM clock running during the final part of the display initialisation where we reset the controller and initialise the CEC component.
Failing to do so will result in a complete, silent, hang of the CPU.
--- drivers/gpu/drm/vc4/vc4_hdmi.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-)
drivers/gpu/drm/vc4/vc4_hdmi.c +15 -2
@@ -2191,6 +2191,18 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)if (ret) goto err_put_ddc; +/* +* We need to have the device powered up at this point to call +* our reset hook and for the CEC init. +*/ + ret =vc4_hdmi_runtime_resume (dev); +if (ret) + goto err_put_ddc; + +pm_runtime_get_noresume (dev); +pm_runtime_set_active (dev); +pm_runtime_enable (dev); +if (vc4_hdmi->variant->reset) vc4_hdmi->variant->reset (vc4_hdmi);
@@ -2202,8 +2214,6 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)clk_prepare_enable (vc4_hdmi->pixel_bvb_clock); } -pm_runtime_enable (dev); -drm_simple_encoder_init (drm, encoder,DRM_MODE_ENCODER_TMDS );drm_encoder_helper_add (encoder, &vc4_hdmi_encoder_helper_funcs);
@@ -2227,6 +2237,8 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data) vc4_hdmi_debugfs_regs, vc4_hdmi); +pm_runtime_put_sync (dev); +return 0 ; err_free_cec:
@@ -2237,6 +2249,7 @@ err_destroy_conn:vc4_hdmi_connector_destroy (&vc4_hdmi->connector); err_destroy_encoder:drm_encoder_cleanup (encoder); +pm_runtime_put_sync (dev);pm_runtime_disable (dev); err_put_ddc:put_device (&vc4_hdmi->ddc->dev);
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 100/1039 drm/vc4: hdmi: Rework the pre_crtc_configure error handling
In reply to Greg Kroah-HartmanFrom: Maxime Ripard <[email protected]>
[ Upstream commit caa51a4c11f1cadba9bcf61ed9e0105711952ce7 ]
Since our pre_crtc_configure hook returned void, we didn't implement a goto-based error path handling, leading to errors like failing to put back the device in pm_runtime in all the error paths, but also failing to disable the pixel clock if clk_set_min_rate on the HSM clock fails.
Move to a goto-based implementation to have an easier consitency.
--- drivers/gpu/drm/vc4/vc4_hdmi.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-)
drivers/gpu/drm/vc4/vc4_hdmi.c +14 -6
@@ -933,15 +933,16 @@ static void vc4_hdmi_encoder_pre_crtc_configure(struct drm_encoder *encoder, ret =clk_set_rate (vc4_hdmi->pixel_clock, pixel_rate);if (ret) {DRM_ERROR ("Failed to set pixel clock rate: %d\n" , ret); -return ; + goto err_put_runtime_pm; } ret =clk_prepare_enable (vc4_hdmi->pixel_clock);if (ret) {DRM_ERROR ("Failed to turn on pixel clock: %d\n" , ret); -return ; + goto err_put_runtime_pm; } +vc4_hdmi_cec_update_clk_div (vc4_hdmi);if (pixel_rate >297000000 )
@@ -954,15 +955,13 @@ static void vc4_hdmi_encoder_pre_crtc_configure(struct drm_encoder *encoder, ret =clk_set_min_rate (vc4_hdmi->pixel_bvb_clock, bvb_rate);if (ret) {DRM_ERROR ("Failed to set pixel bvb clock rate: %d\n" , ret); -clk_disable_unprepare (vc4_hdmi->pixel_clock); -return ; + goto err_disable_pixel_clock; } ret =clk_prepare_enable (vc4_hdmi->pixel_bvb_clock);if (ret) {DRM_ERROR ("Failed to turn on pixel bvb clock: %d\n" , ret); -clk_disable_unprepare (vc4_hdmi->pixel_clock); -return ; + goto err_disable_pixel_clock; }if (vc4_hdmi->variant->phy_init)
@@ -975,6 +974,15 @@ static void vc4_hdmi_encoder_pre_crtc_configure(struct drm_encoder *encoder,if (vc4_hdmi->variant->set_timings) vc4_hdmi->variant->set_timings (vc4_hdmi, conn_state, mode); + +return ; + +err_disable_pixel_clock: +clk_disable_unprepare (vc4_hdmi->pixel_clock); +err_put_runtime_pm: +pm_runtime_put (&vc4_hdmi->pdev->dev); + +return ; } static void vc4_hdmi_encoder_pre_crtc_enable(struct drm_encoder *encoder,
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 101/1039 drm/vc4: crtc: Make sure the HDMI controller is powered when disabling
In reply to Greg Kroah-HartmanFrom: Maxime Ripard <[email protected]>
[ Upstream commit bca10db67bdaf15997a5a2a276e7aa9b6eea1393 ]
Since commit 875a4d536842 ("drm/vc4: drv: Disable the CRTC at boot time"), during the initial setup of the driver we call into the VC4 HDMI controller hooks to make sure the controller is properly disabled.
However, we were never making sure that the device was properly powered while doing so. This never resulted in any (reported) issue in practice, but since the introduction of commit 4209f03fcb8e ("drm/vc4: hdmi: Warn if we access the controller while disabled") we get a loud complaint when we do that kind of access.
Let's make sure we have the HDMI controller properly powered while disabling it.
--- drivers/gpu/drm/vc4/vc4_crtc.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)
drivers/gpu/drm/vc4/vc4_crtc.c +18 -1
@@ -32,6 +32,7 @@#include <linux/clk.h> #include <linux/component.h> #include <linux/of_device.h> +#include <linux/pm_runtime.h> #include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h>
@@ -42,6 +43,7 @@#include <drm/drm_vblank.h> #include "vc4_drv.h" +#include "vc4_hdmi.h" #include "vc4_regs.h" #define HVS_FIFO_LATENCY_PIX 6
@@ -496,8 +498,10 @@ int vc4_crtc_disable_at_boot(struct drm_crtc *crtc)enum vc4_encoder_type encoder_type;const struct vc4_pv_data *pv_data;struct drm_encoder *encoder; +struct vc4_hdmi *vc4_hdmi;unsigned encoder_sel;int channel; +int ret; if (!(of_device_is_compatible(vc4_crtc->pdev->dev.of_node, "brcm,bcm2711-pixelvalve2") ||
@@ -525,7 +529,20 @@ int vc4_crtc_disable_at_boot(struct drm_crtc *crtc)if (WARN_ON (!encoder))return 0 ; -return vc4_crtc_disable (crtc, encoder,NULL , channel); + vc4_hdmi =encoder_to_vc4_hdmi (encoder); + ret =pm_runtime_resume_and_get (&vc4_hdmi->pdev->dev); +if (ret) +return ret; + + ret =vc4_crtc_disable (crtc, encoder,NULL , channel); +if (ret) +return ret; + + ret =pm_runtime_put (&vc4_hdmi->pdev->dev); +if (ret) +return ret; + +return 0 ; } static void vc4_crtc_atomic_disable(struct drm_crtc *crtc,
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 102/1039 drm/bridge: sn65dsi83: Fix bridge removal
In reply to Greg Kroah-HartmanFrom: Maxime Ripard <[email protected]>
[ Upstream commit c05f1a4e2c4b8a217b448828c4e59fb47454dc75 ]
Commit 24417d5b0c00 ("drm/bridge: ti-sn65dsi83: Implement .detach callback") moved the unregistration of the bridge DSI device and bridge itself to the detach callback.
While this is correct for the DSI device detach and unregistration, the bridge is added in the driver probe, and should thus be removed as part of its remove callback.
--- drivers/gpu/drm/bridge/ti-sn65dsi83.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/bridge/ti-sn65dsi83.c +1 -1
@@ -297,7 +297,6 @@ static void sn65dsi83_detach(struct drm_bridge *bridge)mipi_dsi_detach (ctx->dsi);mipi_dsi_device_unregister (ctx->dsi); -drm_bridge_remove (&ctx->bridge); ctx->dsi =NULL ; }
@@ -711,6 +710,7 @@ static int sn65dsi83_remove(struct i2c_client *client) {struct sn65dsi83 *ctx =i2c_get_clientdata (client); +drm_bridge_remove (&ctx->bridge);of_node_put (ctx->host_node);return 0 ;
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 103/1039 drm/virtio: fix potential integer overflow on shift of a int
In reply to Greg Kroah-HartmanFrom: Colin Ian King <[email protected]>
[ Upstream commit 8f4502fa284478a5264afa8a5a95511276fa9b80 ]
The left shift of unsigned int 32 bit integer constant 1 is evaluated using 32 bit arithmetic and then assigned to a signed 64 bit integer. In the case where i is 32 or more this can lead to an overflow. Fix this by shifting the value 1ULL instead.
Addresses-Coverity: ("Uninitentional integer overflow")
--- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/virtio/virtgpu_ioctl.c +1 -1
@@ -819,7 +819,7 @@ static int virtio_gpu_context_init_ioctl(struct drm_device *dev,if (vfpriv->ring_idx_mask) { valid_ring_mask =0 ;for (i =0 ; i < vfpriv->num_rings; i++) - valid_ring_mask |=1 << i; + valid_ring_mask |=1ULL << i;if (~valid_ring_mask & vfpriv->ring_idx_mask) { ret = -EINVAL ;
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 104/1039 drm/virtio: fix another potential integer overflow on shift of a int
In reply to Greg Kroah-HartmanFrom: Colin Ian King <[email protected]>
[ Upstream commit 74c1bda2f3fa79a93e1c910008649b49b02dc09d ]
The left shift of unsigned int 32 bit integer constant 1 is evaluated using 32 bit arithmetic and then assigned to a signed 64 bit integer. In the case where value is 32 or more this can lead to an overflow (value can be in range 0..MAX_CAPSET_ID (63). Fix this by shifting the value 1ULL instead.
Addresses-Coverity: ("Uninitentional integer overflow")
--- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/virtio/virtgpu_ioctl.c +1 -1
@@ -774,7 +774,7 @@ static int virtio_gpu_context_init_ioctl(struct drm_device *dev, goto out_unlock; } -if ((vgdev->capset_id_mask & (1 << value)) ==0 ) { +if ((vgdev->capset_id_mask & (1ULL << value)) ==0 ) { ret = -EINVAL ; goto out_unlock; }
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 105/1039 wcn36xx: ensure pairing of init_scan/finish_scan and start_scan/end_scan
In reply to Greg Kroah-HartmanFrom: Benjamin Li <[email protected]>
[ Upstream commit 8f1ba8b0ee2679f0b3d22d2a5c1bc70c436fd872 ]
An SMD capture from the downstream prima driver on WCN3680B shows the following command sequence for connected scans:
- init_scan_req
- start_scan_req, channel 1
- end_scan_req, channel 1
- start_scan_req, channel 2
- ...
- end_scan_req, channel 3
- finish_scan_req
- init_scan_req
- start_scan_req, channel 4
- ...
- end_scan_req, channel 6
- finish_scan_req
- ...
- end_scan_req, channel 165
- finish_scan_req
Upstream currently never calls wcn36xx_smd_end_scan, and in some cases[1] still sends finish_scan_req twice in a row or before init_scan_req. A typical connected scan looks like this:
- init_scan_req
- start_scan_req, channel 1
- finish_scan_req
- init_scan_req
- start_scan_req, channel 2
- ...
- start_scan_req, channel 165
- finish_scan_req
- finish_scan_req
This patch cleans up scanning so that init/finish and start/end are always paired together and correctly nested.
- init_scan_req
- start_scan_req, channel 1
- end_scan_req, channel 1
- finish_scan_req
- init_scan_req
- start_scan_req, channel 2
- end_scan_req, channel 2
- ...
- start_scan_req, channel 165
- end_scan_req, channel 165
- finish_scan_req
Note that upstream will not do batching of 3 active-probe scans before returning to the operating channel, and this patch does not change that. To match downstream in this aspect, adjust IEEE80211_PROBE_DELAY and/or the 125ms max off-channel time in ieee80211_scan_state_decision.
[1]: commit d195d7aac09b ("wcn36xx: Ensure finish scan is not requested before start scan") addressed one case of finish_scan_req being sent without a preceding init_scan_req (the case of the operating channel coinciding with the first scan channel); two other cases are:
1) if SW scan is started and aborted immediately, without scanning any channels, we send a finish_scan_req without ever sending init_scan_req, and
2) as SW scan logic always returns us to the operating channel before calling wcn36xx_sw_scan_complete, finish_scan_req is always sent twice at the end of a SW scan
--- drivers/net/wireless/ath/wcn36xx/main.c | 34 +++++++++++++++++----- drivers/net/wireless/ath/wcn36xx/smd.c | 4 +++ drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 1 + 3 files changed, 32 insertions(+), 7 deletions(-)
drivers/net/wireless/ath/wcn36xx/main.c +27 -7
@@ -402,6 +402,7 @@ static void wcn36xx_change_opchannel(struct wcn36xx *wcn, int ch)static int wcn36xx_config (struct ieee80211_hw *hw,u32 changed) {struct wcn36xx *wcn = hw->priv; +int ret;wcn36xx_dbg (WCN36XX_DBG_MAC ,"mac config changed 0x%08x\n" , changed);
@@ -417,17 +418,31 @@ static int wcn36xx_config(struct ieee80211_hw *hw, u32 changed)* want to receive/transmit regular data packets, then * simply stop the scan session and exit PS mode. */ -wcn36xx_smd_finish_scan (wcn,HAL_SYS_MODE_SCAN , - wcn->sw_scan_vif); - wcn->sw_scan_channel =0 ; +if (wcn->sw_scan_channel) +wcn36xx_smd_end_scan (wcn, wcn->sw_scan_channel); +if (wcn->sw_scan_init) { +wcn36xx_smd_finish_scan (wcn,HAL_SYS_MODE_SCAN , + wcn->sw_scan_vif); + } }else if (wcn->sw_scan) {/* A scan is ongoing, do not change the operating * channel, but start a scan session on the channel. */ -wcn36xx_smd_init_scan (wcn,HAL_SYS_MODE_SCAN , - wcn->sw_scan_vif); +if (wcn->sw_scan_channel) +wcn36xx_smd_end_scan (wcn, wcn->sw_scan_channel); +if (!wcn->sw_scan_init) { +/* This can fail if we are unable to notify the +* operating channel. +*/ + ret =wcn36xx_smd_init_scan (wcn, +HAL_SYS_MODE_SCAN , + wcn->sw_scan_vif); +if (ret) { +mutex_unlock (&wcn->conf_mutex); +return -EIO ; + } + }wcn36xx_smd_start_scan (wcn, ch); - wcn->sw_scan_channel = ch; }else {wcn36xx_change_opchannel (wcn, ch); }
@@ -722,7 +737,12 @@ static void wcn36xx_sw_scan_complete(struct ieee80211_hw *hw,struct wcn36xx *wcn = hw->priv;/* ensure that any scan session is finished */ -wcn36xx_smd_finish_scan (wcn,HAL_SYS_MODE_SCAN , wcn->sw_scan_vif); +if (wcn->sw_scan_channel) +wcn36xx_smd_end_scan (wcn, wcn->sw_scan_channel); +if (wcn->sw_scan_init) { +wcn36xx_smd_finish_scan (wcn,HAL_SYS_MODE_SCAN , + wcn->sw_scan_vif); + } wcn->sw_scan = false; wcn->sw_scan_opchannel =0 ; }
drivers/net/wireless/ath/wcn36xx/smd.c +4 -0
@@ -722,6 +722,7 @@ int wcn36xx_smd_init_scan(struct wcn36xx *wcn, enum wcn36xx_hal_sys_mode mode,wcn36xx_err ("hal_init_scan response failed err=%d\n" , ret); goto out; } + wcn->sw_scan_init = true; out:mutex_unlock (&wcn->hal_mutex);return ret;
@@ -752,6 +753,7 @@ int wcn36xx_smd_start_scan(struct wcn36xx *wcn, u8 scan_channel)wcn36xx_err ("hal_start_scan response failed err=%d\n" , ret); goto out; } + wcn->sw_scan_channel = scan_channel; out:mutex_unlock (&wcn->hal_mutex);return ret;
@@ -782,6 +784,7 @@ int wcn36xx_smd_end_scan(struct wcn36xx *wcn, u8 scan_channel)wcn36xx_err ("hal_end_scan response failed err=%d\n" , ret); goto out; } + wcn->sw_scan_channel =0 ; out:mutex_unlock (&wcn->hal_mutex);return ret;
@@ -823,6 +826,7 @@ int wcn36xx_smd_finish_scan(struct wcn36xx *wcn,wcn36xx_err ("hal_finish_scan response failed err=%d\n" , ret); goto out; } + wcn->sw_scan_init = false; out:mutex_unlock (&wcn->hal_mutex);return ret;
drivers/net/wireless/ath/wcn36xx/wcn36xx.h +1 -0
@@ -248,6 +248,7 @@ struct wcn36xx {struct cfg80211_scan_request *scan_req;bool sw_scan;u8 sw_scan_opchannel; +bool sw_scan_init;u8 sw_scan_channel;struct ieee80211_vif *sw_scan_vif;struct mutex scan_lock;
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 106/1039 wcn36xx: Indicate beacon not connection loss on MISSED_BEACON_IND
In reply to Greg Kroah-HartmanFrom: Bryan O'Donoghue <[email protected]>
[ Upstream commit 588b45c88ae130fe373a8c50edaf54735c3f4fe3 ]
Firmware can trigger a missed beacon indication, this is not the same as a lost signal.
Flag to Linux the missed beacon and let the WiFi stack decide for itself if the link is up or down by sending its own probe to determine this.
We should only be signalling the link is lost when the firmware indicates
--- drivers/net/wireless/ath/wcn36xx/smd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/wcn36xx/smd.c +2 -2
@@ -2736,7 +2736,7 @@ static int wcn36xx_smd_missed_beacon_ind(struct wcn36xx *wcn,wcn36xx_dbg (WCN36XX_DBG_HAL ,"beacon missed bss_index %d\n" , tmp->bss_index); vif =wcn36xx_priv_to_vif (tmp); -ieee80211_connection_loss (vif); +ieee80211_beacon_loss (vif); }return 0 ; }
@@ -2751,7 +2751,7 @@ static int wcn36xx_smd_missed_beacon_ind(struct wcn36xx *wcn,wcn36xx_dbg (WCN36XX_DBG_HAL ,"beacon missed bss_index %d\n" , rsp->bss_index); vif =wcn36xx_priv_to_vif (tmp); -ieee80211_connection_loss (vif); +ieee80211_beacon_loss (vif);return 0 ; } }
Signature · 1 line
2.34.1