6.6.93-rc1 review
Subsystems (3)
Greg Kroah-Hartman
maintainercover 6.6.93-rc1 review
This is the start of the stable review cycle for the 6.6.93 release. There are 444 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, 04 Jun 2025 13:42:20 +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/v6.x/stable-review/patch-6.6.93-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-6.6.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 6.6.93-rc1
Namjae Jeon <[email protected]>
ksmbd: use list_first_entry_or_null for opinfo_get_list()
Nishanth Menon <[email protected]>
net: ethernet: ti: am65-cpsw: Lower random mac address error print to info
Mark Pearson <[email protected]>
platform/x86: thinkpad_acpi: Ignore battery threshold change event notification
Valtteri Koskivuori <[email protected]>
platform/x86: fujitsu-laptop: Support Lifebook S2110 hotkeys
Trond Myklebust <[email protected]>
NFS: Avoid flushing data while holding directory locks in nfs_rename()
Ilya Guterman <[email protected]>
nvme-pci: add NVME_QUIRK_NO_DEEPEST_PS quirk for SOLIDIGM P44 Pro
Alessandro Grassi <[email protected]>
spi: spi-sun4i: fix early activation
Hal Feng <[email protected]>
phy: starfive: jh7110-usb: Fix USB 2.0 host occasional detection failure
George Shen <[email protected]>
drm/amd/display: fix link_set_dpms_off multi-display MST corner case
Masahiro Yamada <[email protected]>
um: let 'make clean' properly clean underlying SUBARCH as well
John Chau <[email protected]>
platform/x86: thinkpad_acpi: Support also NEC Lavie X1475JAS
Jeff Layton <[email protected]>
nfs: don't share pNFS DS connections between net namespaces
Milton Barrera <[email protected]>
HID: quirks: Add ADATA XPG alpha wireless mouse support
Purva Yeshi <[email protected]>
dmaengine: idxd: cdev: Fix uninitialized use of sva in idxd_cdev_open
Christian Brauner <[email protected]>
coredump: hand a pidfd to the usermode coredump helper
Christian Brauner <[email protected]>
coredump: fix error handling for replace_fd()
Robin Murphy <[email protected]>
perf/arm-cmn: Initialise cmn->cpu earlier
Robin Murphy <[email protected]>
perf/arm-cmn: Fix REQ2/SNP2 mixup
Pedro Tammela <[email protected]>
net_sched: hfsc: Address reentrant enqueue adding class to eltree twice
Yemike Abhilash Chandra <[email protected]>
arm64: dts: ti: k3-am68-sk: Fix regulator hierarchy
Stephan Gerhold <[email protected]>
arm64: dts: qcom: sm8550: Add missing properties for cryptobam
Stephan Gerhold <[email protected]>
arm64: dts: qcom: sm8450: Add missing properties for cryptobam
Alok Tiwari <[email protected]>
arm64: dts: qcom: sm8350: Fix typo in pil_camera_mem node
Stephan Gerhold <[email protected]>
arm64: dts: qcom: ipq9574: Add missing properties for cryptobam
Shigeru Yoshida <[email protected]>
af_unix: Fix uninit-value in __unix_walk_scc()
Michal Luczaj <[email protected]>
af_unix: Fix garbage collection of embryos carrying OOB with SCM_RIGHTS
Kuniyuki Iwashima <[email protected]>
af_unix: Add dead flag to struct scm_fp_list.
Kuniyuki Iwashima <[email protected]>
af_unix: Don't access successor in unix_del_edges() during GC.
Kuniyuki Iwashima <[email protected]>
af_unix: Try not to hold unix_gc_lock during accept().
Kuniyuki Iwashima <[email protected]>
af_unix: Remove lock dance in unix_peek_fds().
Kuniyuki Iwashima <[email protected]>
af_unix: Replace garbage collection algorithm.
Kuniyuki Iwashima <[email protected]>
af_unix: Detect dead SCC.
Kuniyuki Iwashima <[email protected]>
af_unix: Assign a unique index to SCC.
Kuniyuki Iwashima <[email protected]>
af_unix: Avoid Tarjan's algorithm if unnecessary.
Kuniyuki Iwashima <[email protected]>
af_unix: Skip GC if no cycle exists.
Kuniyuki Iwashima <[email protected]>
af_unix: Save O(n) setup of Tarjan's algo.
Kuniyuki Iwashima <[email protected]>
af_unix: Fix up unix_edge.successor for embryo socket.
Kuniyuki Iwashima <[email protected]>
af_unix: Save listener for embryo socket.
Kuniyuki Iwashima <[email protected]>
af_unix: Detect Strongly Connected Components.
Kuniyuki Iwashima <[email protected]>
af_unix: Iterate all vertices by DFS.
Kuniyuki Iwashima <[email protected]>
af_unix: Bulk update unix_tot_inflight/unix_inflight when queuing skb.
Kuniyuki Iwashima <[email protected]>
af_unix: Link struct unix_edge when queuing skb.
Kuniyuki Iwashima <[email protected]>
af_unix: Allocate struct unix_edge for each inflight AF_UNIX fd.
Kuniyuki Iwashima <[email protected]>
af_unix: Allocate struct unix_vertex for each inflight AF_UNIX fd.
Kuniyuki Iwashima <[email protected]>
af_unix: Remove CONFIG_UNIX_SCM.
Kuniyuki Iwashima <[email protected]>
af_unix: Remove io_uring code for GC.
Kuniyuki Iwashima <[email protected]>
af_unix: Replace BUG_ON() with WARN_ON_ONCE().
Kuniyuki Iwashima <[email protected]>
af_unix: Try to run GC async.
Kuniyuki Iwashima <[email protected]>
af_unix: Run GC on only one CPU.
Kuniyuki Iwashima <[email protected]>
af_unix: Return struct unix_sock from unix_get_socket().
Boris Burkov <[email protected]>
btrfs: check folio mapping after unlock in relocate_one_folio()
Frederic Weisbecker <[email protected]>
hrtimers: Force migrate away hrtimers queued after CPUHP_AP_HRTIMERS_DYING
Axel Forsman <[email protected]>
can: kvaser_pciefd: Force IRQ edge in case of nested IRQ
Thomas Zimmermann <[email protected]>
drm/gem: Internally test import_attach for imported objects
Balbir Singh <[email protected]>
x86/mm/init: Handle the special case of device private pages in add_pages(), to not increase max_pfn and trigger dma_addressing_limited() bounce buffers bounce buffers
Nathan Chancellor <[email protected]>
i3c: master: svc: Fix implicit fallthrough in svc_i3c_master_ibi_work()
Dan Carpenter <[email protected]>
pinctrl: tegra: Fix off by one in tegra_pinctrl_get_group()
Arnd Bergmann <[email protected]>
watchdog: aspeed: fix 64-bit division
Geert Uytterhoeven <[email protected]>
serial: sh-sci: Save and restore more registers
Brett Creeley <[email protected]>
pds_core: Prevent possible adminq overflow/stuck condition
Matthew Wilcox (Oracle) <[email protected]>
highmem: add folio_test_partial_kmap()
Alexey Dobriyan <[email protected]>
x86/boot: Compile boot code with -std=gnu11 too
Larisa Grigore <[email protected]>
spi: spi-fsl-dspi: Reset SR flags before sending a new message
Bogdan-Gabriel Roman <[email protected]>
spi: spi-fsl-dspi: Halt the module after a new message transfer
Larisa Grigore <[email protected]>
spi: spi-fsl-dspi: restrict register range for regmap access
Namjae Jeon <[email protected]>
ksmbd: fix stream write failure
Jernej Skrabec <[email protected]>
Revert "arm64: dts: allwinner: h6: Use RSB for AXP805 PMIC connection"
Tianyang Zhang <[email protected]>
mm/page_alloc.c: avoid infinite retries caused by cpuset race
Breno Leitao <[email protected]>
memcg: always call cond_resched() after fn()
Vicki Pfau <[email protected]>
Input: xpad - add more controllers
Mario Limonciello <[email protected]>
Revert "drm/amd: Keep display off while going into S4"
Wang Zhaolong <[email protected]>
smb: client: Reset all search buffer pointers when releasing buffer
Gabor Juhos <[email protected]>
arm64: dts: marvell: uDPU: define pinctrl state for alarm LEDs
Wang Zhaolong <[email protected]>
smb: client: Fix use-after-free in cifs_fill_dirent
feijuan.li <[email protected]>
drm/edid: fixed the bug that hdr metadata was not reset
Zhang Rui <[email protected]>
thermal: intel: x86_pkg_temp_thermal: Fix bogus trip temperature
Vladimir Moskovkin <[email protected]>
platform/x86: dell-wmi-sysman: Avoid buffer overflow in current_password_store()
Axel Forsman <[email protected]>
can: kvaser_pciefd: Continue parsing DMA buf after dropped RX
Ilia Gavrilov <[email protected]>
llc: fix data loss when reading from a socket in llc_ui_recvmsg()
Ed Burcher <[email protected]>
ALSA: hda/realtek: Add quirk for Lenovo Yoga Pro 7 14ASP10
Takashi Iwai <[email protected]>
ALSA: pcm: Fix race of buffer access at PCM OSS layer
Peter Ujfalusi <[email protected]>
ASoC: SOF: ipc4-pcm: Delay reporting is only supported for playback direction
Kai Vehmanen <[email protected]>
ASoc: SOF: topology: connect DAI to a single DAI link
Peter Ujfalusi <[email protected]>
ASoC: SOF: ipc4-control: Use SOF_CTRL_CMD_BINARY as numid for bytes_ext
Oliver Hartkopp <[email protected]>
can: bcm: add missing rcu read protection for procfs content
Oliver Hartkopp <[email protected]>
can: bcm: add locking for bcm_op runtime updates
Carlos Sanchez <[email protected]>
can: slcan: allow reception of short error messages
Dominik Grzegorzek <[email protected]>
padata: do not leak refcount in reorder_work
Ivan Pravdin <[email protected]>
crypto: algif_hash - fix double free in hash_accept
André Draszik <[email protected]>
clk: s2mps11: initialise clk_hw_onecell_data::num before accessing ::hws[] in probe()
Geetha sowjanya <[email protected]>
octeontx2-af: Fix APR entry mapping based on APR_LMT_CFG
Subbaraya Sundeep <[email protected]>
octeontx2-af: Set LMT_ENA bit for APR table entries
Wang Liang <[email protected]>
net/tipc: fix slab-use-after-free Read in tipc_aead_encrypt_done
Suman Ghosh <[email protected]>
octeontx2-pf: Add AF_XDP non-zero copy support
Cong Wang <[email protected]>
sch_hfsc: Fix qlen accounting bug when using peek in hfsc_enqueue()
Pavel Begunkov <[email protected]>
io_uring: fix overflow resched cqe reordering
Thangaraj Samynathan <[email protected]>
net: lan743x: Restore SGMII CTRL register on resume
Paul Kocialkowski <[email protected]>
net: dwmac-sun8i: Use parsed internal PHY address instead of 1
Dmitry Baryshkov <[email protected]>
pinctrl: qcom: switch to devm_register_sys_off_handler()
Uwe Kleine-König <[email protected]>
pinctrl: qcom/msm: Convert to platform remove callback returning void
Dave Ertman <[email protected]>
ice: Fix LACP bonds without SRIOV environment
Jacob Keller <[email protected]>
ice: fix vf->num_mac count with port representors
Ido Schimmel <[email protected]>
bridge: netfilter: Fix forwarding of fragmented packets
En-Wei Wu <[email protected]>
Bluetooth: btusb: use skb_pull to avoid unsafe access in QCA dump handling
Luiz Augusto von Dentz <[email protected]>
Bluetooth: L2CAP: Fix not checking l2cap_chan security level
Stefan Wahren <[email protected]>
dmaengine: fsl-edma: Fix return code for unhandled interrupts
Dave Jiang <[email protected]>
dmaengine: idxd: Fix ->poll() return value
Paul Chaignon <[email protected]>
xfrm: Sanitize marks before insert
Andre Przywara <[email protected]>
clk: sunxi-ng: d1: Add missing divider for MMC mod clocks
Matti Lehtimäki <[email protected]>
remoteproc: qcom_wcnss: Fix on platforms without fallback regulators
David Hildenbrand <[email protected]>
kernel/fork: only call untrack_pfn_clear() on VMAs duplicated for fork()
Vinicius Costa Gomes <[email protected]>
dmaengine: idxd: Fix allowing write() from different address spaces
Dave Jiang <[email protected]>
dmaengine: idxd: add wq driver name support for accel-config user tool
Sabrina Dubroca <[email protected]>
espintcp: remove encap socket caching to avoid reference leak
Charles Keepax <[email protected]>
soundwire: bus: Fix race on the creation of the IRQ domain
Al Viro <[email protected]>
__legitimize_mnt(): check for MNT_SYNC_UMOUNT should be under mount_lock
Jason Andryuk <[email protected]>
xenbus: Allow PVH dom0 a non-local xenstore
Johannes Berg <[email protected]>
wifi: iwlwifi: add support for Killer on MTL
David Wei <[email protected]>
tools: ynl-gen: validate 0 len strings from kernel
Qu Wenruo <[email protected]>
btrfs: avoid NULL pointer dereference if no valid csum tree
Goldwyn Rodrigues <[email protected]>
btrfs: correct the order of prelim_ref arguments in btrfs__prelim_ref
Pali Rohár <[email protected]>
cifs: Fix changing times and read-only attr over SMB1 smb_set_file_info() function
Pali Rohár <[email protected]>
cifs: Fix and improve cifs_query_path_info() and cifs_query_file_info()
Jens Axboe <[email protected]>
io_uring/fdinfo: annotate racy sq/cq head/tail reads
Alistair Francis <[email protected]>
nvmet-tcp: don't restore null sk_state_change
Wentao Guan <[email protected]>
nvme-pci: add quirks for WDC Blue SN550 15b7:5009
Wentao Guan <[email protected]>
nvme-pci: add quirks for device 126f:1001
Takashi Iwai <[email protected]>
ALSA: hda/realtek: Add quirk for HP Spectre x360 15-df1xxx
Takashi Iwai <[email protected]>
ASoC: Intel: bytcr_rt5640: Add DMI quirk for Acer Aspire SW3-013
Charles Keepax <[email protected]>
ASoC: cs42l43: Disable headphone clamps during type detection
Martin Blumenstingl <[email protected]>
pinctrl: meson: define the pull up/down resistor value as 60 kOhm
Ritesh Harjani (IBM) <[email protected]>
book3s64/radix: Fix compile errors when CONFIG_ARCH_WANT_OPTIMIZE_DAX_VMEMMAP=n
Chenyuan Yang <[email protected]>
ASoC: imx-card: Adjust over allocation of memory in imx_card_parse_of()
Jessica Zhang <[email protected]>
drm: Add valid clones check
Douglas Anderson <[email protected]>
drm/panel-edp: Add Starry 116KHD024006
Simona Vetter <[email protected]>
drm/atomic: clarify the rules around drm_atomic_state->allow_modeset
Olivier Moysan <[email protected]>
drm: bridge: adv7511: fill stream capabilities
P Praneesh <[email protected]>
wifi: ath12k: Fix end offset bit definition in monitor ring descriptor
Rosen Penev <[email protected]>
wifi: ath9k: return by of_get_mac_address
Youssef Samir <[email protected]>
accel/qaic: Mask out SR-IOV PCI resources
Nicolas Escande <[email protected]>
wifi: ath12k: fix ath12k_hal_tx_cmd_ext_desc_setup() info1 override
Isaac Scott <[email protected]>
regulator: ad5398: Add device tree support
Sean Anderson <[email protected]>
spi: zynqmp-gqspi: Always acknowledge interrupts
Ping-Ke Shih <[email protected]>
wifi: rtw89: add wiphy_lock() to work that isn't held wiphy_lock() yet
Bitterblue Smith <[email protected]>
wifi: rtw88: Don't use static local variable in rtw8822b_set_tx_power_index_by_rate
Soeren Moch <[email protected]>
wifi: rtl8xxxu: retry firmware download on error
Ravi Bangoria <[email protected]>
perf/amd/ibs: Fix ->config to sample period calculation for OP PMU
Ravi Bangoria <[email protected]>
perf/amd/ibs: Fix perf_ibs_op.cnt_mask for CurCnt
Sudeep Holla <[email protected]>
firmware: arm_scmi: Relax duplicate name constraint across protocol ids
Viktor Malik <[email protected]>
bpftool: Fix readlink usage in get_fd_type
Thomas Zimmermann <[email protected]>
drm/ast: Find VBIOS mode from regular display size
Charles Keepax <[email protected]>
ASoC: rt722-sdca: Add some missing readable registers
Cezary Rojewski <[email protected]>
ASoC: codecs: pcm3168a: Allow for 24-bit in provider mode
Naman Trivedi <[email protected]>
arm64: zynqmp: add clock-output-names property in clock nodes
junan <[email protected]>
HID: usbkbd: Fix the bit shift number for LED_KANA
Avula Sri Charan <[email protected]>
wifi: ath12k: Avoid napi_sync() before napi_enable()
Kai Mäkisara <[email protected]>
scsi: st: Restore some drive settings after reset
Justin Tee <[email protected]>
scsi: lpfc: Free phba irq in lpfc_sli4_enable_msi() when pci_irq_vector() fails
Justin Tee <[email protected]>
scsi: lpfc: Handle duplicate D_IDs in ndlp search-by D_ID routine
Konstantin Taranov <[email protected]>
net/mana: fix warning in the writer of client oob
Michal Swiatkowski <[email protected]>
ice: count combined queues using Rx/Tx count
Peter Zijlstra (Intel) <[email protected]>
perf: Avoid the read if the count is already updated
Ankur Arora <[email protected]>
rcu: fix header guard for rcu_all_qs()
Ankur Arora <[email protected]>
rcu: handle unstable rdp in rcu_read_unlock_strict()
Ankur Arora <[email protected]>
rcu: handle quiescent states for PREEMPT_RCU=n, PREEMPT_COUNT=y
Michal Swiatkowski <[email protected]>
ice: treat dyn_allowed only as suggestion
Petr Machata <[email protected]>
bridge: mdb: Allow replace of a host-joined group
Heiner Kallweit <[email protected]>
r8169: don't scan PHY addresses > 0
Geert Uytterhoeven <[email protected]>
ipv4: ip_gre: Fix set but not used warning in ipgre_err() if IPv4-only
Ido Schimmel <[email protected]>
vxlan: Annotate FDB data races
Carolina Jubran <[email protected]>
net/mlx5e: Avoid WARN_ON when configuring MQPRIO with HTB offload enabled
Depeng Shao <[email protected]>
media: qcom: camss: csid: Only add TPG v4l2 ctrl if TPG hardware is available
Jaegeuk Kim <[email protected]>
f2fs: introduce f2fs_base_attr for global sysfs entries
Andrey Vatoropin <[email protected]>
hwmon: (xgene-hwmon) use appropriate type for the latency value
Jordan Crouse <[email protected]>
clk: qcom: camcc-sm8250: Use clk_rcg2_shared_ops for some RCGs
Bitterblue Smith <[email protected]>
wifi: rtw88: Fix __rtw_download_firmware() for RTL8814AU
Bitterblue Smith <[email protected]>
wifi: rtw88: Fix download_firmware_validate() for RTL8814AU
Zhang Yi <[email protected]>
ext4: remove writable userspace mappings before truncating page cache
Zhang Yi <[email protected]>
ext4: don't write back data before punch hole in nojournal mode
Marek Vasut <[email protected]>
leds: trigger: netdev: Configure LED blink interval for HW offload
Kees Cook <[email protected]>
pstore: Change kmsg_bytes storage size to u32
Aleksander Jan Bajkowski <[email protected]>
r8152: add vendor/device ID pair for Dell Alienware AW1022z
Kuniyuki Iwashima <[email protected]>
ip: fib_rules: Fetch net from fib_rule in fib[46]_rule_configure().
Athira Rajeev <[email protected]>
arch/powerpc/perf: Check the instruction type before creating sample with perf_mem_data_src
Gaurav Batra <[email protected]>
powerpc/pseries/iommu: memory notifier incorrectly adds TCEs for pmemory
Csókás, Bence <[email protected]>
net: fec: Refactor MAC reset to function
Johannes Berg <[email protected]>
wifi: mac80211: remove misplaced drv_mgd_complete_tx() call
Johannes Berg <[email protected]>
wifi: mac80211: don't unconditionally call drv_mgd_complete_tx()
Stefan Wahren <[email protected]>
drm/v3d: Add clock handling
William Tu <[email protected]>
net/mlx5e: reduce the max log mpwrq sz for ECPF and reps
William Tu <[email protected]>
net/mlx5e: reduce rep rxq depth to 256 for ECPF
William Tu <[email protected]>
net/mlx5e: set the tx_queue_len for pfifo_fast
Alexei Lazar <[email protected]>
net/mlx5: Extend Ethtool loopback selftest to support non-linear SKB
Chaohai Chen <[email protected]>
scsi: target: spc: Fix loop traversal in spc_rsoc_get_descr()
Alex Deucher <[email protected]>
drm/amd/display/dm: drop hw_support check in amdgpu_dm_i2c_xfer()
Shiwu Zhang <[email protected]>
drm/amdgpu: enlarge the VBIOS binary size limit
Joshua Aberback <[email protected]>
drm/amd/display: Increase block_sequence array size
Tom Chung <[email protected]>
drm/amd/display: Initial psr_version with correct setting
George Shen <[email protected]>
drm/amd/display: Update CR AUX RD interval interpretation
Jiang Liu <[email protected]>
drm/amdgpu: reset psp->cmd to NULL after releasing the buffer
Ilya Bakoulin <[email protected]>
drm/amd/display: Don't try AUX transactions on disconnected link
Harish Kasiviswanathan <[email protected]>
drm/amdgpu: Set snoop bit for SDMA for MI series
Vijendar Mukunda <[email protected]>
soundwire: amd: change the soundwire wake enable/disable sequence
Dmitry Baryshkov <[email protected]>
phy: core: don't require set_mode() callback for phy_get_mode() to work
Claudiu Beznea <[email protected]>
serial: sh-sci: Update the suspend/resume support
zihan zhou <[email protected]>
sched: Reduce the default slice to avoid tasks getting an extra tick
Peter Zijlstra <[email protected]>
x86/traps: Cleanup and robustify decode_bug()
Krzysztof Kozlowski <[email protected]>
clk: qcom: clk-alpha-pll: Do not use random stack value for recalc rate
Karl Chan <[email protected]>
clk: qcom: ipq5018: allow it to be bulid on arm32
Kees Cook <[email protected]>
net/mlx4_core: Avoid impossible mlx4_db_alloc() order value
Sakari Ailus <[email protected]>
media: v4l: Memset argument to 0 before calling get_mbus_config pad op
David Plowman <[email protected]>
media: i2c: imx219: Correct the minimum vblanking value
Brendan Jackman <[email protected]>
kunit: tool: Use qboot on QEMU x86_64
Konstantin Andreev <[email protected]>
smack: Revert "smackfs: Added check catlen"
Konstantin Andreev <[email protected]>
smack: recognize ipv4 CIPSO w/o categories
Valentin Caron <[email protected]>
pinctrl: devicetree: do not goto err when probing hogs in pinctrl_dt_to_map
Kuninori Morimoto <[email protected]>
ASoC: soc-dai: check return value at snd_soc_dai_set_tdm_slot()
Hector Martin <[email protected]>
ASoC: tas2764: Power up/down amp on mute ops
Hector Martin <[email protected]>
ASoC: tas2764: Mark SW_RESET as volatile
Hector Martin <[email protected]>
ASoC: tas2764: Add reg defaults for TAS2764_INT_CLK_CFG
Martin Povišer <[email protected]>
ASoC: ops: Enforce platform maximum on initial value
Sudeep Holla <[email protected]>
firmware: arm_ffa: Reject higher major version as incompatible
Shahar Shitrit <[email protected]>
net/mlx5: Apply rate-limiting to high temperature warning
Shahar Shitrit <[email protected]>
net/mlx5: Modify LSB bitmask in temperature event to include only the first bit
Hans Verkuil <[email protected]>
media: test-drivers: vivid: don't call schedule in loop
Petr Machata <[email protected]>
vxlan: Join / leave MC group after remote changes
Xiaofei Tan <[email protected]>
ACPI: HED: Always initialize before evged
Ilpo Järvinen <[email protected]>
PCI: Fix old_size lower bound in calculate_iosize() too
Jakub Kicinski <[email protected]>
eth: mlx4: don't try to complete XDP frames in netpoll
Eduard Zingerman <[email protected]>
bpf: don't do clean_live_states when state->loop_entry->branches > 0
Krzysztof Kozlowski <[email protected]>
can: c_can: Use of_property_present() to test existence of DT property
Ahmad Fatoum <[email protected]>
pmdomain: imx: gpcv2: use proper helper for property detection
Michael Margolin <[email protected]>
RDMA/core: Fix best page size finding when it can cross SG entries
Alexis Lothoré <[email protected]>
serial: mctrl_gpio: split disable_ms into sync and no_sync APIs
Harry VanZyllDeJong <[email protected]>
drm/amd/display: Add support for disconnected eDP streams
Frank Li <[email protected]>
i3c: master: svc: Flush FIFO before sending Dynamic Address Assignment(DAA)
Arnd Bergmann <[email protected]>
EDAC/ie31200: work around false positive build warning
Peter Seiderer <[email protected]>
net: pktgen: fix access outside of user given buffer in pktgen_thread_write()
Ping-Ke Shih <[email protected]>
wifi: rtw89: fw: propagate error code from rtw89_h2c_tx()
Bitterblue Smith <[email protected]>
wifi: rtw88: Fix rtw_desc_to_mcsrate() to handle MCS16-31
Bitterblue Smith <[email protected]>
wifi: rtw88: Fix rtw_init_ht_cap() for RTL8814AU
Bitterblue Smith <[email protected]>
wifi: rtw88: Fix rtw_init_vht_cap() for RTL8814AU
Shivasharan S <[email protected]>
scsi: mpt3sas: Send a diag reset if target reset fails
Paul Burton <[email protected]>
clocksource: mips-gic-timer: Enable counter when CPUs start
Paul Burton <[email protected]>
MIPS: pm-cps: Use per-CPU variables as per-CPU, not per-core
Jason Gunthorpe <[email protected]>
genirq/msi: Store the IOMMU IOVA directly in msi_desc instead of iommu_cookie
Bibo Mao <[email protected]>
MIPS: Use arch specific syscall name match function
Herbert Xu <[email protected]>
crypto: skcipher - Zap type in crypto_alloc_sync_skcipher
Herbert Xu <[email protected]>
crypto: ahash - Set default reqsize from ahash_alg
Balbir Singh <[email protected]>
x86/kaslr: Reduce KASLR entropy on most x86 systems
Patrisious Haddad <[email protected]>
net/mlx5: Change POOL_NEXT_SIZE define value and make it global
Jinliang Zheng <[email protected]>
dm: fix unconditional IO throttle caused by REQ_PREFLUSH
Nandakumar Edamana <[email protected]>
libbpf: Fix out-of-bound read
Matthias Fend <[email protected]>
media: tc358746: improve calculation of the D-PHY timing registers
Niklas Söderlund <[email protected]>
media: adv7180: Disable test-pattern control on adv7180
Rafael J. Wysocki <[email protected]>
cpuidle: menu: Avoid discarding useful information
Konstantin Shkolnyy <[email protected]>
vdpa/mlx5: Fix mlx5_vdpa_get_config() endianness on big-endian machines
Mike Christie <[email protected]>
vhost-scsi: Return queue full for page alloc failures during copy
Waiman Long <[email protected]>
x86/nmi: Add an emergency handler in nmi_desc & use it in nmi_shootdown_cpus()
Nícolas F. R. A. Prado <[email protected]>
ASoC: mediatek: mt8188: Add reference for dmic clocks
Nícolas F. R. A. Prado <[email protected]>
ASoC: mediatek: mt8188: Treat DMIC_GAINx_CUR as non-volatile
Yihan Zhu <[email protected]>
drm/amd/display: handle max_downscale_src_width fail check
Nir Lichtman <[email protected]>
x86/build: Fix broken copy command in genimage.sh when making isoimage
Hariprasad Kelam <[email protected]>
Octeontx2-af: RPM: Register driver with PCI subsys IDs
Andrew Davis <[email protected]>
soc: ti: k3-socinfo: Do not use syscon helper to build regmap
Ramasamy Kaliappan <[email protected]>
wifi: ath12k: Improve BSS discovery with hidden SSID in 6 GHz band
Hangbin Liu <[email protected]>
bonding: report duplicate MAC address in all situations
Arnd Bergmann <[email protected]>
net: xgene-v2: remove incorrect ACPI_PTR annotation
Eric Woudstra <[email protected]>
net: ethernet: mtk_ppe_offload: Allow QinQ, double ETH_P_8021Q only
Yuanjun Gong <[email protected]>
leds: pwm-multicolor: Add check for fwnode_property_read_u32
Philip Yang <[email protected]>
drm/amdkfd: KFD release_work possible circular locking
Kevin Krakauer <[email protected]>
selftests/net: have gro.sh -t return a correct exit code
Moshe Shemesh <[email protected]>
net/mlx5: Avoid report two health errors on same syndrome
Viresh Kumar <[email protected]>
firmware: arm_ffa: Set dma_mask for ffa devices
Stanimir Varbanov <[email protected]>
PCI: brcmstb: Add a softdep to MIP MSI-X driver
Stanimir Varbanov <[email protected]>
PCI: brcmstb: Expand inbound window size up to 64GB
Vinith Kumar R <[email protected]>
wifi: ath12k: Report proper tx completion status to mac80211
Hector Martin <[email protected]>
soc: apple: rtkit: Implement OSLog buffers properly
Janne Grunau <[email protected]>
soc: apple: rtkit: Use high prio work queue
Rob Herring (Arm) <[email protected]>
perf: arm_pmuv3: Call kvm_vcpu_pmu_resync_el0() before enabling counters
Kuhanh Murugasen Krishnan <[email protected]>
fpga: altera-cvp: Increase credit timeout
AngeloGioacchino Del Regno <[email protected]>
drm/mediatek: mtk_dpi: Add checks for reg_h_fre_con existence
Li Bin <[email protected]>
ARM: at91: pm: fix at91_suspend_finish for ZQ calibration
Alexander Stein <[email protected]>
hwmon: (gpio-fan) Add missing mutex locks
Breno Leitao <[email protected]>
x86/bugs: Make spectre user default depend on MITIGATION_SPECTRE_V2
Ahmad Fatoum <[email protected]>
clk: imx8mp: inform CCF of maximum frequency of clocks
Ricardo Ribalda <[email protected]>
media: uvcvideo: Handle uvc menu translation inside uvc_get_le_value
Ricardo Ribalda <[email protected]>
media: uvcvideo: Add sanity check to uvc_ioctl_xu_ctrl_map
Andy Yan <[email protected]>
drm/rockchip: vop2: Add uv swap for cluster window
Kuniyuki Iwashima <[email protected]>
ipv4: fib: Move fib_valid_key_len() to rtm_to_fib_config().
Maciej S. Szmigiero <[email protected]>
ALSA: hda/realtek: Enable PC beep passthrough for HP EliteBook 855 G7
Saket Kumar Bhaskar <[email protected]>
perf/hw_breakpoint: Return EOPNOTSUPP for unsupported breakpoint type
Peter Seiderer <[email protected]>
net: pktgen: fix mpls maximum labels list parsing
Alexander Sverdlin <[email protected]>
net: ethernet: ti: cpsw_new: populate netdev of_node
Artur Weber <[email protected]>
pinctrl: bcm281xx: Use "unsigned int" instead of bare "unsigned"
Hans Verkuil <[email protected]>
media: cx231xx: set device_caps for 417
George Shen <[email protected]>
drm/amd/display: Skip checking FRL_MODE bit for PCON BW determination
Victor Lu <[email protected]>
drm/amdgpu: Do not program AGP BAR regs under SRIOV in gfxhub_v1_0.c
Matti Lehtimäki <[email protected]>
remoteproc: qcom_wcnss: Handle platforms with only single power domain
Choong Yong Liang <[email protected]>
net: phylink: use pl->link_interface in phylink_expects_phy()
Thomas Zimmermann <[email protected]>
drm/gem: Test for imported GEM buffers with helper
Matthew Wilcox (Oracle) <[email protected]>
orangefs: Do not truncate file size
Ming-Hung Tsai <[email protected]>
dm cache: prevent BUG_ON by blocking retries on failed device resumes
Markus Elfring <[email protected]>
media: c8sectpfe: Call of_node_put(i2c_bus) only once in c8sectpfe_probe()
Svyatoslav Ryhel <[email protected]>
ARM: tegra: Switch DSI-B clock parent to PLLD on Tegra114
Andy Shevchenko <[email protected]>
ieee802154: ca8210: Use proper setters and getters for bitwise types
Alexandre Belloni <[email protected]>
rtc: ds1307: stop disabling alarms on probe
Eric Dumazet <[email protected]>
tcp: bring back NUMA dispersion in inet_ehash_locks_alloc()
Takashi Iwai <[email protected]>
ALSA: seq: Improve data consistency at polling
Andreas Schwab <[email protected]>
powerpc/prom_init: Fixup missing #size-cells on PowerBook6,7
Jon Hunter <[email protected]>
arm64: tegra: Resize aperture for the IGX PCIe C5 slot
Diogo Ivo <[email protected]>
arm64: tegra: p2597: Fix gpio for vdd-1v8-dis regulator
Harish Kasiviswanathan <[email protected]>
drm/amdkfd: Set per-process flags only once cik/vi
Herbert Xu <[email protected]>
crypto: lzo - Fix compression buffer overrun
Chin-Ting Kuo <[email protected]>
watchdog: aspeed: Update bootstatus handling
Aaron Kling <[email protected]>
cpufreq: tegra186: Share policy per cluster
Vasant Hegde <[email protected]>
iommu/amd/pgtbl_v2: Improve error handling
Alexey Klimov <[email protected]>
ASoC: qcom: sm8250: explicitly set format in sm8250_be_hw_params_fixup()
Andy Shevchenko <[email protected]>
auxdisplay: charlcd: Partially revert "Move hwidth and bwidth to struct hd44780_common"
Andreas Gruenbacher <[email protected]>
gfs2: Check for empty queue in run_queue
Leon Huang <[email protected]>
drm/amd/display: Fix incorrect DPCD configs while Replay/PSR switch
Zhikai Zhai <[email protected]>
drm/amd/display: calculate the remain segments for all pipes
Charlene Liu <[email protected]>
drm/amd/display: remove minimum Dispclk and apply oem panel timing.
Willem de Bruijn <[email protected]>
ipv6: save dontfrag in cork
Johannes Berg <[email protected]>
wifi: iwlwifi: fix debug actions order
Marcos Paulo de Souza <[email protected]>
printk: Check CON_SUSPEND when unblanking a console
Kurt Borja <[email protected]>
hwmon: (dell-smm) Increment the number of fans
Michal Pecio <[email protected]>
usb: xhci: Don't change the status of stalled TDs on failed Stop EP
Erick Shepherd <[email protected]>
mmc: sdhci: Disable SD card clock before changing parameters
Kaustabh Chakraborty <[email protected]>
mmc: dw_mmc: add exynos7870 DW MMC support
Ryan Roberts <[email protected]>
arm64/mm: Check PUD_TYPE_TABLE in pud_bad()
Nicolas Bouchinet <[email protected]>
netfilter: conntrack: Bound nf_conntrack sysctl writes
Thomas Weißschuh <[email protected]>
timer_list: Don't use %pK through printk()
Eric Dumazet <[email protected]>
posix-timers: Add cond_resched() to posix_timer_add() search loop
Maher Sanalla <[email protected]>
RDMA/uverbs: Propagate errors from rdma_lookup_get_uobject()
Baokun Li <[email protected]>
ext4: do not convert the unwritten extents if data writeback fails
Baokun Li <[email protected]>
ext4: reject the 'data_err=abort' option in nojournal mode
Ryan Walklin <[email protected]>
ASoC: sun4i-codec: support hp-det-gpios property
David Rosca <[email protected]>
drm/amdgpu: Update SRIOV video codec caps
Shree Ramamoorthy <[email protected]>
mfd: tps65219: Remove TPS65219_REG_TI_DEV_ID check
Prathamesh Shete <[email protected]>
pinctrl-tegra: Restore SFSEL bit when freeing pins
Frediano Ziglio <[email protected]>
xen: Add support for XenServer 6.1 platform device
Guangguan Wang <[email protected]>
net/smc: use the correct ndev to find pnetid by pnetid table
Mikulas Patocka <[email protected]>
dm: restrict dm device size to 2^63-512 bytes
Shashank Gupta <[email protected]>
crypto: octeontx2 - suppress auth failure screaming due to negative tests
Seyediman Seyedarab <[email protected]>
kbuild: fix argument parsing in scripts/config
Yonghong Song <[email protected]>
bpf: Allow pre-ordering for bpf cgroup progs
Nícolas F. R. A. Prado <[email protected]>
ASoC: mediatek: mt6359: Add stub for mt6359_accdet_enable_jack_detect
Mika Westerberg <[email protected]>
thunderbolt: Do not add non-active NVM if NVM upgrade is disabled for retimer
Josh Poimboeuf <[email protected]>
objtool: Fix error handling inconsistencies in check()
Alexandre Belloni <[email protected]>
rtc: rv3032: fix EERD location
Ilpo Järvinen <[email protected]>
tcp: reorganize tcp_in_ack_event() and tcp_count_delivered()
Jan Kara <[email protected]>
jbd2: do not try to recover wiped journal
Mykyta Yatsenko <[email protected]>
bpf: Return prog btf_id without capable check
Alex Williamson <[email protected]>
vfio/pci: Handle INTx IRQ_NOTCONNECTED
Kai Mäkisara <[email protected]>
scsi: st: ERASE does not change tape location
Kai Mäkisara <[email protected]>
scsi: st: Tighten the page format heuristics with MODE SELECT
Al Viro <[email protected]>
hypfs_create_cpu_files(): add missing check for hypfs_mkdir() failure
Christian Göttsche <[email protected]>
ext4: reorder capability check last
Tiwei Bie <[email protected]>
um: Update min_low_pfn to match changes in uml_reserved
Benjamin Berg <[email protected]>
um: Store full CSGSFS and SS register from mcontext
Heming Zhao <[email protected]>
dlm: make tcp still work in multi-link env
Stanley Chu <[email protected]>
i3c: master: svc: Fix missing STOP for master request
Jing Zhou <[email protected]>
drm/amd/display: Guard against setting dispclk low for dcn31x
Filipe Manana <[email protected]>
btrfs: send: return -ENAMETOOLONG when attempting a path that is too long
Filipe Manana <[email protected]>
btrfs: get zone unusable bytes while holding lock at btrfs_reclaim_bgs_work()
Filipe Manana <[email protected]>
btrfs: fix non-empty delayed iputs list on unmount due to async workers
Qu Wenruo <[email protected]>
btrfs: run btrfs_error_commit_super() early
Mark Harmstone <[email protected]>
btrfs: avoid linker error in btrfs_find_create_tree_block()
Boris Burkov <[email protected]>
btrfs: make btrfs_discard_workfn() block_group ref explicit
Vitalii Mordan <[email protected]>
i2c: pxa: fix call balance of i2c->clk handling routines
Stephan Gerhold <[email protected]>
i2c: qup: Vote for interconnect bandwidth to DRAM
Philip Redkin <[email protected]>
x86/mm: Check return value from memblock_phys_alloc_range()
Ingo Molnar <[email protected]>
x86/stackprotector/64: Only export __ref_stack_chk_guard on CONFIG_SMP
Benjamin Lin <[email protected]>
wifi: mt76: mt7996: revise TXS size
Felix Fietkau <[email protected]>
wifi: mt76: only mark tx-status-failed frames as ACKed on mt76x0/2
Erick Shepherd <[email protected]>
mmc: host: Wait for Vdd to settle on card power off
Robert Richter <[email protected]>
libnvdimm/labels: Fix divide error in nd_label_data_init()
Nicolas Bretz <[email protected]>
ext4: on a remount, only log the ro or r/w state when it has changed
Roger Pau Monne <[email protected]>
PCI: vmd: Disable MSI remapping bypass under Xen
Trond Myklebust <[email protected]>
pNFS/flexfiles: Report ENETDOWN as a connection error
Ian Rogers <[email protected]>
tools/build: Don't pass test log files to linker
Frank Li <[email protected]>
PCI: dwc: ep: Ensure proper iteration over outbound map windows
Josh Poimboeuf <[email protected]>
objtool: Properly disable uaccess validation
Ryo Takakura <[email protected]>
lockdep: Fix wait context check on softirq for PREEMPT_RT
Jing Su <[email protected]>
dql: Fix dql->limit value when reset.
Alice Guo <[email protected]>
thermal/drivers/qoriq: Power down TMU on system suspend
Luis de Arquer <[email protected]>
spi-rockchip: Fix register out of bounds access
Trond Myklebust <[email protected]>
SUNRPC: rpcbind should never reset the port to the value '0'
Trond Myklebust <[email protected]>
SUNRPC: rpc_clnt_set_transport() must not change the autobind setting
Trond Myklebust <[email protected]>
NFSv4: Treat ENETUNREACH errors as fatal for state recovery
Pali Rohár <[email protected]>
cifs: Fix establishing NetBIOS session for SMB2+ connection
Namjae Jeon <[email protected]>
cifs: add validation check for the fields in smb_aces
Zsolt Kajtar <[email protected]>
fbdev: core: tileblit: Implement missing margin clearing for tileblit
Zsolt Kajtar <[email protected]>
fbcon: Use correct erase colour for clearing in fbcon
Shixiong Ou <[email protected]>
fbdev: fsl-diu-fb: add missing device_remove_file()
Samuel Holland <[email protected]>
riscv: Allow NOMMU kernels to access all of RAM
Tudor Ambarus <[email protected]>
mailbox: use error ret code of of_parse_phandle_with_args()
Sudeep Holla <[email protected]>
mailbox: pcc: Use acpi_os_ioremap() instead of ioremap()
Diogo Ivo <[email protected]>
ACPI: PNP: Add Intel OC Watchdog IDs to non-PNP device list
Andy Shevchenko <[email protected]>
tracing: Mark binary printing functions with __printf() attribute
Jinqian Yang <[email protected]>
arm64: Add support for HIP09 Spectre-BHB mitigation
Trond Myklebust <[email protected]>
SUNRPC: Don't allow waiting for exiting tasks
Trond Myklebust <[email protected]>
NFS: Don't allow waiting for exiting tasks
Trond Myklebust <[email protected]>
NFSv4: Check for delegation validity in nfs_start_delegation_return_locked()
Matt Johnston <[email protected]>
fuse: Return EPERM rather than ENOSYS from link()
Wang Zhaolong <[email protected]>
smb: client: Store original IO parameters and prevent zero IO sizes
Pali Rohár <[email protected]>
cifs: Fix negotiate retry functionality
Pali Rohár <[email protected]>
cifs: Fix querying and creating MF symlinks over SMB1
Pali Rohár <[email protected]>
cifs: Add fallback for SMB2 CREATE without FILE_READ_ATTRIBUTES
Anthony Krowiak <[email protected]>
s390/vfio-ap: Fix no AP queue sharing allowed message written to kernel log
Daniel Gomez <[email protected]>
kconfig: merge_config: use an empty file as initfile
Haoran Jiang <[email protected]>
samples/bpf: Fix compilation failure for samples/bpf on LoongArch Fedora
Brandon Kammerdiener <[email protected]>
bpf: fix possible endless loop in BPF map iteration
Ihor Solodrai <[email protected]>
selftests/bpf: Mitigate sockmap_ktls disconnect_after_delete failure
Felix Kuehling <[email protected]>
drm/amdgpu: Allow P2P access through XGMI
Frederick Lawler <[email protected]>
ima: process_measurement() needlessly takes inode_lock() on MAY_READ
Vladimir Oltean <[email protected]>
net: enetc: refactor bulk flipping of RX buffers to separate function
Ranjan Kumar <[email protected]>
scsi: mpi3mr: Add level check to control event logging
Dongli Zhang <[email protected]>
vhost-scsi: protect vq->log_used with vq->mutex
Stefano Garzarella <[email protected]>
vhost_task: fix vhost_task_create() documentation
gaoxu <[email protected]>
cgroup: Fix compilation issue due to cgroup_mutex not being exported
Marek Szyprowski <[email protected]>
dma-mapping: avoid potential unused data compilation warning
Lorenzo Stoakes <[email protected]>
intel_th: avoid using deprecated page->mapping, index fields
Zhongqiu Han <[email protected]>
virtio_ring: Fix data race by tagging event_triggered as racy for KCSAN
Manish Pandey <[email protected]>
scsi: ufs: Introduce quirk to extend PA_HIBERN8TIME for UFS devices
Dmitry Bogdanov <[email protected]>
scsi: target: iscsi: Fix timeout on deleted connection
Dmitry Baryshkov <[email protected]>
nvmem: qfprom: switch to 4-byte aligned reads
Dmitry Baryshkov <[email protected]>
nvmem: core: update raw_len if the bit reading is required
Dmitry Baryshkov <[email protected]>
nvmem: core: verify cell's raw_len
Heiko Stuebner <[email protected]>
nvmem: rockchip-otp: add rk3576 variant data
Heiko Stuebner <[email protected]>
nvmem: rockchip-otp: Move read-offset into variant-data
Pengyu Luo <[email protected]>
cpufreq: Add SM8650 to cpufreq-dt-platdev blocklist
Claudiu Beznea <[email protected]>
phy: renesas: rcar-gen3-usb2: Assert PLL reset on PHY power off
Claudiu Beznea <[email protected]>
phy: renesas: rcar-gen3-usb2: Lock around hardware registers and driver data
Claudiu Beznea <[email protected]>
phy: renesas: rcar-gen3-usb2: Move IRQ request in probe
Claudiu Beznea <[email protected]>
phy: renesas: rcar-gen3-usb2: Add support to initialize the bus
Christophe JAILLET <[email protected]>
i2c: designware: Fix an error handling path in i2c_dw_pci_probe()
Andy Shevchenko <[email protected]>
i2c: designware: Use temporary variable for struct device
Andy Shevchenko <[email protected]>
i2c: designware: Remove ->disable() callback
Jarkko Nikula <[email protected]>
i2c: designware: Uniform initialization flow for polling mode
Emanuele Ghidoli <[email protected]>
gpio: pca953x: fix IRQ storm on system wake up
Andy Shevchenko <[email protected]>
gpio: pca953x: Simplify code with cleanup helpers
Andy Shevchenko <[email protected]>
gpio: pca953x: Split pca953x_restore_context() and pca953x_save_context()
-------------
Diffstat:
Documentation/ABI/stable/sysfs-driver-dma-idxd | 6 + Documentation/admin-guide/kernel-parameters.txt | 2 + Documentation/driver-api/serial/driver.rst | 2 +- Documentation/hwmon/dell-smm-hwmon.rst | 14 +- Makefile | 4 +- arch/arm/boot/dts/nvidia/tegra114.dtsi | 2 +- arch/arm/mach-at91/pm.c | 21 +- .../boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 38 +- .../boot/dts/allwinner/sun50i-h6-orangepi-3.dts | 14 +- .../boot/dts/allwinner/sun50i-h6-orangepi.dtsi | 22 +- arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi | 8 +- arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi | 2 +- .../dts/nvidia/tegra234-p3740-0002+p3701-0008.dts | 10 + arch/arm64/boot/dts/qcom/ipq9574.dtsi | 2 + arch/arm64/boot/dts/qcom/sm8350.dtsi | 2 +- arch/arm64/boot/dts/qcom/sm8450.dtsi | 2 + arch/arm64/boot/dts/qcom/sm8550.dtsi | 2 + arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dts | 13 +- arch/arm64/boot/dts/xilinx/zynqmp-clk-ccf.dtsi | 15 +- arch/arm64/include/asm/cputype.h | 2 + arch/arm64/include/asm/pgtable.h | 3 +- arch/arm64/kernel/proton-pack.c | 1 + arch/mips/include/asm/ftrace.h | 16 + arch/mips/kernel/pm-cps.c | 30 +- arch/powerpc/include/asm/mmzone.h | 1 + arch/powerpc/kernel/prom_init.c | 4 +- arch/powerpc/mm/book3s64/radix_pgtable.c | 3 +- arch/powerpc/mm/numa.c | 2 +- arch/powerpc/perf/core-book3s.c | 20 + arch/powerpc/perf/isa207-common.c | 4 +- arch/powerpc/platforms/pseries/iommu.c | 29 +- arch/riscv/include/asm/page.h | 12 +- arch/riscv/include/asm/pgtable.h | 2 +- arch/s390/hypfs/hypfs_diag_fs.c | 2 + arch/um/Makefile | 1 + arch/um/kernel/mem.c | 1 + arch/x86/Makefile | 2 +- arch/x86/boot/genimage.sh | 5 +- arch/x86/entry/entry.S | 2 +- arch/x86/events/amd/ibs.c | 20 +- arch/x86/include/asm/bug.h | 5 +- arch/x86/include/asm/ibt.h | 4 +- arch/x86/include/asm/nmi.h | 2 + arch/x86/include/asm/perf_event.h | 1 + arch/x86/kernel/cpu/bugs.c | 10 +- arch/x86/kernel/nmi.c | 42 ++ arch/x86/kernel/reboot.c | 10 +- arch/x86/kernel/traps.c | 82 ++- arch/x86/mm/init.c | 9 +- arch/x86/mm/init_64.c | 15 +- arch/x86/mm/kaslr.c | 10 +- arch/x86/um/os-Linux/mcontext.c | 3 +- crypto/ahash.c | 4 + crypto/algif_hash.c | 4 - crypto/lzo-rle.c | 2 +- crypto/lzo.c | 2 +- crypto/skcipher.c | 1 + drivers/accel/qaic/qaic_drv.c | 2 +- drivers/acpi/Kconfig | 2 +- drivers/acpi/acpi_pnp.c | 2 + drivers/acpi/hed.c | 7 +- drivers/auxdisplay/charlcd.c | 5 +- drivers/auxdisplay/charlcd.h | 5 +- drivers/auxdisplay/hd44780.c | 2 +- drivers/auxdisplay/lcd2s.c | 2 +- drivers/auxdisplay/panel.c | 2 +- drivers/bluetooth/btusb.c | 98 ++- drivers/clk/clk-s2mps11.c | 3 +- drivers/clk/imx/clk-imx8mp.c | 151 ++++ drivers/clk/qcom/Kconfig | 2 +- drivers/clk/qcom/camcc-sm8250.c | 56 +- drivers/clk/qcom/clk-alpha-pll.c | 52 +- drivers/clk/sunxi-ng/ccu-sun20i-d1.c | 42 +- drivers/clk/sunxi-ng/ccu_mp.h | 22 + drivers/clocksource/mips-gic-timer.c | 6 +- drivers/cpufreq/cpufreq-dt-platdev.c | 1 + drivers/cpufreq/tegra186-cpufreq.c | 7 + drivers/cpuidle/governors/menu.c | 13 +- .../crypto/marvell/octeontx2/otx2_cptvf_reqmgr.c | 7 +- drivers/dma/fsl-edma-main.c | 2 +- drivers/dma/idxd/cdev.c | 20 +- drivers/dma/idxd/dma.c | 6 + drivers/dma/idxd/idxd.h | 9 + drivers/dma/idxd/sysfs.c | 34 + drivers/edac/ie31200_edac.c | 28 +- drivers/firmware/arm_ffa/bus.c | 1 + drivers/firmware/arm_ffa/driver.c | 8 + drivers/firmware/arm_scmi/bus.c | 19 +- drivers/fpga/altera-cvp.c | 2 +- drivers/gpio/gpio-pca953x.c | 111 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 30 +- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 7 +- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 10 +- drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c | 25 + drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c | 27 + drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c | 31 + drivers/gpu/drm/amd/amdgpu/nv.c | 16 +- drivers/gpu/drm/amd/amdgpu/soc21.c | 10 +- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 39 +- .../drm/amd/amdkfd/kfd_device_queue_manager_cik.c | 69 +- .../drm/amd/amdkfd/kfd_device_queue_manager_vi.c | 77 +- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 16 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 +- .../amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c | 22 +- .../amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c | 15 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 1 + .../amd/display/dc/dce110/dce110_hw_sequencer.c | 3 +- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c | 11 +- .../drm/amd/display/dc/dcn315/dcn315_resource.c | 40 +- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2 +- drivers/gpu/drm/amd/display/dc/link/link_dpms.c | 13 +- .../display/dc/link/protocols/link_dp_capability.c | 33 +- .../amd/display/dc/link/protocols/link_dp_phy.c | 8 +- .../dc/link/protocols/link_dp_training_8b_10b.c | 7 +- .../dc/link/protocols/link_edp_panel_control.c | 25 +- .../include/asic_reg/mmhub/mmhub_9_4_1_offset.h | 32 + .../include/asic_reg/mmhub/mmhub_9_4_1_sh_mask.h | 48 ++ drivers/gpu/drm/ast/ast_mode.c | 10 +- drivers/gpu/drm/bridge/adv7511/adv7511_audio.c | 2 + drivers/gpu/drm/drm_atomic_helper.c | 28 + drivers/gpu/drm/drm_edid.c | 1 + drivers/gpu/drm/drm_gem.c | 4 +- drivers/gpu/drm/mediatek/mtk_dpi.c | 5 +- drivers/gpu/drm/panel/panel-edp.c | 1 + drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 6 +- drivers/gpu/drm/v3d/v3d_drv.c | 25 +- drivers/hid/hid-ids.h | 4 + drivers/hid/hid-quirks.c | 2 + drivers/hid/usbhid/usbkbd.c | 2 +- drivers/hwmon/dell-smm-hwmon.c | 5 +- drivers/hwmon/gpio-fan.c | 16 +- drivers/hwmon/xgene-hwmon.c | 2 +- drivers/hwtracing/intel_th/Kconfig | 1 + drivers/hwtracing/intel_th/msu.c | 31 +- drivers/i2c/busses/i2c-designware-common.c | 1 + drivers/i2c/busses/i2c-designware-core.h | 5 +- drivers/i2c/busses/i2c-designware-master.c | 43 +- drivers/i2c/busses/i2c-designware-pcidrv.c | 40 +- drivers/i2c/busses/i2c-designware-platdrv.c | 54 +- drivers/i2c/busses/i2c-designware-slave.c | 3 +- drivers/i2c/busses/i2c-pxa.c | 5 +- drivers/i2c/busses/i2c-qup.c | 36 + drivers/i3c/master/svc-i3c-master.c | 4 + drivers/infiniband/core/umem.c | 36 +- drivers/infiniband/core/uverbs_cmd.c | 144 ++-- drivers/infiniband/core/verbs.c | 11 +- drivers/input/joystick/xpad.c | 3 + drivers/iommu/amd/io_pgtable_v2.c | 2 +- drivers/iommu/dma-iommu.c | 28 +- drivers/leds/rgb/leds-pwm-multicolor.c | 5 +- drivers/leds/trigger/ledtrig-netdev.c | 16 +- drivers/mailbox/mailbox.c | 7 +- drivers/mailbox/pcc.c | 8 +- drivers/md/dm-cache-target.c | 24 + drivers/md/dm-table.c | 4 + drivers/md/dm.c | 8 +- drivers/media/i2c/adv7180.c | 34 +- drivers/media/i2c/imx219.c | 2 +- drivers/media/i2c/tc358746.c | 19 +- drivers/media/platform/qcom/camss/camss-csid.c | 64 +- .../platform/st/sti/c8sectpfe/c8sectpfe-core.c | 3 +- .../media/test-drivers/vivid/vivid-kthread-cap.c | 11 +- .../media/test-drivers/vivid/vivid-kthread-out.c | 11 +- .../media/test-drivers/vivid/vivid-kthread-touch.c | 11 +- drivers/media/test-drivers/vivid/vivid-sdr-cap.c | 11 +- drivers/media/usb/cx231xx/cx231xx-417.c | 2 + drivers/media/usb/uvc/uvc_ctrl.c | 77 +- drivers/media/usb/uvc/uvc_v4l2.c | 6 + drivers/media/v4l2-core/v4l2-subdev.c | 2 + drivers/mfd/tps65219.c | 7 - drivers/mmc/host/dw_mmc-exynos.c | 41 +- drivers/mmc/host/sdhci-pci-core.c | 6 +- drivers/mmc/host/sdhci.c | 9 +- drivers/net/bonding/bond_main.c | 2 +- drivers/net/can/c_can/c_can_platform.c | 2 +- drivers/net/can/kvaser_pciefd.c | 90 ++- drivers/net/can/slcan/slcan-core.c | 26 +- drivers/net/ethernet/amd/pds_core/core.c | 5 +- drivers/net/ethernet/amd/pds_core/core.h | 2 +- drivers/net/ethernet/apm/xgene-v2/main.c | 4 +- drivers/net/ethernet/freescale/enetc/enetc.c | 16 +- drivers/net/ethernet/freescale/fec_main.c | 52 +- drivers/net/ethernet/intel/ice/ice_ethtool.c | 3 +- drivers/net/ethernet/intel/ice/ice_irq.c | 25 +- drivers/net/ethernet/intel/ice/ice_lag.c | 6 + drivers/net/ethernet/intel/ice/ice_lib.c | 2 + drivers/net/ethernet/intel/ice/ice_virtchnl.c | 1 - drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 14 +- drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 2 + .../net/ethernet/marvell/octeontx2/af/rvu_cn10k.c | 24 +- .../ethernet/marvell/octeontx2/af/rvu_debugfs.c | 11 +- .../ethernet/marvell/octeontx2/nic/otx2_common.c | 8 +- drivers/net/ethernet/mediatek/mtk_ppe_offload.c | 22 +- drivers/net/ethernet/mellanox/mlx4/alloc.c | 6 +- drivers/net/ethernet/mellanox/mlx4/en_tx.c | 2 + drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 - .../net/ethernet/mellanox/mlx5/core/en/params.c | 15 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 7 +- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 5 + .../net/ethernet/mellanox/mlx5/core/en_selftest.c | 3 + .../net/ethernet/mellanox/mlx5/core/esw/legacy.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/events.c | 11 +- .../net/ethernet/mellanox/mlx5/core/fs_ft_pool.c | 6 +- .../net/ethernet/mellanox/mlx5/core/fs_ft_pool.h | 2 - drivers/net/ethernet/mellanox/mlx5/core/health.c | 1 + .../ethernet/mellanox/mlx5/core/lib/fs_chains.c | 3 +- drivers/net/ethernet/microchip/lan743x_main.c | 19 +- drivers/net/ethernet/microsoft/mana/gdma_main.c | 2 +- drivers/net/ethernet/realtek/r8169_main.c | 1 + drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 2 +- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 2 +- drivers/net/ethernet/ti/cpsw_new.c | 1 + drivers/net/ieee802154/ca8210.c | 9 +- drivers/net/phy/phylink.c | 2 +- drivers/net/usb/r8152.c | 1 + drivers/net/vxlan/vxlan_core.c | 36 +- drivers/net/wireless/ath/ath12k/core.h | 1 + drivers/net/wireless/ath/ath12k/dp_tx.c | 6 +- drivers/net/wireless/ath/ath12k/hal_desc.h | 2 +- drivers/net/wireless/ath/ath12k/pci.c | 13 +- drivers/net/wireless/ath/ath12k/wmi.c | 4 +- drivers/net/wireless/ath/ath9k/init.c | 4 +- drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | 10 +- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 2 + drivers/net/wireless/mediatek/mt76/mt76.h | 1 + .../net/wireless/mediatek/mt76/mt76_connac3_mac.h | 3 + drivers/net/wireless/mediatek/mt76/mt76x0/pci.c | 3 +- drivers/net/wireless/mediatek/mt76/mt76x0/usb.c | 3 +- drivers/net/wireless/mediatek/mt76/mt76x2/pci.c | 3 +- drivers/net/wireless/mediatek/mt76/mt76x2/usb.c | 3 +- drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 4 +- drivers/net/wireless/mediatek/mt76/tx.c | 3 +- .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 17 +- drivers/net/wireless/realtek/rtw88/mac.c | 6 +- drivers/net/wireless/realtek/rtw88/main.c | 40 +- drivers/net/wireless/realtek/rtw88/reg.h | 3 +- drivers/net/wireless/realtek/rtw88/rtw8822b.c | 14 +- drivers/net/wireless/realtek/rtw88/util.c | 3 +- drivers/net/wireless/realtek/rtw89/fw.c | 2 - drivers/net/wireless/realtek/rtw89/regd.c | 2 + drivers/net/wireless/realtek/rtw89/ser.c | 4 + drivers/nvdimm/label.c | 3 +- drivers/nvme/host/pci.c | 8 + drivers/nvme/target/tcp.c | 3 + drivers/nvmem/core.c | 16 +- drivers/nvmem/qfprom.c | 26 +- drivers/nvmem/rockchip-otp.c | 17 +- drivers/pci/Kconfig | 6 + drivers/pci/controller/dwc/pcie-designware-ep.c | 2 +- drivers/pci/controller/pcie-brcmstb.c | 5 +- drivers/pci/controller/vmd.c | 20 + drivers/pci/setup-bus.c | 6 +- drivers/perf/arm-cmn.c | 10 +- drivers/perf/arm_pmuv3.c | 4 +- drivers/phy/phy-core.c | 7 +- drivers/phy/renesas/phy-rcar-gen3-usb2.c | 143 ++-- drivers/phy/starfive/phy-jh7110-usb.c | 7 + drivers/pinctrl/bcm/pinctrl-bcm281xx.c | 44 +- drivers/pinctrl/devicetree.c | 10 +- drivers/pinctrl/meson/pinctrl-meson.c | 2 +- drivers/pinctrl/qcom/pinctrl-apq8064.c | 2 +- drivers/pinctrl/qcom/pinctrl-apq8084.c | 2 +- drivers/pinctrl/qcom/pinctrl-ipq4019.c | 2 +- drivers/pinctrl/qcom/pinctrl-ipq5018.c | 2 +- drivers/pinctrl/qcom/pinctrl-ipq5332.c | 2 +- drivers/pinctrl/qcom/pinctrl-ipq6018.c | 2 +- drivers/pinctrl/qcom/pinctrl-ipq8064.c | 2 +- drivers/pinctrl/qcom/pinctrl-ipq8074.c | 2 +- drivers/pinctrl/qcom/pinctrl-ipq9574.c | 2 +- drivers/pinctrl/qcom/pinctrl-mdm9607.c | 2 +- drivers/pinctrl/qcom/pinctrl-mdm9615.c | 2 +- drivers/pinctrl/qcom/pinctrl-msm.c | 27 +- drivers/pinctrl/qcom/pinctrl-msm.h | 2 +- drivers/pinctrl/qcom/pinctrl-msm8226.c | 2 +- drivers/pinctrl/qcom/pinctrl-msm8660.c | 2 +- drivers/pinctrl/qcom/pinctrl-msm8909.c | 2 +- drivers/pinctrl/qcom/pinctrl-msm8916.c | 2 +- drivers/pinctrl/qcom/pinctrl-msm8953.c | 2 +- drivers/pinctrl/qcom/pinctrl-msm8960.c | 2 +- drivers/pinctrl/qcom/pinctrl-msm8976.c | 2 +- drivers/pinctrl/qcom/pinctrl-msm8994.c | 2 +- drivers/pinctrl/qcom/pinctrl-msm8996.c | 2 +- drivers/pinctrl/qcom/pinctrl-msm8998.c | 2 +- drivers/pinctrl/qcom/pinctrl-msm8x74.c | 2 +- drivers/pinctrl/qcom/pinctrl-qcm2290.c | 2 +- drivers/pinctrl/qcom/pinctrl-qcs404.c | 2 +- drivers/pinctrl/qcom/pinctrl-qdf2xxx.c | 2 +- drivers/pinctrl/qcom/pinctrl-qdu1000.c | 2 +- drivers/pinctrl/qcom/pinctrl-sa8775p.c | 2 +- drivers/pinctrl/qcom/pinctrl-sc7180.c | 2 +- drivers/pinctrl/qcom/pinctrl-sc7280.c | 2 +- drivers/pinctrl/qcom/pinctrl-sc8180x.c | 2 +- drivers/pinctrl/qcom/pinctrl-sc8280xp.c | 2 +- drivers/pinctrl/qcom/pinctrl-sdm660.c | 2 +- drivers/pinctrl/qcom/pinctrl-sdm670.c | 2 +- drivers/pinctrl/qcom/pinctrl-sdm845.c | 2 +- drivers/pinctrl/qcom/pinctrl-sdx55.c | 2 +- drivers/pinctrl/qcom/pinctrl-sdx65.c | 2 +- drivers/pinctrl/qcom/pinctrl-sdx75.c | 2 +- drivers/pinctrl/qcom/pinctrl-sm6115.c | 2 +- drivers/pinctrl/qcom/pinctrl-sm6125.c | 2 +- drivers/pinctrl/qcom/pinctrl-sm6350.c | 2 +- drivers/pinctrl/qcom/pinctrl-sm6375.c | 2 +- drivers/pinctrl/qcom/pinctrl-sm7150.c | 2 +- drivers/pinctrl/qcom/pinctrl-sm8150.c | 2 +- drivers/pinctrl/qcom/pinctrl-sm8250.c | 2 +- drivers/pinctrl/qcom/pinctrl-sm8350.c | 2 +- drivers/pinctrl/qcom/pinctrl-sm8450.c | 2 +- drivers/pinctrl/qcom/pinctrl-sm8550.c | 2 +- drivers/pinctrl/tegra/pinctrl-tegra.c | 59 +- drivers/pinctrl/tegra/pinctrl-tegra.h | 6 + .../x86/dell/dell-wmi-sysman/passobj-attributes.c | 2 +- drivers/platform/x86/fujitsu-laptop.c | 33 +- drivers/platform/x86/thinkpad_acpi.c | 7 + drivers/pmdomain/imx/gpcv2.c | 2 +- drivers/regulator/ad5398.c | 12 +- drivers/remoteproc/qcom_wcnss.c | 34 +- drivers/rtc/rtc-ds1307.c | 4 +- drivers/rtc/rtc-rv3032.c | 2 +- drivers/s390/crypto/vfio_ap_ops.c | 72 +- drivers/scsi/lpfc/lpfc_hbadisc.c | 17 +- drivers/scsi/lpfc/lpfc_init.c | 2 + drivers/scsi/mpi3mr/mpi3mr_fw.c | 3 + drivers/scsi/mpt3sas/mpt3sas_ctl.c | 12 +- drivers/scsi/st.c | 29 +- drivers/scsi/st.h | 2 + drivers/soc/apple/rtkit-internal.h | 1 + drivers/soc/apple/rtkit.c | 58 +- drivers/soc/ti/k3-socinfo.c | 13 +- drivers/soundwire/amd_manager.c | 2 + drivers/soundwire/bus.c | 9 +- drivers/spi/spi-fsl-dspi.c | 46 +- drivers/spi/spi-rockchip.c | 2 +- drivers/spi/spi-sun4i.c | 5 +- drivers/spi/spi-zynqmp-gqspi.c | 22 +- drivers/target/iscsi/iscsi_target.c | 2 +- drivers/target/target_core_spc.c | 14 +- drivers/thermal/intel/x86_pkg_temp_thermal.c | 1 + drivers/thermal/qoriq_thermal.c | 13 + drivers/thunderbolt/retimer.c | 8 +- drivers/tty/serial/8250/8250_port.c | 2 +- drivers/tty/serial/atmel_serial.c | 2 +- drivers/tty/serial/imx.c | 2 +- drivers/tty/serial/serial_mctrl_gpio.c | 34 +- drivers/tty/serial/serial_mctrl_gpio.h | 17 +- drivers/tty/serial/sh-sci.c | 98 ++- drivers/tty/serial/stm32-usart.c | 2 +- drivers/ufs/core/ufshcd.c | 29 + drivers/usb/host/xhci-ring.c | 12 +- drivers/vdpa/mlx5/net/mlx5_vnet.c | 3 + drivers/vfio/pci/vfio_pci_config.c | 3 +- drivers/vfio/pci/vfio_pci_core.c | 10 +- drivers/vfio/pci/vfio_pci_intrs.c | 2 +- drivers/vhost/scsi.c | 23 +- drivers/video/fbdev/core/bitblit.c | 5 +- drivers/video/fbdev/core/fbcon.c | 10 +- drivers/video/fbdev/core/fbcon.h | 38 +- drivers/video/fbdev/core/fbcon_ccw.c | 5 +- drivers/video/fbdev/core/fbcon_cw.c | 5 +- drivers/video/fbdev/core/fbcon_ud.c | 5 +- drivers/video/fbdev/core/tileblit.c | 45 +- drivers/video/fbdev/fsl-diu-fb.c | 1 + drivers/virtio/virtio_ring.c | 2 +- drivers/watchdog/aspeed_wdt.c | 81 ++- drivers/xen/platform-pci.c | 4 + drivers/xen/xenbus/xenbus_probe.c | 14 +- fs/btrfs/block-group.c | 18 +- fs/btrfs/discard.c | 34 +- fs/btrfs/disk-io.c | 28 +- fs/btrfs/extent_io.c | 7 +- fs/btrfs/relocation.c | 6 + fs/btrfs/scrub.c | 4 +- fs/btrfs/send.c | 6 +- fs/coredump.c | 81 ++- fs/dlm/lowcomms.c | 4 +- fs/ext4/balloc.c | 4 +- fs/ext4/ext4.h | 5 +- fs/ext4/extents.c | 19 +- fs/ext4/inode.c | 81 ++- fs/ext4/page-io.c | 16 +- fs/ext4/super.c | 19 +- fs/f2fs/sysfs.c | 74 +- fs/fuse/dir.c | 2 + fs/gfs2/glock.c | 11 +- fs/jbd2/recovery.c | 11 +- fs/namespace.c | 6 +- fs/nfs/client.c | 2 + fs/nfs/delegation.c | 3 +- fs/nfs/dir.c | 15 +- fs/nfs/filelayout/filelayoutdev.c | 6 +- fs/nfs/flexfilelayout/flexfilelayout.c | 1 + fs/nfs/flexfilelayout/flexfilelayoutdev.c | 6 +- fs/nfs/inode.c | 2 + fs/nfs/internal.h | 5 + fs/nfs/nfs3proc.c | 2 +- fs/nfs/nfs4proc.c | 9 +- fs/nfs/nfs4state.c | 10 +- fs/nfs/pnfs.h | 4 +- fs/nfs/pnfs_nfs.c | 9 +- fs/orangefs/inode.c | 7 +- fs/pstore/inode.c | 2 +- fs/pstore/internal.h | 4 +- fs/pstore/platform.c | 11 +- fs/smb/client/cifsacl.c | 17 +- fs/smb/client/cifspdu.h | 5 +- fs/smb/client/cifsproto.h | 7 + fs/smb/client/cifssmb.c | 57 ++ fs/smb/client/connect.c | 30 +- fs/smb/client/fs_context.c | 2 + fs/smb/client/fs_context.h | 3 + fs/smb/client/link.c | 8 +- fs/smb/client/readdir.c | 7 +- fs/smb/client/smb1ops.c | 228 +++++- fs/smb/client/smb2file.c | 11 +- fs/smb/client/smb2ops.c | 30 +- fs/smb/client/transport.c | 2 +- fs/smb/common/smb2pdu.h | 3 + fs/smb/server/oplock.c | 7 +- fs/smb/server/vfs.c | 14 +- include/crypto/hash.h | 3 + include/drm/drm_atomic.h | 23 +- include/drm/drm_gem.h | 13 + include/linux/bpf-cgroup.h | 1 + include/linux/coredump.h | 1 + include/linux/dma-mapping.h | 12 +- include/linux/highmem.h | 6 +- include/linux/hrtimer.h | 1 + include/linux/ipv6.h | 1 + include/linux/lzo.h | 8 + include/linux/mlx4/device.h | 2 +- include/linux/mlx5/fs.h | 2 + include/linux/msi.h | 33 +- include/linux/nfs_fs_sb.h | 12 +- include/linux/page-flags.h | 7 + include/linux/perf_event.h | 8 +- include/linux/rcupdate.h | 2 +- include/linux/rcutree.h | 2 +- include/linux/trace.h | 4 +- include/linux/trace_seq.h | 8 +- include/linux/usb/r8152.h | 1 + include/media/v4l2-subdev.h | 4 +- include/net/af_unix.h | 49 +- include/net/scm.h | 11 + include/net/xfrm.h | 1 - include/rdma/uverbs_std_types.h | 2 +- include/sound/hda_codec.h | 1 + include/sound/pcm.h | 2 + include/trace/events/btrfs.h | 2 +- include/uapi/linux/bpf.h | 1 + include/uapi/linux/idxd.h | 1 + include/ufs/ufs_quirks.h | 6 + io_uring/fdinfo.c | 4 +- io_uring/io_uring.c | 1 + kernel/bpf/cgroup.c | 33 +- kernel/bpf/hashtab.c | 2 +- kernel/bpf/syscall.c | 7 +- kernel/bpf/verifier.c | 4 + kernel/cgroup/cgroup.c | 2 +- kernel/events/core.c | 33 +- kernel/events/hw_breakpoint.c | 5 +- kernel/events/ring_buffer.c | 1 + kernel/fork.c | 9 +- kernel/padata.c | 3 +- kernel/printk/printk.c | 14 +- kernel/rcu/tree_plugin.h | 22 +- kernel/sched/fair.c | 6 +- kernel/softirq.c | 18 + kernel/time/hrtimer.c | 103 ++- kernel/time/posix-timers.c | 1 + kernel/time/timer_list.c | 4 +- kernel/trace/trace.c | 11 +- kernel/trace/trace.h | 16 +- kernel/vhost_task.c | 2 +- lib/dynamic_queue_limits.c | 2 +- lib/lzo/Makefile | 2 +- lib/lzo/lzo1x_compress.c | 102 ++- lib/lzo/lzo1x_compress_safe.c | 18 + mm/memcontrol.c | 6 +- mm/page_alloc.c | 8 + net/Makefile | 2 +- net/bluetooth/l2cap_core.c | 15 +- net/bridge/br_mdb.c | 2 +- net/bridge/br_nf_core.c | 7 +- net/bridge/br_private.h | 1 + net/can/bcm.c | 79 ++- net/core/pktgen.c | 13 +- net/core/scm.c | 17 + net/ipv4/esp4.c | 49 +- net/ipv4/fib_frontend.c | 18 +- net/ipv4/fib_rules.c | 4 +- net/ipv4/fib_trie.c | 22 - net/ipv4/inet_hashtables.c | 37 +- net/ipv4/ip_gre.c | 16 +- net/ipv4/tcp_input.c | 56 +- net/ipv6/esp6.c | 49 +- net/ipv6/fib6_rules.c | 4 +- net/ipv6/ip6_output.c | 9 +- net/llc/af_llc.c | 8 +- net/mac80211/mlme.c | 4 +- net/netfilter/nf_conntrack_standalone.c | 12 +- net/sched/sch_hfsc.c | 15 +- net/smc/smc_pnet.c | 8 +- net/sunrpc/clnt.c | 3 - net/sunrpc/rpcb_clnt.c | 5 +- net/sunrpc/sched.c | 2 + net/tipc/crypto.c | 5 + net/unix/Kconfig | 5 - net/unix/Makefile | 2 - net/unix/af_unix.c | 120 ++-- net/unix/garbage.c | 779 ++++++++++++++------- net/unix/scm.c | 161 ----- net/unix/scm.h | 10 - net/xfrm/xfrm_policy.c | 3 + net/xfrm/xfrm_state.c | 6 +- samples/bpf/Makefile | 2 +- scripts/config | 26 +- scripts/kconfig/merge_config.sh | 4 +- security/integrity/ima/ima_main.c | 4 +- security/smack/smackfs.c | 21 +- sound/core/oss/pcm_oss.c | 3 +- sound/core/pcm_native.c | 11 + sound/core/seq/seq_clientmgr.c | 5 +- sound/core/seq/seq_memory.c | 1 + sound/pci/hda/hda_beep.c | 15 +- sound/pci/hda/patch_realtek.c | 77 +- sound/soc/codecs/cs42l43-jack.c | 7 + sound/soc/codecs/mt6359-accdet.h | 9 + sound/soc/codecs/pcm3168a.c | 6 +- sound/soc/codecs/rt722-sdca-sdw.c | 49 +- sound/soc/codecs/tas2764.c | 53 +- sound/soc/fsl/imx-card.c | 2 +- sound/soc/intel/boards/bytcr_rt5640.c | 13 + sound/soc/mediatek/mt8188/mt8188-afe-clk.c | 8 + sound/soc/mediatek/mt8188/mt8188-afe-clk.h | 8 + sound/soc/mediatek/mt8188/mt8188-afe-pcm.c | 4 - sound/soc/qcom/sm8250.c | 3 + sound/soc/soc-dai.c | 8 +- sound/soc/soc-ops.c | 29 +- sound/soc/sof/ipc4-control.c | 11 +- sound/soc/sof/ipc4-pcm.c | 3 +- sound/soc/sof/topology.c | 18 +- sound/soc/sunxi/sun4i-codec.c | 53 ++ tools/bpf/bpftool/common.c | 3 +- tools/build/Makefile.build | 6 +- tools/include/uapi/linux/bpf.h | 1 + tools/lib/bpf/libbpf.c | 2 +- tools/net/ynl/lib/ynl.c | 2 +- tools/objtool/check.c | 21 +- tools/testing/kunit/qemu_configs/x86_64.py | 4 +- .../selftests/bpf/prog_tests/sockmap_ktls.c | 1 - .../testing/selftests/net/forwarding/bridge_mdb.sh | 2 +- tools/testing/selftests/net/gro.sh | 3 +- 552 files changed, 5765 insertions(+), 2788 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/444 gpio: pca953x: Split pca953x_restore_context() and pca953x_save_context()
6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andy Shevchenko <[email protected]>
[ Upstream commit ec5bde62019b0a5300c67bd81b9864a8ea12274e ]
Split regcache handling to the respective helpers. It will allow to have further refactoring with ease.
Stable-dep-of: 3e38f946062b ("gpio: pca953x: fix IRQ storm on system wake up")
--- drivers/gpio/gpio-pca953x.c | 44 ++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 15 deletions(-)
drivers/gpio/gpio-pca953x.c +29 -15
@@ -1168,9 +1168,9 @@ static int pca953x_probe(struct i2c_client *client) }#ifdef CONFIG_PM_SLEEP -static int pca953x_regcache_sync (struct device *dev) +static int pca953x_regcache_sync (struct pca953x_chip *chip) { -struct pca953x_chip *chip =dev_get_drvdata (dev); +struct device *dev = &chip->client->dev;int ret;u8 regaddr;
@@ -1217,13 +1217,37 @@ static int pca953x_regcache_sync(struct device *dev)return 0 ; } -static int pca953x_suspend (struct device *dev) +static int pca953x_restore_context (struct pca953x_chip *chip) { -struct pca953x_chip *chip =dev_get_drvdata (dev); +int ret; + +mutex_lock (&chip->i2c_lock); + +regcache_cache_only (chip->regmap, false); +regcache_mark_dirty (chip->regmap); + ret =pca953x_regcache_sync (chip); +if (ret) { +mutex_unlock (&chip->i2c_lock); +return ret; + } + + ret =regcache_sync (chip->regmap); +mutex_unlock (&chip->i2c_lock); +return ret; +} +static void pca953x_save_context (struct pca953x_chip *chip) +{mutex_lock (&chip->i2c_lock);regcache_cache_only (chip->regmap, true);mutex_unlock (&chip->i2c_lock); +} + +static int pca953x_suspend (struct device *dev) +{ +struct pca953x_chip *chip =dev_get_drvdata (dev); + +pca953x_save_context (chip);if (atomic_read (&chip->wakeup_path))device_set_wakeup_path (dev);
@@ -1246,17 +1270,7 @@ static int pca953x_resume(struct device *dev) } } -mutex_lock (&chip->i2c_lock); -regcache_cache_only (chip->regmap, false); -regcache_mark_dirty (chip->regmap); - ret =pca953x_regcache_sync (dev); -if (ret) { -mutex_unlock (&chip->i2c_lock); -return ret; - } - - ret =regcache_sync (chip->regmap); -mutex_unlock (&chip->i2c_lock); + ret =pca953x_restore_context (chip);if (ret) {dev_err (dev,"Failed to restore register map: %d\n" , ret);return ret;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 2/444 gpio: pca953x: Simplify code with cleanup helpers
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andy Shevchenko <[email protected]>
[ Upstream commit 8e471b784a720f6f34f9fb449ba0744359dcaccb ]
Use macros defined in linux/cleanup.h to automate resource lifetime control in gpio-pca953x.
Stable-dep-of: 3e38f946062b ("gpio: pca953x: fix IRQ storm on system wake up")
--- drivers/gpio/gpio-pca953x.c | 77 ++++++++++++++----------------------- 1 file changed, 29 insertions(+), 48 deletions(-)
drivers/gpio/gpio-pca953x.c +29 -48
@@ -10,6 +10,7 @@#include <linux/acpi.h> #include <linux/bitmap.h> +#include <linux/cleanup.h> #include <linux/gpio/consumer.h> #include <linux/gpio/driver.h> #include <linux/i2c.h>
@@ -519,12 +520,10 @@ static int pca953x_gpio_direction_input(struct gpio_chip *gc, unsigned off)struct pca953x_chip *chip =gpiochip_get_data (gc);u8 dirreg = chip->recalc_addr (chip, chip->regs->direction, off);u8 bit =BIT (off %BANK_SZ ); -int ret; -mutex_lock (&chip->i2c_lock); - ret =regmap_write_bits (chip->regmap, dirreg, bit, bit); -mutex_unlock (&chip->i2c_lock); -return ret; +guard (mutex)(&chip->i2c_lock); + +return regmap_write_bits (chip->regmap, dirreg, bit, bit); } static int pca953x_gpio_direction_output(struct gpio_chip *gc,
@@ -536,17 +535,15 @@ static int pca953x_gpio_direction_output(struct gpio_chip *gc,u8 bit =BIT (off %BANK_SZ );int ret; -mutex_lock (&chip->i2c_lock); +guard (mutex)(&chip->i2c_lock); +/* set output level */ ret =regmap_write_bits (chip->regmap, outreg, bit, val ? bit :0 );if (ret) - goto exit; +return ret;/* then direction */ - ret =regmap_write_bits (chip->regmap, dirreg, bit,0 ); -exit: -mutex_unlock (&chip->i2c_lock); -return ret; +return regmap_write_bits (chip->regmap, dirreg, bit,0 ); }static int pca953x_gpio_get_value (struct gpio_chip *gc,unsigned off)
@@ -557,9 +554,8 @@ static int pca953x_gpio_get_value(struct gpio_chip *gc, unsigned off)u32 reg_val;int ret; -mutex_lock (&chip->i2c_lock); - ret =regmap_read (chip->regmap, inreg, ®_val); -mutex_unlock (&chip->i2c_lock); +scoped_guard (mutex, &chip->i2c_lock) + ret = regmap_read(chip->regmap, inreg, ®_val);if (ret <0 )return ret;
@@ -572,9 +568,9 @@ static void pca953x_gpio_set_value(struct gpio_chip *gc, unsigned off, int val)u8 outreg = chip->recalc_addr (chip, chip->regs->output, off);u8 bit =BIT (off %BANK_SZ ); -mutex_lock (&chip->i2c_lock); +guard (mutex)(&chip->i2c_lock); +regmap_write_bits (chip->regmap, outreg, bit, val ? bit :0 ); -mutex_unlock (&chip->i2c_lock); }static int pca953x_gpio_get_direction (struct gpio_chip *gc,unsigned off)
@@ -585,9 +581,8 @@ static int pca953x_gpio_get_direction(struct gpio_chip *gc, unsigned off)u32 reg_val;int ret; -mutex_lock (&chip->i2c_lock); - ret =regmap_read (chip->regmap, dirreg, ®_val); -mutex_unlock (&chip->i2c_lock); +scoped_guard (mutex, &chip->i2c_lock) + ret = regmap_read(chip->regmap, dirreg, ®_val);if (ret <0 )return ret;
@@ -604,9 +599,8 @@ static int pca953x_gpio_get_multiple(struct gpio_chip *gc,DECLARE_BITMAP (reg_val,MAX_LINE );int ret; -mutex_lock (&chip->i2c_lock); - ret =pca953x_read_regs (chip, chip->regs->input, reg_val); -mutex_unlock (&chip->i2c_lock); +scoped_guard (mutex, &chip->i2c_lock) + ret = pca953x_read_regs(chip, chip->regs->input, reg_val);if (ret)return ret;
@@ -621,16 +615,15 @@ static void pca953x_gpio_set_multiple(struct gpio_chip *gc,DECLARE_BITMAP (reg_val,MAX_LINE );int ret; -mutex_lock (&chip->i2c_lock); +guard (mutex)(&chip->i2c_lock); + ret =pca953x_read_regs (chip, chip->regs->output, reg_val);if (ret) - goto exit; +return ;bitmap_replace (reg_val, reg_val, bits, mask, gc->ngpio);pca953x_write_regs (chip, chip->regs->output, reg_val); -exit: -mutex_unlock (&chip->i2c_lock); } static int pca953x_gpio_set_pull_up_down(struct pca953x_chip *chip,
@@ -638,7 +631,6 @@ static int pca953x_gpio_set_pull_up_down(struct pca953x_chip *chip, unsigned long config) {enum pin_config_param param =pinconf_to_config_param (config); -u8 pull_en_reg = chip->recalc_addr (chip,PCAL953X_PULL_EN , offset);u8 pull_sel_reg = chip->recalc_addr (chip,PCAL953X_PULL_SEL , offset);u8 bit =BIT (offset %BANK_SZ );
@@ -651,7 +643,7 @@ static int pca953x_gpio_set_pull_up_down(struct pca953x_chip *chip,if (!(chip->driver_data &PCA_PCAL ))return -ENOTSUPP ; -mutex_lock (&chip->i2c_lock); +guard (mutex)(&chip->i2c_lock);/* Configure pull-up/pull-down */ if (param ==PIN_CONFIG_BIAS_PULL_UP )
@@ -661,17 +653,13 @@ static int pca953x_gpio_set_pull_up_down(struct pca953x_chip *chip,else ret =0 ;if (ret) - goto exit; +return ret;/* Disable/Enable pull-up/pull-down */ if (param ==PIN_CONFIG_BIAS_DISABLE ) - ret =regmap_write_bits (chip->regmap, pull_en_reg, bit,0 ); +return regmap_write_bits (chip->regmap, pull_en_reg, bit,0 );else - ret =regmap_write_bits (chip->regmap, pull_en_reg, bit, bit); - -exit: -mutex_unlock (&chip->i2c_lock); -return ret; +return regmap_write_bits (chip->regmap, pull_en_reg, bit, bit); } static int pca953x_gpio_set_config(struct gpio_chip *gc, unsigned int offset,
@@ -883,10 +871,8 @@ static irqreturn_t pca953x_irq_handler(int irq, void *devid)bitmap_zero (pending,MAX_LINE ); -mutex_lock (&chip->i2c_lock); - ret =pca953x_irq_pending (chip, pending); -mutex_unlock (&chip->i2c_lock); - +scoped_guard (mutex, &chip->i2c_lock) + ret = pca953x_irq_pending(chip, pending);if (ret) { ret =0 ;
@@ -1221,26 +1207,21 @@ static int pca953x_restore_context(struct pca953x_chip *chip) {int ret; -mutex_lock (&chip->i2c_lock); +guard (mutex)(&chip->i2c_lock);regcache_cache_only (chip->regmap, false);regcache_mark_dirty (chip->regmap); ret =pca953x_regcache_sync (chip); -if (ret) { -mutex_unlock (&chip->i2c_lock); +if (ret)return ret; - } - ret =regcache_sync (chip->regmap); -mutex_unlock (&chip->i2c_lock); -return ret; +return regcache_sync (chip->regmap); }static void pca953x_save_context (struct pca953x_chip *chip) { -mutex_lock (&chip->i2c_lock); +guard (mutex)(&chip->i2c_lock);regcache_cache_only (chip->regmap, true); -mutex_unlock (&chip->i2c_lock); }static int pca953x_suspend (struct device *dev)
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 3/444 gpio: pca953x: fix IRQ storm on system wake up
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Emanuele Ghidoli <[email protected]>
[ Upstream commit 3e38f946062b4845961ab86b726651b4457b2af8 ]
If an input changes state during wake-up and is used as an interrupt source, the IRQ handler reads the volatile input register to clear the interrupt mask and deassert the IRQ line. However, the IRQ handler is triggered before access to the register is granted, causing the read operation to fail.
As a result, the IRQ handler enters a loop, repeatedly printing the "failed reading register" message, until pca953x_resume() is eventually called, which restores the driver context and enables access to registers.
Fix by disabling the IRQ line before entering suspend mode, and re-enabling it after the driver context is restored in pca953x_resume().
An IRQ can be disabled with disable_irq() and still wake the system as long as the IRQ has wake enabled, so the wake-up functionality is preserved.
--- drivers/gpio/gpio-pca953x.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpio/gpio-pca953x.c +6 -0
@@ -1209,6 +1209,8 @@ static int pca953x_restore_context(struct pca953x_chip *chip)guard (mutex)(&chip->i2c_lock); +if (chip->client->irq >0 ) +enable_irq (chip->client->irq);regcache_cache_only (chip->regmap, false);regcache_mark_dirty (chip->regmap); ret =pca953x_regcache_sync (chip);
@@ -1221,6 +1223,10 @@ static int pca953x_restore_context(struct pca953x_chip *chip)static void pca953x_save_context (struct pca953x_chip *chip) {guard (mutex)(&chip->i2c_lock); + +/* Disable IRQ to prevent early triggering while regmap "cache only" is on */ +if (chip->client->irq >0 ) +disable_irq (chip->client->irq);regcache_cache_only (chip->regmap, true); }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 4/444 i2c: designware: Uniform initialization flow for polling mode
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jarkko Nikula <[email protected]>
[ Upstream commit 535677e44d57a31e1363529b5ecddb92653d7136 ]
Currently initialization flow in i2c_dw_probe_master() skips a few steps and has code duplication for polling mode implementation.
Simplify this by adding a new ACCESS_POLLING flag that is set for those two platforms that currently use polling mode and use it to skip interrupt handler setup.
Stable-dep-of: 1cfe51ef07ca ("i2c: designware: Fix an error handling path in i2c_dw_pci_probe()")
--- drivers/i2c/busses/i2c-designware-core.h | 1 + drivers/i2c/busses/i2c-designware-master.c | 42 ++++----------------- drivers/i2c/busses/i2c-designware-pcidrv.c | 2 +- drivers/i2c/busses/i2c-designware-platdrv.c | 2 +- 4 files changed, 11 insertions(+), 36 deletions(-)
drivers/i2c/busses/i2c-designware-core.h +1 -0
@@ -305,6 +305,7 @@ struct dw_i2c_dev {#define ACCESS_INTR_MASK BIT(0)#define ACCESS_NO_IRQ_SUSPEND BIT(1)#define ARBITRATION_SEMAPHORE BIT(2) +#define ACCESS_POLLING BIT(3)#define MODEL_MSCC_OCELOT BIT(8)#define MODEL_BAIKAL_BT1 BIT(9)
drivers/i2c/busses/i2c-designware-master.c +8 -34
60 lines not on this page · raw message
drivers/i2c/busses/i2c-designware-pcidrv.c +1 -1
@@ -154,7 +154,7 @@ static int navi_amd_setup(struct pci_dev *pdev, struct dw_pci_controller *c) {struct dw_i2c_dev *dev =dev_get_drvdata (&pdev->dev); - dev->flags |=MODEL_AMD_NAVI_GPU ; + dev->flags |=MODEL_AMD_NAVI_GPU |ACCESS_POLLING ; dev->timings.bus_freq_hz =I2C_MAX_STANDARD_MODE_FREQ ;return 0 ; }
drivers/i2c/busses/i2c-designware-platdrv.c +1 -1
@@ -290,7 +290,7 @@ static int dw_i2c_plat_probe(struct platform_device *pdev) dev->flags = (uintptr_t )device_get_match_data (&pdev->dev);if (device_property_present (&pdev->dev,"wx,i2c-snps-model" )) - dev->flags =MODEL_WANGXUN_SP ; + dev->flags =MODEL_WANGXUN_SP |ACCESS_POLLING ; dev->dev = &pdev->dev; dev->irq = irq;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 5/444 i2c: designware: Remove ->disable() callback
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andy Shevchenko <[email protected]>
[ Upstream commit bc07fb417007b323d34651be20b9135480a947dc ]
Commit 90312351fd1e ("i2c: designware: MASTER mode as separated driver") introduced ->disable() callback but there is no real use for it. Both i2c-designware-master.c and i2c-designware-slave.c set it to the same i2c_dw_disable() and scope is inside the same kernel module.
That said, replace the callback by explicitly calling the i2c_dw_disable().
Stable-dep-of: 1cfe51ef07ca ("i2c: designware: Fix an error handling path in i2c_dw_pci_probe()")
--- drivers/i2c/busses/i2c-designware-common.c | 1 + drivers/i2c/busses/i2c-designware-core.h | 4 +--- drivers/i2c/busses/i2c-designware-master.c | 1 - drivers/i2c/busses/i2c-designware-pcidrv.c | 5 +++-- drivers/i2c/busses/i2c-designware-platdrv.c | 4 ++-- drivers/i2c/busses/i2c-designware-slave.c | 3 +-- 6 files changed, 8 insertions(+), 10 deletions(-)
drivers/i2c/busses/i2c-designware-common.c +1 -0
@@ -669,6 +669,7 @@ void i2c_dw_disable(struct dw_i2c_dev *dev)i2c_dw_release_lock (dev); } +EXPORT_SYMBOL_GPL (i2c_dw_disable);MODULE_DESCRIPTION ("Synopsys DesignWare I2C bus adapter core" );MODULE_LICENSE ("GPL" );
drivers/i2c/busses/i2c-designware-core.h +1 -3
@@ -238,7 +238,6 @@ struct reset_control;* @semaphore_idx: Index of table with semaphore type attached to the bus. It's * -1 if there is no semaphore. * @shared_with_punit: true if this bus is shared with the SoCs PUNIT -* @disable: function to disable the controller * @init: function to initialize the I2C hardware * @set_sda_hold_time: callback to retrieve IP specific SDA hold timing * @mode: operation mode - DW_IC_MASTER or DW_IC_SLAVE
@@ -295,7 +294,6 @@ struct dw_i2c_dev {void (*release_lock)(void );int semaphore_idx;bool shared_with_punit; -void (*disable)(struct dw_i2c_dev *dev);int (*init)(struct dw_i2c_dev *dev);int (*set_sda_hold_time)(struct dw_i2c_dev *dev);int mode;
@@ -340,7 +338,6 @@ int i2c_dw_wait_bus_not_busy(struct dw_i2c_dev *dev);int i2c_dw_handle_tx_abort (struct dw_i2c_dev *dev);int i2c_dw_set_fifo_size (struct dw_i2c_dev *dev);u32 i2c_dw_func (struct i2c_adapter *adap); -void i2c_dw_disable (struct dw_i2c_dev *dev);static inline void __i2c_dw_enable (struct dw_i2c_dev *dev) {
@@ -355,6 +352,7 @@ static inline void __i2c_dw_disable_nowait(struct dw_i2c_dev *dev) }void __i2c_dw_disable (struct dw_i2c_dev *dev); +void i2c_dw_disable (struct dw_i2c_dev *dev);extern void i2c_dw_configure_master (struct dw_i2c_dev *dev);extern int i2c_dw_probe_master (struct dw_i2c_dev *dev);
drivers/i2c/busses/i2c-designware-master.c +0 -1
@@ -1001,7 +1001,6 @@ int i2c_dw_probe_master(struct dw_i2c_dev *dev)init_completion (&dev->cmd_complete); dev->init = i2c_dw_init_master; - dev->disable = i2c_dw_disable; ret =i2c_dw_init_regmap (dev);if (ret)
drivers/i2c/busses/i2c-designware-pcidrv.c +3 -2
@@ -198,7 +198,7 @@ static int __maybe_unused i2c_dw_pci_runtime_suspend(struct device *dev) {struct dw_i2c_dev *i_dev =dev_get_drvdata (dev); - i_dev->disable (i_dev); +i2c_dw_disable (i_dev);return 0 ; }
@@ -354,7 +354,8 @@ static void i2c_dw_pci_remove(struct pci_dev *pdev) {struct dw_i2c_dev *dev =pci_get_drvdata (pdev); - dev->disable (dev); +i2c_dw_disable (dev); +pm_runtime_forbid (&pdev->dev);pm_runtime_get_noresume (&pdev->dev);
drivers/i2c/busses/i2c-designware-platdrv.c +2 -2
@@ -407,7 +407,7 @@ static void dw_i2c_plat_remove(struct platform_device *pdev)i2c_del_adapter (&dev->adapter); - dev->disable (dev); +i2c_dw_disable (dev);pm_runtime_dont_use_autosuspend (&pdev->dev);pm_runtime_put_sync (&pdev->dev);
@@ -436,7 +436,7 @@ static int dw_i2c_plat_runtime_suspend(struct device *dev)if (i_dev->shared_with_punit)return 0 ; - i_dev->disable (i_dev); +i2c_dw_disable (i_dev);i2c_dw_prepare_clk (i_dev, false);return 0 ;
drivers/i2c/busses/i2c-designware-slave.c +1 -2
@@ -88,7 +88,7 @@ static int i2c_dw_unreg_slave(struct i2c_client *slave)struct dw_i2c_dev *dev =i2c_get_adapdata (slave->adapter);regmap_write (dev->map,DW_IC_INTR_MASK ,0 ); - dev->disable (dev); +i2c_dw_disable (dev);synchronize_irq (dev->irq); dev->slave =NULL ;pm_runtime_put (dev->dev);
@@ -235,7 +235,6 @@ int i2c_dw_probe_slave(struct dw_i2c_dev *dev)int ret; dev->init = i2c_dw_init_slave; - dev->disable = i2c_dw_disable; ret =i2c_dw_init_regmap (dev);if (ret)
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 6/444 i2c: designware: Use temporary variable for struct device
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andy Shevchenko <[email protected]>
[ Upstream commit d2f94dccab8319063dd1fbc1738b4a280c2e4009 ]
Use temporary variable for struct device to make code neater.
Stable-dep-of: 1cfe51ef07ca ("i2c: designware: Fix an error handling path in i2c_dw_pci_probe()")
--- drivers/i2c/busses/i2c-designware-pcidrv.c | 29 ++++++------- drivers/i2c/busses/i2c-designware-platdrv.c | 48 ++++++++++----------- 2 files changed, 37 insertions(+), 40 deletions(-)
drivers/i2c/busses/i2c-designware-pcidrv.c +14 -15
@@ -248,6 +248,7 @@ static const struct software_node dgpu_node = {static int i2c_dw_pci_probe (struct pci_dev *pdev,const struct pci_device_id *id) { +struct device *device = &pdev->dev;struct dw_i2c_dev *dev;struct i2c_adapter *adap;int r;
@@ -256,25 +257,22 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,struct i2c_timings *t;if (id->driver_data >=ARRAY_SIZE (dw_pci_controllers)) -return dev_err_probe (&pdev->dev, -EINVAL , -"Invalid driver data %ld\n" , +return dev_err_probe (device, -EINVAL ,"Invalid driver data %ld\n" , id->driver_data); controller = &dw_pci_controllers[id->driver_data]; r =pcim_enable_device (pdev);if (r) -return dev_err_probe (&pdev->dev, r, -"Failed to enable I2C PCI device\n" ); +return dev_err_probe (device, r,"Failed to enable I2C PCI device\n" );pci_set_master (pdev); r =pcim_iomap_regions (pdev,1 <<0 ,pci_name (pdev));if (r) -return dev_err_probe (&pdev->dev, r, -"I/O memory remapping failed\n" ); +return dev_err_probe (device, r,"I/O memory remapping failed\n" ); - dev =devm_kzalloc (&pdev->dev,sizeof (*dev),GFP_KERNEL ); + dev =devm_kzalloc (device,sizeof (*dev),GFP_KERNEL );if (!dev)return -ENOMEM ;
@@ -284,7 +282,7 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev, dev->get_clk_rate_khz = controller->get_clk_rate_khz; dev->base =pcim_iomap_table (pdev)[0 ]; - dev->dev = &pdev->dev; + dev->dev = device; dev->irq =pci_irq_vector (pdev,0 ); dev->flags |= controller->flags;
@@ -338,14 +336,14 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,if ((dev->flags &MODEL_MASK ) ==MODEL_AMD_NAVI_GPU ) { dev->slave =i2c_new_ccgx_ucsi (&dev->adapter, dev->irq, &dgpu_node);if (IS_ERR (dev->slave)) -return dev_err_probe (dev->dev,PTR_ERR (dev->slave), +return dev_err_probe (device,PTR_ERR (dev->slave),"register UCSI failed\n" ); } -pm_runtime_set_autosuspend_delay (&pdev->dev,1000 ); -pm_runtime_use_autosuspend (&pdev->dev); -pm_runtime_put_autosuspend (&pdev->dev); -pm_runtime_allow (&pdev->dev); +pm_runtime_set_autosuspend_delay (device,1000 ); +pm_runtime_use_autosuspend (device); +pm_runtime_put_autosuspend (device); +pm_runtime_allow (device);return 0 ; }
@@ -353,11 +351,12 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,static void i2c_dw_pci_remove (struct pci_dev *pdev) {struct dw_i2c_dev *dev =pci_get_drvdata (pdev); +struct device *device = &pdev->dev;i2c_dw_disable (dev); -pm_runtime_forbid (&pdev->dev); -pm_runtime_get_noresume (&pdev->dev); +pm_runtime_forbid (device); +pm_runtime_get_noresume (device);i2c_del_adapter (&dev->adapter);devm_free_irq (&pdev->dev, dev->irq, dev);
drivers/i2c/busses/i2c-designware-platdrv.c +23 -25
107 lines not on this page · raw message
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 7/444 i2c: designware: Fix an error handling path in i2c_dw_pci_probe()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christophe JAILLET <[email protected]>
[ Upstream commit 1cfe51ef07ca3286581d612debfb0430eeccbb65 ]
If navi_amd_register_client() fails, the previous i2c_dw_probe() call should be undone by a corresponding i2c_del_adapter() call, as already done in the remove function.
--- drivers/i2c/busses/i2c-designware-pcidrv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/i2c/busses/i2c-designware-pcidrv.c +3 -1
@@ -335,9 +335,11 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,if ((dev->flags &MODEL_MASK ) ==MODEL_AMD_NAVI_GPU ) { dev->slave =i2c_new_ccgx_ucsi (&dev->adapter, dev->irq, &dgpu_node); -if (IS_ERR (dev->slave)) +if (IS_ERR (dev->slave)) { +i2c_del_adapter (&dev->adapter);return dev_err_probe (device,PTR_ERR (dev->slave),"register UCSI failed\n" ); + } }pm_runtime_set_autosuspend_delay (device,1000 );
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 8/444 phy: renesas: rcar-gen3-usb2: Add support to initialize the bus
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Claudiu Beznea <[email protected]>
[ Upstream commit 4eae16375357a2a7e8501be5469532f7636064b3 ]
The Renesas RZ/G3S need to initialize the USB BUS before transferring data due to hardware limitation. As the register that need to be touched for this is in the address space of the USB PHY, and the UBS PHY need to be initialized before any other USB drivers handling data transfer, add support to initialize the USB BUS.
As the USB PHY is probed before any other USB drivers that enables clocks and de-assert the reset signals and the BUS initialization is done in the probe phase, we need to add code to de-assert reset signal and runtime resume the device (which enables its clocks) before accessing the registers.
As the reset signals are not required by the USB PHY driver for the other USB PHY hardware variants, the reset signals and runtime PM was handled only in the function that initialize the USB BUS.
The PHY initialization was done right after runtime PM enable to have all in place when the PHYs are registered.
Stable-dep-of: 9ce71e85b29e ("phy: renesas: rcar-gen3-usb2: Assert PLL reset on PHY power off")
--- drivers/phy/renesas/phy-rcar-gen3-usb2.c | 50 ++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 3 deletions(-)
drivers/phy/renesas/phy-rcar-gen3-usb2.c +47 -3
@@ -19,12 +19,14 @@#include <linux/platform_device.h> #include <linux/pm_runtime.h> #include <linux/regulator/consumer.h> +#include <linux/reset.h> #include <linux/string.h> #include <linux/usb/of.h> #include <linux/workqueue.h> /******* USB2.0 Host registers (original offset is +0x200) *******/ #define USB2_INT_ENABLE 0x000 +#define USB2_AHB_BUS_CTR 0x008#define USB2_USBCTR 0x00c#define USB2_SPD_RSM_TIMSET 0x10c#define USB2_OC_TIMSET 0x110
@@ -40,6 +42,10 @@#define USB2_INT_ENABLE_USBH_INTB_EN BIT(2)/* For EHCI */ #define USB2_INT_ENABLE_USBH_INTA_EN BIT(1)/* For OHCI */ +/* AHB_BUS_CTR */ +#define USB2_AHB_BUS_CTR_MBL_MASK GENMASK(1, 0) +#define USB2_AHB_BUS_CTR_MBL_INCR4 2 +/* USBCTR */ #define USB2_USBCTR_DIRPD BIT(2)#define USB2_USBCTR_PLL_RST BIT(1)
@@ -110,6 +116,7 @@ struct rcar_gen3_chan {struct extcon_dev *extcon;struct rcar_gen3_phy rphys[NUM_OF_PHYS ];struct regulator *vbus; +struct reset_control *rstc;struct work_struct work;struct mutex lock;/* protects rphys[...].powered */ enum usb_dr_mode dr_mode;
@@ -124,6 +131,7 @@ struct rcar_gen3_chan {struct rcar_gen3_phy_drv_data {const struct phy_ops *phy_usb2_ops;bool no_adp_ctrl; +bool init_bus; };/*
@@ -645,6 +653,35 @@ static enum usb_dr_mode rcar_gen3_get_dr_mode(struct device_node *np)return candidate; } +static int rcar_gen3_phy_usb2_init_bus (struct rcar_gen3_chan *channel) +{ +struct device *dev = channel->dev; +int ret; +u32 val; + + channel->rstc =devm_reset_control_array_get_shared (dev); +if (IS_ERR (channel->rstc)) +return PTR_ERR (channel->rstc); + + ret =pm_runtime_resume_and_get (dev); +if (ret) +return ret; + + ret =reset_control_deassert (channel->rstc); +if (ret) + goto rpm_put; + + val =readl (channel->base +USB2_AHB_BUS_CTR ); + val &= ~USB2_AHB_BUS_CTR_MBL_MASK ; + val |=USB2_AHB_BUS_CTR_MBL_INCR4 ; +writel (val, channel->base +USB2_AHB_BUS_CTR ); + +rpm_put: +pm_runtime_put (dev); + +return ret; +} +static int rcar_gen3_phy_usb2_probe (struct platform_device *pdev) {const struct rcar_gen3_phy_drv_data *phy_data;
@@ -698,6 +735,15 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev) goto error; } +platform_set_drvdata (pdev, channel); + channel->dev = dev; + +if (phy_data->init_bus) { + ret =rcar_gen3_phy_usb2_init_bus (channel); +if (ret) + goto error; + } + channel->soc_no_adp_ctrl = phy_data->no_adp_ctrl;if (phy_data->no_adp_ctrl) channel->obint_enable_bits =USB2_OBINT_IDCHG_EN ;
@@ -725,9 +771,6 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev) channel->vbus =NULL ; } -platform_set_drvdata (pdev, channel); - channel->dev = dev; - provider =devm_of_phy_provider_register (dev, rcar_gen3_phy_usb2_xlate);if (IS_ERR (provider)) {dev_err (dev,"Failed to register PHY provider\n" );
@@ -754,6 +797,7 @@ static void rcar_gen3_phy_usb2_remove(struct platform_device *pdev)if (channel->is_otg_channel)device_remove_file (&pdev->dev, &dev_attr_role); +reset_control_assert (channel->rstc);pm_runtime_disable (&pdev->dev); };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 9/444 phy: renesas: rcar-gen3-usb2: Move IRQ request in probe
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Claudiu Beznea <[email protected]>
[ Upstream commit de76809f60cc938d3580bbbd5b04b7d12af6ce3a ]
Commit 08b0ad375ca6 ("phy: renesas: rcar-gen3-usb2: move IRQ registration to init") moved the IRQ request operation from probe to
struct phy_ops::phy_init API to avoid triggering interrupts (which lead to register accesses) while the PHY clocks (enabled through runtime PM APIs) are not active. If this happens, it results in a synchronous abort.
One way to reproduce this issue is by enabling CONFIG_DEBUG_SHIRQ, which calls free_irq() on driver removal.
Move the IRQ request and free operations back to probe, and take the runtime PM state into account in IRQ handler. This commit is preparatory for the subsequent fixes in this series.
Stable-dep-of: 9ce71e85b29e ("phy: renesas: rcar-gen3-usb2: Assert PLL reset on PHY power off")
--- drivers/phy/renesas/phy-rcar-gen3-usb2.c | 46 +++++++++++++----------- 1 file changed, 26 insertions(+), 20 deletions(-)
drivers/phy/renesas/phy-rcar-gen3-usb2.c +26 -20
@@ -120,7 +120,6 @@ struct rcar_gen3_chan {struct work_struct work;struct mutex lock;/* protects rphys[...].powered */ enum usb_dr_mode dr_mode; -int irq;u32 obint_enable_bits;bool extcon_host;bool is_otg_channel;
@@ -425,16 +424,25 @@ static irqreturn_t rcar_gen3_phy_usb2_irq(int irq, void *_ch) {struct rcar_gen3_chan *ch = _ch;void __iomem *usb2_base = ch->base; -u32 status =readl (usb2_base +USB2_OBINTSTA ); +struct device *dev = ch->dev;irqreturn_t ret =IRQ_NONE ; +u32 status; +pm_runtime_get_noresume (dev); + +if (pm_runtime_suspended (dev)) + goto rpm_put; + + status =readl (usb2_base +USB2_OBINTSTA );if (status & ch->obint_enable_bits) { -dev_vdbg (ch->dev,"%s: %08x\n" , __func__, status); +dev_vdbg (dev,"%s: %08x\n" , __func__, status);writel (ch->obint_enable_bits, usb2_base +USB2_OBINTSTA );rcar_gen3_device_recognition (ch); ret =IRQ_HANDLED ; } +rpm_put: +pm_runtime_put_noidle (dev);return ret; }
@@ -444,17 +452,6 @@ static int rcar_gen3_phy_usb2_init(struct phy *p)struct rcar_gen3_chan *channel = rphy->ch;void __iomem *usb2_base = channel->base;u32 val; -int ret; - -if (!rcar_gen3_is_any_rphy_initialized (channel) && channel->irq >=0 ) { -INIT_WORK (&channel->work, rcar_gen3_phy_usb2_work); - ret =request_irq (channel->irq, rcar_gen3_phy_usb2_irq, -IRQF_SHARED ,dev_name (channel->dev), channel); -if (ret <0 ) { -dev_err (channel->dev,"No irq handler (%d)\n" , channel->irq); -return ret; - } - }/* Initialize USB2 part */ val =readl (usb2_base +USB2_INT_ENABLE );
@@ -490,9 +487,6 @@ static int rcar_gen3_phy_usb2_exit(struct phy *p) val &= ~USB2_INT_ENABLE_UCOM_INTEN ;writel (val, usb2_base +USB2_INT_ENABLE ); -if (channel->irq >=0 && !rcar_gen3_is_any_rphy_initialized (channel)) -free_irq (channel->irq, channel); -return 0 ; }
@@ -688,7 +682,7 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)struct device *dev = &pdev->dev;struct rcar_gen3_chan *channel;struct phy_provider *provider; -int ret =0 , i; +int ret =0 , i, irq;if (!dev->of_node) {dev_err (dev,"This driver needs device tree\n" );
@@ -704,8 +698,6 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)return PTR_ERR (channel->base); channel->obint_enable_bits =USB2_OBINT_BITS ; -/* get irq number here and request_irq for OTG in phy_init */ - channel->irq =platform_get_irq_optional (pdev,0 ); channel->dr_mode =rcar_gen3_get_dr_mode (dev->of_node);if (channel->dr_mode !=USB_DR_MODE_UNKNOWN ) { channel->is_otg_channel = true;
@@ -771,6 +763,20 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev) channel->vbus =NULL ; } + irq =platform_get_irq_optional (pdev,0 ); +if (irq <0 && irq != -ENXIO ) { + ret = irq; + goto error; + }else if (irq >0 ) { +INIT_WORK (&channel->work, rcar_gen3_phy_usb2_work); + ret =devm_request_irq (dev, irq, rcar_gen3_phy_usb2_irq, +IRQF_SHARED ,dev_name (dev), channel); +if (ret <0 ) { +dev_err (dev,"Failed to request irq (%d)\n" , irq); + goto error; + } + } + provider =devm_of_phy_provider_register (dev, rcar_gen3_phy_usb2_xlate);if (IS_ERR (provider)) {dev_err (dev,"Failed to register PHY provider\n" );
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 10/444 phy: renesas: rcar-gen3-usb2: Lock around hardware registers and driver data
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Claudiu Beznea <[email protected]>
[ Upstream commit 55a387ebb9219cbe4edfa8ba9996ccb0e7ad4932 ]
The phy-rcar-gen3-usb2 driver exposes four individual PHYs that are requested and configured by PHY users. The struct phy_ops APIs access the same set of registers to configure all PHYs. Additionally, PHY settings can be modified through sysfs or an IRQ handler. While some struct phy_ops APIs are protected by a driver-wide mutex, others rely on individual PHY-specific mutexes.
This approach can lead to various issues, including:
1/ the IRQ handler may interrupt PHY settings in progress, racing with
hardware configuration protected by a mutex lock
2/ due to msleep(20) in rcar_gen3_init_otg(), while a configuration thread
suspends to wait for the delay, another thread may try to configure another PHY (with phy_init() + phy_power_on()); re-running the phy_init() goes to the exact same configuration code, re-running the same hardware configuration on the same set of registers (and bits) which might impact the result of the msleep for the 1st configuring thread
3/ sysfs can configure the hardware (though role_store()) and it can
still race with the phy_init()/phy_power_on() APIs calling into the drivers struct phy_ops
To address these issues, add a spinlock to protect hardware register access and driver private data structures (e.g., calls to rcar_gen3_is_any_rphy_initialized()). Checking driver-specific data remains necessary as all PHY instances share common settings. With this change, the existing mutex protection is removed and the cleanup.h helpers are used.
While at it, to keep the code simpler, do not skip regulator_enable()/regulator_disable() APIs in rcar_gen3_phy_usb2_power_on()/rcar_gen3_phy_usb2_power_off() as the regulators enable/disable operations are reference counted anyway.
Stable-dep-of: 9ce71e85b29e ("phy: renesas: rcar-gen3-usb2: Assert PLL reset on PHY power off")
--- drivers/phy/renesas/phy-rcar-gen3-usb2.c | 49 +++++++++++++----------- 1 file changed, 26 insertions(+), 23 deletions(-)
drivers/phy/renesas/phy-rcar-gen3-usb2.c +26 -23
@@ -9,6 +9,7 @@* Copyright (C) 2014 Cogent Embedded, Inc. */ +#include <linux/cleanup.h> #include <linux/extcon-provider.h> #include <linux/interrupt.h> #include <linux/io.h>
@@ -118,7 +119,7 @@ struct rcar_gen3_chan {struct regulator *vbus;struct reset_control *rstc;struct work_struct work; -struct mutex lock;/* protects rphys[...].powered */ +spinlock_t lock;/* protects access to hardware and driver data structure. */ enum usb_dr_mode dr_mode;u32 obint_enable_bits;bool extcon_host;
@@ -345,6 +346,8 @@ static ssize_t role_store(struct device *dev, struct device_attribute *attr,bool is_b_device;enum phy_mode cur_mode, new_mode; +guard (spinlock_irqsave)(&ch->lock); +if (!ch->is_otg_channel || !rcar_gen3_is_any_otg_rphy_initialized (ch))return -EIO ;
@@ -412,7 +415,7 @@ static void rcar_gen3_init_otg(struct rcar_gen3_chan *ch) val =readl (usb2_base +USB2_ADPCTRL );writel (val |USB2_ADPCTRL_IDPULLUP , usb2_base +USB2_ADPCTRL ); } -msleep (20 ); +mdelay (20 );writel (0xffffffff , usb2_base +USB2_OBINTSTA );writel (ch->obint_enable_bits, usb2_base +USB2_OBINTEN );
@@ -433,12 +436,14 @@ static irqreturn_t rcar_gen3_phy_usb2_irq(int irq, void *_ch)if (pm_runtime_suspended (dev)) goto rpm_put; - status =readl (usb2_base +USB2_OBINTSTA ); -if (status & ch->obint_enable_bits) { -dev_vdbg (dev,"%s: %08x\n" , __func__, status); -writel (ch->obint_enable_bits, usb2_base +USB2_OBINTSTA ); -rcar_gen3_device_recognition (ch); - ret =IRQ_HANDLED ; + scoped_guard(spinlock, &ch->lock) { + status =readl (usb2_base +USB2_OBINTSTA ); +if (status & ch->obint_enable_bits) { +dev_vdbg (dev,"%s: %08x\n" , __func__, status); +writel (ch->obint_enable_bits, usb2_base +USB2_OBINTSTA ); +rcar_gen3_device_recognition (ch); + ret =IRQ_HANDLED ; + } } rpm_put:
@@ -453,6 +458,8 @@ static int rcar_gen3_phy_usb2_init(struct phy *p)void __iomem *usb2_base = channel->base;u32 val; +guard (spinlock_irqsave)(&channel->lock); +/* Initialize USB2 part */ val =readl (usb2_base +USB2_INT_ENABLE ); val |=USB2_INT_ENABLE_UCOM_INTEN | rphy->int_enable_bits;
@@ -479,6 +486,8 @@ static int rcar_gen3_phy_usb2_exit(struct phy *p)void __iomem *usb2_base = channel->base;u32 val; +guard (spinlock_irqsave)(&channel->lock); + rphy->initialized = false; val =readl (usb2_base +USB2_INT_ENABLE );
@@ -498,16 +507,17 @@ static int rcar_gen3_phy_usb2_power_on(struct phy *p)u32 val;int ret =0 ; -mutex_lock (&channel->lock); -if (!rcar_gen3_are_all_rphys_power_off (channel)) - goto out; -if (channel->vbus) { ret =regulator_enable (channel->vbus);if (ret) - goto out; +return ret; } +guard (spinlock_irqsave)(&channel->lock); + +if (!rcar_gen3_are_all_rphys_power_off (channel)) + goto out; + val =readl (usb2_base +USB2_USBCTR ); val |=USB2_USBCTR_PLL_RST ;writel (val, usb2_base +USB2_USBCTR );
@@ -517,7 +527,6 @@ static int rcar_gen3_phy_usb2_power_on(struct phy *p) out:/* The powered flag should be set for any other phys anyway */ rphy->powered = true; -mutex_unlock (&channel->lock);return 0 ; }
@@ -528,18 +537,12 @@ static int rcar_gen3_phy_usb2_power_off(struct phy *p)struct rcar_gen3_chan *channel = rphy->ch;int ret =0 ; -mutex_lock (&channel->lock); - rphy->powered = false; - -if (!rcar_gen3_are_all_rphys_power_off (channel)) - goto out; +scoped_guard (spinlock_irqsave, &channel->lock) + rphy->powered = false;if (channel->vbus) ret =regulator_disable (channel->vbus); -out: -mutex_unlock (&channel->lock); -return ret; }
@@ -740,7 +743,7 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)if (phy_data->no_adp_ctrl) channel->obint_enable_bits =USB2_OBINT_IDCHG_EN ; -mutex_init (&channel->lock); +spin_lock_init (&channel->lock);for (i =0 ; i <NUM_OF_PHYS ; i++) { channel->rphys[i].phy =devm_phy_create (dev,NULL , phy_data->phy_usb2_ops);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 11/444 phy: renesas: rcar-gen3-usb2: Assert PLL reset on PHY power off
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Claudiu Beznea <[email protected]>
[ Upstream commit 9ce71e85b29eb63e48e294479742e670513f03a0 ]
Assert PLL reset on PHY power off. This saves power.
--- drivers/phy/renesas/phy-rcar-gen3-usb2.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/phy/renesas/phy-rcar-gen3-usb2.c +9 -1
@@ -537,9 +537,17 @@ static int rcar_gen3_phy_usb2_power_off(struct phy *p)struct rcar_gen3_chan *channel = rphy->ch;int ret =0 ; -scoped_guard (spinlock_irqsave, &channel->lock) + scoped_guard(spinlock_irqsave, &channel->lock) { rphy->powered = false; +if (rcar_gen3_are_all_rphys_power_off (channel)) { +u32 val =readl (channel->base +USB2_USBCTR ); + + val |=USB2_USBCTR_PLL_RST ; +writel (val, channel->base +USB2_USBCTR ); + } + } +if (channel->vbus) ret =regulator_disable (channel->vbus);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 12/444 cpufreq: Add SM8650 to cpufreq-dt-platdev blocklist
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengyu Luo <[email protected]>
[ Upstream commit fc5414a4774e14e51a93499a6adfdc45f2de82e0 ]
SM8650 have already been supported by qcom-cpufreq-hw driver, but never been added to cpufreq-dt-platdev. This makes noise
[ 0.388525] cpufreq-dt cpufreq-dt: failed register driver: -17 [ 0.388537] cpufreq-dt cpufreq-dt: probe with driver cpufreq-dt failed with error -17
So adding it to the cpufreq-dt-platdev driver's blocklist to fix it.
--- drivers/cpufreq/cpufreq-dt-platdev.c | 1 + 1 file changed, 1 insertion(+)
drivers/cpufreq/cpufreq-dt-platdev.c +1 -0
@@ -165,6 +165,7 @@ static const struct of_device_id blocklist[] __initconst = { { .compatible = "qcom,sm8350", }, { .compatible = "qcom,sm8450", }, { .compatible = "qcom,sm8550", }, + { .compatible = "qcom,sm8650", }, { .compatible = "st,stih407", }, { .compatible = "st,stih410", },
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 13/444 nvmem: rockchip-otp: Move read-offset into variant-data
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Stuebner <[email protected]>
[ Upstream commit 6907e8093b3070d877ee607e5ceede60cfd08bde ]
The RK3588 has an offset into the OTP area where the readable area begins and automatically adds this to the start address.
Other variants are very much similar to rk3588, just with a different offset, so move that value into variant-data.
To match the size in bytes, store this value also in bytes and not in number of blocks.
--- drivers/nvmem/rockchip-otp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/nvmem/rockchip-otp.c +3 -2
@@ -59,7 +59,6 @@#define RK3588_OTPC_AUTO_EN 0x08#define RK3588_OTPC_INT_ST 0x84#define RK3588_OTPC_DOUT0 0x20 -#define RK3588_NO_SECURE_OFFSET 0x300#define RK3588_NBYTES 4#define RK3588_BURST_NUM 1#define RK3588_BURST_SHIFT 8
@@ -69,6 +68,7 @@struct rockchip_data {int size; +int read_offset;const char *const *clks;int num_clks;nvmem_reg_read_t reg_read;
@@ -196,7 +196,7 @@ static int rk3588_otp_read(void *context, unsigned int offset, addr_start =round_down (offset,RK3588_NBYTES ) /RK3588_NBYTES ; addr_end =round_up (offset + bytes,RK3588_NBYTES ) /RK3588_NBYTES ; addr_len = addr_end - addr_start; - addr_start +=RK3588_NO_SECURE_OFFSET ; + addr_start += otp->data->read_offset /RK3588_NBYTES ; buf =kzalloc (array_size (addr_len,RK3588_NBYTES ),GFP_KERNEL );if (!buf)
@@ -279,6 +279,7 @@ static const char * const rk3588_otp_clocks[] = {static const struct rockchip_data rk3588_data = { .size =0x400 , + .read_offset =0xc00 , .clks = rk3588_otp_clocks, .num_clks =ARRAY_SIZE (rk3588_otp_clocks), .reg_read = rk3588_otp_read,
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 14/444 nvmem: rockchip-otp: add rk3576 variant data
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Stuebner <[email protected]>
[ Upstream commit 50d75a13a9ce880a5ef07a4ccc63ba561cc2e69a ]
The variant works very similar to the rk3588, just with a different read-offset and size.
--- drivers/nvmem/rockchip-otp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/nvmem/rockchip-otp.c +12 -0
@@ -273,6 +273,14 @@ static const struct rockchip_data px30_data = { .reg_read = px30_otp_read, }; +static const struct rockchip_data rk3576_data = { + .size =0x100 , + .read_offset =0x700 , + .clks = px30_otp_clocks, + .num_clks =ARRAY_SIZE (px30_otp_clocks), + .reg_read = rk3588_otp_read, +}; +static const char *const rk3588_otp_clocks[] = {"otp" ,"apb_pclk" ,"phy" ,"arb" , };
@@ -294,6 +302,10 @@ static const struct of_device_id rockchip_otp_match[] = { .compatible = "rockchip,rk3308-otp", .data = &px30_data, }, + { + .compatible = "rockchip,rk3576-otp", + .data = &rk3576_data, + }, { .compatible = "rockchip,rk3588-otp", .data = &rk3588_data,
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 15/444 nvmem: core: verify cells raw_len
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit 13bcd440f2ff38cd7e42a179c223d4b833158b33 ]
Check that the NVMEM cell's raw_len is a aligned to word_size. Otherwise Otherwise drivers might face incomplete read while accessing the last part of the NVMEM cell.
--- drivers/nvmem/core.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/nvmem/core.c +12 -0
@@ -467,6 +467,18 @@ static int nvmem_cell_info_to_nvmem_cell_entry_nodup(struct nvmem_device *nvmem,return -EINVAL ; } +if (!IS_ALIGNED (cell->raw_len, nvmem->word_size)) { +dev_err (&nvmem->dev, +"cell %s raw len %zd unaligned to nvmem word size %d\n" , + cell->name ?:"<unknown>" , cell->raw_len, + nvmem->word_size); + +if (info->raw_len) +return -EINVAL ; + + cell->raw_len =ALIGN (cell->raw_len, nvmem->word_size); + } +return 0 ; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 16/444 nvmem: core: update raw_len if the bit reading is required
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit 6786484223d5705bf7f919c1e5055d478ebeec32 ]
If NVMEM cell uses bit offset or specifies bit truncation, update raw_len manually (following the cell->bytes update), ensuring that the NVMEM access is still word-aligned.
--- drivers/nvmem/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/nvmem/core.c +3 -1
@@ -456,9 +456,11 @@ static int nvmem_cell_info_to_nvmem_cell_entry_nodup(struct nvmem_device *nvmem, cell->nbits = info->nbits; cell->np = info->np; -if (cell->nbits) +if (cell->nbits) { cell->bytes =DIV_ROUND_UP (cell->nbits + cell->bit_offset,BITS_PER_BYTE ); + cell->raw_len =ALIGN (cell->bytes, nvmem->word_size); + }if (!IS_ALIGNED (cell->offset, nvmem->stride)) { dev_err(&nvmem->dev,
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 17/444 nvmem: qfprom: switch to 4-byte aligned reads
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit 3566a737db87a9bf360c2fd36433c5149f805f2e ]
All platforms since Snapdragon 8 Gen1 (SM8450) require using 4-byte reads to access QFPROM data. While older platforms were more than happy with 1-byte reads, change the qfprom driver to use 4-byte reads for all the platforms. Specify stride and word size of 4 bytes. To retain compatibility with the existing DT and to simplify porting data from vendor kernels, use fixup_dt_cell_info in order to bump alignment requirements.
--- drivers/nvmem/qfprom.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-)
drivers/nvmem/qfprom.c +20 -6
@@ -321,19 +321,32 @@ static int qfprom_reg_read(void *context, unsigned int reg, void *_val, size_t bytes) { struct qfprom_priv *priv = context; -u8 *val = _val; -int i =0 , words = bytes; +u32 *val = _val;void __iomem *base = priv->qfpcorrected; +int words =DIV_ROUND_UP (bytes,sizeof (u32)); +int i;if (read_raw_data && priv->qfpraw) base = priv->qfpraw; -while (words--) - *val++ =readb (base + reg + i++); +for (i =0 ; i < words; i++) + *val++ =readl (base + reg + i *sizeof (u32));return 0 ; } +/* Align reads to word boundary */ +static void qfprom_fixup_dt_cell_info (struct nvmem_device *nvmem, +struct nvmem_cell_info *cell) +{ +unsigned int byte_offset = cell->offset %sizeof (u32); + + cell->bit_offset += byte_offset *BITS_PER_BYTE ; + cell->offset -= byte_offset; +if (byte_offset && !cell->nbits) + cell->nbits = cell->bytes *BITS_PER_BYTE ; +} +static void qfprom_runtime_disable (void *data) {pm_runtime_disable (data);
@@ -358,10 +371,11 @@ static int qfprom_probe(struct platform_device *pdev)struct nvmem_config econfig = { .name ="qfprom" , .add_legacy_fixed_of_cells = true, - .stride =1 , - .word_size =1 , + .stride =4 , + .word_size =4 , .id =NVMEM_DEVID_AUTO , .reg_read = qfprom_reg_read, + .fixup_dt_cell_info = qfprom_fixup_dt_cell_info, };struct device *dev = &pdev->dev;struct resource *res;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 18/444 scsi: target: iscsi: Fix timeout on deleted connection
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Bogdanov <[email protected]>
[ Upstream commit 7f533cc5ee4c4436cee51dc58e81dfd9c3384418 ]
NOPIN response timer may expire on a deleted connection and crash with such logs:
Did not receive response to NOPIN on CID: 0, failing connection for I_T Nexus (null),i,0x00023d000125,iqn.2017-01.com.iscsi.target,t,0x3d
BUG: Kernel NULL pointer dereference on read at 0x00000000 NIP strlcpy+0x8/0xb0 LR iscsit_fill_cxn_timeout_err_stats+0x5c/0xc0 [iscsi_target_mod] Call Trace: iscsit_handle_nopin_response_timeout+0xfc/0x120 [iscsi_target_mod] call_timer_fn+0x58/0x1f0 run_timer_softirq+0x740/0x860 __do_softirq+0x16c/0x420 irq_exit+0x188/0x1c0 timer_interrupt+0x184/0x410
That is because nopin response timer may be re-started on nopin timer expiration.
Stop nopin timer before stopping the nopin response timer to be sure that no one of them will be re-started.
--- drivers/target/iscsi/iscsi_target.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/target/iscsi/iscsi_target.c +1 -1
@@ -4323,8 +4323,8 @@ int iscsit_close_connection(spin_unlock (&iscsit_global->ts_bitmap_lock);iscsit_stop_timers_for_cmds (conn); -iscsit_stop_nopin_response_timer (conn);iscsit_stop_nopin_timer (conn); +iscsit_stop_nopin_response_timer (conn);if (conn->conn_transport->iscsit_wait_conn) conn->conn_transport->iscsit_wait_conn (conn);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 19/444 scsi: ufs: Introduce quirk to extend PA_HIBERN8TIME for UFS devices
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Manish Pandey <[email protected]>
[ Upstream commit 569330a34a31a52c904239439984a59972c11d28 ]
Samsung UFS devices require additional time in hibern8 mode before exiting, beyond the negotiated handshaking phase between the host and device. Introduce a quirk to increase the PA_HIBERN8TIME parameter by 100 µs, a value derived from experiments, to ensure a proper hibernation process.
--- drivers/ufs/core/ufshcd.c | 29 +++++++++++++++++++++++++++++ include/ufs/ufs_quirks.h | 6 ++++++ 2 files changed, 35 insertions(+)
drivers/ufs/core/ufshcd.c +29 -0
@@ -257,6 +257,7 @@ static const struct ufs_dev_quirk ufs_fixups[] = { .model = UFS_ANY_MODEL, .quirk =UFS_DEVICE_QUIRK_DELAY_BEFORE_LPM |UFS_DEVICE_QUIRK_HOST_PA_TACTIVATE | +UFS_DEVICE_QUIRK_PA_HIBER8TIME | UFS_DEVICE_QUIRK_RECOVERY_FROM_DL_NAC_ERRORS }, { .wmanufacturerid = UFS_VENDOR_SKHYNIX, .model = UFS_ANY_MODEL,
@@ -8459,6 +8460,31 @@ static int ufshcd_quirk_tune_host_pa_tactivate(struct ufs_hba *hba)return ret; } +/** +* ufshcd_quirk_override_pa_h8time - Ensures proper adjustment of PA_HIBERN8TIME. +* @hba: per-adapter instance +* +* Some UFS devices require specific adjustments to the PA_HIBERN8TIME parameter +* to ensure proper hibernation timing. This function retrieves the current +* PA_HIBERN8TIME value and increments it by 100us. +*/ +static void ufshcd_quirk_override_pa_h8time (struct ufs_hba *hba) +{ +u32 pa_h8time; +int ret; + + ret =ufshcd_dme_get (hba,UIC_ARG_MIB (PA_HIBERN8TIME ), &pa_h8time); +if (ret) { +dev_err (hba->dev,"Failed to get PA_HIBERN8TIME: %d\n" , ret); +return ; + } + +/* Increment by 1 to increase hibernation time by 100 µs */ + ret =ufshcd_dme_set (hba,UIC_ARG_MIB (PA_HIBERN8TIME ), pa_h8time +1 ); +if (ret) +dev_err (hba->dev,"Failed updating PA_HIBERN8TIME: %d\n" , ret); +} +static void ufshcd_tune_unipro_params (struct ufs_hba *hba) {if (ufshcd_is_unipro_pa_params_tuning_req (hba)) {
@@ -8474,6 +8500,9 @@ static void ufshcd_tune_unipro_params(struct ufs_hba *hba)if (hba->dev_quirks &UFS_DEVICE_QUIRK_HOST_PA_TACTIVATE )ufshcd_quirk_tune_host_pa_tactivate (hba); + +if (hba->dev_quirks &UFS_DEVICE_QUIRK_PA_HIBER8TIME ) +ufshcd_quirk_override_pa_h8time (hba); }static void ufshcd_clear_dbg_ufs_stats (struct ufs_hba *hba)
include/ufs/ufs_quirks.h +6 -0
@@ -107,4 +107,10 @@ struct ufs_dev_quirk {*/ #define UFS_DEVICE_QUIRK_DELAY_AFTER_LPM (1 << 11) +/* +* Some ufs devices may need more time to be in hibern8 before exiting. +* Enable this quirk to give it an additional 100us. +*/ +#define UFS_DEVICE_QUIRK_PA_HIBER8TIME (1 << 12) +#endif /* UFS_QUIRKS_H_ */
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 20/444 virtio_ring: Fix data race by tagging event_triggered as racy for KCSAN
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhongqiu Han <[email protected]>
[ Upstream commit 2e2f925fe737576df2373931c95e1a2b66efdfef ]
syzbot reports a data-race when accessing the event_triggered, here is the simplified stack when the issue occurred:
==================================================================
BUG: KCSAN: data-race in virtqueue_disable_cb / virtqueue_enable_cb_delayed
write to 0xffff8881025bc452 of 1 bytes by task 3288 on cpu 0:
virtqueue_enable_cb_delayed+0x42/0x3c0 drivers/virtio/virtio_ring.c:2653 start_xmit+0x230/0x1310 drivers/net/virtio_net.c:3264 __netdev_start_xmit include/linux/netdevice.h:5151 [inline] netdev_start_xmit include/linux/netdevice.h:5160 [inline] xmit_one net/core/dev.c:3800 [inline]
read to 0xffff8881025bc452 of 1 bytes by interrupt on cpu 1:
virtqueue_disable_cb_split drivers/virtio/virtio_ring.c:880 [inline] virtqueue_disable_cb+0x92/0x180 drivers/virtio/virtio_ring.c:2566 skb_xmit_done+0x5f/0x140 drivers/net/virtio_net.c:777 vring_interrupt+0x161/0x190 drivers/virtio/virtio_ring.c:2715 __handle_irq_event_percpu+0x95/0x490 kernel/irq/handle.c:158 handle_irq_event_percpu kernel/irq/handle.c:193 [inline]
value changed: 0x01 -> 0x00
==================================================================
When the data race occurs, the function virtqueue_enable_cb_delayed() sets event_triggered to false, and virtqueue_disable_cb_split/packed() reads it as false due to the race condition. Since event_triggered is an unreliable hint used for optimization, this should only cause the driver temporarily suggest that the device not send an interrupt notification when the event index is used.
Fix this KCSAN reported data-race issue by explicitly tagging the access as data_racy.
Message-Id: <[email protected]>
--- drivers/virtio/virtio_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/virtio/virtio_ring.c +1 -1
@@ -2530,7 +2530,7 @@ bool virtqueue_enable_cb_delayed(struct virtqueue *_vq)struct vring_virtqueue *vq =to_vvq (_vq);if (vq->event_triggered) - vq->event_triggered = false; +data_race (vq->event_triggered = false);return vq->packed_ring ?virtqueue_enable_cb_delayed_packed (_vq) :virtqueue_enable_cb_delayed_split (_vq);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 21/444 intel_th: avoid using deprecated page->mapping, index fields
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lorenzo Stoakes <[email protected]>
[ Upstream commit 8e553520596bbd5ce832e26e9d721e6a0c797b8b ]
The struct page->mapping, index fields are deprecated and soon to be only available as part of a folio.
It is likely the intel_th code which sets page->mapping, index is was implemented out of concern that some aspect of the page fault logic may encounter unexpected problems should they not.
However, the appropriate interface for inserting kernel-allocated memory is vm_insert_page() in a VM_MIXEDMAP. By using the helper function vmf_insert_mixed() we can do this with minimal churn in the existing fault handler.
By doing so, we bypass the remainder of the faulting logic. The pages are still pinned so there is no possibility of anything unexpected being done with the pages once established.
It would also be reasonable to pre-map everything on fault, however to minimise churn we retain the fault handler.
We also eliminate all code which clears page->mapping on teardown as this has now become unnecessary.
The MSU code relies on faulting to function correctly, so is by definition dependent on CONFIG_MMU. We avoid spurious reports about compilation failure for unsupported platforms by making this requirement explicit in Kconfig as part of this change too.
--- drivers/hwtracing/intel_th/Kconfig | 1 + drivers/hwtracing/intel_th/msu.c | 31 +++++++----------------------- 2 files changed, 8 insertions(+), 24 deletions(-)
drivers/hwtracing/intel_th/Kconfig +1 -0
@@ -60,6 +60,7 @@ config INTEL_TH_STH config INTEL_TH_MSU tristate "Intel(R) Trace Hub Memory Storage Unit" + depends on MMU help Memory Storage Unit (MSU) trace output device enables storing STP traces to system memory. It supports single
drivers/hwtracing/intel_th/msu.c +7 -24
@@ -19,6 +19,7 @@#include <linux/io.h> #include <linux/workqueue.h> #include <linux/dma-mapping.h> +#include <linux/pfn_t.h> #ifdef CONFIG_X86 #include <asm/set_memory.h>
@@ -965,7 +966,6 @@ static void msc_buffer_contig_free(struct msc *msc)for (off =0 ; off < msc->nr_pages <<PAGE_SHIFT ; off +=PAGE_SIZE ) {struct page *page =virt_to_page (msc->base + off); - page->mapping =NULL ;__free_page (page); }
@@ -1147,9 +1147,6 @@ static void __msc_buffer_win_free(struct msc *msc, struct msc_window *win)int i;for_each_sg (win->sgt->sgl, sg, win->nr_segs, i) { -struct page *page =msc_sg_page (sg); - - page->mapping =NULL ;dma_free_coherent (msc_dev (win->msc)->parent->parent,PAGE_SIZE ,sg_virt (sg),sg_dma_address (sg)); }
@@ -1584,22 +1581,10 @@ static void msc_mmap_close(struct vm_area_struct *vma) {struct msc_iter *iter = vma->vm_file->private_data;struct msc *msc = iter->msc; -unsigned long pg;if (!atomic_dec_and_mutex_lock (&msc->mmap_count, &msc->buf_mutex))return ; -/* drop page _refcounts */ -for (pg =0 ; pg < msc->nr_pages; pg++) { -struct page *page =msc_buffer_get_page (msc, pg); - -if (WARN_ON_ONCE (!page)) -continue ; - -if (page->mapping) - page->mapping =NULL ; - } -/* last mapping -- drop user_count */ atomic_dec (&msc->user_count);mutex_unlock (&msc->buf_mutex);
@@ -1609,16 +1594,14 @@ static vm_fault_t msc_mmap_fault(struct vm_fault *vmf) {struct msc_iter *iter = vmf->vma->vm_file->private_data;struct msc *msc = iter->msc; +struct page *page; - vmf->page =msc_buffer_get_page (msc, vmf->pgoff); -if (!vmf->page) + page =msc_buffer_get_page (msc, vmf->pgoff); +if (!page)return VM_FAULT_SIGBUS ; -get_page (vmf->page); - vmf->page->mapping = vmf->vma->vm_file->f_mapping; - vmf->page->index = vmf->pgoff; - -return 0 ; +get_page (page); +return vmf_insert_mixed (vmf->vma, vmf->address,page_to_pfn_t (page)); }static const struct vm_operations_struct msc_mmap_ops = {
@@ -1659,7 +1642,7 @@ static int intel_th_msc_mmap(struct file *file, struct vm_area_struct *vma)atomic_dec (&msc->user_count); vma->vm_page_prot =pgprot_noncached (vma->vm_page_prot); -vm_flags_set (vma,VM_DONTEXPAND |VM_DONTCOPY ); +vm_flags_set (vma,VM_DONTEXPAND |VM_DONTCOPY |VM_MIXEDMAP ); vma->vm_ops = &msc_mmap_ops;return ret; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 22/444 dma-mapping: avoid potential unused data compilation warning
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Szyprowski <[email protected]>
[ Upstream commit c9b19ea63036fc537a69265acea1b18dabd1cbd3 ]
When CONFIG_NEED_DMA_MAP_STATE is not defined, dma-mapping clients might report unused data compilation warnings for dma_unmap_*() calls arguments. Redefine macros for those calls to let compiler to notice that it is okay when the provided arguments are not used.
--- include/linux/dma-mapping.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
include/linux/dma-mapping.h +8 -4
@@ -600,10 +600,14 @@ static inline int dma_mmap_wc(struct device *dev,#else #define DEFINE_DMA_UNMAP_ADDR (ADDR_NAME )#define DEFINE_DMA_UNMAP_LEN (LEN_NAME ) -#define dma_unmap_addr (PTR ,ADDR_NAME ) (0) -#define dma_unmap_addr_set (PTR ,ADDR_NAME ,VAL ) do { } while (0) -#define dma_unmap_len (PTR ,LEN_NAME ) (0) -#define dma_unmap_len_set (PTR ,LEN_NAME ,VAL ) do { } while (0) +#define dma_unmap_addr (PTR ,ADDR_NAME ) \ + ({ typeof(PTR) __p __maybe_unused = PTR; 0; }) +#define dma_unmap_addr_set (PTR ,ADDR_NAME ,VAL ) \ + do { typeof(PTR) __p __maybe_unused = PTR; } while (0) +#define dma_unmap_len (PTR ,LEN_NAME ) \ + ({ typeof(PTR) __p __maybe_unused = PTR; 0; }) +#define dma_unmap_len_set (PTR ,LEN_NAME ,VAL ) \ + do { typeof(PTR) __p __maybe_unused = PTR; } while (0)#endif #endif /* _LINUX_DMA_MAPPING_H */
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 23/444 cgroup: Fix compilation issue due to cgroup_mutex not being exported
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: gaoxu <[email protected]>
[ Upstream commit 87c259a7a359e73e6c52c68fcbec79988999b4e6 ]
When adding folio_memcg function call in the zram module for Android16-6.12, the following error occurs during compilation:
ERROR: modpost: "cgroup_mutex" [../soc-repo/zram.ko] undefined!
This error is caused by the indirect call to lockdep_is_held(&cgroup_mutex) within folio_memcg. The export setting for cgroup_mutex is controlled by the CONFIG_PROVE_RCU macro. If CONFIG_LOCKDEP is enabled while CONFIG_PROVE_RCU is not, this compilation error will occur.
To resolve this issue, add a parallel macro CONFIG_LOCKDEP control to ensure cgroup_mutex is properly exported when needed.
--- kernel/cgroup/cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/cgroup/cgroup.c +1 -1
@@ -90,7 +90,7 @@DEFINE_MUTEX (cgroup_mutex);DEFINE_SPINLOCK (css_set_lock); -#ifdef CONFIG_PROVE_RCU +#if (definedCONFIG_PROVE_RCU || definedCONFIG_LOCKDEP )EXPORT_SYMBOL_GPL (cgroup_mutex);EXPORT_SYMBOL_GPL (css_set_lock);#endif
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 24/444 vhost_task: fix vhost_task_create() documentation
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stefano Garzarella <[email protected]>
[ Upstream commit fec0abf52609c20279243699d08b660c142ce0aa ]
Commit cb380909ae3b ("vhost: return task creation error instead of NULL") changed the return value of vhost_task_create(), but did not update the documentation.
Reflect the change in the documentation: on an error, vhost_task_create() returns an ERR_PTR() and no longer NULL.
Message-Id: <[email protected]>
--- kernel/vhost_task.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/vhost_task.c +1 -1
@@ -111,7 +111,7 @@ EXPORT_SYMBOL_GPL(vhost_task_stop);* @arg: data to be passed to fn and handled_kill * @name: the thread's name * -* This returns a specialized task for use by the vhost layer or NULL on +* This returns a specialized task for use by the vhost layer or ERR_PTR() on * failure. The returned task is inactive, and the caller must fire it up * through vhost_task_start(). */
Signature · 1 line
2.39.5
Re: [PATCH 6.6 024/444] vhost_task: fix vhost_task_create() documentation
Quoted 2 lines · Greg Kroah-Hartman
6.6-stable review patch. If anyone has any objections, please let me know.
It seems that commit cb380909ae3b ("vhost: return task creation error instead of NULL") is not backported to 6.6, so we can skip this patch. BTW it's just a fix in a comment, so if it's too late, it should not be a big issue.
Just for my understanding, next time should I add a Fixes tag in this case, also if the patch doesn't touch code?
Thanks,
Stefano
Quoted 40 lines
------------------
From: Stefano Garzarella <[email protected]>
[ Upstream commit
fec0abf52609c20279243699d08b660c142ce0aa]Commit
cb380909ae3b("vhost: return task creation error instead of NULL") changed the return value ofvhost_task_create(), but did not update the documentation.Reflect the change in the documentation: on an error,
vhost_task_create()returns anERR_PTR()and no longer NULL.Signed-off-by Stefano Garzarella <[email protected]>Message-Id: <[email protected]>
Signed-off-by Michael S. Tsirkin <[email protected]>Signed-off-by Sasha Levin <[email protected]>--- kernel/vhost_task.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kernel/vhost_task.c +1
-2@@ -111,7 +111,7 @@ EXPORT_SYMBOL_GPL(vhost_task_stop);* @arg: data to be passed to fn and handled_kill * @name: the thread's name * -* This returns a specialized task for use by the vhost layer or NULL on +* This returns a specialized task for use by the vhost layer or ERR_PTR() on * failure. The returned task is inactive, and the caller must fire it up * through vhost_task_start(). */ --2.39.5
Greg Kroah-Hartman
maintainerRe: [PATCH 6.6 024/444] vhost_task: fix vhost_task_create() documentation
Quoted 5 lines · Stefano Garzarella
Quoted 2 lines · Greg Kroah-Hartman
6.6-stable review patch. If anyone has any objections, please let me know.
Quoted 7 lines
It seems that commit
cb380909ae3b("vhost: return task creation error instead of NULL") is not backported to 6.6, so we can skip this patch. BTW it's just a fix in a comment, so if it's too late, it should not be a big issue.Just for my understanding, next time should I add a Fixes tag in this case, also if the patch doesn't touch code?
Yes, as you did say that in the changelog, which is what triggered this backport, but our tools that automatically check for Fixes: tags missed it :(
I'll go drop this now, thanks!
greg k-h
Re: [PATCH 6.6 024/444] vhost_task: fix vhost_task_create() documentation
Quoted 12 lines · Greg Kroah-Hartman
Quoted 10 lines · Stefano Garzarella
Quoted 2 lines · Greg Kroah-Hartman
6.6-stable review patch. If anyone has any objections, please let me know.
It seems that commit
cb380909ae3b("vhost: return task creation error instead of NULL") is not backported to 6.6, so we can skip this patch. BTW it's just a fix in a comment, so if it's too late, it should not be a big issue.
Quoted 6 lines
Quoted 2 lines
Just for my understanding, next time should I add a Fixes tag in this case, also if the patch doesn't touch code?
Yes, as you did say that in the changelog, which is what triggered this backport, but our tools that automatically check for Fixes: tags missed it :(
Sorry about that, I'll keep that in mind for next times.
Quoted 2 lines
I'll go drop this now, thanks!
Great, thanks!
Stefano
Greg Kroah-Hartman
maintainerPATCH 25/444 vhost-scsi: protect vq->log_used with vq->mutex
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dongli Zhang <[email protected]>
[ Upstream commit f591cf9fce724e5075cc67488c43c6e39e8cbe27 ]
The vhost-scsi completion path may access vq->log_base when vq->log_used is already set to false.
vhost-thread QEMU-thread
vhost_scsi_complete_cmd_work()
-> vhost_add_used()
-> vhost_add_used_n()
if (unlikely(vq->log_used))
QEMU disables vq->log_used
via VHOST_SET_VRING_ADDR.
mutex_lock(&vq->mutex);
vq->log_used = false now!
mutex_unlock(&vq->mutex);
QEMU gfree(vq->log_base)
log_used()
-> log_write(vq->log_base)Assuming the VMM is QEMU. The vq->log_base is from QEMU userpace and can be reclaimed via gfree(). As a result, this causes invalid memory writes to QEMU userspace.
The control queue path has the same issue.
Message-Id: <[email protected]>
--- drivers/vhost/scsi.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/vhost/scsi.c +8 -0
@@ -560,6 +560,9 @@ static void vhost_scsi_complete_cmd_work(struct vhost_work *work)int ret; llnode =llist_del_all (&svq->completion_list); + +mutex_lock (&svq->vq.mutex); +llist_for_each_entry_safe (cmd, t, llnode, tvc_completion_list) { se_cmd = &cmd->tvc_se_cmd;
@@ -593,6 +596,8 @@ static void vhost_scsi_complete_cmd_work(struct vhost_work *work)vhost_scsi_release_cmd_res (se_cmd); } +mutex_unlock (&svq->vq.mutex); +if (signal)vhost_signal (&svq->vs->dev, &svq->vq); }
@@ -1301,8 +1306,11 @@ static void vhost_scsi_tmf_resp_work(struct vhost_work *work) resp_code =VIRTIO_SCSI_S_FUNCTION_REJECTED ; } +mutex_lock (&tmf->svq->vq.mutex);vhost_scsi_send_tmf_resp (tmf->vhost, &tmf->svq->vq, tmf->in_iovs, tmf->vq_desc, &tmf->resp_iov, resp_code); +mutex_unlock (&tmf->svq->vq.mutex); +vhost_scsi_release_tmf_res (tmf); }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 26/444 scsi: mpi3mr: Add level check to control event logging
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ranjan Kumar <[email protected]>
[ Upstream commit b0b7ee3b574a72283399b9232f6190be07f220c0 ]
Ensure event logs are only generated when the debug logging level MPI3_DEBUG_EVENT is enabled. This prevents unnecessary logging.
--- drivers/scsi/mpi3mr/mpi3mr_fw.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/scsi/mpi3mr/mpi3mr_fw.c +3 -0
@@ -174,6 +174,9 @@ static void mpi3mr_print_event_data(struct mpi3mr_ioc *mrioc,char *desc =NULL ;u16 event; +if (!(mrioc->logging_level &MPI3_DEBUG_EVENT )) +return ; + event = event_reply->event;switch (event) {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 27/444 net: enetc: refactor bulk flipping of RX buffers to separate function
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vladimir Oltean <[email protected]>
[ Upstream commit 1d587faa5be7e9785b682cc5f58ba8f4100c13ea ]
This small snippet of code ensures that we do something with the array of RX software buffer descriptor elements after passing the skb to the stack. In this case, we see if the other half of the page is reusable, and if so, we "turn around" the buffers, making them directly usable by enetc_refill_rx_ring() without going to enetc_new_page().
We will need to perform this kind of buffer flipping from a new code path, i.e. from XDP_PASS. Currently, enetc_build_skb() does it there buffer by buffer, but in a subsequent change we will stop using enetc_build_skb() for XDP_PASS.
--- drivers/net/ethernet/freescale/enetc/enetc.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
drivers/net/ethernet/freescale/enetc/enetc.c +11 -5
@@ -1572,6 +1572,16 @@ static void enetc_xdp_drop(struct enetc_bdr *rx_ring, int rx_ring_first, } } +static void enetc_bulk_flip_buff (struct enetc_bdr *rx_ring,int rx_ring_first, +int rx_ring_last) +{ +while (rx_ring_first != rx_ring_last) { +enetc_flip_rx_buff (rx_ring, + &rx_ring->rx_swbd[rx_ring_first]); +enetc_bdr_idx_inc (rx_ring, &rx_ring_first); + } +} +static int enetc_clean_rx_ring_xdp (struct enetc_bdr *rx_ring,struct napi_struct *napi,int work_limit,struct bpf_prog *prog)
@@ -1687,11 +1697,7 @@ static int enetc_clean_rx_ring_xdp(struct enetc_bdr *rx_ring,enetc_xdp_drop (rx_ring, orig_i, i); rx_ring->stats.xdp_redirect_failures++; }else { -while (orig_i != i) { -enetc_flip_rx_buff (rx_ring, - &rx_ring->rx_swbd[orig_i]); -enetc_bdr_idx_inc (rx_ring, &orig_i); - } +enetc_bulk_flip_buff (rx_ring, orig_i, i); xdp_redirect_frm_cnt++; rx_ring->stats.xdp_redirect++; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 28/444 ima: process_measurement() needlessly takes inode_lock() on MAY_READ
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Frederick Lawler <[email protected]>
[ Upstream commit 30d68cb0c37ebe2dc63aa1d46a28b9163e61caa2 ]
On IMA policy update, if a measure rule exists in the policy, IMA_MEASURE is set for ima_policy_flags which makes the violation_check variable always true. Coupled with a no-action on MAY_READ for a FILE_CHECK call, we're always taking the inode_lock().
This becomes a performance problem for extremely heavy read-only workloads. Therefore, prevent this only in the case there's no action to be taken.
--- security/integrity/ima/ima_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
security/integrity/ima/ima_main.c +3 -1
@@ -235,7 +235,9 @@ static int process_measurement(struct file *file, const struct cred *cred, &allowed_algos); violation_check = ((func ==FILE_CHECK || func ==MMAP_CHECK || func ==MMAP_CHECK_REQPROT ) && - (ima_policy_flag &IMA_MEASURE )); + (ima_policy_flag &IMA_MEASURE ) && + ((action &IMA_MEASURE ) || + (file->f_mode &FMODE_WRITE )));if (!action && !violation_check)return 0 ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 29/444 drm/amdgpu: Allow P2P access through XGMI
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Felix Kuehling <[email protected]>
[ Upstream commit a92741e72f91b904c1d8c3d409ed8dbe9c1f2b26 ]
If peer memory is accessible through XGMI, allow leaving it in VRAM rather than forcing its migration to GTT on DMABuf attachment.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 30 ++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c +29 -1
@@ -43,6 +43,29 @@#include <linux/pci-p2pdma.h> #include <linux/pm_runtime.h> +static const struct dma_buf_attach_ops amdgpu_dma_buf_attach_ops; + +/** +* dma_buf_attach_adev - Helper to get adev of an attachment +* +* @attach: attachment +* +* Returns: +* A struct amdgpu_device * if the attaching device is an amdgpu device or +* partition, NULL otherwise. +*/ +static struct amdgpu_device *dma_buf_attach_adev (struct dma_buf_attachment *attach) +{ +if (attach->importer_ops == &amdgpu_dma_buf_attach_ops) { +struct drm_gem_object *obj = attach->importer_priv; +struct amdgpu_bo *bo =gem_to_amdgpu_bo (obj); + +return amdgpu_ttm_adev (bo->tbo.bdev); + } + +return NULL ; +} +/** * amdgpu_dma_buf_attach - &dma_buf_ops.attach implementation *
@@ -54,12 +77,14 @@static int amdgpu_dma_buf_attach (struct dma_buf *dmabuf,struct dma_buf_attachment *attach) { +struct amdgpu_device *attach_adev =dma_buf_attach_adev (attach);struct drm_gem_object *obj = dmabuf->priv;struct amdgpu_bo *bo =gem_to_amdgpu_bo (obj);struct amdgpu_device *adev =amdgpu_ttm_adev (bo->tbo.bdev);int r; -if (pci_p2pdma_distance (adev->pdev, attach->dev, false) <0 ) +if (!amdgpu_dmabuf_is_xgmi_accessible (attach_adev, bo) && +pci_p2pdma_distance (adev->pdev, attach->dev, false) <0 ) attach->peer2peer = false; r =pm_runtime_get_sync (adev_to_drm (adev)->dev);
@@ -482,6 +507,9 @@ bool amdgpu_dmabuf_is_xgmi_accessible(struct amdgpu_device *adev,struct drm_gem_object *obj = &bo->tbo.base;struct drm_gem_object *gobj; +if (!adev) +return false; +if (obj->import_attach) {struct dma_buf *dma_buf = obj->import_attach->dmabuf;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 30/444 selftests/bpf: Mitigate sockmap_ktls disconnect_after_delete failure
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ihor Solodrai <[email protected]>
[ Upstream commit f2858f308131a09e33afb766cd70119b5b900569 ]
"sockmap_ktls disconnect_after_delete" test has been failing on BPF CI after recent merges from netdev:
* https://github.com/kernel-patches/bpf/actions/runs/14458537639
* https://github.com/kernel-patches/bpf/actions/runs/14457178732
It happens because disconnect has been disabled for TLS [1], and it renders the test case invalid.
Removing all the test code creates a conflict between bpf and bpf-next, so for now only remove the offending assert [2].
The test will be removed later on bpf-next.
[1] https://lore.kernel.org/netdev/[email protected]/
[2] https://lore.kernel.org/bpf/[email protected]/
--- tools/testing/selftests/bpf/prog_tests/sockmap_ktls.c | 1 - 1 file changed, 1 deletion(-)
tools/testing/selftests/bpf/prog_tests/sockmap_ktls.c +0 -1
@@ -68,7 +68,6 @@ static void test_sockmap_ktls_disconnect_after_delete(int family, int map) goto close_cli; err =disconnect (cli); -ASSERT_OK (err,"disconnect" ); close_cli:close (cli);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 31/444 bpf: fix possible endless loop in BPF map iteration
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Brandon Kammerdiener <[email protected]>
[ Upstream commit 75673fda0c557ae26078177dd14d4857afbf128d ]
The _safe variant used here gets the next element before running the callback, avoiding the endless loop condition.
--- kernel/bpf/hashtab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/bpf/hashtab.c +1 -1
@@ -2212,7 +2212,7 @@ static long bpf_for_each_hash_elem(struct bpf_map *map, bpf_callback_t callback_ b = &htab->buckets[i];rcu_read_lock (); head = &b->head; -hlist_nulls_for_each_entry_rcu (elem, n, head, hash_node) { +hlist_nulls_for_each_entry_safe (elem, n, head, hash_node) { key = elem->key;if (is_percpu) {/* current cpu value for percpu map */
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 32/444 samples/bpf: Fix compilation failure for samples/bpf on LoongArch Fedora
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Haoran Jiang <[email protected]>
[ Upstream commit 548762f05d19c5542db7590bcdfb9be1fb928376 ]
When building the latest samples/bpf on LoongArch Fedora
make M=samples/bpf
There are compilation errors as follows:
In file included from ./linux/samples/bpf/sockex2_kern.c:2:
In file included from ./include/uapi/linux/in.h:25:
In file included from ./include/linux/socket.h:8:
In file included from ./include/linux/uio.h:9:
In file included from ./include/linux/thread_info.h:60:
In file included from ./arch/loongarch/include/asm/thread_info.h:15:
In file included from ./arch/loongarch/include/asm/processor.h:13:
In file included from ./arch/loongarch/include/asm/cpu-info.h:11:./arch/loongarch/include/asm/loongarch.h:13:10: fatal error: 'larchintrin.h' file not found
^~~~~~~~~~~~~~~
1 error generated.
larchintrin.h is included in /usr/lib64/clang/14.0.6/include, and the header file location is specified at compile time.
Test on LoongArch Fedora:
https://github.com/fedora-remix-loongarch/releases-info
--- samples/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
samples/bpf/Makefile +1 -1
@@ -392,7 +392,7 @@ $(obj)/%.o: $(src)/%.c @echo " CLANG-bpf " $@ $(Q)$(CLANG) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(BPF_EXTRA_CFLAGS) \ -I$(obj) -I$(srctree)/tools/testing/selftests/bpf/ \ - -I$(LIBBPF_INCLUDE) \ + -I$(LIBBPF_INCLUDE) $(CLANG_SYS_INCLUDES) \ -D__KERNEL__ -D__BPF_TRACING__ -Wno-unused-value -Wno-pointer-sign \ -D__TARGET_ARCH_$(SRCARCH) -Wno-compare-distinct-pointer-types \ -Wno-gnu-variable-sized-type-not-at-end \
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 33/444 kconfig: merge_config: use an empty file as initfile
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Gomez <[email protected]>
[ Upstream commit a26fe287eed112b4e21e854f173c8918a6a8596d ]
The scripts/kconfig/merge_config.sh script requires an existing $INITFILE (or the $1 argument) as a base file for merging Kconfig fragments. However, an empty $INITFILE can serve as an initial starting point, later referenced by the KCONFIG_ALLCONFIG Makefile variable if -m is not used. This variable can point to any configuration file containing preset config symbols (the merged output) as stated in Documentation/kbuild/kconfig.rst. When -m is used $INITFILE will contain just the merge output requiring the user to run make (i.e. KCONFIG_ALLCONFIG=<$INITFILE> make <allnoconfig/alldefconfig> or make olddefconfig).
Instead of failing when $INITFILE is missing, create an empty file and use it as the starting point for merges.
--- scripts/kconfig/merge_config.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/kconfig/merge_config.sh +2 -2
@@ -112,8 +112,8 @@ INITFILE=$1 shift; if [ ! -r "$INITFILE" ]; then - echo "The base file '$INITFILE' does not exist. Exit." >&2 - exit 1 + echo "The base file '$INITFILE' does not exist. Creating one..." >&2 + touch "$INITFILE" fi MERGE_LIST=$*
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 34/444 s390/vfio-ap: Fix no AP queue sharing allowed message written to kernel log
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Anthony Krowiak <[email protected]>
[ Upstream commit d33d729afcc8ad2148d99f9bc499b33fd0c0d73b ]
An erroneous message is written to the kernel log when either of the following actions are taken by a user:
1. Assign an adapter or domain to a vfio_ap mediated device via its sysfs assign_adapter or assign_domain attributes that would result in one or more AP queues being assigned that are already assigned to a different mediated device. Sharing of queues between mdevs is not allowed.
2. Reserve an adapter or domain for the host device driver via the AP bus driver's sysfs apmask or aqmask attribute that would result in providing host access to an AP queue that is in use by a vfio_ap mediated device. Reserving a queue for a host driver that is in use by an mdev is not allowed.
In both cases, the assignment will return an error; however, a message like the following is written to the kernel log:
vfio_ap_mdev e1839397-51a0-4e3c-91e0-c3b9c3d3047d: Userspace may not re-assign queue 00.0028 already assigned to \
e1839397-51a0-4e3c-91e0-c3b9c3d3047d
Notice the mdev reporting the error is the same as the mdev identified in the message as the one to which the queue is being assigned. It is perfectly okay to assign a queue to an mdev to which it is already assigned; the assignment is simply ignored by the vfio_ap device driver.
This patch logs more descriptive and accurate messages for both 1 and 2 above to the kernel log:
Example for 1:vfio_ap_mdev 0fe903a0-a323-44db-9daf-134c68627d61: Userspace may not assign queue 00.0033 to mdev: already assigned to \
62177883-f1bb-47f0-914d-32a22e3a8804
Example for 2:vfio_ap_mdev 62177883-f1bb-47f0-914d-32a22e3a8804: Can not reserve queue 00.0033 for host driver: in use by mdev
--- drivers/s390/crypto/vfio_ap_ops.c | 72 ++++++++++++++++++++----------- 1 file changed, 46 insertions(+), 26 deletions(-)
drivers/s390/crypto/vfio_ap_ops.c +46 -26
@@ -834,48 +834,66 @@ static void vfio_ap_mdev_remove(struct mdev_device *mdev)vfio_put_device (&matrix_mdev->vdev); } -#define MDEV_SHARING_ERR "Userspace may not re-assign queue %02lx.%04lx " \ - "already assigned to %s" +#define MDEV_SHARING_ERR "Userspace may not assign queue %02lx.%04lx to mdev: already assigned to %s" -static void vfio_ap_mdev_log_sharing_err (struct ap_matrix_mdev *matrix_mdev, -unsigned long *apm, -unsigned long *aqm) +#define MDEV_IN_USE_ERR "Can not reserve queue %02lx.%04lx for host driver: in use by mdev" + +static void vfio_ap_mdev_log_sharing_err (struct ap_matrix_mdev *assignee, +struct ap_matrix_mdev *assigned_to, +unsigned long *apm,unsigned long *aqm) {unsigned long apid, apqi; -const struct device *dev =mdev_dev (matrix_mdev->mdev); -const char *mdev_name =dev_name (dev); -for_each_set_bit_inv (apid, apm,AP_DEVICES ) +for_each_set_bit_inv (apid, apm,AP_DEVICES ) { +for_each_set_bit_inv (apqi, aqm,AP_DOMAINS ) { +dev_warn (mdev_dev (assignee->mdev),MDEV_SHARING_ERR , + apid, apqi,dev_name (mdev_dev (assigned_to->mdev))); + } + } +} + +static void vfio_ap_mdev_log_in_use_err (struct ap_matrix_mdev *assignee, +unsigned long *apm,unsigned long *aqm) +{ +unsigned long apid, apqi; + +for_each_set_bit_inv (apid, apm,AP_DEVICES ) {for_each_set_bit_inv (apqi, aqm,AP_DOMAINS ) -dev_warn (dev,MDEV_SHARING_ERR , apid, apqi, mdev_name); +dev_warn (mdev_dev (assignee->mdev),MDEV_IN_USE_ERR , apid, apqi); + } }/** * vfio_ap_mdev_verify_no_sharing - verify APQNs are not shared by matrix mdevs * +* @assignee: the matrix mdev to which @mdev_apm and @mdev_aqm are being +* assigned; or, NULL if this function was called by the AP bus +* driver in_use callback to verify none of the APQNs being reserved +* for the host device driver are in use by a vfio_ap mediated device * @mdev_apm: mask indicating the APIDs of the APQNs to be verified * @mdev_aqm: mask indicating the APQIs of the APQNs to be verified * -* Verifies that each APQN derived from the Cartesian product of a bitmap of -* AP adapter IDs and AP queue indexes is not configured for any matrix -* mediated device. AP queue sharing is not allowed. +* Verifies that each APQN derived from the Cartesian product of APIDs +* represented by the bits set in @mdev_apm and the APQIs of the bits set in +* @mdev_aqm is not assigned to a mediated device other than the mdev to which +* the APQN is being assigned (@assignee). AP queue sharing is not allowed. * * Return: 0 if the APQNs are not shared; otherwise return -EADDRINUSE. */ -static int vfio_ap_mdev_verify_no_sharing (unsigned long *mdev_apm, +static int vfio_ap_mdev_verify_no_sharing (struct ap_matrix_mdev *assignee, +unsigned long *mdev_apm,unsigned long *mdev_aqm) { -struct ap_matrix_mdev *matrix_mdev; +struct ap_matrix_mdev *assigned_to;DECLARE_BITMAP (apm,AP_DEVICES );DECLARE_BITMAP (aqm,AP_DOMAINS ); -list_for_each_entry (matrix_mdev, &matrix_dev->mdev_list, node) { +list_for_each_entry (assigned_to, &matrix_dev->mdev_list, node) {/* -* If the input apm and aqm are fields of the matrix_mdev -* object, then move on to the next matrix_mdev. +* If the mdev to which the mdev_apm and mdev_aqm is being +* assigned is the same as the mdev being verified */ -if (mdev_apm == matrix_mdev->matrix.apm && - mdev_aqm == matrix_mdev->matrix.aqm) +if (assignee == assigned_to)continue ;memset (apm,0 ,sizeof (apm));
@@ -885,15 +903,16 @@ static int vfio_ap_mdev_verify_no_sharing(unsigned long *mdev_apm,* We work on full longs, as we can only exclude the leftover * bits in non-inverse order. The leftover is all zeros. */ -if (!bitmap_and (apm, mdev_apm, matrix_mdev->matrix.apm, -AP_DEVICES )) +if (!bitmap_and (apm, mdev_apm, assigned_to->matrix.apm,AP_DEVICES ))continue ; -if (!bitmap_and (aqm, mdev_aqm, matrix_mdev->matrix.aqm, -AP_DOMAINS )) +if (!bitmap_and (aqm, mdev_aqm, assigned_to->matrix.aqm,AP_DOMAINS ))continue ; -vfio_ap_mdev_log_sharing_err (matrix_mdev, apm, aqm); +if (assignee) +vfio_ap_mdev_log_sharing_err (assignee, assigned_to, apm, aqm); +else +vfio_ap_mdev_log_in_use_err (assigned_to, apm, aqm);return -EADDRINUSE ; }
@@ -922,7 +941,8 @@ static int vfio_ap_mdev_validate_masks(struct ap_matrix_mdev *matrix_mdev) matrix_mdev->matrix.aqm))return -EADDRNOTAVAIL ; -return vfio_ap_mdev_verify_no_sharing (matrix_mdev->matrix.apm, +return vfio_ap_mdev_verify_no_sharing (matrix_mdev, + matrix_mdev->matrix.apm, matrix_mdev->matrix.aqm); }
@@ -2271,7 +2291,7 @@ int vfio_ap_mdev_resource_in_use(unsigned long *apm, unsigned long *aqm)mutex_lock (&matrix_dev->guests_lock);mutex_lock (&matrix_dev->mdevs_lock); - ret =vfio_ap_mdev_verify_no_sharing (apm, aqm); + ret =vfio_ap_mdev_verify_no_sharing (NULL , apm, aqm);mutex_unlock (&matrix_dev->mdevs_lock);mutex_unlock (&matrix_dev->guests_lock);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 35/444 cifs: Add fallback for SMB2 CREATE without FILE_READ_ATTRIBUTES
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pali Rohár <[email protected]>
[ Upstream commit e255612b5ed9f179abe8196df7c2ba09dd227900 ]
Some operations, like WRITE, does not require FILE_READ_ATTRIBUTES access.
So when FILE_READ_ATTRIBUTES is not explicitly requested for smb2_open_file() then first try to do SMB2 CREATE with FILE_READ_ATTRIBUTES access (like it was before) and then fallback to SMB2 CREATE without FILE_READ_ATTRIBUTES access (less common case).
This change allows to complete WRITE operation to a file when it does not grant FILE_READ_ATTRIBUTES permission and its parent directory does not grant READ_DATA permission (parent directory READ_DATA is implicit grant of child FILE_READ_ATTRIBUTES permission).
--- fs/smb/client/smb2file.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
fs/smb/client/smb2file.c +10 -1
@@ -107,16 +107,25 @@ int smb2_open_file(const unsigned int xid, struct cifs_open_parms *oparms, __u32int err_buftype =CIFS_NO_BUFFER ;struct cifs_fid *fid = oparms->fid;struct network_resiliency_req nr_ioctl_req; +bool retry_without_read_attributes = false; smb2_path =cifs_convert_path_to_utf16 (oparms->path, oparms->cifs_sb);if (smb2_path ==NULL )return -ENOMEM ; - oparms->desired_access |=FILE_READ_ATTRIBUTES ; +if (!(oparms->desired_access &FILE_READ_ATTRIBUTES )) { + oparms->desired_access |=FILE_READ_ATTRIBUTES ; + retry_without_read_attributes = true; + } smb2_oplock =SMB2_OPLOCK_LEVEL_BATCH ; rc =SMB2_open (xid, oparms, smb2_path, &smb2_oplock, smb2_data,NULL , &err_iov, &err_buftype); +if (rc == -EACCES && retry_without_read_attributes) { + oparms->desired_access &= ~FILE_READ_ATTRIBUTES ; + rc =SMB2_open (xid, oparms, smb2_path, &smb2_oplock, smb2_data,NULL , &err_iov, + &err_buftype); + }if (rc && data) {struct smb2_hdr *hdr = err_iov.iov_base;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 36/444 cifs: Fix querying and creating MF symlinks over SMB1
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pali Rohár <[email protected]>
[ Upstream commit 4236ac9fe5b8b42756070d4abfb76fed718e87c2 ]
Old SMB1 servers without CAP_NT_SMBS do not support CIFS_open() function and instead SMBLegacyOpen() needs to be used. This logic is already handled in cifs_open_file() function, which is server->ops->open callback function.
So for querying and creating MF symlinks use open callback function instead of CIFS_open() function directly.
This change fixes querying and creating new MF symlinks on Windows 98. Currently cifs_query_mf_symlink() is not able to detect MF symlink and cifs_create_mf_symlink() is failing with EIO error.
--- fs/smb/client/link.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
fs/smb/client/link.c +4 -4
@@ -257,7 +257,7 @@ cifs_query_mf_symlink(unsigned int xid, struct cifs_tcon *tcon,struct cifs_open_parms oparms;struct cifs_io_parms io_parms = {0 };int buf_type =CIFS_NO_BUFFER ; -FILE_ALL_INFO file_info; +struct cifs_open_info_data query_data; oparms = (struct cifs_open_parms ) { .tcon = tcon,
@@ -269,11 +269,11 @@ cifs_query_mf_symlink(unsigned int xid, struct cifs_tcon *tcon, .fid = &fid, }; - rc =CIFS_open (xid, &oparms, &oplock, &file_info); + rc = tcon->ses->server->ops->open (xid, &oparms, &oplock, &query_data);if (rc)return rc; -if (file_info.EndOfFile !=cpu_to_le64 (CIFS_MF_SYMLINK_FILE_SIZE )) { +if (query_data.fi.EndOfFile !=cpu_to_le64 (CIFS_MF_SYMLINK_FILE_SIZE )) { rc = -ENOENT ;/* it's not a symlink */ goto out;
@@ -312,7 +312,7 @@ cifs_create_mf_symlink(unsigned int xid, struct cifs_tcon *tcon, .fid = &fid, }; - rc =CIFS_open (xid, &oparms, &oplock,NULL ); + rc = tcon->ses->server->ops->open (xid, &oparms, &oplock,NULL );if (rc)return rc;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 37/444 cifs: Fix negotiate retry functionality
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pali Rohár <[email protected]>
[ Upstream commit e94e882a6d69525c07589222cf3a6ff57ad12b5b ]
SMB negotiate retry functionality in cifs_negotiate() is currently broken and does not work when doing socket reconnect. Caller of this function, which is cifs_negotiate_protocol() requires that tcpStatus after successful execution of negotiate callback stay in CifsInNegotiate. But if the CIFSSMBNegotiate() called from cifs_negotiate() fails due to connection issues then tcpStatus is changed as so repeated CIFSSMBNegotiate() call does not help.
Fix this problem by moving retrying code from negotiate callback (which is either cifs_negotiate() or smb2_negotiate()) to cifs_negotiate_protocol() which is caller of those callbacks. This allows to properly handle and implement correct transistions between tcpStatus states as function cifs_negotiate_protocol() already handles it.
With this change, cifs_negotiate_protocol() now handles also -EAGAIN error set by the RFC1002_NEGATIVE_SESSION_RESPONSE processing after reconnecting with NetBIOS session.
--- fs/smb/client/connect.c | 10 ++++++++++ fs/smb/client/smb1ops.c | 7 ------- fs/smb/client/smb2ops.c | 3 --- 3 files changed, 10 insertions(+), 10 deletions(-)
fs/smb/client/connect.c +10 -0
@@ -3946,11 +3946,13 @@ int cifs_negotiate_protocol(const unsigned int xid, struct cifs_ses *ses, struct TCP_Server_Info *server) { + bool in_retry = false;int rc =0 ;if (!server->ops->need_neg || !server->ops->negotiate)return -ENOSYS ; +retry:/* only send once per connect */ spin_lock (&server->srv_lock); if (server->tcpStatus != CifsGood &&
@@ -3970,6 +3972,14 @@ cifs_negotiate_protocol(const unsigned int xid, struct cifs_ses *ses,spin_unlock (&server->srv_lock); rc = server->ops->negotiate (xid, ses, server); +if (rc == -EAGAIN ) { +/* Allow one retry attempt */ +if (!in_retry) { + in_retry = true; + goto retry; + } + rc = -EHOSTDOWN ; + }if (rc ==0 ) {spin_lock (&server->srv_lock);if (server->tcpStatus == CifsInNegotiate)
fs/smb/client/smb1ops.c +0 -7
@@ -426,13 +426,6 @@ cifs_negotiate(const unsigned int xid, {int rc; rc =CIFSSMBNegotiate (xid, ses, server); -if (rc == -EAGAIN ) { -/* retry only once on 1st time connection */ -set_credits (server,1 ); - rc =CIFSSMBNegotiate (xid, ses, server); -if (rc == -EAGAIN ) - rc = -EHOSTDOWN ; - }return rc; }
fs/smb/client/smb2ops.c +0 -3
@@ -428,9 +428,6 @@ smb2_negotiate(const unsigned int xid, server->CurrentMid =0 ;spin_unlock (&server->mid_lock); rc =SMB2_negotiate (xid, ses, server); -/* BB we probably don't need to retry with modern servers */ -if (rc == -EAGAIN ) - rc = -EHOSTDOWN ;return rc; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 38/444 smb: client: Store original IO parameters and prevent zero IO sizes
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wang Zhaolong <[email protected]>
[ Upstream commit 287906b20035a04a234d1a3c64f760a5678387be ]
During mount option processing and negotiation with the server, the original user-specified rsize/wsize values were being modified directly. This makes it impossible to recover these values after a connection reset, leading to potential degraded performance after reconnection.
The other problem is that When negotiating read and write sizes, there are cases where the negotiated values might calculate to zero, especially during reconnection when server->max_read or server->max_write might be reset. In general, these values come from the negotiation response. According to MS-SMB2 specification, these values should be at least 65536 bytes.
This patch improves IO parameter handling:
1. Adds vol_rsize and vol_wsize fields to store the original user-specified values separately from the negotiated values
2. Uses got_rsize/got_wsize flags to determine if values were user-specified rather than checking for non-zero values, which is more reliable
3. Adds a prevent_zero_iosize() helper function to ensure IO sizes are never negotiated down to zero, which could happen in edge cases like when server->max_read/write is zero
The changes make the CIFS client more resilient to unusual server responses and reconnection scenarios, preventing potential failures when IO sizes are calculated to be zero.
--- fs/smb/client/fs_context.c | 2 ++ fs/smb/client/fs_context.h | 3 +++ fs/smb/client/smb1ops.c | 6 +++--- fs/smb/client/smb2ops.c | 27 +++++++++++++++++++-------- fs/smb/common/smb2pdu.h | 3 +++ 5 files changed, 30 insertions(+), 11 deletions(-)
fs/smb/client/fs_context.c +2 -0
@@ -1249,6 +1249,7 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,case Opt_rsize: ctx->rsize = result.uint_32; ctx->got_rsize = true; + ctx->vol_rsize = ctx->rsize;break ;case Opt_wsize: ctx->wsize = result.uint_32;
@@ -1264,6 +1265,7 @@ static int smb3_fs_context_parse_param(struct fs_context *fc, ctx->wsize, PAGE_SIZE); } } + ctx->vol_wsize = ctx->wsize;break ;case Opt_acregmax:if (result.uint_32 >CIFS_MAX_ACTIMEO /HZ ) {
fs/smb/client/fs_context.h +3 -0
@@ -253,6 +253,9 @@ struct smb3_fs_context { bool use_client_guid:1;/* reuse existing guid for multichannel */ u8 client_guid[SMB2_CLIENT_GUID_SIZE ]; +/* User-specified original r/wsize value */ +unsigned int vol_rsize; +unsigned int vol_wsize;unsigned int bsize;unsigned int rasize;unsigned int rsize;
fs/smb/client/smb1ops.c +3 -3
@@ -437,8 +437,8 @@ cifs_negotiate_wsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)unsigned int wsize;/* start with specified wsize, or default */ -if (ctx->wsize) - wsize = ctx->wsize; +if (ctx->got_wsize) + wsize = ctx->vol_wsize;else if (tcon->unix_ext && (unix_cap &CIFS_UNIX_LARGE_WRITE_CAP )) wsize =CIFS_DEFAULT_IOSIZE ;else
@@ -490,7 +490,7 @@ cifs_negotiate_rsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)else defsize = server->maxBuf -sizeof (READ_RSP ); - rsize = ctx->rsize ? ctx->rsize : defsize; + rsize = ctx->got_rsize ? ctx->vol_rsize : defsize;/* * no CAP_LARGE_READ_X? Then MS-CIFS states that we must limit this to
fs/smb/client/smb2ops.c +19 -8
@@ -431,6 +431,17 @@ smb2_negotiate(const unsigned int xid,return rc; } +static inline unsigned int +prevent_zero_iosize (unsigned int size,const char *type) +{ +if (size ==0 ) { +cifs_dbg (VFS ,"SMB: Zero %ssize calculated, using minimum value %u\n" , + type,CIFS_MIN_DEFAULT_IOSIZE ); +return CIFS_MIN_DEFAULT_IOSIZE ; + } +return size; +} +static unsigned int smb2_negotiate_wsize (struct cifs_tcon *tcon,struct smb3_fs_context *ctx) {
@@ -438,12 +449,12 @@ smb2_negotiate_wsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)unsigned int wsize;/* start with specified wsize, or default */ - wsize = ctx->wsize ? ctx->wsize :CIFS_DEFAULT_IOSIZE ; + wsize = ctx->got_wsize ? ctx->vol_wsize :CIFS_DEFAULT_IOSIZE ; wsize = min_t(unsigned int, wsize, server->max_write);if (!(server->capabilities &SMB2_GLOBAL_CAP_LARGE_MTU )) wsize = min_t(unsigned int, wsize, SMB2_MAX_BUFFER_SIZE); -return wsize; +return prevent_zero_iosize (wsize,"w" ); } static unsigned int
@@ -453,7 +464,7 @@ smb3_negotiate_wsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)unsigned int wsize;/* start with specified wsize, or default */ - wsize = ctx->wsize ? ctx->wsize :SMB3_DEFAULT_IOSIZE ; + wsize = ctx->got_wsize ? ctx->vol_wsize :SMB3_DEFAULT_IOSIZE ; wsize = min_t(unsigned int, wsize, server->max_write);#ifdef CONFIG_CIFS_SMB_DIRECT if (server->rdma) {
@@ -475,7 +486,7 @@ smb3_negotiate_wsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)if (!(server->capabilities &SMB2_GLOBAL_CAP_LARGE_MTU )) wsize = min_t(unsigned int, wsize, SMB2_MAX_BUFFER_SIZE); -return wsize; +return prevent_zero_iosize (wsize,"w" ); } static unsigned int
@@ -485,13 +496,13 @@ smb2_negotiate_rsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)unsigned int rsize;/* start with specified rsize, or default */ - rsize = ctx->rsize ? ctx->rsize :CIFS_DEFAULT_IOSIZE ; + rsize = ctx->got_rsize ? ctx->vol_rsize :CIFS_DEFAULT_IOSIZE ; rsize = min_t(unsigned int, rsize, server->max_read);if (!(server->capabilities &SMB2_GLOBAL_CAP_LARGE_MTU )) rsize = min_t(unsigned int, rsize, SMB2_MAX_BUFFER_SIZE); -return rsize; +return prevent_zero_iosize (rsize,"r" ); } static unsigned int
@@ -501,7 +512,7 @@ smb3_negotiate_rsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)unsigned int rsize;/* start with specified rsize, or default */ - rsize = ctx->rsize ? ctx->rsize :SMB3_DEFAULT_IOSIZE ; + rsize = ctx->got_rsize ? ctx->vol_rsize :SMB3_DEFAULT_IOSIZE ; rsize = min_t(unsigned int, rsize, server->max_read);#ifdef CONFIG_CIFS_SMB_DIRECT if (server->rdma) {
@@ -524,7 +535,7 @@ smb3_negotiate_rsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)if (!(server->capabilities &SMB2_GLOBAL_CAP_LARGE_MTU )) rsize = min_t(unsigned int, rsize, SMB2_MAX_BUFFER_SIZE); -return rsize; +return prevent_zero_iosize (rsize,"r" ); }/*
fs/smb/common/smb2pdu.h +3 -0
@@ -95,6 +95,9 @@*/ #define SMB3_DEFAULT_IOSIZE (4 * 1024 * 1024) +/* According to MS-SMB2 specification The minimum recommended value is 65536.*/ +#define CIFS_MIN_DEFAULT_IOSIZE (65536) +/* * SMB2 Header Definition *
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 39/444 fuse: Return EPERM rather than ENOSYS from link()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matt Johnston <[email protected]>
[ Upstream commit 8344213571b2ac8caf013cfd3b37bc3467c3a893 ]
link() is documented to return EPERM when a filesystem doesn't support the operation, return that instead.
--- fs/fuse/dir.c | 2 ++ 1 file changed, 2 insertions(+)
fs/fuse/dir.c +2 -0
@@ -1121,6 +1121,8 @@ static int fuse_link(struct dentry *entry, struct inode *newdir,else if (err == -EINTR )fuse_invalidate_attr (inode); +if (err == -ENOSYS ) + err = -EPERM ;return err; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 40/444 NFSv4: Check for delegation validity in nfs_start_delegation_return_locked()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Trond Myklebust <[email protected]>
[ Upstream commit 9e8f324bd44c1fe026b582b75213de4eccfa1163 ]
Check that the delegation is still attached after taking the spin lock in nfs_start_delegation_return_locked().
--- fs/nfs/delegation.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/nfs/delegation.c +2 -1
@@ -297,7 +297,8 @@ nfs_start_delegation_return_locked(struct nfs_inode *nfsi)if (delegation ==NULL ) goto out;spin_lock (&delegation->lock); -if (!test_and_set_bit (NFS_DELEGATION_RETURNING , &delegation->flags)) { +if (delegation->inode && + !test_and_set_bit (NFS_DELEGATION_RETURNING , &delegation->flags)) {clear_bit (NFS_DELEGATION_RETURN_DELAYED , &delegation->flags);/* Refcount matched in nfs_end_delegation_return() */ ret =nfs_get_delegation (delegation);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 41/444 NFS: Dont allow waiting for exiting tasks
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Trond Myklebust <[email protected]>
[ Upstream commit 8d3ca331026a7f9700d3747eed59a67b8f828cdc ]
Once a task calls exit_signals() it can no longer be signalled. So do not allow it to do killable waits.
--- fs/nfs/inode.c | 2 ++ fs/nfs/internal.h | 5 +++++ fs/nfs/nfs3proc.c | 2 +- fs/nfs/nfs4proc.c | 9 +++++++-- 4 files changed, 15 insertions(+), 3 deletions(-)
fs/nfs/inode.c +2 -0
@@ -74,6 +74,8 @@ nfs_fattr_to_ino_t(struct nfs_fattr *fattr)int nfs_wait_bit_killable (struct wait_bit_key *key,int mode) { +if (unlikely (nfs_current_task_exiting ())) +return -EINTR ;schedule ();if (signal_pending_state (mode, current))return -ERESTARTSYS ;
fs/nfs/internal.h +5 -0
@@ -865,6 +865,11 @@ static inline u32 nfs_stateid_hash(const nfs4_stateid *stateid) NFS4_STATEID_OTHER_SIZE); } +static inline bool nfs_current_task_exiting (void ) +{ +return (current->flags &PF_EXITING ) !=0 ; +} +static inline bool nfs_error_is_fatal (int err) {switch (err) {
fs/nfs/nfs3proc.c +1 -1
@@ -39,7 +39,7 @@ nfs3_rpc_wrapper(struct rpc_clnt *clnt, struct rpc_message *msg, int flags)__set_current_state (TASK_KILLABLE |TASK_FREEZABLE_UNSAFE );schedule_timeout (NFS_JUKEBOX_RETRY_TIME ); res = -ERESTARTSYS ; - }while (!fatal_signal_pending (current)); + }while (!fatal_signal_pending (current) && !nfs_current_task_exiting ());return res; }
fs/nfs/nfs4proc.c +7 -2
@@ -422,6 +422,8 @@ static int nfs4_delay_killable(long *timeout) {might_sleep (); +if (unlikely (nfs_current_task_exiting ())) +return -EINTR ;__set_current_state (TASK_KILLABLE |TASK_FREEZABLE_UNSAFE );schedule_timeout (nfs4_update_delay (timeout));if (!__fatal_signal_pending (current))
@@ -433,6 +435,8 @@ static int nfs4_delay_interruptible(long *timeout) {might_sleep (); +if (unlikely (nfs_current_task_exiting ())) +return -EINTR ;__set_current_state (TASK_INTERRUPTIBLE |TASK_FREEZABLE_UNSAFE );schedule_timeout (nfs4_update_delay (timeout));if (!signal_pending (current))
@@ -1712,7 +1716,8 @@ static void nfs_set_open_stateid_locked(struct nfs4_state *state,rcu_read_unlock ();trace_nfs4_open_stateid_update_wait (state->inode, stateid,0 ); -if (!fatal_signal_pending (current)) { +if (!fatal_signal_pending (current) && + !nfs_current_task_exiting ()) {if (schedule_timeout (5 *HZ ) ==0 ) status = -EAGAIN ;else
@@ -3494,7 +3499,7 @@ static bool nfs4_refresh_open_old_stateid(nfs4_stateid *dst,write_sequnlock (&state->seqlock);trace_nfs4_close_stateid_update_wait (state->inode, dst,0 ); -if (fatal_signal_pending (current)) +if (fatal_signal_pending (current) ||nfs_current_task_exiting ()) status = -EINTR ;else if (schedule_timeout (5 *HZ ) !=0 )
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 42/444 SUNRPC: Dont allow waiting for exiting tasks
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Trond Myklebust <[email protected]>
[ Upstream commit 14e41b16e8cb677bb440dca2edba8b041646c742 ]
Once a task calls exit_signals() it can no longer be signalled. So do not allow it to do killable waits.
--- net/sunrpc/sched.c | 2 ++ 1 file changed, 2 insertions(+)
net/sunrpc/sched.c +2 -0
@@ -276,6 +276,8 @@ EXPORT_SYMBOL_GPL(rpc_destroy_wait_queue);static int rpc_wait_bit_killable (struct wait_bit_key *key,int mode) { +if (unlikely (current->flags &PF_EXITING )) +return -EINTR ;schedule ();if (signal_pending_state (mode, current))return -ERESTARTSYS ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 43/444 arm64: Add support for HIP09 Spectre-BHB mitigation
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jinqian Yang <[email protected]>
[ Upstream commit e18c09b204e81702ea63b9f1a81ab003b72e3174 ]
The HIP09 processor is vulnerable to the Spectre-BHB (Branch History Buffer) attack, which can be exploited to leak information through branch prediction side channels. This commit adds the MIDR of HIP09 to the list for software mitigation.
--- arch/arm64/include/asm/cputype.h | 2 ++ arch/arm64/kernel/proton-pack.c | 1 + 2 files changed, 3 insertions(+)
arch/arm64/include/asm/cputype.h +2 -0
@@ -132,6 +132,7 @@#define FUJITSU_CPU_PART_A64FX 0x001#define HISI_CPU_PART_TSV110 0xD01 +#define HISI_CPU_PART_HIP09 0xD02#define APPLE_CPU_PART_M1_ICESTORM 0x022#define APPLE_CPU_PART_M1_FIRESTORM 0x023
@@ -208,6 +209,7 @@#define MIDR_NVIDIA_CARMEL MIDR_CPU_MODEL(ARM_CPU_IMP_NVIDIA, NVIDIA_CPU_PART_CARMEL)#define MIDR_FUJITSU_A64FX MIDR_CPU_MODEL(ARM_CPU_IMP_FUJITSU, FUJITSU_CPU_PART_A64FX)#define MIDR_HISI_TSV110 MIDR_CPU_MODEL(ARM_CPU_IMP_HISI, HISI_CPU_PART_TSV110) +#define MIDR_HISI_HIP09 MIDR_CPU_MODEL(ARM_CPU_IMP_HISI, HISI_CPU_PART_HIP09)#define MIDR_APPLE_M1_ICESTORM MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_ICESTORM)#define MIDR_APPLE_M1_FIRESTORM MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_FIRESTORM)#define MIDR_APPLE_M1_ICESTORM_PRO MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_ICESTORM_PRO)
arch/arm64/kernel/proton-pack.c +1 -0
@@ -904,6 +904,7 @@ static u8 spectre_bhb_loop_affected(void)MIDR_ALL_VERSIONS (MIDR_CORTEX_A77 ),MIDR_ALL_VERSIONS (MIDR_NEOVERSE_N1 ),MIDR_ALL_VERSIONS (MIDR_QCOM_KRYO_4XX_GOLD ), + MIDR_ALL_VERSIONS(MIDR_HISI_HIP09), {}, };static const struct midr_range spectre_bhb_k11_list[] = {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 44/444 tracing: Mark binary printing functions with __printf() attribute
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andy Shevchenko <[email protected]>
[ Upstream commit 196a062641fe68d9bfe0ad36b6cd7628c99ad22c ]
Binary printing functions are using printf() type of format, and compiler is not happy about them as is:
kernel/trace/trace.c:3292:9: error: function ‘trace_vbprintk’ might be a candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format] kernel/trace/trace_seq.c:182:9: error: function ‘trace_seq_bprintf’ might be a candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format]
Fix the compilation errors by adding __printf() attribute.
While at it, move existing __printf() attributes from the implementations to the declarations. IT also fixes incorrect attribute parameters that are used for trace_array_printk().
--- include/linux/trace.h | 4 ++-- include/linux/trace_seq.h | 8 ++++---- kernel/trace/trace.c | 11 +++-------- kernel/trace/trace.h | 16 +++++++++------- 4 files changed, 18 insertions(+), 21 deletions(-)
include/linux/trace.h +2 -2
@@ -72,8 +72,8 @@ static inline int unregister_ftrace_export(struct trace_export *export)static inline void trace_printk_init_buffers (void ) { } -static inline int trace_array_printk (struct trace_array *tr,unsigned long ip, -const char *fmt, ...) +static inline __printf(3, 4) +int trace_array_printk(struct trace_array *tr, unsigned long ip, const char *fmt, ...) {return 0 ; }
include/linux/trace_seq.h +4 -4
@@ -79,8 +79,8 @@ extern __printf(2, 3)void trace_seq_printf (struct trace_seq *s,const char *fmt, ...); extern __printf(2, 0) void trace_seq_vprintf(struct trace_seq *s, const char *fmt, va_list args); -extern void -trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary); +extern __printf(2, 0) +void trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary); extern int trace_print_seq(struct seq_file *m, struct trace_seq *s); extern int trace_seq_to_user(struct trace_seq *s, char __user *ubuf, int cnt);
@@ -104,8 +104,8 @@ static inline __printf(2, 3)void trace_seq_printf (struct trace_seq *s,const char *fmt, ...) { } -static inline void -trace_seq_bprintf (struct trace_seq *s,const char *fmt,const u32 *binary) +static inline __printf(2, 0) +void trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary) { }
kernel/trace/trace.c +3 -8
@@ -3487,10 +3487,9 @@ int trace_vbprintk(unsigned long ip, const char *fmt, va_list args) }EXPORT_SYMBOL_GPL (trace_vbprintk); -__printf(3, 0) -static int -__trace_array_vprintk (struct trace_buffer *buffer, -unsigned long ip,const char *fmt,va_list args) +static __printf(3, 0) +int __trace_array_vprintk(struct trace_buffer *buffer, + unsigned long ip, const char *fmt, va_list args) { struct trace_event_call *call = &event_print;struct ring_buffer_event *event;
@@ -3543,7 +3542,6 @@ __trace_array_vprintk(struct trace_buffer *buffer,return len; } -__printf(3, 0)int trace_array_vprintk (struct trace_array *tr,unsigned long ip,const char *fmt,va_list args) {
@@ -3573,7 +3571,6 @@ int trace_array_vprintk(struct trace_array *tr,* Note, trace_array_init_printk() must be called on @tr before this * can be used. */ -__printf(3, 0)int trace_array_printk (struct trace_array *tr,unsigned long ip,const char *fmt, ...) {
@@ -3618,7 +3615,6 @@ int trace_array_init_printk(struct trace_array *tr) }EXPORT_SYMBOL_GPL (trace_array_init_printk); -__printf(3, 4)int trace_array_printk_buf (struct trace_buffer *buffer,unsigned long ip,const char *fmt, ...) {
@@ -3634,7 +3630,6 @@ int trace_array_printk_buf(struct trace_buffer *buffer,return ret; } -__printf(2, 0)int trace_vprintk (unsigned long ip,const char *fmt,va_list args) {return trace_array_vprintk (&global_trace, ip, fmt, args);
kernel/trace/trace.h +9 -7
@@ -800,13 +800,15 @@ static inline void __init disable_tracing_selftest(const char *reason)extern void *head_page (struct trace_array_cpu *data);extern unsigned long long ns2usecs (u64 nsec); -extern int -trace_vbprintk (unsigned long ip,const char *fmt,va_list args); -extern int -trace_vprintk (unsigned long ip,const char *fmt,va_list args); -extern int -trace_array_vprintk (struct trace_array *tr, -unsigned long ip,const char *fmt,va_list args); + +__printf(2, 0) +int trace_vbprintk (unsigned long ip,const char *fmt,va_list args); +__printf(2, 0) +int trace_vprintk (unsigned long ip,const char *fmt,va_list args); +__printf(3, 0) +int trace_array_vprintk (struct trace_array *tr, +unsigned long ip,const char *fmt,va_list args); +__printf(3, 4)int trace_array_printk_buf (struct trace_buffer *buffer,unsigned long ip,const char *fmt, ...);void trace_printk_seq (struct trace_seq *s);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 45/444 ACPI: PNP: Add Intel OC Watchdog IDs to non-PNP device list
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Diogo Ivo <[email protected]>
[ Upstream commit f06777cf2bbc21dd8c71d6e3906934e56b4e18e4 ]
Intel Over-Clocking Watchdogs are described in ACPI tables by both the generic PNP0C02 _CID and their ACPI _HID. The presence of the _CID then causes the PNP scan handler to attach to the watchdog, preventing the actual watchdog driver from binding. Address this by adding the ACPI _HIDs to the list of non-PNP devices, so that the PNP scan handler is bypassed.
Note that these watchdogs can be described by multiple _HIDs for what seems to be identical hardware. This commit is not a complete list of all the possible watchdog ACPI _HIDs.
--- drivers/acpi/acpi_pnp.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/acpi/acpi_pnp.c +2 -0
@@ -355,8 +355,10 @@ static bool acpi_pnp_match(const char *idstr, const struct acpi_device_id **matc* device represented by it. */ static const struct acpi_device_id acpi_nonpnp_device_ids[] = { + {"INT3F0D" }, {"INTC1080" }, {"INTC1081" }, + {"INTC1099" }, {"" }, };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 46/444 mailbox: pcc: Use acpi_os_ioremap() instead of ioremap()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sudeep Holla <[email protected]>
[ Upstream commit d181acea5b864e91f38f5771b8961215ce5017ae ]
The Platform Communication Channel (PCC) mailbox driver currently uses ioremap() to map channel shared memory regions. However it is preferred to use acpi_os_ioremap(), which is mapping function specific to EFI/ACPI defined memory regions. It ensures that the correct memory attributes are applied when mapping ACPI-provided regions.
While at it, also add checks for handling any errors with the mapping.
--- drivers/mailbox/pcc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/mailbox/pcc.c +6 -2
@@ -419,8 +419,12 @@ int pcc_mbox_ioremap(struct mbox_chan *chan)return -1 ; pchan_info = chan->con_priv; pcc_mbox_chan = &pchan_info->chan; - pcc_mbox_chan->shmem =ioremap (pcc_mbox_chan->shmem_base_addr, - pcc_mbox_chan->shmem_size); + + pcc_mbox_chan->shmem =acpi_os_ioremap (pcc_mbox_chan->shmem_base_addr, + pcc_mbox_chan->shmem_size); +if (!pcc_mbox_chan->shmem) +return -ENXIO ; +return 0 ; }EXPORT_SYMBOL_GPL (pcc_mbox_ioremap);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 47/444 mailbox: use error ret code of of_parse_phandle_with_args()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tudor Ambarus <[email protected]>
[ Upstream commit 24fdd5074b205cfb0ef4cd0751a2d03031455929 ]
In case of error, of_parse_phandle_with_args() returns -EINVAL when the passed index is negative, or -ENOENT when the index is for an empty phandle. The mailbox core overwrote the error return code with a less precise -ENODEV. Use the error returned code from of_parse_phandle_with_args().
--- drivers/mailbox/mailbox.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/mailbox/mailbox.c +4 -3
@@ -415,11 +415,12 @@ struct mbox_chan *mbox_request_channel(struct mbox_client *cl, int index)mutex_lock (&con_mutex); -if (of_parse_phandle_with_args (dev->of_node,"mboxes" , -"#mbox-cells" , index, &spec)) { + ret =of_parse_phandle_with_args (dev->of_node,"mboxes" ,"#mbox-cells" , + index, &spec); +if (ret) {dev_dbg (dev,"%s: can't parse \"mboxes\" property\n" , __func__);mutex_unlock (&con_mutex); -return ERR_PTR (-ENODEV ); +return ERR_PTR (ret); } chan =ERR_PTR (-EPROBE_DEFER );
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 48/444 riscv: Allow NOMMU kernels to access all of RAM
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Samuel Holland <[email protected]>
[ Upstream commit 2c0391b29b27f315c1b4c29ffde66f50b29fab99 ]
NOMMU kernels currently cannot access memory below the kernel link address. Remove this restriction by setting PAGE_OFFSET to the actual start of RAM, as determined from the devicetree. The kernel link address must be a constant, so keep using CONFIG_PAGE_OFFSET for that purpose.
--- arch/riscv/include/asm/page.h | 12 ++++-------- arch/riscv/include/asm/pgtable.h | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-)
arch/riscv/include/asm/page.h +4 -8
@@ -26,12 +26,9 @@* When not using MMU this corresponds to the first free page in * physical memory (aligned on a page boundary). */ -#ifdef CONFIG_64BIT #ifdef CONFIG_MMU +#ifdef CONFIG_64BIT #define PAGE_OFFSET kernel_map.page_offset -#else -#define PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL) -#endif /* * By default, CONFIG_PAGE_OFFSET value corresponds to SV57 address space so * define the PAGE_OFFSET value for SV48 and SV39.
@@ -41,6 +38,9 @@#else #define PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)#endif /* CONFIG_64BIT */ +#else +#define PAGE_OFFSET ((unsigned long)phys_ram_base) +#endif /* CONFIG_MMU */ #ifndef __ASSEMBLY__
@@ -97,11 +97,7 @@ typedef struct page *pgtable_t;#define MIN_MEMBLOCK_ADDR 0#endif -#ifdef CONFIG_MMU #define ARCH_PFN_OFFSET (PFN_DOWN((unsigned long)phys_ram_base)) -#else -#define ARCH_PFN_OFFSET (PAGE_OFFSET >> PAGE_SHIFT) -#endif /* CONFIG_MMU */ struct kernel_mapping {unsigned long page_offset;
arch/riscv/include/asm/pgtable.h +1 -1
@@ -12,7 +12,7 @@#include <asm/pgtable-bits.h> #ifndef CONFIG_MMU -#define KERNEL_LINK_ADDR PAGE_OFFSET +#define KERNEL_LINK_ADDR _AC(CONFIG_PAGE_OFFSET, UL)#define KERN_VIRT_SIZE (UL(-1))#else
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 49/444 fbdev: fsl-diu-fb: add missing device_remove_file()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shixiong Ou <[email protected]>
[ Upstream commit 86d16cd12efa547ed43d16ba7a782c1251c80ea8 ]
Call device_remove_file() when driver remove.
--- drivers/video/fbdev/fsl-diu-fb.c | 1 + 1 file changed, 1 insertion(+)
drivers/video/fbdev/fsl-diu-fb.c +1 -0
@@ -1827,6 +1827,7 @@ static void fsl_diu_remove(struct platform_device *pdev)int i; data =dev_get_drvdata (&pdev->dev); +device_remove_file (&pdev->dev, &data->dev_attr);disable_lcdc (&data->fsl_diu_info[0 ]);free_irq (data->irq, data->diu_reg);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 50/444 fbcon: Use correct erase colour for clearing in fbcon
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zsolt Kajtar <[email protected]>
[ Upstream commit 892c788d73fe4a94337ed092cb998c49fa8ecaf4 ]
The erase colour calculation for fbcon clearing should use get_color instead of attr_col_ec, like everything else. The latter is similar but is not correct. For example it's missing the depth dependent remapping and doesn't care about blanking.
The problem can be reproduced by setting up the background colour to grey (vt.color=0x70) and having an fbcon console set to 2bpp (4 shades of gray). Now the background attribute should be 1 (dark gray) on the console.
If the screen is scrolled when pressing enter in a shell prompt at the bottom line then the new line is cleared using colour 7 instead of 1. That's not something fillrect likes (at 2bbp it expect 0-3) so the result is interesting.
This patch switches to get_color with vc_video_erase_char to determine the erase colour from attr_col_ec. That makes the latter function redundant as no other users were left.
Use correct erase colour for clearing in fbcon
--- drivers/video/fbdev/core/bitblit.c | 5 ++-- drivers/video/fbdev/core/fbcon.c | 10 +++++--- drivers/video/fbdev/core/fbcon.h | 38 +--------------------------- drivers/video/fbdev/core/fbcon_ccw.c | 5 ++-- drivers/video/fbdev/core/fbcon_cw.c | 5 ++-- drivers/video/fbdev/core/fbcon_ud.c | 5 ++-- drivers/video/fbdev/core/tileblit.c | 8 +++--- 7 files changed, 18 insertions(+), 58 deletions(-)
drivers/video/fbdev/core/bitblit.c +2 -3
@@ -59,12 +59,11 @@ static void bit_bmove(struct vc_data *vc, struct fb_info *info, int sy, }static void bit_clear (struct vc_data *vc,struct fb_info *info,int sy, -int sx,int height,int width) +int sx,int height,int width,int fg,int bg) { -int bgshift = (vc->vc_hi_font_mask) ?13 :12 ;struct fb_fillrect region; - region.color =attr_bgcol_ec (bgshift, vc, info); + region.color = bg; region.dx = sx * vc->vc_font.width; region.dy = sy * vc->vc_font.height; region.width = width * vc->vc_font.width;
drivers/video/fbdev/core/fbcon.c +6 -4
@@ -1240,7 +1240,7 @@ static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height, {struct fb_info *info =fbcon_info_from_console (vc->vc_num);struct fbcon_ops *ops = info->fbcon_par; - +int fg, bg;struct fbcon_display *p = &fb_display[vc->vc_num];u_int y_break;
@@ -1261,16 +1261,18 @@ static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height,fbcon_clear_margins (vc,0 ); } + fg =get_color (vc, info, vc->vc_video_erase_char,1 ); + bg =get_color (vc, info, vc->vc_video_erase_char,0 );/* Split blits that cross physical y_wrap boundary */ y_break = p->vrows - p->yscroll;if (sy < y_break && sy + height -1 >= y_break) {u_int b = y_break - sy; - ops->clear (vc, info,real_y (p, sy), sx, b, width); + ops->clear (vc, info,real_y (p, sy), sx, b, width, fg, bg); ops->clear (vc, info,real_y (p, sy + b), sx, height - b, - width); + width, fg, bg); }else - ops->clear (vc, info,real_y (p, sy), sx, height, width); + ops->clear (vc, info,real_y (p, sy), sx, height, width, fg, bg); } static void fbcon_putcs(struct vc_data *vc, const unsigned short *s,
drivers/video/fbdev/core/fbcon.h +1 -37
@@ -55,7 +55,7 @@ struct fbcon_ops {void (*bmove)(struct vc_data *vc,struct fb_info *info,int sy,int sx,int dy,int dx,int height,int width);void (*clear)(struct vc_data *vc,struct fb_info *info,int sy, -int sx,int height,int width); +int sx,int height,int width,int fb,int bg);void (*putcs)(struct vc_data *vc,struct fb_info *info,const unsigned short *s,int count,int yy,int xx,int fg,int bg);
@@ -116,42 +116,6 @@ static inline int mono_col(const struct fb_info *info)return (~(0xfff << max_len)) &0xff ; } -static inline int attr_col_ec (int shift,struct vc_data *vc, -struct fb_info *info,int is_fg) -{ -int is_mono01; -int col; -int fg; -int bg; - -if (!vc) -return 0 ; - -if (vc->vc_can_do_color) -return is_fg ?attr_fgcol (shift,vc->vc_video_erase_char) - :attr_bgcol (shift,vc->vc_video_erase_char); - -if (!info) -return 0 ; - - col =mono_col (info); - is_mono01 = info->fix.visual ==FB_VISUAL_MONO01 ; - -if (attr_reverse (vc->vc_video_erase_char)) { - fg = is_mono01 ? col :0 ; - bg = is_mono01 ?0 : col; - } -else { - fg = is_mono01 ?0 : col; - bg = is_mono01 ? col :0 ; - } - -return is_fg ? fg : bg; -} - -#define attr_bgcol_ec (bgshift, vc, info) attr_col_ec(bgshift, vc, info, 0) -#define attr_fgcol_ec (fgshift, vc, info) attr_col_ec(fgshift, vc, info, 1) -/* * Scroll Method */
drivers/video/fbdev/core/fbcon_ccw.c +2 -3
@@ -78,14 +78,13 @@ static void ccw_bmove(struct vc_data *vc, struct fb_info *info, int sy, }static void ccw_clear (struct vc_data *vc,struct fb_info *info,int sy, -int sx,int height,int width) +int sx,int height,int width,int fg,int bg) {struct fbcon_ops *ops = info->fbcon_par;struct fb_fillrect region; -int bgshift = (vc->vc_hi_font_mask) ?13 :12 ;u32 vyres =GETVYRES (ops->p, info); - region.color =attr_bgcol_ec (bgshift,vc,info); + region.color = bg; region.dx = sy * vc->vc_font.height; region.dy = vyres - ((sx + width) * vc->vc_font.width); region.height = width * vc->vc_font.width;
drivers/video/fbdev/core/fbcon_cw.c +2 -3
@@ -63,14 +63,13 @@ static void cw_bmove(struct vc_data *vc, struct fb_info *info, int sy, }static void cw_clear (struct vc_data *vc,struct fb_info *info,int sy, -int sx,int height,int width) +int sx,int height,int width,int fg,int bg) {struct fbcon_ops *ops = info->fbcon_par;struct fb_fillrect region; -int bgshift = (vc->vc_hi_font_mask) ?13 :12 ;u32 vxres =GETVXRES (ops->p, info); - region.color =attr_bgcol_ec (bgshift,vc,info); + region.color = bg; region.dx = vxres - ((sy + height) * vc->vc_font.height); region.dy = sx * vc->vc_font.width; region.height = width * vc->vc_font.width;
drivers/video/fbdev/core/fbcon_ud.c +2 -3
@@ -64,15 +64,14 @@ static void ud_bmove(struct vc_data *vc, struct fb_info *info, int sy, }static void ud_clear (struct vc_data *vc,struct fb_info *info,int sy, -int sx,int height,int width) +int sx,int height,int width,int fg,int bg) {struct fbcon_ops *ops = info->fbcon_par;struct fb_fillrect region; -int bgshift = (vc->vc_hi_font_mask) ?13 :12 ;u32 vyres =GETVYRES (ops->p, info);u32 vxres =GETVXRES (ops->p, info); - region.color =attr_bgcol_ec (bgshift,vc,info); + region.color = bg; region.dy = vyres - ((sy + height) * vc->vc_font.height); region.dx = vxres - ((sx + width) * vc->vc_font.width); region.width = width * vc->vc_font.width;
drivers/video/fbdev/core/tileblit.c +3 -5
@@ -32,16 +32,14 @@ static void tile_bmove(struct vc_data *vc, struct fb_info *info, int sy, }static void tile_clear (struct vc_data *vc,struct fb_info *info,int sy, -int sx,int height,int width) +int sx,int height,int width,int fg,int bg) {struct fb_tilerect rect; -int bgshift = (vc->vc_hi_font_mask) ?13 :12 ; -int fgshift = (vc->vc_hi_font_mask) ?9 :8 ; rect.index = vc->vc_video_erase_char & ((vc->vc_hi_font_mask) ?0x1ff :0xff ); - rect.fg =attr_fgcol_ec (fgshift, vc, info); - rect.bg =attr_bgcol_ec (bgshift, vc, info); + rect.fg = fg; + rect.bg = bg; rect.sx = sx; rect.sy = sy; rect.width = width;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 51/444 fbdev: core: tileblit: Implement missing margin clearing for tileblit
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zsolt Kajtar <[email protected]>
[ Upstream commit 76d3ca89981354e1f85a3e0ad9ac4217d351cc72 ]
I was wondering why there's garbage at the bottom of the screen when tile blitting is used with an odd mode like 1080, 600 or 200. Sure there's only space for half a tile but the same area is clean when the buffer is bitmap.
Then later I found that it's supposed to be cleaned but that's not implemented. So I took what's in bitblit and adapted it for tileblit.
This implementation was tested for both the horizontal and vertical case, and now does the same as what's done for bitmap buffers.
If anyone is interested to reproduce the problem then I could bet that'd be on a S3 or Ark. Just set up a mode with an odd line count and make sure that the virtual size covers the complete tile at the bottom. E.g. for 600 lines that's 608 virtual lines for a 16 tall tile. Then the bottom area should be cleaned.
For the right side it's more difficult as there the drivers won't let an odd size happen, unless the code is modified. But once it reports back a few pixel columns short then fbcon won't use the last column. With the patch that column is now clean.
Btw. the virtual size should be rounded up by the driver for both axes (not only the horizontal) so that it's dividable by the tile size. That's a driver bug but correcting it is not in scope for this patch.
Implement missing margin clearing for tileblit
--- drivers/video/fbdev/core/tileblit.c | 37 ++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-)
drivers/video/fbdev/core/tileblit.c +36 -1
@@ -74,7 +74,42 @@ static void tile_putcs(struct vc_data *vc, struct fb_info *info,static void tile_clear_margins (struct vc_data *vc,struct fb_info *info,int color,int bottom_only) { -return ; +unsigned int cw = vc->vc_font.width; +unsigned int ch = vc->vc_font.height; +unsigned int rw = info->var.xres - (vc->vc_cols*cw); +unsigned int bh = info->var.yres - (vc->vc_rows*ch); +unsigned int rs = info->var.xres - rw; +unsigned int bs = info->var.yres - bh; +unsigned int vwt = info->var.xres_virtual / cw; +unsigned int vht = info->var.yres_virtual / ch; +struct fb_tilerect rect; + + rect.index = vc->vc_video_erase_char & + ((vc->vc_hi_font_mask) ?0x1ff :0xff ); + rect.fg = color; + rect.bg = color; + +if ((int ) rw >0 && !bottom_only) { + rect.sx = (info->var.xoffset + rs + cw -1 ) / cw; + rect.sy =0 ; + rect.width = (rw + cw -1 ) / cw; + rect.height = vht; +if (rect.width + rect.sx > vwt) + rect.width = vwt - rect.sx; +if (rect.sx < vwt) + info->tileops->fb_tilefill (info, &rect); + } + +if ((int ) bh >0 ) { + rect.sx = info->var.xoffset / cw; + rect.sy = (info->var.yoffset + bs) / ch; + rect.width = rs / cw; + rect.height = (bh + ch -1 ) / ch; +if (rect.height + rect.sy > vht) + rect.height = vht - rect.sy; +if (rect.sy < vht) + info->tileops->fb_tilefill (info, &rect); + } } static void tile_cursor(struct vc_data *vc, struct fb_info *info, int mode,
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 52/444 cifs: add validation check for the fields in smb_aces
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Namjae Jeon <[email protected]>
[ Upstream commit eeb827f2922eb07ffbf7d53569cc95b38272646f ]
cifs.ko is missing validation check when accessing smb_aces. This patch add validation check for the fields in smb_aces.
--- fs/smb/client/cifsacl.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)
fs/smb/client/cifsacl.c +16 -1
@@ -811,7 +811,23 @@ static void parse_dacl(struct smb_acl *pdacl, char *end_of_acl,return ;for (i =0 ; i < num_aces; ++i) { +if (end_of_acl - acl_base < acl_size) +break ; + ppace[i] = (struct smb_ace *) (acl_base + acl_size); + acl_base = (char *)ppace[i]; + acl_size = offsetof(struct smb_ace , sid) + + offsetof(struct smb_sid , sub_auth); + +if (end_of_acl - acl_base < acl_size || + ppace[i]->sid.num_subauth ==0 || + ppace[i]->sid.num_subauth >SID_MAX_SUB_AUTHORITIES || + (end_of_acl - acl_base < + acl_size +sizeof (__le32) * ppace[i]->sid.num_subauth) || + (le16_to_cpu (ppace[i]->size) < + acl_size +sizeof (__le32) * ppace[i]->sid.num_subauth)) +break ; +#ifdef CONFIG_CIFS_DEBUG2 dump_ace (ppace[i], end_of_acl);#endif
@@ -855,7 +871,6 @@ static void parse_dacl(struct smb_acl *pdacl, char *end_of_acl,(void *)ppace[i], sizeof(struct smb_ace)); */ - acl_base = (char *)ppace[i]; acl_size =le16_to_cpu (ppace[i]->size); }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 53/444 cifs: Fix establishing NetBIOS session for SMB2+ connection
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pali Rohár <[email protected]>
[ Upstream commit 781802aa5a5950f99899f13ff9d760f5db81d36d ]
Function ip_rfc1001_connect() which establish NetBIOS session for SMB connections, currently uses smb_send() function for sending NetBIOS Session Request packet. This function expects that the passed buffer is SMB packet and for SMB2+ connections it mangles packet header, which breaks prepared NetBIOS Session Request packet. Result is that this function send garbage packet for SMB2+ connection, which SMB2+ server cannot parse. That function is not mangling packets for SMB1 connections, so it somehow works for SMB1.
Fix this problem and instead of smb_send(), use smb_send_kvec() function which does not mangle prepared packet, this function send them as is. Just API of this function takes struct msghdr (kvec) instead of packet buffer.
[MS-SMB2] specification allows SMB2 protocol to use NetBIOS as a transport protocol. NetBIOS can be used over TCP via port 139. So this is a valid configuration, just not so common. And even recent Windows versions (e.g. Windows Server 2022) still supports this configuration: SMB over TCP port 139, including for modern SMB2 and SMB3 dialects.
This change fixes SMB2 and SMB3 connections over TCP port 139 which requires establishing of NetBIOS session. Tested that this change fixes establishing of SMB2 and SMB3 connections with Windows Server 2022.
--- fs/smb/client/cifsproto.h | 3 +++ fs/smb/client/connect.c | 20 +++++++++++++++----- fs/smb/client/transport.c | 2 +- 3 files changed, 19 insertions(+), 6 deletions(-)
fs/smb/client/cifsproto.h +3 -0
@@ -31,6 +31,9 @@ extern void cifs_small_buf_release(void *);extern void free_rsp_buf (int ,void *);extern int smb_send (struct TCP_Server_Info *,struct smb_hdr *,unsigned int /* length */ ); +extern int smb_send_kvec (struct TCP_Server_Info *server, +struct msghdr *msg, +size_t *sent);extern unsigned int _get_xid (void );extern void _free_xid (unsigned int );#define get_xid () \
fs/smb/client/connect.c +15 -5
@@ -3051,8 +3051,10 @@ ip_rfc1001_connect(struct TCP_Server_Info *server)* sessinit is sent but no second negprot */ struct rfc1002_session_packet req = {}; -struct smb_hdr *smb_buf = (struct smb_hdr *)&req; +struct msghdr msg = {}; +struct kvec iov = {};unsigned int len; +size_t sent; req.trailer.session_req.called_len =sizeof (req.trailer.session_req.called_name);
@@ -3081,10 +3083,18 @@ ip_rfc1001_connect(struct TCP_Server_Info *server)* As per rfc1002, @len must be the number of bytes that follows the * length field of a rfc1002 session request payload. */ - len = sizeof(req) - offsetof(struct rfc1002_session_packet, trailer.session_req); + len =sizeof (req.trailer.session_req); + req.type =RFC1002_SESSION_REQUEST ; + req.flags =0 ; + req.length =cpu_to_be16 (len); + len += offsetof(typeof(req), trailer.session_req); + iov.iov_base = &req; + iov.iov_len = len; +iov_iter_kvec (&msg.msg_iter,ITER_SOURCE , &iov,1 , len); + rc =smb_send_kvec (server, &msg, &sent); +if (rc <0 || len != sent) +return (rc == -EINTR || rc == -EAGAIN ) ? rc : -ECONNABORTED ; - smb_buf->smb_buf_length =cpu_to_be32 ((RFC1002_SESSION_REQUEST <<24 ) | len); - rc =smb_send (server, smb_buf, len);/* * RFC1001 layer in at least one server requires very short break before * negprot presumably because not expecting negprot to follow so fast.
@@ -3093,7 +3103,7 @@ ip_rfc1001_connect(struct TCP_Server_Info *server)*/ usleep_range (1000 ,2000 ); -return rc; +return 0 ; } static int
fs/smb/client/transport.c +1 -1
@@ -178,7 +178,7 @@ delete_mid(struct mid_q_entry *mid)* Our basic "send data to server" function. Should be called with srv_mutex * held. The caller is responsible for handling the results. */ -static int +int smb_send_kvec (struct TCP_Server_Info *server,struct msghdr *smb_msg,size_t *sent) {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 54/444 NFSv4: Treat ENETUNREACH errors as fatal for state recovery
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Trond Myklebust <[email protected]>
[ Upstream commit 0af5fb5ed3d2fd9e110c6112271f022b744a849a ]
If a containerised process is killed and causes an ENETUNREACH or ENETDOWN error to be propagated to the state manager, then mark the nfs_client as being dead so that we don't loop in functions that are expecting recovery to succeed.
--- fs/nfs/nfs4state.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
fs/nfs/nfs4state.c +9 -1
@@ -2741,7 +2741,15 @@ static void nfs4_state_manager(struct nfs_client *clp)pr_warn_ratelimited ("NFS: state manager%s%s failed on NFSv4 server %s" " with error %d\n" , section_sep, section, clp->cl_hostname, -status); -ssleep (1 ); +switch (status) { +case -ENETDOWN : +case -ENETUNREACH : +nfs_mark_client_ready (clp, -EIO ); +break ; +default : +ssleep (1 ); +break ; + } out_drain:memalloc_nofs_restore (memflags);nfs4_end_drain_session (clp);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 55/444 SUNRPC: rpc_clnt_set_transport() must not change the autobind setting
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Trond Myklebust <[email protected]>
[ Upstream commit bf9be373b830a3e48117da5d89bb6145a575f880 ]
The autobind setting was supposed to be determined in rpc_create(), since commit c2866763b402 ("SUNRPC: use sockaddr + size when creating remote transport endpoints").
--- net/sunrpc/clnt.c | 3 --- 1 file changed, 3 deletions(-)
net/sunrpc/clnt.c +0 -3
@@ -275,9 +275,6 @@ static struct rpc_xprt *rpc_clnt_set_transport(struct rpc_clnt *clnt, old =rcu_dereference_protected (clnt->cl_xprt,lockdep_is_held (&clnt->cl_lock)); -if (!xprt_bound (xprt)) - clnt->cl_autobind =1 ; - clnt->cl_timeout = timeout;rcu_assign_pointer (clnt->cl_xprt, xprt);spin_unlock (&clnt->cl_lock);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 56/444 SUNRPC: rpcbind should never reset the port to the value 0
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Trond Myklebust <[email protected]>
[ Upstream commit 214c13e380ad7636631279f426387f9c4e3c14d9 ]
If we already had a valid port number for the RPC service, then we should not allow the rpcbind client to set it to the invalid value '0'.
--- net/sunrpc/rpcb_clnt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
net/sunrpc/rpcb_clnt.c +3 -2
@@ -820,9 +820,10 @@ static void rpcb_getport_done(struct rpc_task *child, void *data) }trace_rpcb_setport (child, map->r_status, map->r_port); - xprt->ops->set_port (xprt, map->r_port); -if (map->r_port) +if (map->r_port) { + xprt->ops->set_port (xprt, map->r_port);xprt_set_bound (xprt); + } }/*
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 57/444 spi-rockchip: Fix register out of bounds access
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luis de Arquer <[email protected]>
[ Upstream commit 7a874e8b54ea21094f7fd2d428b164394c6cb316 ]
Do not write native chip select stuff for GPIO chip selects. GPIOs can be numbered much higher than native CS. Also, it makes no sense.
--- drivers/spi/spi-rockchip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-rockchip.c +1 -1
@@ -542,7 +542,7 @@ static int rockchip_spi_config(struct rockchip_spi *rs, cr0 |= (spi->mode &0x3U ) <<CR0_SCPH_OFFSET ;if (spi->mode &SPI_LSB_FIRST ) cr0 |=CR0_FBM_LSB <<CR0_FBM_OFFSET ; -if (spi->mode &SPI_CS_HIGH ) +if ((spi->mode &SPI_CS_HIGH ) && !(spi_get_csgpiod (spi,0 ))) cr0 |=BIT (spi_get_chipselect (spi,0 )) <<CR0_SOI_OFFSET ;if (xfer->rx_buf && xfer->tx_buf)
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 58/444 thermal/drivers/qoriq: Power down TMU on system suspend
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alice Guo <[email protected]>
[ Upstream commit 229f3feb4b0442835b27d519679168bea2de96c2 ]
Enable power-down of TMU (Thermal Management Unit) for TMU version 2 during system suspend to save power. Save approximately 4.3mW on VDD_ANA_1P8 on i.MX93 platforms.
--- drivers/thermal/qoriq_thermal.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
drivers/thermal/qoriq_thermal.c +13 -0
@@ -18,6 +18,7 @@#define SITES_MAX 16#define TMR_DISABLE 0x0#define TMR_ME 0x80000000 +#define TMR_CMD BIT(29)#define TMR_ALPF 0x0c000000#define TMR_ALPF_V2 0x03000000#define TMTMIR_DEFAULT 0x0000000f
@@ -356,6 +357,12 @@ static int __maybe_unused qoriq_tmu_suspend(struct device *dev)if (ret)return ret; +if (data->ver >TMU_VER1 ) { + ret =regmap_set_bits (data->regmap,REGS_TMR ,TMR_CMD ); +if (ret) +return ret; + } +clk_disable_unprepare (data->clk);return 0 ;
@@ -370,6 +377,12 @@ static int __maybe_unused qoriq_tmu_resume(struct device *dev)if (ret)return ret; +if (data->ver >TMU_VER1 ) { + ret =regmap_clear_bits (data->regmap,REGS_TMR ,TMR_CMD ); +if (ret) +return ret; + } +/* Enable monitoring */ return regmap_update_bits (data->regmap,REGS_TMR ,TMR_ME ,TMR_ME ); }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 59/444 dql: Fix dql->limit value when reset.
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jing Su <[email protected]>
[ Upstream commit 3a17f23f7c36bac3a3584aaf97d3e3e0b2790396 ]
Executing dql_reset after setting a non-zero value for limit_min can lead to an unreasonable situation where dql->limit is less than dql->limit_min.
For instance, after setting /sys/class/net/eth*/queues/tx-0/byte_queue_limits/limit_min, an ifconfig down/up operation might cause the ethernet driver to call netdev_tx_reset_queue, which in turn invokes dql_reset.
In this case, dql->limit is reset to 0 while dql->limit_min remains non-zero value, which is unexpected. The limit should always be greater than or equal to limit_min.
--- lib/dynamic_queue_limits.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/dynamic_queue_limits.c +1 -1
@@ -116,7 +116,7 @@ EXPORT_SYMBOL(dql_completed);void dql_reset (struct dql *dql) {/* Reset all dynamic values */ - dql->limit =0 ; + dql->limit = dql->min_limit; dql->num_queued =0 ; dql->num_completed =0 ; dql->last_obj_cnt =0 ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 60/444 lockdep: Fix wait context check on softirq for PREEMPT_RT
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ryo Takakura <[email protected]>
[ Upstream commit 61c39d8c83e2077f33e0a2c8980a76a7f323f0ce ]
Since:
0c1d7a2c2d32 ("lockdep: Remove softirq accounting on PREEMPT_RT.")
the wait context test for mutex usage within "in softirq context" fails as it references @softirq_context:
| wait context tests |
--------------------------------------------------------------------------
| rcu | raw | spin |mutex |
--------------------------------------------------------------------------
in hardirq context: ok | ok | ok | ok |
in hardirq context (not threaded): ok | ok | ok | ok |
in softirq context: ok | ok | ok |FAILED|As a fix, add lockdep map for BH disabled section. This fixes the issue by letting us catch cases when local_bh_disable() gets called with preemption disabled where local_lock doesn't get acquired. In the case of "in softirq context" selftest, local_bh_disable() was being called with preemption disable as it's early in the boot.
[ boqun: Move the lockdep annotations into __local_bh_*() to avoid false
positives because of unpaired local_bh_disable() reported by Borislav Petkov and Peter Zijlstra, and make bh_lock_map only exist for PREEMPT_RT. ]
[ mingo: Restored authorship and improved the bh_lock_map definition. ]
--- kernel/softirq.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
kernel/softirq.c +18 -0
@@ -125,6 +125,18 @@ static DEFINE_PER_CPU(struct softirq_ctrl, softirq_ctrl) = { .lock = INIT_LOCAL_LOCK(softirq_ctrl.lock), }; +#ifdef CONFIG_DEBUG_LOCK_ALLOC +static struct lock_class_key bh_lock_key; +struct lockdep_map bh_lock_map = { + .name ="local_bh" , + .key = &bh_lock_key, + .wait_type_outer =LD_WAIT_FREE , + .wait_type_inner =LD_WAIT_CONFIG ,/* PREEMPT_RT makes BH preemptible. */ + .lock_type =LD_LOCK_PERCPU , +}; +EXPORT_SYMBOL_GPL (bh_lock_map); +#endif +/** * local_bh_blocked() - Check for idle whether BH processing is blocked *
@@ -147,6 +159,8 @@ void __local_bh_disable_ip(unsigned long ip, unsigned int cnt)WARN_ON_ONCE (in_hardirq ()); +lock_map_acquire_read (&bh_lock_map); +/* First entry of a task into a BH disabled section? */ if (!current->softirq_disable_cnt) {if (preemptible ()) {
@@ -210,6 +224,8 @@ void __local_bh_enable_ip(unsigned long ip, unsigned int cnt)WARN_ON_ONCE (in_hardirq ());lockdep_assert_irqs_enabled (); +lock_map_release (&bh_lock_map); +local_irq_save (flags); curcnt =__this_cpu_read (softirq_ctrl.cnt);
@@ -260,6 +276,8 @@ static inline void ksoftirqd_run_begin(void)/* Counterpart to ksoftirqd_run_begin() */ static inline void ksoftirqd_run_end (void ) { +/* pairs with the lock_map_acquire_read() in ksoftirqd_run_begin() */ +lock_map_release (&bh_lock_map);__local_bh_enable (SOFTIRQ_OFFSET , true);WARN_ON_ONCE (in_interrupt ());local_irq_enable ();
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 61/444 objtool: Properly disable uaccess validation
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josh Poimboeuf <[email protected]>
[ Upstream commit e1a9dda74dbffbc3fa2069ff418a1876dc99fb14 ]
If opts.uaccess isn't set, the uaccess validation is disabled, but only
partially: it doesn't read the uaccess_safe_builtin list but still tries to do the validation. Disable it completely to prevent false warnings.
--- tools/objtool/check.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
tools/objtool/check.c +9 -2
@@ -3287,7 +3287,7 @@ static int handle_insn_ops(struct instruction *insn,if (update_cfi_state (insn, next_insn, &state->cfi, op))return 1 ; -if (!insn->alt_group) +if (!opts.uaccess || !insn->alt_group)continue ;if (op->dest.type ==OP_DEST_PUSHF ) {
@@ -3754,6 +3754,9 @@ static int validate_branch(struct objtool_file *file, struct symbol *func,return 0 ;case INSN_STAC : +if (!opts.uaccess) +break ; +if (state.uaccess) {WARN_INSN (insn,"recursive UACCESS enable" );return 1 ;
@@ -3763,6 +3766,9 @@ static int validate_branch(struct objtool_file *file, struct symbol *func,break ;case INSN_CLAC : +if (!opts.uaccess) +break ; +if (!state.uaccess && func) {WARN_INSN (insn,"redundant UACCESS disable" );return 1 ;
@@ -4238,7 +4244,8 @@ static int validate_symbol(struct objtool_file *file, struct section *sec,if (!insn || insn->ignore || insn->visited)return 0 ; - state->uaccess = sym->uaccess_safe; +if (opts.uaccess) + state->uaccess = sym->uaccess_safe; ret =validate_branch (file,insn_func (insn), insn, *state);if (ret)
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 62/444 PCI: dwc: ep: Ensure proper iteration over outbound map windows
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Frank Li <[email protected]>
[ Upstream commit f3e1dccba0a0833fc9a05fb838ebeb6ea4ca0e1a ]
Most systems' PCIe outbound map windows have non-zero physical addresses, but the possibility of encountering zero increased after following commit ("PCI: dwc: Use parent_bus_offset").
'ep->outbound_addr[n]', representing 'parent_bus_address', might be 0 on some hardware, which trims high address bits through bus fabric before sending to the PCIe controller.
Replace the iteration logic with 'for_each_set_bit()' to ensure only allocated map windows are iterated when determining the ATU index from a given address.
--- drivers/pci/controller/dwc/pcie-designware-ep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/controller/dwc/pcie-designware-ep.c +1 -1
@@ -281,7 +281,7 @@ static int dw_pcie_find_index(struct dw_pcie_ep *ep, phys_addr_t addr,u32 index;struct dw_pcie *pci =to_dw_pcie_from_ep (ep); -for (index =0 ; index < pci->num_ob_windows; index++) { +for_each_set_bit (index, ep->ob_window_map, pci->num_ob_windows) {if (ep->outbound_addr[index] != addr)continue ; *atu_index = index;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 63/444 tools/build: Dont pass test log files to linker
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <[email protected]>
[ Upstream commit 935e7cb5bb80106ff4f2fe39640f430134ef8cd8 ]
Separate test log files from object files. Depend on test log output but don't pass to the linker.
--- tools/build/Makefile.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
tools/build/Makefile.build +5 -1
@@ -141,6 +141,10 @@ objprefix := $(subst ./,,$(OUTPUT)$(dir)/) obj-y := $(addprefix $(objprefix),$(obj-y)) subdir-obj-y := $(addprefix $(objprefix),$(subdir-obj-y)) +# Separate out test log files from real build objects. +test-y := $(filter %_log, $(obj-y)) +obj-y := $(filter-out %_log, $(obj-y)) + # Final '$(obj)-in.o' object in-target := $(objprefix)$(obj)-in.o
@@ -151,7 +155,7 @@ $(subdir-y): $(sort $(subdir-obj-y)): $(subdir-y) ; -$(in-target): $(obj-y) FORCE +$(in-target): $(obj-y) $(test-y) FORCE $(call rule_mkdir) $(call if_changed,$(host)ld_multi)
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 64/444 pNFS/flexfiles: Report ENETDOWN as a connection error
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Trond Myklebust <[email protected]>
[ Upstream commit aa42add73ce9b9e3714723d385c254b75814e335 ]
If the client should see an ENETDOWN when trying to connect to the data server, it might still be able to talk to the metadata server through another NIC. If so, report the error.
--- fs/nfs/flexfilelayout/flexfilelayout.c | 1 + 1 file changed, 1 insertion(+)
fs/nfs/flexfilelayout/flexfilelayout.c +1 -0
@@ -1255,6 +1255,7 @@ static void ff_layout_io_track_ds_error(struct pnfs_layout_segment *lseg,case -ECONNRESET :case -EHOSTDOWN :case -EHOSTUNREACH : +case -ENETDOWN :case -ENETUNREACH :case -EADDRINUSE :case -ENOBUFS :
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 65/444 PCI: vmd: Disable MSI remapping bypass under Xen
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Roger Pau Monne <[email protected]>
[ Upstream commit 6c4d5aadf5df31ea0ac025980670eee9beaf466b ]
MSI remapping bypass (directly configuring MSI entries for devices on the VMD bus) won't work under Xen, as Xen is not aware of devices in such bus, and hence cannot configure the entries using the pIRQ interface in the PV case, and in the PVH case traps won't be setup for MSI entries for such devices.
Until Xen is aware of devices in the VMD bus prevent the VMD_FEAT_CAN_BYPASS_MSI_REMAP capability from being used when running as any kind of Xen guest.
The MSI remapping bypass is an optional feature of VMD bridges, and hence when running under Xen it will be masked and devices will be forced to redirect its interrupts from the VMD bridge. That mode of operation must always be supported by VMD bridges and works when Xen is not aware of devices behind the VMD bridge.
Message-ID: <[email protected]>
--- drivers/pci/controller/vmd.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
drivers/pci/controller/vmd.c +20 -0
@@ -17,6 +17,8 @@#include <linux/rculist.h> #include <linux/rcupdate.h> +#include <xen/xen.h> +#include <asm/irqdomain.h> #define VMD_CFGBAR 0
@@ -981,6 +983,24 @@ static int vmd_probe(struct pci_dev *dev, const struct pci_device_id *id)struct vmd_dev *vmd;int err; +if (xen_domain ()) { +/* +* Xen doesn't have knowledge about devices in the VMD bus +* because the config space of devices behind the VMD bridge is +* not known to Xen, and hence Xen cannot discover or configure +* them in any way. +* +* Bypass of MSI remapping won't work in that case as direct +* write by Linux to the MSI entries won't result in functional +* interrupts, as Xen is the entity that manages the host +* interrupt controller and must configure interrupts. However +* multiplexing of interrupts by the VMD bridge will work under +* Xen, so force the usage of that mode which must always be +* supported by VMD bridges. +*/ + features &= ~VMD_FEAT_CAN_BYPASS_MSI_REMAP ; + } +if (resource_size (&dev->resource[VMD_CFGBAR ]) < (1 <<20 ))return -ENOMEM ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 66/444 ext4: on a remount, only log the ro or r/w state when it has changed
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nicolas Bretz <[email protected]>
[ Upstream commit d7b0befd09320e3356a75cb96541c030515e7f5f ]
A user complained that a message such as:
EXT4-fs (nvme0n1p3): re-mounted UUID ro. Quota mode: none.
implied that the file system was previously mounted read/write and was now remounted read-only, when it could have been some other mount state that had changed by the "mount -o remount" operation. Fix this by only logging "ro"or "r/w" when it has changed.
https://bugzilla.kernel.org/show_bug.cgi?id=219132
--- fs/ext4/super.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
fs/ext4/super.c +4 -3
@@ -6771,6 +6771,7 @@ static int ext4_reconfigure(struct fs_context *fc) {struct super_block *sb = fc->root->d_sb;int ret; +bool old_ro =sb_rdonly (sb); fc->s_fs_info =EXT4_SB (sb);
@@ -6782,9 +6783,9 @@ static int ext4_reconfigure(struct fs_context *fc)if (ret <0 )return ret; -ext4_msg (sb,KERN_INFO ,"re-mounted %pU %s. Quota mode: %s." , - &sb->s_uuid,sb_rdonly (sb) ?"ro" :"r/w" , -ext4_quota_mode (sb)); +ext4_msg (sb,KERN_INFO ,"re-mounted %pU%s." , + &sb->s_uuid, + (old_ro !=sb_rdonly (sb)) ? (sb_rdonly (sb) ?" ro" :" r/w" ) :"" );return 0 ; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 67/444 libnvdimm/labels: Fix divide error in nd_label_data_init()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Robert Richter <[email protected]>
[ Upstream commit ef1d3455bbc1922f94a91ed58d3d7db440652959 ]
If a faulty CXL memory device returns a broken zero LSA size in its memory device information (Identify Memory Device (Opcode 4000h), CXL spec. 3.1, 8.2.9.9.1.1), a divide error occurs in the libnvdimm driver:
Oops: divide error: 0000 [#1] PREEMPT SMP NOPTI RIP: 0010:nd_label_data_init+0x10e/0x800 [libnvdimm]
Code and flow:
1) CXL Command 4000h returns LSA size = 0
2) config_size is assigned to zero LSA size (CXL pmem driver):
drivers/cxl/pmem.c: .config_size = mds->lsa_size,
3) max_xfer is set to zero (nvdimm driver):
drivers/nvdimm/label.c: max_xfer = min_t(size_t, ndd->nsarea.max_xfer, config_size);
4) A subsequent DIV_ROUND_UP() causes a division by zero:
drivers/nvdimm/label.c: /* Make our initial read size a multiple of max_xfer size */ drivers/nvdimm/label.c: read_size = min(DIV_ROUND_UP(read_size, max_xfer) * max_xfer,drivers/nvdimm/label.c- config_size);
Fix this by checking the config size parameter by extending an existing check.
--- drivers/nvdimm/label.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/nvdimm/label.c +2 -1
@@ -442,7 +442,8 @@ int nd_label_data_init(struct nvdimm_drvdata *ndd)if (ndd->data)return 0 ; -if (ndd->nsarea.status || ndd->nsarea.max_xfer ==0 ) { +if (ndd->nsarea.status || ndd->nsarea.max_xfer ==0 || + ndd->nsarea.config_size ==0 ) {dev_dbg (ndd->dev,"failed to init config data area: (%u:%u)\n" , ndd->nsarea.max_xfer, ndd->nsarea.config_size);return -ENXIO ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 68/444 mmc: host: Wait for Vdd to settle on card power off
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Erick Shepherd <[email protected]>
[ Upstream commit 31e75ed964582257f59156ce6a42860e1ae4cc39 ]
The SD spec version 6.0 section 6.4.1.5 requires that Vdd must be lowered to less than 0.5V for a minimum of 1 ms when powering off a card. Increase wait to 15 ms so that voltage has time to drain down to 0.5V and cards can power off correctly. Issues with voltage drain time were only observed on Apollo Lake and Bay Trail host controllers so this fix is limited to those devices.
--- drivers/mmc/host/sdhci-pci-core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/mmc/host/sdhci-pci-core.c +5 -1
@@ -608,8 +608,12 @@ static void sdhci_intel_set_power(struct sdhci_host *host, unsigned char mode,sdhci_set_power (host, mode, vdd); -if (mode ==MMC_POWER_OFF ) +if (mode ==MMC_POWER_OFF ) { +if (slot->chip->pdev->device ==PCI_DEVICE_ID_INTEL_APL_SD || + slot->chip->pdev->device ==PCI_DEVICE_ID_INTEL_BYT_SD ) +usleep_range (15000 ,17500 );return ; + }/* * Bus power might not enable after D3 -> D0 transition due to the
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 69/444 wifi: mt76: only mark tx-status-failed frames as ACKed on mt76x0/2
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Felix Fietkau <[email protected]>
[ Upstream commit 0c5a89ceddc1728a40cb3313948401dd70e3c649 ]
The interrupt status polling is unreliable, which can cause status events to get lost. On all newer chips, txs-timeout is an indication that the packet was either never sent, or never acked.
Fixes issues with inactivity polling.
--- drivers/net/wireless/mediatek/mt76/mt76.h | 1 + drivers/net/wireless/mediatek/mt76/mt76x0/pci.c | 3 ++- drivers/net/wireless/mediatek/mt76/mt76x0/usb.c | 3 ++- drivers/net/wireless/mediatek/mt76/mt76x2/pci.c | 3 ++- drivers/net/wireless/mediatek/mt76/mt76x2/usb.c | 3 ++- drivers/net/wireless/mediatek/mt76/tx.c | 3 ++- 6 files changed, 11 insertions(+), 5 deletions(-)
drivers/net/wireless/mediatek/mt76/mt76.h +1 -0
@@ -439,6 +439,7 @@ struct mt76_hw_cap {#define MT_DRV_RX_DMA_HDR BIT(3)#define MT_DRV_HW_MGMT_TXQ BIT(4)#define MT_DRV_AMSDU_OFFLOAD BIT(5) +#define MT_DRV_IGNORE_TXS_FAILED BIT(6)struct mt76_driver_ops {u32 drv_flags;
drivers/net/wireless/mediatek/mt76/mt76x0/pci.c +2 -1
@@ -152,7 +152,8 @@ mt76x0e_probe(struct pci_dev *pdev, const struct pci_device_id *id)static const struct mt76_driver_ops drv_ops = { .txwi_size =sizeof (struct mt76x02_txwi ), .drv_flags =MT_DRV_TX_ALIGNED4_SKBS | -MT_DRV_SW_RX_AIRTIME , +MT_DRV_SW_RX_AIRTIME | +MT_DRV_IGNORE_TXS_FAILED , .survey_flags =SURVEY_INFO_TIME_TX , .update_survey = mt76x02_update_channel, .tx_prepare_skb = mt76x02_tx_prepare_skb,
drivers/net/wireless/mediatek/mt76/mt76x0/usb.c +2 -1
@@ -210,7 +210,8 @@ static int mt76x0u_probe(struct usb_interface *usb_intf, const struct usb_device_id *id) {static const struct mt76_driver_ops drv_ops = { - .drv_flags =MT_DRV_SW_RX_AIRTIME , + .drv_flags =MT_DRV_SW_RX_AIRTIME | +MT_DRV_IGNORE_TXS_FAILED , .survey_flags =SURVEY_INFO_TIME_TX , .update_survey = mt76x02_update_channel, .tx_prepare_skb = mt76x02u_tx_prepare_skb,
drivers/net/wireless/mediatek/mt76/mt76x2/pci.c +2 -1
@@ -22,7 +22,8 @@ mt76x2e_probe(struct pci_dev *pdev, const struct pci_device_id *id)static const struct mt76_driver_ops drv_ops = { .txwi_size =sizeof (struct mt76x02_txwi ), .drv_flags =MT_DRV_TX_ALIGNED4_SKBS | -MT_DRV_SW_RX_AIRTIME , +MT_DRV_SW_RX_AIRTIME | +MT_DRV_IGNORE_TXS_FAILED , .survey_flags =SURVEY_INFO_TIME_TX , .update_survey = mt76x02_update_channel, .tx_prepare_skb = mt76x02_tx_prepare_skb,
drivers/net/wireless/mediatek/mt76/mt76x2/usb.c +2 -1
@@ -29,7 +29,8 @@ static int mt76x2u_probe(struct usb_interface *intf, const struct usb_device_id *id) {static const struct mt76_driver_ops drv_ops = { - .drv_flags =MT_DRV_SW_RX_AIRTIME , + .drv_flags =MT_DRV_SW_RX_AIRTIME | +MT_DRV_IGNORE_TXS_FAILED , .survey_flags =SURVEY_INFO_TIME_TX , .update_survey = mt76x02_update_channel, .tx_prepare_skb = mt76x02u_tx_prepare_skb,
drivers/net/wireless/mediatek/mt76/tx.c +2 -1
@@ -100,7 +100,8 @@ __mt76_tx_status_skb_done(struct mt76_dev *dev, struct sk_buff *skb, u8 flags,return ;/* Tx status can be unreliable. if it fails, mark the frame as ACKed */ -if (flags &MT_TX_CB_TXS_FAILED ) { +if (flags &MT_TX_CB_TXS_FAILED && + (dev->drv->drv_flags &MT_DRV_IGNORE_TXS_FAILED )) { info->status.rates[0 ].count =0 ; info->status.rates[0 ].idx =-1 ; info->flags |=IEEE80211_TX_STAT_ACK ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 70/444 wifi: mt76: mt7996: revise TXS size
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Benjamin Lin <[email protected]>
[ Upstream commit 593c829b4326f7b3b15a69e97c9044ecbad3c319 ]
Size of MPDU/PPDU TXS is 12 DWs.
In mt7996/mt7992, last 4 DWs are reserved, so TXS size was mistakenly considered to be 8 DWs. However, in mt7990, 9th DW of TXS starts to be used.
--- drivers/net/wireless/mediatek/mt76/mt76_connac3_mac.h | 3 +++ drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-)
drivers/net/wireless/mediatek/mt76/mt76_connac3_mac.h +3 -0
@@ -280,6 +280,9 @@ enum tx_mgnt_type {#define MT_TXFREE_INFO_COUNT GENMASK(27, 24)#define MT_TXFREE_INFO_STAT GENMASK(29, 28) +#define MT_TXS_HDR_SIZE 4/* Unit: DW */ +#define MT_TXS_SIZE 12/* Unit: DW */ +#define MT_TXS0_BW GENMASK(31, 29)#define MT_TXS0_TID GENMASK(28, 26)#define MT_TXS0_AMPDU BIT(25)
drivers/net/wireless/mediatek/mt76/mt7996/mac.c +2 -2
@@ -1354,7 +1354,7 @@ bool mt7996_rx_check(struct mt76_dev *mdev, void *data, int len)mt7996_mac_tx_free (dev, data, len);return false;case PKT_TYPE_TXS : -for (rxd +=4 ; rxd +8 <= end; rxd +=8 ) +for (rxd +=MT_TXS_HDR_SIZE ; rxd +MT_TXS_SIZE <= end; rxd +=MT_TXS_SIZE )mt7996_mac_add_txs (dev, rxd);return false;case PKT_TYPE_RX_FW_MONITOR :
@@ -1391,7 +1391,7 @@ void mt7996_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q,mt7996_mcu_rx_event (dev, skb);break ;case PKT_TYPE_TXS : -for (rxd +=4 ; rxd +8 <= end; rxd +=8 ) +for (rxd +=MT_TXS_HDR_SIZE ; rxd +MT_TXS_SIZE <= end; rxd +=MT_TXS_SIZE )mt7996_mac_add_txs (dev, rxd);dev_kfree_skb (skb);break ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 71/444 x86/stackprotector/64: Only export __ref_stack_chk_guard on CONFIG_SMP
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ingo Molnar <[email protected]>
[ Upstream commit 91d5451d97ce35cbd510277fa3b7abf9caa4e34d ]
The __ref_stack_chk_guard symbol doesn't exist on UP:
<stdin>:4:15: error: ‘__ref_stack_chk_guard’ undeclared here (not in a function)
Fix the #ifdef around the entry.S export.
--- arch/x86/entry/entry.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/entry/entry.S +1 -1
@@ -59,7 +59,7 @@ EXPORT_SYMBOL_GPL(mds_verw_sel); * entirely in the C code, and use an alias emitted by the linker script * instead. */ -#ifdef CONFIG_STACKPROTECTOR +#if defined(CONFIG_STACKPROTECTOR) && defined(CONFIG_SMP) EXPORT_SYMBOL(__ref_stack_chk_guard); #endif #endif
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 72/444 x86/mm: Check return value from memblock_phys_alloc_range()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Philip Redkin <[email protected]>
[ Upstream commit 631ca8909fd5c62b9fda9edda93924311a78a9c4 ]
At least with CONFIG_PHYSICAL_START=0x100000, if there is < 4 MiB of contiguous free memory available at this point, the kernel will crash and burn because memblock_phys_alloc_range() returns 0 on failure, which leads memblock_phys_free() to throw the first 4 MiB of physical memory to the wolves.
At a minimum it should fail gracefully with a meaningful diagnostic, but in fact everything seems to work fine without the weird reserve allocation.
--- arch/x86/mm/init.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
arch/x86/mm/init.c +7 -2
@@ -644,8 +644,13 @@ static void __init memory_map_top_down(unsigned long map_start,*/ addr =memblock_phys_alloc_range (PMD_SIZE ,PMD_SIZE , map_start, map_end); -memblock_phys_free (addr,PMD_SIZE ); - real_end = addr +PMD_SIZE ; +if (!addr) { +pr_warn ("Failed to release memory for alloc_low_pages()" ); + real_end =max (map_start,ALIGN_DOWN (map_end,PMD_SIZE )); + }else { +memblock_phys_free (addr,PMD_SIZE ); + real_end = addr +PMD_SIZE ; + }/* step_size need to be small so pgt_buf from BRK could cover it */ step_size =PMD_SIZE ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 73/444 i2c: qup: Vote for interconnect bandwidth to DRAM
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stephan Gerhold <[email protected]>
[ Upstream commit d4f35233a6345f62637463ef6e0708f44ffaa583 ]
When the I2C QUP controller is used together with a DMA engine it needs to vote for the interconnect path to the DRAM. Otherwise it may be unable to access the memory quickly enough.
The requested peak bandwidth is dependent on the I2C core clock.
To avoid sending votes too often the bandwidth is always requested when a DMA transfer starts, but dropped only on runtime suspend. Runtime suspend should only happen if no transfer is active. After resumption we can defer the next vote until the first DMA transfer actually happens.
The implementation is largely identical to the one introduced for spi-qup in commit ecdaa9473019 ("spi: qup: Vote for interconnect bandwidth to DRAM") since both drivers represent the same hardware block.
--- drivers/i2c/busses/i2c-qup.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+)
drivers/i2c/busses/i2c-qup.c +36 -0
@@ -14,6 +14,7 @@#include <linux/dma-mapping.h> #include <linux/err.h> #include <linux/i2c.h> +#include <linux/interconnect.h> #include <linux/interrupt.h> #include <linux/io.h> #include <linux/module.h>
@@ -150,6 +151,8 @@/* TAG length for DATA READ in RX FIFO */ #define READ_RX_TAGS_LEN 2 +#define QUP_BUS_WIDTH 8 +static unsigned int scl_freq;module_param_named (scl_freq, scl_freq, uint,0444 );MODULE_PARM_DESC (scl_freq,"SCL frequency override" );
@@ -227,6 +230,7 @@ struct qup_i2c_dev {int irq;struct clk *clk;struct clk *pclk; +struct icc_path *icc_path;struct i2c_adapter adap;int clk_ctl;
@@ -255,6 +259,10 @@ struct qup_i2c_dev {/* To configure when bus is in run state */ u32 config_run; +/* bandwidth votes */ +u32 src_clk_freq; +u32 cur_bw_clk_freq; +/* dma parameters */ bool is_dma;/* To check if the current transfer is using DMA */
@@ -453,6 +461,23 @@ static int qup_i2c_bus_active(struct qup_i2c_dev *qup, int len)return ret; } +static int qup_i2c_vote_bw (struct qup_i2c_dev *qup,u32 clk_freq) +{ +u32 needed_peak_bw; +int ret; + +if (qup->cur_bw_clk_freq == clk_freq) +return 0 ; + + needed_peak_bw =Bps_to_icc (clk_freq *QUP_BUS_WIDTH ); + ret =icc_set_bw (qup->icc_path,0 , needed_peak_bw); +if (ret) +return ret; + + qup->cur_bw_clk_freq = clk_freq; +return 0 ; +} +static void qup_i2c_write_tx_fifo_v1 (struct qup_i2c_dev *qup) {struct qup_i2c_block *blk = &qup->blk;
@@ -840,6 +865,10 @@ static int qup_i2c_bam_xfer(struct i2c_adapter *adap, struct i2c_msg *msg,int ret =0 ;int idx =0 ; + ret =qup_i2c_vote_bw (qup, qup->src_clk_freq); +if (ret) +return ret; +enable_irq (qup->irq); ret =qup_i2c_req_dma (qup);
@@ -1645,6 +1674,7 @@ static void qup_i2c_disable_clocks(struct qup_i2c_dev *qup) config =readl (qup->base +QUP_CONFIG ); config |=QUP_CLOCK_AUTO_GATE ;writel (config, qup->base +QUP_CONFIG ); +qup_i2c_vote_bw (qup,0 );clk_disable_unprepare (qup->pclk); }
@@ -1745,6 +1775,11 @@ static int qup_i2c_probe(struct platform_device *pdev) goto fail_dma; } qup->is_dma = true; + + qup->icc_path =devm_of_icc_get (&pdev->dev,NULL ); +if (IS_ERR (qup->icc_path)) +return dev_err_probe (&pdev->dev,PTR_ERR (qup->icc_path), +"failed to get interconnect path\n" ); } nodma:
@@ -1793,6 +1828,7 @@ static int qup_i2c_probe(struct platform_device *pdev)qup_i2c_enable_clocks (qup); src_clk_freq =clk_get_rate (qup->clk); } + qup->src_clk_freq = src_clk_freq;/* * Bootloaders might leave a pending interrupt on certain QUP's,
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 74/444 i2c: pxa: fix call balance of i2c->clk handling routines
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vitalii Mordan <[email protected]>
[ Upstream commit be7113d2e2a6f20cbee99c98d261a1fd6fd7b549 ]
If the clock i2c->clk was not enabled in i2c_pxa_probe(), it should not be disabled in any path.
Found by Linux Verification Center (linuxtesting.org) with Klever.
--- drivers/i2c/busses/i2c-pxa.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/i2c/busses/i2c-pxa.c +4 -1
@@ -1504,7 +1504,10 @@ static int i2c_pxa_probe(struct platform_device *dev) i2c->adap.name); } -clk_prepare_enable (i2c->clk); + ret =clk_prepare_enable (i2c->clk); +if (ret) +return dev_err_probe (&dev->dev, ret, +"failed to enable clock\n" );if (i2c->use_pio) { i2c->adap.algo = &i2c_pxa_pio_algorithm;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 75/444 btrfs: make btrfs_discard_workfn() block_group ref explicit
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Boris Burkov <[email protected]>
[ Upstream commit 895c6721d310c036dcfebb5ab845822229fa35eb ]
Currently, the async discard machinery owns a ref to the block_group when the block_group is queued on a discard list. However, to handle races with discard cancellation and the discard workfn, we have a specific logic to detect that the block_group is *currently* running in the workfn, to protect the workfn's usage amidst cancellation.
As far as I can tell, this doesn't have any overt bugs (though finish_discard_pass() and remove_from_discard_list() racing can have a surprising outcome for the caller of remove_from_discard_list() in that it is again added at the end).
But it is needlessly complicated to rely on locking and the nullity of discard_ctl->block_group. Simplify this significantly by just taking a refcount while we are in the workfn and unconditionally drop it in both the remove and workfn paths, regardless of if they race.
--- fs/btrfs/discard.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-)
fs/btrfs/discard.c +16 -18
@@ -167,13 +167,7 @@ static bool remove_from_discard_list(struct btrfs_discard_ctl *discard_ctl, block_group->discard_eligible_time =0 ; queued = !list_empty (&block_group->discard_list);list_del_init (&block_group->discard_list); -/* -* If the block group is currently running in the discard workfn, we -* don't want to deref it, since it's still being used by the workfn. -* The workfn will notice this case and deref the block group when it is -* finished. -*/ -if (queued && !running) +if (queued)btrfs_put_block_group (block_group);spin_unlock (&discard_ctl->lock);
@@ -260,9 +254,10 @@ static struct btrfs_block_group *peek_discard_list( block_group->discard_cursor = block_group->start; block_group->discard_state =BTRFS_DISCARD_EXTENTS ; } - discard_ctl->block_group = block_group; }if (block_group) { +btrfs_get_block_group (block_group); + discard_ctl->block_group = block_group; *discard_state = block_group->discard_state; *discard_index = block_group->discard_index; }
@@ -493,9 +488,20 @@ static void btrfs_discard_workfn(struct work_struct *work) block_group =peek_discard_list (discard_ctl, &discard_state, &discard_index, now); -if (!block_group || !btrfs_run_discard_work (discard_ctl)) +if (!block_group)return ; +if (!btrfs_run_discard_work (discard_ctl)) { +spin_lock (&discard_ctl->lock); +btrfs_put_block_group (block_group); + discard_ctl->block_group =NULL ; +spin_unlock (&discard_ctl->lock); +return ; + }if (now < block_group->discard_eligible_time) { +spin_lock (&discard_ctl->lock); +btrfs_put_block_group (block_group); + discard_ctl->block_group =NULL ; +spin_unlock (&discard_ctl->lock);btrfs_discard_schedule_work (discard_ctl, false);return ; }
@@ -547,15 +553,7 @@ static void btrfs_discard_workfn(struct work_struct *work)spin_lock (&discard_ctl->lock); discard_ctl->prev_discard = trimmed; discard_ctl->prev_discard_time = now; -/* -* If the block group was removed from the discard list while it was -* running in this workfn, then we didn't deref it, since this function -* still owned that reference. But we set the discard_ctl->block_group -* back to NULL, so we can use that condition to know that now we need -* to deref the block_group. -*/ -if (discard_ctl->block_group ==NULL ) -btrfs_put_block_group (block_group); +btrfs_put_block_group (block_group); discard_ctl->block_group =NULL ;__btrfs_discard_schedule_work (discard_ctl, now, false);spin_unlock (&discard_ctl->lock);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 76/444 btrfs: avoid linker error in btrfs_find_create_tree_block()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mark Harmstone <[email protected]>
[ Upstream commit 7ef3cbf17d2734ca66c4ed8573be45f4e461e7ee ]
The inline function btrfs_is_testing() is hardcoded to return 0 if CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set. Currently we're relying on the compiler optimizing out the call to alloc_test_extent_buffer() in btrfs_find_create_tree_block(), as it's not been defined (it's behind an
#ifdef).
Add a stub version of alloc_test_extent_buffer() to avoid linker errors on non-standard optimization levels. This problem was seen on GCC 14 with -O0 and is helps to see symbols that would be otherwise optimized out.
--- fs/btrfs/extent_io.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
fs/btrfs/extent_io.c +5 -2
@@ -3565,10 +3565,10 @@ struct extent_buffer *find_extent_buffer(struct btrfs_fs_info *fs_info,return eb; } -#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS struct extent_buffer *alloc_test_extent_buffer (struct btrfs_fs_info *fs_info,u64 start) { +#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS struct extent_buffer *eb, *exists =NULL ;int ret;
@@ -3604,8 +3604,11 @@ struct extent_buffer *alloc_test_extent_buffer(struct btrfs_fs_info *fs_info, free_eb:btrfs_release_extent_buffer (eb);return exists; -} +#else +/* Stub to avoid linker error when compiled with optimizations turned off. */ +return NULL ;#endif +}static struct extent_buffer *grab_extent_buffer (struct btrfs_fs_info *fs_info,struct page *page)
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 77/444 btrfs: run btrfs_error_commit_super() early
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Qu Wenruo <[email protected]>
[ Upstream commit df94a342efb451deb0e32b495d1d6cd4bb3a1648 ]
[BUG]
Even after all the error fixes related the "ASSERT(list_empty(&fs_info->delayed_iputs));" in close_ctree(), I can still hit it reliably with my experimental 2K block size.
[CAUSE]
In my case, all the error is triggered after the fs is already in error status.
I find the following call trace to be the cause of race:
Main thread | endio_write_workers
---------------------------------------------+---------------------------
close_ctree() | |- btrfs_error_commit_super() | | |- btrfs_cleanup_transaction() | | | |- btrfs_destroy_all_ordered_extents() | | | |- btrfs_wait_ordered_roots() | | |- btrfs_run_delayed_iputs() | | | btrfs_finish_ordered_io() | | |- btrfs_put_ordered_extent() | | |- btrfs_add_delayed_iput() |- ASSERT(list_empty(delayed_iputs)) |
!!! Triggered !!!
The root cause is that, btrfs_wait_ordered_roots() only wait for ordered extents to finish their IOs, not to wait for them to finish and removed.
[FIX]
Since btrfs_error_commit_super() will flush and wait for all ordered extents, it should be executed early, before we start flushing the workqueues.
And since btrfs_error_commit_super() now runs early, there is no need to run btrfs_run_delayed_iputs() inside it, so just remove the btrfs_run_delayed_iputs() call from btrfs_error_commit_super().
--- fs/btrfs/disk-io.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)
fs/btrfs/disk-io.c +8 -7
@@ -4313,6 +4313,14 @@ void __cold close_ctree(struct btrfs_fs_info *fs_info)/* clear out the rbtree of defraggable inodes */ btrfs_cleanup_defrag_inodes (fs_info); +/* +* Handle the error fs first, as it will flush and wait for all ordered +* extents. This will generate delayed iputs, thus we want to handle +* it first. +*/ +if (unlikely (BTRFS_FS_ERROR (fs_info))) +btrfs_error_commit_super (fs_info); +/* * Wait for any fixup workers to complete. * If we don't wait for them here and they are still running by the time
@@ -4402,9 +4410,6 @@ void __cold close_ctree(struct btrfs_fs_info *fs_info)btrfs_err (fs_info,"commit super ret %d" , ret); } -if (BTRFS_FS_ERROR (fs_info)) -btrfs_error_commit_super (fs_info); -kthread_stop (fs_info->transaction_kthread);kthread_stop (fs_info->cleaner_kthread);
@@ -4541,10 +4546,6 @@ static void btrfs_error_commit_super(struct btrfs_fs_info *fs_info)/* cleanup FS via transaction */ btrfs_cleanup_transaction (fs_info); -mutex_lock (&fs_info->cleaner_mutex); -btrfs_run_delayed_iputs (fs_info); -mutex_unlock (&fs_info->cleaner_mutex); -down_write (&fs_info->cleanup_work_sem);up_write (&fs_info->cleanup_work_sem); }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 78/444 btrfs: fix non-empty delayed iputs list on unmount due to async workers
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Filipe Manana <[email protected]>
[ Upstream commit cda76788f8b0f7de3171100e3164ec1ce702292e ]
At close_ctree() after we have ran delayed iputs either explicitly through calling btrfs_run_delayed_iputs() or later during the call to btrfs_commit_super() or btrfs_error_commit_super(), we assert that the delayed iputs list is empty.
We have (another) race where this assertion might fail because we have queued an async write into the fs_info->workers workqueue. Here's how it happens:
1) We are submitting a data bio for an inode that is not the data relocation inode, so we call btrfs_wq_submit_bio();
2) btrfs_wq_submit_bio() submits a work for the fs_info->workers queue that will run run_one_async_done();
3) We enter close_ctree(), flush several work queues except fs_info->workers, explicitly run delayed iputs with a call to btrfs_run_delayed_iputs() and then again shortly after by calling btrfs_commit_super() or btrfs_error_commit_super(), which also run delayed iputs;
4) run_one_async_done() is executed in the work queue, and because there was an IO error (bio->bi_status is not 0) it calls btrfs_bio_end_io(), which drops the final reference on the associated ordered extent by calling btrfs_put_ordered_extent() - and that adds a delayed iput for the inode;
5) At close_ctree() we find that after stopping the cleaner and transaction kthreads the delayed iputs list is not empty, failing the following assertion:
ASSERT(list_empty(&fs_info->delayed_iputs));
Fix this by flushing the fs_info->workers workqueue before running delayed iputs at close_ctree().
David reported this when running generic/648, which exercises IO error paths by using the DM error table.
--- fs/btrfs/disk-io.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
fs/btrfs/disk-io.c +13 -0
@@ -4341,6 +4341,19 @@ void __cold close_ctree(struct btrfs_fs_info *fs_info)*/ btrfs_flush_workqueue (fs_info->delalloc_workers); +/* +* We can have ordered extents getting their last reference dropped from +* the fs_info->workers queue because for async writes for data bios we +* queue a work for that queue, at btrfs_wq_submit_bio(), that runs +* run_one_async_done() which calls btrfs_bio_end_io() in case the bio +* has an error, and that later function can do the final +* btrfs_put_ordered_extent() on the ordered extent attached to the bio, +* which adds a delayed iput for the inode. So we must flush the queue +* so that we don't have delayed iputs after committing the current +* transaction below and stopping the cleaner and transaction kthreads. +*/ +btrfs_flush_workqueue (fs_info->workers); +/* * When finishing a compressed write bio we schedule a work queue item * to finish an ordered extent - btrfs_finish_compressed_write_work()
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 79/444 btrfs: get zone unusable bytes while holding lock at btrfs_reclaim_bgs_work()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Filipe Manana <[email protected]>
[ Upstream commit 1283b8c125a83bf7a7dbe90c33d3472b6d7bf612 ]
At btrfs_reclaim_bgs_work(), we are grabbing a block group's zone unusable bytes while not under the protection of the block group's spinlock, so this can trigger race reports from KCSAN (or similar tools) since that field is typically updated while holding the lock, such as at __btrfs_add_free_space_zoned() for example.
Fix this by grabbing the zone unusable bytes while we are still in the critical section holding the block group's spinlock, which is right above where we are currently grabbing it.
--- fs/btrfs/block-group.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)
fs/btrfs/block-group.c +11 -7
@@ -1885,6 +1885,17 @@ void btrfs_reclaim_bgs_work(struct work_struct *work)up_write (&space_info->groups_sem); goto next; } + +/* +* Cache the zone_unusable value before turning the block group +* to read only. As soon as the block group is read only it's +* zone_unusable value gets moved to the block group's read-only +* bytes and isn't available for calculations anymore. We also +* cache it before unlocking the block group, to prevent races +* (reports from KCSAN and such tools) with tasks updating it. +*/ + zone_unusable = bg->zone_unusable; +spin_unlock (&bg->lock);/*
@@ -1900,13 +1911,6 @@ void btrfs_reclaim_bgs_work(struct work_struct *work) goto next; } -/* -* Cache the zone_unusable value before turning the block group -* to read only. As soon as the blog group is read only it's -* zone_unusable value gets moved to the block group's read-only -* bytes and isn't available for calculations anymore. -*/ - zone_unusable = bg->zone_unusable; ret =inc_block_group_ro (bg,0 );up_write (&space_info->groups_sem);if (ret <0 )
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 80/444 btrfs: send: return -ENAMETOOLONG when attempting a path that is too long
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Filipe Manana <[email protected]>
[ Upstream commit a77749b3e21813566cea050bbb3414ae74562eba ]
When attempting to build a too long path we are currently returning -ENOMEM, which is very odd and misleading. So update fs_path_ensure_buf() to return -ENAMETOOLONG instead. Also, while at it, move the WARN_ON() into the if statement's expression, as it makes it clear what is being tested and also has the effect of adding 'unlikely' to the statement, which allows the compiler to generate better code as this condition is never expected to happen.
--- fs/btrfs/send.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
fs/btrfs/send.c +2 -4
@@ -487,10 +487,8 @@ static int fs_path_ensure_buf(struct fs_path *p, int len)if (p->buf_len >= len)return 0 ; -if (len >PATH_MAX ) { -WARN_ON (1 ); -return -ENOMEM ; - } +if (WARN_ON (len >PATH_MAX )) +return -ENAMETOOLONG ; path_len = p->end - p->start; old_buf_len = p->buf_len;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 81/444 drm/amd/display: Guard against setting dispclk low for dcn31x
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jing Zhou <[email protected]>
[ Upstream commit 9c2f4ae64bb6f6d83a54d88b9ee0f369cdbb9fa8 ]
[WHY]
We should never apply a minimum dispclk value while in prepare_bandwidth or while displays are active. This is always an optimizaiton for when all displays are disabled.
[HOW]
Defer dispclk optimization until safe_to_lower = true and display_count reaches 0.
Since 0 has a special value in this logic (ie. no dispclk required) we also need adjust the logic that clamps it for the actual request to PMFW.
--- .../dc/clk_mgr/dcn315/dcn315_clk_mgr.c | 20 +++++++++++-------- .../dc/clk_mgr/dcn316/dcn316_clk_mgr.c | 13 +++++++++--- 2 files changed, 22 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c +12 -8
@@ -130,7 +130,7 @@ static void dcn315_update_clocks(struct clk_mgr *clk_mgr_base,struct clk_mgr_internal *clk_mgr =TO_CLK_MGR_INTERNAL (clk_mgr_base);struct dc_clocks *new_clocks = &context->bw_ctx.bw.dcn.clk;struct dc *dc = clk_mgr_base->ctx->dc; -int display_count; +int display_count =0 ;bool update_dppclk = false;bool update_dispclk = false;bool dpp_clock_lowered = false;
@@ -204,15 +204,19 @@ static void dcn315_update_clocks(struct clk_mgr *clk_mgr_base, update_dppclk = true; } -if (should_set_clock (safe_to_lower, new_clocks->dispclk_khz, clk_mgr_base->clks.dispclk_khz)) { -/* No need to apply the w/a if we haven't taken over from bios yet */ -if (clk_mgr_base->clks.dispclk_khz) -dcn315_disable_otg_wa (clk_mgr_base, context, true); +if (should_set_clock (safe_to_lower, new_clocks->dispclk_khz, clk_mgr_base->clks.dispclk_khz) && + (new_clocks->dispclk_khz >0 || (safe_to_lower && display_count ==0 ))) { +int requested_dispclk_khz = new_clocks->dispclk_khz; +dcn315_disable_otg_wa (clk_mgr_base, context, true); + +/* Clamp the requested clock to PMFW based on their limit. */ +if (dc->debug.min_disp_clk_khz >0 && requested_dispclk_khz < dc->debug.min_disp_clk_khz) + requested_dispclk_khz = dc->debug.min_disp_clk_khz; + +dcn315_smu_set_dispclk (clk_mgr, requested_dispclk_khz); clk_mgr_base->clks.dispclk_khz = new_clocks->dispclk_khz; -dcn315_smu_set_dispclk (clk_mgr, clk_mgr_base->clks.dispclk_khz); -if (clk_mgr_base->clks.dispclk_khz) -dcn315_disable_otg_wa (clk_mgr_base, context, false); +dcn315_disable_otg_wa (clk_mgr_base, context, false); update_dispclk = true; }
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c +10 -3
@@ -140,7 +140,7 @@ static void dcn316_update_clocks(struct clk_mgr *clk_mgr_base,struct clk_mgr_internal *clk_mgr =TO_CLK_MGR_INTERNAL (clk_mgr_base);struct dc_clocks *new_clocks = &context->bw_ctx.bw.dcn.clk;struct dc *dc = clk_mgr_base->ctx->dc; -int display_count; +int display_count =0 ;bool update_dppclk = false;bool update_dispclk = false;bool dpp_clock_lowered = false;
@@ -211,11 +211,18 @@ static void dcn316_update_clocks(struct clk_mgr *clk_mgr_base, update_dppclk = true; } -if (should_set_clock (safe_to_lower, new_clocks->dispclk_khz, clk_mgr_base->clks.dispclk_khz)) { +if (should_set_clock (safe_to_lower, new_clocks->dispclk_khz, clk_mgr_base->clks.dispclk_khz) && + (new_clocks->dispclk_khz >0 || (safe_to_lower && display_count ==0 ))) { +int requested_dispclk_khz = new_clocks->dispclk_khz; +dcn316_disable_otg_wa (clk_mgr_base, context, safe_to_lower, true); +/* Clamp the requested clock to PMFW based on their limit. */ +if (dc->debug.min_disp_clk_khz >0 && requested_dispclk_khz < dc->debug.min_disp_clk_khz) + requested_dispclk_khz = dc->debug.min_disp_clk_khz; + +dcn316_smu_set_dispclk (clk_mgr, requested_dispclk_khz); clk_mgr_base->clks.dispclk_khz = new_clocks->dispclk_khz; -dcn316_smu_set_dispclk (clk_mgr, clk_mgr_base->clks.dispclk_khz);dcn316_disable_otg_wa (clk_mgr_base, context, safe_to_lower, false); update_dispclk = true;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 82/444 i3c: master: svc: Fix missing STOP for master request
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stanley Chu <[email protected]>
[ Upstream commit 0430bf9bc1ac068c8b8c540eb93e5751872efc51 ]
The controller driver nacked the master request but didn't emit a STOP to end the transaction. The driver shall refuse the unsupported requests and return the controller state to IDLE by emitting a STOP.
--- drivers/i3c/master/svc-i3c-master.c | 1 + 1 file changed, 1 insertion(+)
drivers/i3c/master/svc-i3c-master.c +1 -0
@@ -503,6 +503,7 @@ static void svc_i3c_master_ibi_work(struct work_struct *work)queue_work (master->base.wq, &master->hj_work);break ;case SVC_I3C_MSTATUS_IBITYPE_MASTER_REQUEST : +svc_i3c_master_emit_stop (master);default :break ; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 83/444 dlm: make tcp still work in multi-link env
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heming Zhao <[email protected]>
[ Upstream commit 03d2b62208a336a3bb984b9465ef6d89a046ea22 ]
This patch bypasses multi-link errors in TCP mode, allowing dlm to operate on the first tcp link.
--- fs/dlm/lowcomms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/dlm/lowcomms.c +2 -2
@@ -1826,8 +1826,8 @@ static int dlm_tcp_listen_validate(void) {/* We don't support multi-homed hosts */ if (dlm_local_count >1 ) { -log_print ("TCP protocol can't handle multi-homed hosts, try SCTP" ); -return -EINVAL ; +log_print ("Detect multi-homed hosts but use only the first IP address." ); +log_print ("Try SCTP, if you want to enable multi-link." ); }return 0 ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 84/444 um: Store full CSGSFS and SS register from mcontext
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Benjamin Berg <[email protected]>
[ Upstream commit cef721e0d53d2b64f2ba177c63a0dfdd7c0daf17 ]
Doing this allows using registers as retrieved from an mcontext to be pushed to a process using PTRACE_SETREGS.
It is not entirely clear to me why CSGSFS was masked. Doing so creates issues when using the mcontext as process state in seccomp and simply copying the register appears to work perfectly fine for ptrace.
--- arch/x86/um/os-Linux/mcontext.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/x86/um/os-Linux/mcontext.c +1 -2
@@ -26,7 +26,6 @@ void get_regs_from_mc(struct uml_pt_regs *regs, mcontext_t *mc)COPY (RIP );COPY2 (EFLAGS ,EFL );COPY2 (CS ,CSGSFS ); - regs->gp[CS /sizeof (unsigned long )] &=0xffff ; - regs->gp[CS /sizeof (unsigned long )] |=3 ; + regs->gp[SS /sizeof (unsigned long )] = mc->gregs[REG_CSGSFS ] >>48 ;#endif }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 85/444 um: Update min_low_pfn to match changes in uml_reserved
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tiwei Bie <[email protected]>
[ Upstream commit e82cf3051e6193f61e03898f8dba035199064d36 ]
When uml_reserved is updated, min_low_pfn must also be updated accordingly. Otherwise, min_low_pfn will not accurately reflect the lowest available PFN.
--- arch/um/kernel/mem.c | 1 + 1 file changed, 1 insertion(+)
arch/um/kernel/mem.c +1 -0
@@ -68,6 +68,7 @@ void __init mem_init(void)map_memory (brk_end,__pa (brk_end), uml_reserved - brk_end,1 ,1 ,0 );memblock_free ((void *)brk_end, uml_reserved - brk_end); uml_reserved = brk_end; + min_low_pfn =PFN_UP (__pa (uml_reserved));/* this will put all low memory onto the freelists */ memblock_free_all ();
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 86/444 ext4: reorder capability check last
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian Göttsche <[email protected]>
[ Upstream commit 1b419c889c0767a5b66d0a6c566cae491f1cb0f7 ]
capable() calls refer to enabled LSMs whether to permit or deny the request. This is relevant in connection with SELinux, where a capability check results in a policy decision and by default a denial message on insufficient permission is issued.
It can lead to three undesired cases:
1. A denial message is generated, even in case the operation was an unprivileged one and thus the syscall succeeded, creating noise.
2. To avoid the noise from 1. the policy writer adds a rule to ignore those denial messages, hiding future syscalls, where the task performs an actual privileged operation, leading to hidden limited functionality of that task.
3. To avoid the noise from 1. the policy writer adds a rule to permit the task the requested capability, while it does not need it, violating the principle of least privilege.
--- fs/ext4/balloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/ext4/balloc.c +2 -2
@@ -641,8 +641,8 @@ static int ext4_has_free_clusters(struct ext4_sb_info *sbi,/* Hm, nope. Are (enough) root reserved clusters available? */ if (uid_eq (sbi->s_resuid,current_fsuid ()) || (!gid_eq (sbi->s_resgid,GLOBAL_ROOT_GID ) &&in_group_p (sbi->s_resgid)) || -capable (CAP_SYS_RESOURCE ) || - (flags &EXT4_MB_USE_ROOT_BLOCKS )) { + (flags &EXT4_MB_USE_ROOT_BLOCKS ) || +capable (CAP_SYS_RESOURCE )) {if (free_clusters >= (nclusters + dirty_clusters + resv_clusters))
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 87/444 hypfs_create_cpu_files(): add missing check for hypfs_mkdir() failure
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Al Viro <[email protected]>
[ Upstream commit 00cdfdcfa0806202aea56b02cedbf87ef1e75df8 ]
--- arch/s390/hypfs/hypfs_diag_fs.c | 2 ++ 1 file changed, 2 insertions(+)
arch/s390/hypfs/hypfs_diag_fs.c +2 -0
@@ -208,6 +208,8 @@ static int hypfs_create_cpu_files(struct dentry *cpus_dir, void *cpu_info)snprintf (buffer,TMP_SIZE ,"%d" ,cpu_info__cpu_addr (diag204_get_info_type (), cpu_info)); cpu_dir =hypfs_mkdir (cpus_dir, buffer); +if (IS_ERR (cpu_dir)) +return PTR_ERR (cpu_dir); rc =hypfs_create_u64 (cpu_dir,"mgmtime" ,cpu_info__acc_time (diag204_get_info_type (), cpu_info) -cpu_info__lp_time (diag204_get_info_type (), cpu_info));
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 88/444 scsi: st: Tighten the page format heuristics with MODE SELECT
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kai Mäkisara <[email protected]>
[ Upstream commit 8db816c6f176321e42254badd5c1a8df8bfcfdb4 ]
In the days when SCSI-2 was emerging, some drives did claim SCSI-2 but did not correctly implement it. The st driver first tries MODE SELECT with the page format bit set to set the block descriptor. If not successful, the non-page format is tried.
The test only tests the sense code and this triggers also from illegal parameter in the parameter list. The test is limited to "old" devices and made more strict to remove false alarms.
--- drivers/scsi/st.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/scsi/st.c +3 -1
@@ -3082,7 +3082,9 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon cmd_in == MTSETDRVBUFFER || cmd_in == SET_DENS_AND_BLK) {if (cmdstatp->sense_hdr.sense_key ==ILLEGAL_REQUEST && - !(STp->use_pf &PF_TESTED )) { + cmdstatp->sense_hdr.asc ==0x24 && + (STp->device)->scsi_level <=SCSI_2 && + !(STp->use_pf &PF_TESTED )) {/* Try the other possible state of Page Format if not already tried */ STp->use_pf = (STp->use_pf ^USE_PF ) |PF_TESTED ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 89/444 scsi: st: ERASE does not change tape location
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kai Mäkisara <[email protected]>
[ Upstream commit ad77cebf97bd42c93ab4e3bffd09f2b905c1959a ]
The SCSI ERASE command erases from the current position onwards. Don't clear the position variables.
--- drivers/scsi/st.c | 1 - 1 file changed, 1 deletion(-)
drivers/scsi/st.c +0 -1
@@ -2895,7 +2895,6 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon timeout = STp->long_timeout *8 ;DEBC_printk (STp,"Erasing tape.\n" ); - fileno = blkno = at_sm =0 ;break ;case MTSETBLK :/* Set block length */ case MTSETDENSITY :/* Set tape density */
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 90/444 vfio/pci: Handle INTx IRQ_NOTCONNECTED
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Williamson <[email protected]>
[ Upstream commit 860be250fc32de9cb24154bf21b4e36f40925707 ]
Some systems report INTx as not routed by setting pdev->irq to IRQ_NOTCONNECTED, resulting in a -ENOTCONN error when trying to setup eventfd signaling. Include this in the set of conditions for which the PIN register is virtualized to zero.
Additionally consolidate vfio_pci_get_irq_count() to use this virtualized value in reporting INTx support via ioctl and sanity checking ioctl paths since pdev->irq is re-used when the device is in MSI mode.
The combination of these results in both the config space of the device and the ioctl interface behaving as if the device does not support INTx.
--- drivers/vfio/pci/vfio_pci_config.c | 3 ++- drivers/vfio/pci/vfio_pci_core.c | 10 +--------- drivers/vfio/pci/vfio_pci_intrs.c | 2 +- 3 files changed, 4 insertions(+), 11 deletions(-)
drivers/vfio/pci/vfio_pci_config.c +2 -1
@@ -1813,7 +1813,8 @@ int vfio_config_init(struct vfio_pci_core_device *vdev)cpu_to_le16 (PCI_COMMAND_MEMORY ); } -if (!IS_ENABLED (CONFIG_VFIO_PCI_INTX ) || vdev->nointx) +if (!IS_ENABLED (CONFIG_VFIO_PCI_INTX ) || vdev->nointx || + vdev->pdev->irq ==IRQ_NOTCONNECTED ) vconfig[PCI_INTERRUPT_PIN ] =0 ; ret =vfio_cap_init (vdev);
drivers/vfio/pci/vfio_pci_core.c +1 -9
@@ -731,15 +731,7 @@ EXPORT_SYMBOL_GPL(vfio_pci_core_finish_enable);static int vfio_pci_get_irq_count (struct vfio_pci_core_device *vdev,int irq_type) {if (irq_type ==VFIO_PCI_INTX_IRQ_INDEX ) { -u8 pin; - -if (!IS_ENABLED (CONFIG_VFIO_PCI_INTX ) || - vdev->nointx || vdev->pdev->is_virtfn) -return 0 ; - -pci_read_config_byte (vdev->pdev,PCI_INTERRUPT_PIN , &pin); - -return pin ?1 :0 ; +return vdev->vconfig[PCI_INTERRUPT_PIN ] ?1 :0 ; }else if (irq_type ==VFIO_PCI_MSI_IRQ_INDEX ) {u8 pos;u16 flags;
drivers/vfio/pci/vfio_pci_intrs.c +1 -1
@@ -269,7 +269,7 @@ static int vfio_intx_enable(struct vfio_pci_core_device *vdev,if (!is_irq_none (vdev))return -EINVAL ; -if (!pdev->irq) +if (!pdev->irq || pdev->irq ==IRQ_NOTCONNECTED )return -ENODEV ; name =kasprintf (GFP_KERNEL_ACCOUNT ,"vfio-intx(%s)" ,pci_name (pdev));
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 91/444 bpf: Return prog btf_id without capable check
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mykyta Yatsenko <[email protected]>
[ Upstream commit 07651ccda9ff10a8ca427670cdd06ce2c8e4269c ]
Return prog's btf_id from bpf_prog_get_info_by_fd regardless of capable check. This patch enables scenario, when freplace program, running from user namespace, requires to query target prog's btf.
--- kernel/bpf/syscall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/bpf/syscall.c +2 -2
@@ -4442,6 +4442,8 @@ static int bpf_prog_get_info_by_fd(struct file *file, info.recursion_misses = stats.misses; info.verified_insns = prog->aux->verified_insns; +if (prog->aux->btf) + info.btf_id =btf_obj_id (prog->aux->btf);if (!bpf_capable ()) { info.jited_prog_len =0 ;
@@ -4588,8 +4590,6 @@ static int bpf_prog_get_info_by_fd(struct file *file, } } -if (prog->aux->btf) - info.btf_id =btf_obj_id (prog->aux->btf); info.attach_btf_id = prog->aux->attach_btf_id;if (attach_btf) info.attach_btf_obj_id =btf_obj_id (attach_btf);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 92/444 jbd2: do not try to recover wiped journal
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jan Kara <[email protected]>
[ Upstream commit a662f3c03b754e1f97a2781fa242e95bdb139798 ]
If a journal is wiped, we will set journal->j_tail to 0. However if 'write' argument is not set (as it happens for read-only device or for ocfs2), the on-disk superblock is not updated accordingly and thus jbd2_journal_recover() cat try to recover the wiped journal. Fix the check in jbd2_journal_recover() to use journal->j_tail for checking empty journal instead.
--- fs/jbd2/recovery.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
fs/jbd2/recovery.c +6 -5
@@ -286,21 +286,22 @@ static int fc_do_one_pass(journal_t *journal,int jbd2_journal_recover (journal_t *journal) {int err, err2; -journal_superblock_t * sb; -struct recovery_info info;errseq_t wb_err;struct address_space *mapping;memset (&info,0 ,sizeof (info)); - sb = journal->j_superblock;/* * The journal superblock's s_start field (the current log head) * is always zero if, and only if, the journal was cleanly -* unmounted. +* unmounted. We use its in-memory version j_tail here because +* jbd2_journal_wipe() could have updated it without updating journal +* superblock. */ -if (!sb->s_start) { +if (!journal->j_tail) { +journal_superblock_t *sb = journal->j_superblock; +jbd2_debug (1 ,"No recovery required, last transaction %d, head block %u\n" ,be32_to_cpu (sb->s_sequence),be32_to_cpu (sb->s_head)); journal->j_transaction_sequence =be32_to_cpu (sb->s_sequence) +1 ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 93/444 tcp: reorganize tcp_in_ack_event() and tcp_count_delivered()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilpo Järvinen <[email protected]>
[ Upstream commit 149dfb31615e22271d2525f078c95ea49bc4db24 ]
- Move tcp_count_delivered() earlier and split tcp_count_delivered_ce() out of it
- Move tcp_in_ack_event() later
- While at it, remove the inline from tcp_in_ack_event() and let the compiler to decide
Accurate ECN's heuristics does not know if there is going to be ACE field based CE counter increase or not until after rtx queue has been processed. Only then the number of ACKed bytes/pkts is available. As CE or not affects presence of FLAG_ECE, that information for tcp_in_ack_event is not yet available in the old location of the call to tcp_in_ack_event().
--- net/ipv4/tcp_input.c | 56 +++++++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 24 deletions(-)
net/ipv4/tcp_input.c +32 -24
@@ -425,6 +425,20 @@ static bool tcp_ecn_rcv_ecn_echo(const struct tcp_sock *tp, const struct tcphdrreturn false; } +static void tcp_count_delivered_ce (struct tcp_sock *tp,u32 ecn_count) +{ + tp->delivered_ce += ecn_count; +} + +/* Updates the delivered and delivered_ce counts */ +static void tcp_count_delivered (struct tcp_sock *tp,u32 delivered, +bool ece_ack) +{ + tp->delivered += delivered; +if (ece_ack) +tcp_count_delivered_ce (tp, delivered); +} +/* Buffer size and advertised window tuning. * * 1. Tuning sk->sk_sndbuf, when connection enters established state.
@@ -1137,15 +1151,6 @@ void tcp_mark_skb_lost(struct sock *sk, struct sk_buff *skb) } } -/* Updates the delivered and delivered_ce counts */ -static void tcp_count_delivered (struct tcp_sock *tp,u32 delivered, -bool ece_ack) -{ - tp->delivered += delivered; -if (ece_ack) - tp->delivered_ce += delivered; -} -/* This procedure tags the retransmission queue when SACKs arrive. * * We have three tag bits: SACKED(S), RETRANS(R) and LOST(L).
@@ -3816,12 +3821,23 @@ static void tcp_process_tlp_ack(struct sock *sk, u32 ack, int flag) } } -static inline void tcp_in_ack_event (struct sock *sk,u32 flags) +static void tcp_in_ack_event (struct sock *sk,int flag) {const struct inet_connection_sock *icsk =inet_csk (sk); -if (icsk->icsk_ca_ops->in_ack_event) - icsk->icsk_ca_ops->in_ack_event (sk, flags); +if (icsk->icsk_ca_ops->in_ack_event) { +u32 ack_ev_flags =0 ; + +if (flag &FLAG_WIN_UPDATE ) + ack_ev_flags |=CA_ACK_WIN_UPDATE ; +if (flag &FLAG_SLOWPATH ) { + ack_ev_flags |=CA_ACK_SLOWPATH ; +if (flag &FLAG_ECE ) + ack_ev_flags |=CA_ACK_ECE ; + } + + icsk->icsk_ca_ops->in_ack_event (sk, ack_ev_flags); + } }/* Congestion control has updated the cwnd already. So if we're in
@@ -3938,12 +3954,8 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)tcp_snd_una_update (tp, ack); flag |=FLAG_WIN_UPDATE ; -tcp_in_ack_event (sk,CA_ACK_WIN_UPDATE ); -NET_INC_STATS (sock_net (sk),LINUX_MIB_TCPHPACKS ); }else { -u32 ack_ev_flags =CA_ACK_SLOWPATH ; -if (ack_seq !=TCP_SKB_CB (skb)->end_seq) flag |=FLAG_DATA ;else
@@ -3955,19 +3967,12 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag) flag |=tcp_sacktag_write_queue (sk, skb, prior_snd_una, &sack_state); -if (tcp_ecn_rcv_ecn_echo (tp,tcp_hdr (skb))) { +if (tcp_ecn_rcv_ecn_echo (tp,tcp_hdr (skb))) flag |=FLAG_ECE ; - ack_ev_flags |=CA_ACK_ECE ; - }if (sack_state.sack_delivered)tcp_count_delivered (tp, sack_state.sack_delivered, flag &FLAG_ECE ); - -if (flag &FLAG_WIN_UPDATE ) - ack_ev_flags |=CA_ACK_WIN_UPDATE ; - -tcp_in_ack_event (sk, ack_ev_flags); }/* This is a deviation from RFC3168 since it states that:
@@ -3994,6 +3999,8 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)tcp_rack_update_reo_wnd (sk, &rs); +tcp_in_ack_event (sk, flag); +if (tp->tlp_high_seq)tcp_process_tlp_ack (sk, ack, flag);
@@ -4025,6 +4032,7 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)return 1 ; no_queue: +tcp_in_ack_event (sk, flag);/* If data was DSACKed, see if we can undo a cwnd reduction. */ if (flag &FLAG_DSACKING_ACK ) { tcp_fastretrans_alert(sk, prior_snd_una, num_dupack, &flag,
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 94/444 rtc: rv3032: fix EERD location
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexandre Belloni <[email protected]>
[ Upstream commit b0f9cb4a0706b0356e84d67e48500b77b343debe ]
EERD is bit 2 in CTRL1
--- drivers/rtc/rtc-rv3032.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-rv3032.c +1 -1
@@ -69,7 +69,7 @@#define RV3032_CLKOUT2_FD_MSK GENMASK(6, 5)#define RV3032_CLKOUT2_OS BIT(7) -#define RV3032_CTRL1_EERD BIT(3) +#define RV3032_CTRL1_EERD BIT(2)#define RV3032_CTRL1_WADA BIT(5)#define RV3032_CTRL2_STOP BIT(0)
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 95/444 objtool: Fix error handling inconsistencies in check()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josh Poimboeuf <[email protected]>
[ Upstream commit b745962cb97569aad026806bb0740663cf813147 ]
Make sure all fatal errors are funneled through the 'out' label with a negative ret.
--- tools/objtool/check.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
tools/objtool/check.c +6 -4
@@ -4692,8 +4692,10 @@ int check(struct objtool_file *file)init_cfi_state (&force_undefined_cfi); force_undefined_cfi.force_undefined = true; -if (!cfi_hash_alloc (1UL << (file->elf->symbol_bits -3 ))) +if (!cfi_hash_alloc (1UL << (file->elf->symbol_bits -3 ))) { + ret =-1 ; goto out; + }cfi_hash_add (&init_cfi);cfi_hash_add (&func_cfi);
@@ -4710,7 +4712,7 @@ int check(struct objtool_file *file)if (opts.retpoline) { ret =validate_retpoline (file);if (ret <0 ) -return ret; + goto out; warnings += ret; }
@@ -4746,7 +4748,7 @@ int check(struct objtool_file *file)*/ ret =validate_unrets (file);if (ret <0 ) -return ret; + goto out; warnings += ret; }
@@ -4809,7 +4811,7 @@ int check(struct objtool_file *file)if (opts.prefix) { ret =add_prefix_symbols (file);if (ret <0 ) -return ret; + goto out; warnings += ret; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 96/444 thunderbolt: Do not add non-active NVM if NVM upgrade is disabled for retimer
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mika Westerberg <[email protected]>
[ Upstream commit ad79c278e478ca8c1a3bf8e7a0afba8f862a48a1 ]
This is only used to write a new NVM in order to upgrade the retimer firmware. It does not make sense to expose it if upgrade is disabled. This also makes it consistent with the router NVM upgrade.
--- drivers/thunderbolt/retimer.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/thunderbolt/retimer.c +5 -3
@@ -89,9 +89,11 @@ static int tb_retimer_nvm_add(struct tb_retimer *rt)if (ret) goto err_nvm; - ret =tb_nvm_add_non_active (nvm, nvm_write); -if (ret) - goto err_nvm; +if (!rt->no_nvm_upgrade) { + ret =tb_nvm_add_non_active (nvm, nvm_write); +if (ret) + goto err_nvm; + } rt->nvm = nvm;return 0 ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 97/444 ASoC: mediatek: mt6359: Add stub for mt6359_accdet_enable_jack_detect
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nícolas F. R. A. Prado <[email protected]>
[ Upstream commit 0116a7d84b32537a10d9bea1fd1bfc06577ef527 ]
Add a stub for mt6359_accdet_enable_jack_detect() to prevent linker failures in the machine sound drivers calling it when CONFIG_SND_SOC_MT6359_ACCDET is not enabled.
--- sound/soc/codecs/mt6359-accdet.h | 9 +++++++++ 1 file changed, 9 insertions(+)
sound/soc/codecs/mt6359-accdet.h +9 -0
@@ -123,6 +123,15 @@ struct mt6359_accdet { struct workqueue_struct *jd_workqueue; }; +#if IS_ENABLED (CONFIG_SND_SOC_MT6359_ACCDET )int mt6359_accdet_enable_jack_detect (struct snd_soc_component *component,struct snd_soc_jack *jack); +#else +static inline int +mt6359_accdet_enable_jack_detect (struct snd_soc_component *component, +struct snd_soc_jack *jack) +{ +return -EOPNOTSUPP ; +} +#endif #endif
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 98/444 bpf: Allow pre-ordering for bpf cgroup progs
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yonghong Song <[email protected]>
[ Upstream commit 4b82b181a26cff8bf7adc3a85a88d121d92edeaf ]
Currently for bpf progs in a cgroup hierarchy, the effective prog array is computed from bottom cgroup to upper cgroups (post-ordering). For example, the following cgroup hierarchy
root cgroup: p1, p2
subcgroup: p3, p4
have BPF_F_ALLOW_MULTI for both cgroup levels.
The effective cgroup array ordering looks like
p3 p4 p1 p2
and at run time, progs will execute based on that order.
But in some cases, it is desirable to have root prog executes earlier than children progs (pre-ordering). For example,
- prog p1 intends to collect original pkt dest addresses.
- prog p3 will modify original pkt dest addresses to a proxy address for security reason.
The end result is that prog p1 gets proxy address which is not what it wants. Putting p1 to every child cgroup is not desirable either as it will duplicate itself in many child cgroups. And this is exactly a use case we are encountering in Meta.
To fix this issue, let us introduce a flag BPF_F_PREORDER. If the flag is specified at attachment time, the prog has higher priority and the ordering with that flag will be from top to bottom (pre-ordering). For example, in the above example,
root cgroup: p1, p2
subcgroup: p3, p4
Let us say p2 and p4 are marked with BPF_F_PREORDER. The final effective array ordering will be
p2 p4 p3 p1
--- include/linux/bpf-cgroup.h | 1 + include/uapi/linux/bpf.h | 1 + kernel/bpf/cgroup.c | 33 +++++++++++++++++++++++++-------- kernel/bpf/syscall.c | 3 ++- tools/include/uapi/linux/bpf.h | 1 + 5 files changed, 30 insertions(+), 9 deletions(-)
include/linux/bpf-cgroup.h +1 -0
@@ -106,6 +106,7 @@ struct bpf_prog_list {struct bpf_prog *prog;struct bpf_cgroup_link *link;struct bpf_cgroup_storage *storage[MAX_BPF_CGROUP_STORAGE_TYPE ]; +u32 flags; };int cgroup_bpf_inherit (struct cgroup *cgrp);
include/uapi/linux/bpf.h +1 -0
@@ -1140,6 +1140,7 @@ enum bpf_perf_event_type {#define BPF_F_BEFORE (1U << 3)#define BPF_F_AFTER (1U << 4)#define BPF_F_ID (1U << 5) +#define BPF_F_PREORDER (1U << 6)#define BPF_F_LINK BPF_F_LINK/* 1 << 13 */ /* If BPF_F_STRICT_ALIGNMENT is used in BPF_PROG_LOAD command, the
kernel/bpf/cgroup.c +25 -8
@@ -369,7 +369,7 @@ static struct bpf_prog *prog_list_prog(struct bpf_prog_list *pl)/* count number of elements in the list. * it's slow but the list cannot be long */ -static u32 prog_list_length (struct hlist_head *head) +static u32 prog_list_length (struct hlist_head *head,int *preorder_cnt) {struct bpf_prog_list *pl;u32 cnt =0 ;
@@ -377,6 +377,8 @@ static u32 prog_list_length(struct hlist_head *head)hlist_for_each_entry (pl, head, node) {if (!prog_list_prog (pl))continue ; +if (preorder_cnt && (pl->flags &BPF_F_PREORDER )) + (*preorder_cnt)++; cnt++; }return cnt;
@@ -400,7 +402,7 @@ static bool hierarchy_allows_attach(struct cgroup *cgrp,if (flags &BPF_F_ALLOW_MULTI )return true; - cnt =prog_list_length (&p->bpf.progs[atype]); + cnt =prog_list_length (&p->bpf.progs[atype],NULL );WARN_ON_ONCE (cnt >1 );if (cnt ==1 )return !!(flags &BPF_F_ALLOW_OVERRIDE );
@@ -423,12 +425,12 @@ static int compute_effective_progs(struct cgroup *cgrp,struct bpf_prog_array *progs;struct bpf_prog_list *pl;struct cgroup *p = cgrp; -int cnt =0 ; +int i, j, cnt =0 , preorder_cnt =0 , fstart, bstart, init_bstart;/* count number of effective programs by walking parents */ do {if (cnt ==0 || (p->bpf.flags[atype] &BPF_F_ALLOW_MULTI )) - cnt +=prog_list_length (&p->bpf.progs[atype]); + cnt +=prog_list_length (&p->bpf.progs[atype], &preorder_cnt); p =cgroup_parent (p); }while (p);
@@ -439,20 +441,34 @@ static int compute_effective_progs(struct cgroup *cgrp,/* populate the array with effective progs */ cnt =0 ; p = cgrp; + fstart = preorder_cnt; + bstart = preorder_cnt -1 ;do {if (cnt >0 && !(p->bpf.flags[atype] &BPF_F_ALLOW_MULTI ))continue ; + init_bstart = bstart;hlist_for_each_entry (pl, &p->bpf.progs[atype], node) {if (!prog_list_prog (pl))continue ; - item = &progs->items[cnt]; +if (pl->flags &BPF_F_PREORDER ) { + item = &progs->items[bstart]; + bstart--; + }else { + item = &progs->items[fstart]; + fstart++; + } item->prog =prog_list_prog (pl);bpf_cgroup_storages_assign (item->cgroup_storage, pl->storage); cnt++; } + +/* reverse pre-ordering progs at this cgroup level */ +for (i = bstart +1 , j = init_bstart; i < j; i++, j--) +swap (progs->items[i], progs->items[j]); + }while ((p =cgroup_parent (p))); *array = progs;
@@ -663,7 +679,7 @@ static int __cgroup_bpf_attach(struct cgroup *cgrp,*/ return -EPERM ; -if (prog_list_length (progs) >=BPF_CGROUP_MAX_PROGS ) +if (prog_list_length (progs,NULL ) >=BPF_CGROUP_MAX_PROGS )return -E2BIG ; pl = find_attach_entry(progs, prog, link, replace_prog,
@@ -698,6 +714,7 @@ static int __cgroup_bpf_attach(struct cgroup *cgrp, pl->prog = prog; pl->link = link; + pl->flags = flags;bpf_cgroup_storages_assign (pl->storage, storage); cgrp->bpf.flags[atype] = saved_flags;
@@ -1073,7 +1090,7 @@ static int __cgroup_bpf_query(struct cgroup *cgrp, const union bpf_attr *attr, lockdep_is_held(&cgroup_mutex)); total_cnt +=bpf_prog_array_length (effective); }else { - total_cnt +=prog_list_length (&cgrp->bpf.progs[atype]); + total_cnt +=prog_list_length (&cgrp->bpf.progs[atype],NULL ); } }
@@ -1105,7 +1122,7 @@ static int __cgroup_bpf_query(struct cgroup *cgrp, const union bpf_attr *attr,u32 id; progs = &cgrp->bpf.progs[atype]; - cnt =min_t (int,prog_list_length (progs), total_cnt); + cnt =min_t (int,prog_list_length (progs,NULL ), total_cnt); i =0 ;hlist_for_each_entry (pl, progs, node) { prog =prog_list_prog (pl);
kernel/bpf/syscall.c +2 -1
@@ -3900,7 +3900,8 @@ static int bpf_prog_attach_check_attach_type(const struct bpf_prog *prog,#define BPF_F_ATTACH_MASK_BASE \ (BPF_F_ALLOW_OVERRIDE | \ BPF_F_ALLOW_MULTI | \ - BPF_F_REPLACE) + BPF_F_REPLACE | \ + BPF_F_PREORDER)#define BPF_F_ATTACH_MASK_MPROG \ (BPF_F_REPLACE | \
tools/include/uapi/linux/bpf.h +1 -0
@@ -1140,6 +1140,7 @@ enum bpf_perf_event_type {#define BPF_F_BEFORE (1U << 3)#define BPF_F_AFTER (1U << 4)#define BPF_F_ID (1U << 5) +#define BPF_F_PREORDER (1U << 6)#define BPF_F_LINK BPF_F_LINK/* 1 << 13 */ /* If BPF_F_STRICT_ALIGNMENT is used in BPF_PROG_LOAD command, the
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 99/444 kbuild: fix argument parsing in scripts/config
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Seyediman Seyedarab <[email protected]>
[ Upstream commit f757f6011c92b5a01db742c39149bed9e526478f ]
The script previously assumed --file was always the first argument, which caused issues when it appeared later. This patch updates the parsing logic to scan all arguments to find --file, sets the config file correctly, and resets the argument list with the remaining commands.
It also fixes --refresh to respect --file by passing KCONFIG_CONFIG=$FN to make oldconfig.
--- scripts/config | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-)
scripts/config +16 -10
@@ -32,6 +32,7 @@ commands: Disable option directly after other option --module-after|-M beforeopt option Turn option into module directly after other option + --refresh Refresh the config using old settings commands can be repeated multiple times
@@ -124,16 +125,22 @@ undef_var() { txt_delete "^# $name is not set" "$FN" } -if [ "$1" = "--file" ]; then - FN="$2" - if [ "$FN" = "" ] ; then - usage +FN=.config +CMDS=() +while [[ $# -gt 0 ]]; do + if [ "$1" = "--file" ]; then + if [ "$2" = "" ]; then + usage + fi + FN="$2" + shift 2 + else + CMDS+=("$1") + shift fi - shift 2 -else - FN=.config -fi +done +set -- "${CMDS[@]}" if [ "$1" = "" ] ; then usage fi
@@ -217,9 +224,8 @@ while [ "$1" != "" ] ; do set_var "${CONFIG_}$B" "${CONFIG_}$B=m" "${CONFIG_}$A" ;; - # undocumented because it ignores --file (fixme) --refresh) - yes "" | make oldconfig + yes "" | make oldconfig KCONFIG_CONFIG=$FN ;; *)
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 100/444 crypto: octeontx2 - suppress auth failure screaming due to negative tests
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shashank Gupta <[email protected]>
[ Upstream commit 64b7871522a4cba99d092e1c849d6f9092868aaa ]
This patch addresses an issue where authentication failures were being erroneously reported due to negative test failures in the "ccm(aes)" selftest.pr_debug suppress unnecessary screaming of these tests.
--- drivers/crypto/marvell/octeontx2/otx2_cptvf_reqmgr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/crypto/marvell/octeontx2/otx2_cptvf_reqmgr.c +4 -3
@@ -410,9 +410,10 @@ static int cpt_process_ccode(struct otx2_cptlfs_info *lfs,break ; } -dev_err (&pdev->dev, -"Request failed with software error code 0x%x\n" , - cpt_status->s.uc_compcode); +pr_debug ("Request failed with software error code 0x%x: algo = %s driver = %s\n" , + cpt_status->s.uc_compcode, + info->req->areq->tfm->__crt_alg->cra_name, + info->req->areq->tfm->__crt_alg->cra_driver_name);otx2_cpt_dump_sg_list (pdev, info->req);break ; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 101/444 dm: restrict dm device size to 2^63-512 bytes
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikulas Patocka <[email protected]>
[ Upstream commit 45fc728515c14f53f6205789de5bfd72a95af3b8 ]
The devices with size >= 2^63 bytes can't be used reliably by userspace because the type off_t is a signed 64-bit integer.
Therefore, we limit the maximum size of a device mapper device to 2^63-512 bytes.
--- drivers/md/dm-table.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/md/dm-table.c +4 -0
@@ -669,6 +669,10 @@ int dm_table_add_target(struct dm_table *t, const char *type,DMERR ("%s: zero-length target" ,dm_device_name (t->md));return -EINVAL ; } +if (start + len < start || start + len >LLONG_MAX >>SECTOR_SHIFT ) { +DMERR ("%s: too large device" ,dm_device_name (t->md)); +return -EINVAL ; + } ti->type =dm_get_target_type (type);if (!ti->type) {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 102/444 net/smc: use the correct ndev to find pnetid by pnetid table
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guangguan Wang <[email protected]>
[ Upstream commit bfc6c67ec2d64d0ca4e5cc3e1ac84298a10b8d62 ]
When using smc_pnet in SMC, it will only search the pnetid in the base_ndev of the netdev hierarchy(both HW PNETID and User-defined sw pnetid). This may not work for some scenarios when using SMC in container on cloud environment.
In container, there have choices of different container network, such as directly using host network, virtual network IPVLAN, veth, etc. Different choices of container network have different netdev hierarchy. Examples of netdev hierarchy show below. (eth0 and eth1 in host below is the netdev directly related to the physical device).
_______________________________
| _________________ |
| |POD | |
| | | |
| | eth0_________ | |
| |____| |__| |
| | | |
| | | |
| eth1|base_ndev| eth0_______ |
| | | | RDMA ||
| host |_________| |_______||
---------------------------------
netdev hierarchy if directly using host network
________________________________
| _________________ |
| |POD __________ | |
| | |upper_ndev| | |
| |eth0|__________| | |
| |_______|_________| |
| |lower netdev |
| __|______ |
| eth1| | eth0_______ |
| |base_ndev| | RDMA ||
| host |_________| |_______||
---------------------------------
netdev hierarchy if using IPVLAN
_______________________________
| _____________________ |
| |POD _________ | |
| | |base_ndev|| |
| |eth0(veth)|_________|| |
| |____________|________| |
| |pairs |
| _______|_ |
| | | eth0_______ |
| veth|base_ndev| | RDMA ||
| |_________| |_______||
| _________ |
| eth1|base_ndev| |
| host |_________| |
---------------------------------
netdev hierarchy if using vethDue to some reasons, the eth1 in host is not RDMA attached netdevice, pnetid is needed to map the eth1(in host) with RDMA device so that POD can do SMC-R. Because the eth1(in host) is managed by CNI plugin(such as Terway, network management plugin in container environment), and in cloud environment the eth(in host) can dynamically be inserted by CNI when POD create and dynamically be removed by CNI when POD destroy and no POD related to the eth(in host) anymore. It is hard to config the pnetid to the eth1(in host). But it is easy to config the pnetid to the netdevice which can be seen in POD. When do SMC-R, both the container directly using host network and the container using veth network can successfully match the RDMA device, because the configured pnetid netdev is a base_ndev. But the container using IPVLAN can not successfully match the RDMA device and 0x03030000 fallback happens, because the configured pnetid netdev is not a base_ndev. Additionally, if config pnetid to the eth1(in host) also can not work for matching RDMA device when using veth network and doing SMC-R in POD.
To resolve the problems list above, this patch extends to search user -defined sw pnetid in the clc handshake ndev when no pnetid can be found in the base_ndev, and the base_ndev take precedence over ndev for backward compatibility. This patch also can unify the pnetid setup of different network choices list above in container(Config user-defined sw pnetid in the netdevice can be seen in POD).
--- net/smc/smc_pnet.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
net/smc/smc_pnet.c +5 -3
@@ -1084,14 +1084,16 @@ static void smc_pnet_find_roce_by_pnetid(struct net_device *ndev, struct smc_init_info *ini) {u8 ndev_pnetid[SMC_MAX_PNETID_LEN ]; +struct net_device *base_ndev;struct net *net; - ndev =pnet_find_base_ndev (ndev); + base_ndev =pnet_find_base_ndev (ndev); net =dev_net (ndev); -if (smc_pnetid_by_dev_port (ndev->dev.parent, ndev->dev_port, +if (smc_pnetid_by_dev_port (base_ndev->dev.parent, base_ndev->dev_port, ndev_pnetid) && +smc_pnet_find_ndev_pnetid_by_table (base_ndev, ndev_pnetid) &&smc_pnet_find_ndev_pnetid_by_table (ndev, ndev_pnetid)) { -smc_pnet_find_rdma_dev (ndev, ini); +smc_pnet_find_rdma_dev (base_ndev, ini);return ;/* pnetid could not be determined */ }_smc_pnet_find_roce_by_pnetid (ndev_pnetid, ini,NULL , net);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 103/444 xen: Add support for XenServer 6.1 platform device
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Frediano Ziglio <[email protected]>
[ Upstream commit 2356f15caefc0cc63d9cc5122641754f76ef9b25 ]
On XenServer on Windows machine a platform device with ID 2 instead of 1 is used.
This device is mainly identical to device 1 but due to some Windows update behaviour it was decided to use a device with a different ID.
This causes compatibility issues with Linux which expects, if Xen is detected, to find a Xen platform device (5853:0001) otherwise code will crash due to some missing initialization (specifically grant tables). Specifically from dmesg
RIP: 0010:gnttab_expand+0x29/0x210
Code: 90 0f 1f 44 00 00 55 31 d2 48 89 e5 41 57 41 56 41 55 41 89 fd
41 54 53 48 83 ec 10 48 8b 05 7e 9a 49 02 44 8b 35 a7 9a 49 02
<8b> 48 04 8d 44 39 ff f7 f1 45 8d 24 06 89 c3 e8 43 fe ff ff
44 39
RSP: 0000:ffffba34c01fbc88 EFLAGS: 00010086
...The device 2 is presented by Xapi adding device specification to Qemu command line.
Message-ID: <[email protected]>
--- drivers/xen/platform-pci.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/xen/platform-pci.c +4 -0
@@ -26,6 +26,8 @@#define DRV_NAME "xen-platform-pci" +#define PCI_DEVICE_ID_XEN_PLATFORM_XS61 0x0002 +static unsigned long platform_mmio;static unsigned long platform_mmio_alloc;static unsigned long platform_mmiolen;
@@ -174,6 +176,8 @@ static int platform_pci_probe(struct pci_dev *pdev,static const struct pci_device_id platform_pci_tbl[] = { {PCI_VENDOR_ID_XEN ,PCI_DEVICE_ID_XEN_PLATFORM ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,0 }, + {PCI_VENDOR_ID_XEN ,PCI_DEVICE_ID_XEN_PLATFORM_XS61 , +PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,0 }, {0 ,} };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 104/444 pinctrl-tegra: Restore SFSEL bit when freeing pins
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Prathamesh Shete <[email protected]>
[ Upstream commit c12bfa0fee65940b10ff5187349f76c6f6b1df9c ]
Each pin can be configured as a Special Function IO (SFIO) or GPIO, where the SFIO enables the pin to operate in alternative modes such as I2C, SPI, etc.
The current implementation sets all the pins back to SFIO mode even if they were initially in GPIO mode. This can cause glitches on the pins when pinctrl_gpio_free() is called.
Avoid these undesired glitches by storing the pin's SFIO/GPIO state on GPIO request and restoring it on GPIO free.
--- drivers/pinctrl/tegra/pinctrl-tegra.c | 59 +++++++++++++++++++++++---- drivers/pinctrl/tegra/pinctrl-tegra.h | 6 +++ 2 files changed, 57 insertions(+), 8 deletions(-)
drivers/pinctrl/tegra/pinctrl-tegra.c +51 -8
@@ -280,8 +280,8 @@ static int tegra_pinctrl_set_mux(struct pinctrl_dev *pctldev,return 0 ; } -static const struct tegra_pingroup *tegra_pinctrl_get_group (struct pinctrl_dev *pctldev, -unsigned int offset) +static int tegra_pinctrl_get_group_index (struct pinctrl_dev *pctldev, +unsigned int offset) {struct tegra_pmx *pmx =pinctrl_dev_get_drvdata (pctldev);unsigned int group, num_pins, j;
@@ -294,12 +294,35 @@ static const struct tegra_pingroup *tegra_pinctrl_get_group(struct pinctrl_dev *continue ;for (j =0 ; j < num_pins; j++) {if (offset == pins[j]) -return &pmx->soc->groups[group]; +return group; } } -dev_err (pctldev->dev,"Pingroup not found for pin %u\n" , offset); -return NULL ; +return -EINVAL ; +} + +static const struct tegra_pingroup *tegra_pinctrl_get_group (struct pinctrl_dev *pctldev, +unsigned int offset, +int group_index) +{ +struct tegra_pmx *pmx =pinctrl_dev_get_drvdata (pctldev); + +if (group_index <0 || group_index > pmx->soc->ngroups) +return NULL ; + +return &pmx->soc->groups[group_index]; +} + +static struct tegra_pingroup_config *tegra_pinctrl_get_group_config (struct pinctrl_dev *pctldev, +unsigned int offset, +int group_index) +{ +struct tegra_pmx *pmx =pinctrl_dev_get_drvdata (pctldev); + +if (group_index <0 ) +return NULL ; + +return &pmx->pingroup_configs[group_index]; } static int tegra_pinctrl_gpio_request_enable(struct pinctrl_dev *pctldev,
@@ -308,12 +331,15 @@ static int tegra_pinctrl_gpio_request_enable(struct pinctrl_dev *pctldev, {struct tegra_pmx *pmx =pinctrl_dev_get_drvdata (pctldev);const struct tegra_pingroup *group; +struct tegra_pingroup_config *config; +int group_index;u32 value;if (!pmx->soc->sfsel_in_mux)return 0 ; - group =tegra_pinctrl_get_group (pctldev, offset); + group_index =tegra_pinctrl_get_group_index (pctldev, offset); + group =tegra_pinctrl_get_group (pctldev, offset, group_index);if (!group)return -EINVAL ;
@@ -321,7 +347,11 @@ static int tegra_pinctrl_gpio_request_enable(struct pinctrl_dev *pctldev,if (group->mux_reg <0 || group->sfsel_bit <0 )return -EINVAL ; + config =tegra_pinctrl_get_group_config (pctldev, offset, group_index); +if (!config) +return -EINVAL ; value =pmx_readl (pmx, group->mux_bank, group->mux_reg); + config->is_sfsel = (value &BIT (group->sfsel_bit)) !=0 ; value &= ~BIT (group->sfsel_bit);pmx_writel (pmx, value, group->mux_bank, group->mux_reg);
@@ -334,12 +364,15 @@ static void tegra_pinctrl_gpio_disable_free(struct pinctrl_dev *pctldev, {struct tegra_pmx *pmx =pinctrl_dev_get_drvdata (pctldev);const struct tegra_pingroup *group; +struct tegra_pingroup_config *config; +int group_index;u32 value;if (!pmx->soc->sfsel_in_mux)return ; - group =tegra_pinctrl_get_group (pctldev, offset); + group_index =tegra_pinctrl_get_group_index (pctldev, offset); + group =tegra_pinctrl_get_group (pctldev, offset, group_index);if (!group)return ;
@@ -347,8 +380,12 @@ static void tegra_pinctrl_gpio_disable_free(struct pinctrl_dev *pctldev,if (group->mux_reg <0 || group->sfsel_bit <0 )return ; + config =tegra_pinctrl_get_group_config (pctldev, offset, group_index); +if (!config) +return ; value =pmx_readl (pmx, group->mux_bank, group->mux_reg); - value |=BIT (group->sfsel_bit); +if (config->is_sfsel) + value |=BIT (group->sfsel_bit);pmx_writel (pmx, value, group->mux_bank, group->mux_reg); }
@@ -785,6 +822,12 @@ int tegra_pinctrl_probe(struct platform_device *pdev, pmx->dev = &pdev->dev; pmx->soc = soc_data; + pmx->pingroup_configs =devm_kcalloc (&pdev->dev, + pmx->soc->ngroups,sizeof (*pmx->pingroup_configs), +GFP_KERNEL ); +if (!pmx->pingroup_configs) +return -ENOMEM ; +/* * Each mux group will appear in 4 functions' list of groups. * This over-allocates slightly, since not all groups are mux groups.
drivers/pinctrl/tegra/pinctrl-tegra.h +6 -0
@@ -8,6 +8,10 @@ #ifndef __PINMUX_TEGRA_H__ #define __PINMUX_TEGRA_H__ +struct tegra_pingroup_config { + bool is_sfsel; +}; + struct tegra_pmx { struct device *dev; struct pinctrl_dev *pctl;
@@ -21,6 +25,8 @@ struct tegra_pmx {int nbanks;void __iomem **regs;u32 *backup_regs; +/* Array of size soc->ngroups */ +struct tegra_pingroup_config *pingroup_configs; };enum tegra_pinconf_param {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 105/444 mfd: tps65219: Remove TPS65219_REG_TI_DEV_ID check
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shree Ramamoorthy <[email protected]>
[ Upstream commit 76b58d5111fdcffce615beb71520bc7a6f1742c9 ]
The chipid macro/variable and regmap_read function call is not needed because the TPS65219_REG_TI_DEV_ID register value is not a consistent value across TPS65219 PMIC config versions. Reading from the DEV_ID register without a consistent value to compare it to isn't useful. There isn't a way to verify the match data ID is the same ID read from the DEV_ID device register. 0xF0 isn't a DEV_ID value consistent across TPS65219 NVM configurations.
For TPS65215, there is a consistent value in bits 5-0 of the DEV_ID register. However, there are other error checks in place within probe() that apply to both PMICs rather than keeping this isolated check for one PMIC.
--- drivers/mfd/tps65219.c | 7 ------- 1 file changed, 7 deletions(-)
drivers/mfd/tps65219.c +0 -7
@@ -228,7 +228,6 @@ static struct regmap_irq_chip tps65219_irq_chip = {static int tps65219_probe (struct i2c_client *client) {struct tps65219 *tps; -unsigned int chipid;bool pwr_button;int ret;
@@ -253,12 +252,6 @@ static int tps65219_probe(struct i2c_client *client)if (ret)return ret; - ret =regmap_read (tps->regmap,TPS65219_REG_TI_DEV_ID , &chipid); -if (ret) { -dev_err (tps->dev,"Failed to read device ID: %d\n" , ret); -return ret; - } - ret =devm_mfd_add_devices (tps->dev,PLATFORM_DEVID_AUTO , tps65219_cells,ARRAY_SIZE (tps65219_cells),NULL ,0 ,regmap_irq_get_domain (tps->irq_data));
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 106/444 drm/amdgpu: Update SRIOV video codec caps
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Rosca <[email protected]>
[ Upstream commit 19478f2011f8b53dee401c91423c4e0b73753e4f ]
There have been multiple fixes to the video caps that are missing for SRIOV. Update the SRIOV caps with correct values.
--- drivers/gpu/drm/amd/amdgpu/nv.c | 16 ++++++++-------- drivers/gpu/drm/amd/amdgpu/soc21.c | 10 ++-------- 2 files changed, 10 insertions(+), 16 deletions(-)
drivers/gpu/drm/amd/amdgpu/nv.c +8 -8
@@ -142,23 +142,23 @@ static struct amdgpu_video_codec_info sriov_sc_video_codecs_encode_array[] = { };static struct amdgpu_video_codec_info sriov_sc_video_codecs_decode_array_vcn0[] = { - {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG2 ,4096 ,4096 ,3 )}, - {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4 ,4096 ,4096 ,5 )}, + {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG2 ,1920 ,1088 ,3 )}, + {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4 ,1920 ,1088 ,5 )}, {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4_AVC ,4096 ,4096 ,52 )}, - {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_VC1 ,4096 ,4096 ,4 )}, + {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_VC1 ,1920 ,1088 ,4 )}, {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_HEVC ,8192 ,4352 ,186 )}, - {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_JPEG ,4096 ,4096 ,0 )}, + {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_JPEG ,16384 ,16384 ,0 )}, {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_VP9 ,8192 ,4352 ,0 )}, {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_AV1 ,8192 ,4352 ,0 )}, };static struct amdgpu_video_codec_info sriov_sc_video_codecs_decode_array_vcn1[] = { - {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG2 ,4096 ,4096 ,3 )}, - {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4 ,4096 ,4096 ,5 )}, + {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG2 ,1920 ,1088 ,3 )}, + {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4 ,1920 ,1088 ,5 )}, {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4_AVC ,4096 ,4096 ,52 )}, - {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_VC1 ,4096 ,4096 ,4 )}, + {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_VC1 ,1920 ,1088 ,4 )}, {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_HEVC ,8192 ,4352 ,186 )}, - {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_JPEG ,4096 ,4096 ,0 )}, + {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_JPEG ,16384 ,16384 ,0 )}, {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_VP9 ,8192 ,4352 ,0 )}, };
drivers/gpu/drm/amd/amdgpu/soc21.c +2 -8
@@ -117,23 +117,17 @@ static struct amdgpu_video_codecs sriov_vcn_4_0_0_video_codecs_encode_vcn1 = { };static struct amdgpu_video_codec_info sriov_vcn_4_0_0_video_codecs_decode_array_vcn0[] = { - {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG2 ,4096 ,4096 ,3 )}, - {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4 ,4096 ,4096 ,5 )}, {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4_AVC ,4096 ,4096 ,52 )}, - {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_VC1 ,4096 ,4096 ,4 )}, {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_HEVC ,8192 ,4352 ,186 )}, - {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_JPEG ,4096 ,4096 ,0 )}, + {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_JPEG ,16384 ,16384 ,0 )}, {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_VP9 ,8192 ,4352 ,0 )}, {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_AV1 ,8192 ,4352 ,0 )}, };static struct amdgpu_video_codec_info sriov_vcn_4_0_0_video_codecs_decode_array_vcn1[] = { - {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG2 ,4096 ,4096 ,3 )}, - {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4 ,4096 ,4096 ,5 )}, {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4_AVC ,4096 ,4096 ,52 )}, - {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_VC1 ,4096 ,4096 ,4 )}, {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_HEVC ,8192 ,4352 ,186 )}, - {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_JPEG ,4096 ,4096 ,0 )}, + {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_JPEG ,16384 ,16384 ,0 )}, {codec_info_build (AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_VP9 ,8192 ,4352 ,0 )}, };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 107/444 ASoC: sun4i-codec: support hp-det-gpios property
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ryan Walklin <[email protected]>
[ Upstream commit a149377c033afe6557c50892ebbfc0e8b7e2e253 ]
Add support for GPIO headphone detection with the hp-det-gpios property. In order for this to properly disable the path upon removal of headphones, the output must be labelled Headphone which is a common sink in the driver.
Describe a headphone jack and detection GPIO in the driver, check for a corresponding device tree node, and enable jack detection in a new machine init function if described.
--
Changelog v1..v2:
- Separate DAPM changes into separate patch and add rationale.
--- sound/soc/sunxi/sun4i-codec.c | 53 +++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+)
sound/soc/sunxi/sun4i-codec.c +53 -0
@@ -25,6 +25,7 @@#include <linux/gpio/consumer.h> #include <sound/core.h> +#include <sound/jack.h> #include <sound/pcm.h> #include <sound/pcm_params.h> #include <sound/soc.h>
@@ -239,6 +240,7 @@ struct sun4i_codec {struct clk *clk_module;struct reset_control *rst;struct gpio_desc *gpio_pa; +struct gpio_desc *gpio_hp;/* ADC_FIFOC register is at different offset on different SoCs */ struct regmap_field *reg_adc_fifoc;
@@ -1277,6 +1279,49 @@ static struct snd_soc_dai_driver dummy_cpu_dai = { .ops = &dummy_dai_ops, }; +static struct snd_soc_jack sun4i_headphone_jack; + +static struct snd_soc_jack_pin sun4i_headphone_jack_pins[] = { + { .pin ="Headphone" , .mask =SND_JACK_HEADPHONE }, +}; + +static struct snd_soc_jack_gpio sun4i_headphone_jack_gpio = { + .name ="hp-det" , + .report =SND_JACK_HEADPHONE , + .debounce_time =150 , +}; + +static int sun4i_codec_machine_init (struct snd_soc_pcm_runtime *rtd) +{ +struct snd_soc_card *card = rtd->card; +struct sun4i_codec *scodec =snd_soc_card_get_drvdata (card); +int ret; + +if (scodec->gpio_hp) { + ret =snd_soc_card_jack_new_pins (card,"Headphone Jack" , +SND_JACK_HEADPHONE , + &sun4i_headphone_jack, + sun4i_headphone_jack_pins, +ARRAY_SIZE (sun4i_headphone_jack_pins)); +if (ret) { +dev_err (rtd->dev, +"Headphone jack creation failed: %d\n" , ret); +return ret; + } + + sun4i_headphone_jack_gpio.desc = scodec->gpio_hp; + ret =snd_soc_jack_add_gpios (&sun4i_headphone_jack,1 , + &sun4i_headphone_jack_gpio); + +if (ret) { +dev_err (rtd->dev,"Headphone GPIO not added: %d\n" , ret); +return ret; + } + } + +return 0 ; +} +static struct snd_soc_dai_link *sun4i_codec_create_link (struct device *dev,int *num_links) {
@@ -1302,6 +1347,7 @@ static struct snd_soc_dai_link *sun4i_codec_create_link(struct device *dev, link->codecs->name =dev_name (dev); link->platforms->name =dev_name (dev); link->dai_fmt =SND_SOC_DAIFMT_I2S ; + link->init = sun4i_codec_machine_init; *num_links =1 ;
@@ -1742,6 +1788,13 @@ static int sun4i_codec_probe(struct platform_device *pdev)return ret; } + scodec->gpio_hp =devm_gpiod_get_optional (&pdev->dev,"hp-det" ,GPIOD_IN ); +if (IS_ERR (scodec->gpio_hp)) { + ret =PTR_ERR (scodec->gpio_hp); +dev_err_probe (&pdev->dev, ret,"Failed to get hp-det gpio\n" ); +return ret; + } +/* reg_field setup */ scodec->reg_adc_fifoc = devm_regmap_field_alloc(&pdev->dev, scodec->regmap,
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 108/444 ext4: reject the data_err=abort option in nojournal mode
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Baokun Li <[email protected]>
[ Upstream commit 26343ca0df715097065b02a6cddb4a029d5b9327 ]
data_err=abort aborts the journal on I/O errors. However, this option is meaningless if journal is disabled, so it is rejected in nojournal mode to reduce unnecessary checks. Also, this option is ignored upon remount.
--- fs/ext4/super.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
fs/ext4/super.c +12 -0
@@ -2821,6 +2821,13 @@ static int ext4_check_opt_consistency(struct fs_context *fc, }if (is_remount) { +if (!sbi->s_journal && +ctx_test_mount_opt (ctx,EXT4_MOUNT_DATA_ERR_ABORT )) { +ext4_msg (NULL ,KERN_WARNING , +"Remounting fs w/o journal so ignoring data_err option" ); +ctx_clear_mount_opt (ctx,EXT4_MOUNT_DATA_ERR_ABORT ); + } +if (ctx_test_mount_opt (ctx,EXT4_MOUNT_DAX_ALWAYS ) && (test_opt (sb,DATA_FLAGS ) ==EXT4_MOUNT_JOURNAL_DATA )) { ext4_msg(NULL, KERN_ERR, "can't mount with "
@@ -5421,6 +5428,11 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb) "data=, fs mounted w/o journal"); goto failed_mount3a; } +if (test_opt (sb,DATA_ERR_ABORT )) { +ext4_msg (sb,KERN_ERR , +"can't mount with data_err=abort, fs mounted w/o journal" ); + goto failed_mount3a; + } sbi->s_def_mount_opt &= ~EXT4_MOUNT_JOURNAL_CHECKSUM ;clear_opt (sb,JOURNAL_CHECKSUM );clear_opt (sb,DATA_FLAGS );
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 109/444 ext4: do not convert the unwritten extents if data writeback fails
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Baokun Li <[email protected]>
[ Upstream commit e856f93e0fb249955f7d5efb18fe20500a9ccc6d ]
When dioread_nolock is turned on (the default), it will convert unwritten extents to written at ext4_end_io_end(), even if the data writeback fails.
It leads to the possibility that stale data may be exposed when the physical block corresponding to the file data is read-only (i.e., writes return -EIO, but reads are normal).
Therefore a new ext4_io_end->flags EXT4_IO_END_FAILED is added, which indicates that some bio write-back failed in the current ext4_io_end. When this flag is set, the unwritten to written conversion is no longer performed. Users can read the data normally until the caches are dropped, after that, the failed extents can only be read to all 0.
--- fs/ext4/ext4.h | 3 ++- fs/ext4/page-io.c | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-)
fs/ext4/ext4.h +2 -1
@@ -273,7 +273,8 @@ struct ext4_system_blocks {/* * Flags for ext4_io_end->flags */ -#define EXT4_IO_END_UNWRITTEN 0x0001 +#define EXT4_IO_END_UNWRITTEN 0x0001 +#define EXT4_IO_END_FAILED 0x0002struct ext4_io_end_vec {struct list_head list;/* list of io_end_vec */
fs/ext4/page-io.c +14 -2
@@ -181,14 +181,25 @@ static int ext4_end_io_end(ext4_io_end_t *io_end)"list->prev 0x%p\n" , io_end, inode->i_ino, io_end->list.next, io_end->list.prev); - io_end->handle =NULL ;/* Following call will use up the handle */ - ret =ext4_convert_unwritten_io_end_vec (handle, io_end); +/* +* Do not convert the unwritten extents if data writeback fails, +* or stale data may be exposed. +*/ + io_end->handle =NULL ;/* Following call will use up the handle */ +if (unlikely (io_end->flag &EXT4_IO_END_FAILED )) { + ret = -EIO ; +if (handle) +jbd2_journal_free_reserved (handle); + }else { + ret =ext4_convert_unwritten_io_end_vec (handle, io_end); + }if (ret <0 && !ext4_forced_shutdown (inode->i_sb)) {ext4_msg (inode->i_sb,KERN_EMERG ,"failed to convert unwritten extents to written " "extents -- potential data loss! " "(inode %lu, error %d)" , inode->i_ino, ret); } +ext4_clear_io_unwritten_flag (io_end);ext4_release_io_end (io_end);return ret;
@@ -344,6 +355,7 @@ static void ext4_end_bio(struct bio *bio) bio->bi_status, inode->i_ino, (unsigned long long ) bi_sector >> (inode->i_blkbits - 9)); + io_end->flag |=EXT4_IO_END_FAILED ;mapping_set_error (inode->i_mapping,blk_status_to_errno (bio->bi_status)); }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 110/444 RDMA/uverbs: Propagate errors from rdma_lookup_get_uobject()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Maher Sanalla <[email protected]>
[ Upstream commit 81f8f7454ad9e0bf95efdec6542afdc9a6ab1e24 ]
Currently, the IB uverbs API calls uobj_get_uobj_read(), which in turn uses the rdma_lookup_get_uobject() helper to retrieve user objects. In case of failure, uobj_get_uobj_read() returns NULL, overriding the error code from rdma_lookup_get_uobject(). The IB uverbs API then translates this NULL to -EINVAL, masking the actual error and complicating debugging. For example, applications calling ibv_modify_qp that fails with EBUSY when retrieving the QP uobject will see the overridden error code EINVAL instead, masking the actual error.
Furthermore, based on rdma-core commit:
"2a22f1ced5f3 ("Merge pull request #1568 from jakemoroni/master")" Kernel's IB uverbs return values are either ignored and passed on as is to application or overridden with other errnos in a few cases.
Thus, to improve error reporting and debuggability, propagate the original error from rdma_lookup_get_uobject() instead of replacing it with EINVAL.
--- drivers/infiniband/core/uverbs_cmd.c | 144 ++++++++++++++------------- include/rdma/uverbs_std_types.h | 2 +- 2 files changed, 77 insertions(+), 69 deletions(-)
drivers/infiniband/core/uverbs_cmd.c +76 -68
@@ -718,8 +718,8 @@ static int ib_uverbs_reg_mr(struct uverbs_attr_bundle *attrs) goto err_free; pd =uobj_get_obj_read (pd,UVERBS_OBJECT_PD , cmd.pd_handle, attrs); -if (!pd) { - ret = -EINVAL ; +if (IS_ERR (pd)) { + ret =PTR_ERR (pd); goto err_free; }
@@ -809,8 +809,8 @@ static int ib_uverbs_rereg_mr(struct uverbs_attr_bundle *attrs)if (cmd.flags &IB_MR_REREG_PD ) { new_pd =uobj_get_obj_read (pd,UVERBS_OBJECT_PD , cmd.pd_handle, attrs); -if (!new_pd) { - ret = -EINVAL ; +if (IS_ERR (new_pd)) { + ret =PTR_ERR (new_pd); goto put_uobjs; } }else {
@@ -919,8 +919,8 @@ static int ib_uverbs_alloc_mw(struct uverbs_attr_bundle *attrs)return PTR_ERR (uobj); pd =uobj_get_obj_read (pd,UVERBS_OBJECT_PD , cmd.pd_handle, attrs); -if (!pd) { - ret = -EINVAL ; +if (IS_ERR (pd)) { + ret =PTR_ERR (pd); goto err_free; }
@@ -1127,8 +1127,8 @@ static int ib_uverbs_resize_cq(struct uverbs_attr_bundle *attrs)return ret; cq =uobj_get_obj_read (cq,UVERBS_OBJECT_CQ , cmd.cq_handle, attrs); -if (!cq) -return -EINVAL ; +if (IS_ERR (cq)) +return PTR_ERR (cq); ret = cq->device->ops.resize_cq (cq, cmd.cqe, &attrs->driver_udata);if (ret)
@@ -1189,8 +1189,8 @@ static int ib_uverbs_poll_cq(struct uverbs_attr_bundle *attrs)return ret; cq =uobj_get_obj_read (cq,UVERBS_OBJECT_CQ , cmd.cq_handle, attrs); -if (!cq) -return -EINVAL ; +if (IS_ERR (cq)) +return PTR_ERR (cq);/* we copy a struct ib_uverbs_poll_cq_resp to user space */ header_ptr = attrs->ucore.outbuf;
@@ -1238,8 +1238,8 @@ static int ib_uverbs_req_notify_cq(struct uverbs_attr_bundle *attrs)return ret; cq =uobj_get_obj_read (cq,UVERBS_OBJECT_CQ , cmd.cq_handle, attrs); -if (!cq) -return -EINVAL ; +if (IS_ERR (cq)) +return PTR_ERR (cq);ib_req_notify_cq (cq, cmd.solicited_only ?IB_CQ_SOLICITED :IB_CQ_NEXT_COMP );
@@ -1321,8 +1321,8 @@ static int create_qp(struct uverbs_attr_bundle *attrs, ind_tbl =uobj_get_obj_read (rwq_ind_table,UVERBS_OBJECT_RWQ_IND_TBL , cmd->rwq_ind_tbl_handle, attrs); -if (!ind_tbl) { - ret = -EINVAL ; +if (IS_ERR (ind_tbl)) { + ret =PTR_ERR (ind_tbl); goto err_put; }
@@ -1360,8 +1360,10 @@ static int create_qp(struct uverbs_attr_bundle *attrs,if (cmd->is_srq) { srq =uobj_get_obj_read (srq,UVERBS_OBJECT_SRQ , cmd->srq_handle, attrs); -if (!srq || srq->srq_type ==IB_SRQT_XRC ) { - ret = -EINVAL ; +if (IS_ERR (srq) || + srq->srq_type ==IB_SRQT_XRC ) { + ret =IS_ERR (srq) ?PTR_ERR (srq) : + -EINVAL ; goto err_put; } }
@@ -1371,23 +1373,29 @@ static int create_qp(struct uverbs_attr_bundle *attrs, rcq =uobj_get_obj_read ( cq,UVERBS_OBJECT_CQ , cmd->recv_cq_handle, attrs); -if (!rcq) { - ret = -EINVAL ; +if (IS_ERR (rcq)) { + ret =PTR_ERR (rcq); goto err_put; } } } } -if (has_sq) +if (has_sq) { scq =uobj_get_obj_read (cq,UVERBS_OBJECT_CQ , cmd->send_cq_handle, attrs); +if (IS_ERR (scq)) { + ret =PTR_ERR (scq); + goto err_put; + } + } +if (!ind_tbl && cmd->qp_type !=IB_QPT_XRC_INI ) rcq = rcq ?: scq; pd =uobj_get_obj_read (pd,UVERBS_OBJECT_PD , cmd->pd_handle, attrs); -if (!pd || (!scq && has_sq)) { - ret = -EINVAL ; +if (IS_ERR (pd)) { + ret =PTR_ERR (pd); goto err_put; }
@@ -1482,18 +1490,18 @@ static int create_qp(struct uverbs_attr_bundle *attrs, err_put:if (!IS_ERR (xrcd_uobj))uobj_put_read (xrcd_uobj); -if (pd) +if (!IS_ERR_OR_NULL (pd))uobj_put_obj_read (pd); -if (scq) +if (!IS_ERR_OR_NULL (scq))rdma_lookup_put_uobject (&scq->uobject->uevent.uobject,UVERBS_LOOKUP_READ ); -if (rcq && rcq != scq) +if (!IS_ERR_OR_NULL (rcq) && rcq != scq)rdma_lookup_put_uobject (&rcq->uobject->uevent.uobject,UVERBS_LOOKUP_READ ); -if (srq) +if (!IS_ERR_OR_NULL (srq))rdma_lookup_put_uobject (&srq->uobject->uevent.uobject,UVERBS_LOOKUP_READ ); -if (ind_tbl) +if (!IS_ERR_OR_NULL (ind_tbl))uobj_put_obj_read (ind_tbl);uobj_alloc_abort (&obj->uevent.uobject, attrs);
@@ -1655,8 +1663,8 @@ static int ib_uverbs_query_qp(struct uverbs_attr_bundle *attrs) } qp =uobj_get_obj_read (qp,UVERBS_OBJECT_QP , cmd.qp_handle, attrs); -if (!qp) { - ret = -EINVAL ; +if (IS_ERR (qp)) { + ret =PTR_ERR (qp); goto out; }
@@ -1761,8 +1769,8 @@ static int modify_qp(struct uverbs_attr_bundle *attrs, qp =uobj_get_obj_read (qp,UVERBS_OBJECT_QP , cmd->base.qp_handle, attrs); -if (!qp) { - ret = -EINVAL ; +if (IS_ERR (qp)) { + ret =PTR_ERR (qp); goto out; }
@@ -2027,8 +2035,8 @@ static int ib_uverbs_post_send(struct uverbs_attr_bundle *attrs)return -ENOMEM ; qp =uobj_get_obj_read (qp,UVERBS_OBJECT_QP , cmd.qp_handle, attrs); -if (!qp) { - ret = -EINVAL ; +if (IS_ERR (qp)) { + ret =PTR_ERR (qp); goto out; }
@@ -2065,9 +2073,9 @@ static int ib_uverbs_post_send(struct uverbs_attr_bundle *attrs) ud->ah =uobj_get_obj_read (ah,UVERBS_OBJECT_AH , user_wr->wr.ud.ah, attrs); -if (!ud->ah) { +if (IS_ERR (ud->ah)) { + ret =PTR_ERR (ud->ah);kfree (ud); - ret = -EINVAL ; goto out_put; } ud->remote_qpn = user_wr->wr.ud.remote_qpn;
@@ -2304,8 +2312,8 @@ static int ib_uverbs_post_recv(struct uverbs_attr_bundle *attrs)return PTR_ERR (wr); qp =uobj_get_obj_read (qp,UVERBS_OBJECT_QP , cmd.qp_handle, attrs); -if (!qp) { - ret = -EINVAL ; +if (IS_ERR (qp)) { + ret =PTR_ERR (qp); goto out; }
@@ -2355,8 +2363,8 @@ static int ib_uverbs_post_srq_recv(struct uverbs_attr_bundle *attrs)return PTR_ERR (wr); srq =uobj_get_obj_read (srq,UVERBS_OBJECT_SRQ , cmd.srq_handle, attrs); -if (!srq) { - ret = -EINVAL ; +if (IS_ERR (srq)) { + ret =PTR_ERR (srq); goto out; }
@@ -2412,8 +2420,8 @@ static int ib_uverbs_create_ah(struct uverbs_attr_bundle *attrs) } pd =uobj_get_obj_read (pd,UVERBS_OBJECT_PD , cmd.pd_handle, attrs); -if (!pd) { - ret = -EINVAL ; +if (IS_ERR (pd)) { + ret =PTR_ERR (pd); goto err; }
@@ -2482,8 +2490,8 @@ static int ib_uverbs_attach_mcast(struct uverbs_attr_bundle *attrs)return ret; qp =uobj_get_obj_read (qp,UVERBS_OBJECT_QP , cmd.qp_handle, attrs); -if (!qp) -return -EINVAL ; +if (IS_ERR (qp)) +return PTR_ERR (qp); obj = qp->uobject;
@@ -2532,8 +2540,8 @@ static int ib_uverbs_detach_mcast(struct uverbs_attr_bundle *attrs)return ret; qp =uobj_get_obj_read (qp,UVERBS_OBJECT_QP , cmd.qp_handle, attrs); -if (!qp) -return -EINVAL ; +if (IS_ERR (qp)) +return PTR_ERR (qp); obj = qp->uobject;mutex_lock (&obj->mcast_lock);
@@ -2667,8 +2675,8 @@ static int kern_spec_to_ib_spec_action(struct uverbs_attr_bundle *attrs,UVERBS_OBJECT_FLOW_ACTION , kern_spec->action.handle, attrs); -if (!ib_spec->action.act) -return -EINVAL ; +if (IS_ERR (ib_spec->action.act)) +return PTR_ERR (ib_spec->action.act); ib_spec->action.size =sizeof (struct ib_flow_spec_action_handle ); flow_resources_add(uflow_res,
@@ -2685,8 +2693,8 @@ static int kern_spec_to_ib_spec_action(struct uverbs_attr_bundle *attrs,UVERBS_OBJECT_COUNTERS , kern_spec->flow_count.handle, attrs); -if (!ib_spec->flow_count.counters) -return -EINVAL ; +if (IS_ERR (ib_spec->flow_count.counters)) +return PTR_ERR (ib_spec->flow_count.counters); ib_spec->flow_count.size =sizeof (struct ib_flow_spec_action_count ); flow_resources_add(uflow_res,
@@ -2904,14 +2912,14 @@ static int ib_uverbs_ex_create_wq(struct uverbs_attr_bundle *attrs)return PTR_ERR (obj); pd =uobj_get_obj_read (pd,UVERBS_OBJECT_PD , cmd.pd_handle, attrs); -if (!pd) { - err = -EINVAL ; +if (IS_ERR (pd)) { + err =PTR_ERR (pd); goto err_uobj; } cq =uobj_get_obj_read (cq,UVERBS_OBJECT_CQ , cmd.cq_handle, attrs); -if (!cq) { - err = -EINVAL ; +if (IS_ERR (cq)) { + err =PTR_ERR (cq); goto err_put_pd; }
@@ -3012,8 +3020,8 @@ static int ib_uverbs_ex_modify_wq(struct uverbs_attr_bundle *attrs)return -EINVAL ; wq =uobj_get_obj_read (wq,UVERBS_OBJECT_WQ , cmd.wq_handle, attrs); -if (!wq) -return -EINVAL ; +if (IS_ERR (wq)) +return PTR_ERR (wq);if (cmd.attr_mask &IB_WQ_FLAGS ) { wq_attr.flags = cmd.flags;
@@ -3096,8 +3104,8 @@ static int ib_uverbs_ex_create_rwq_ind_table(struct uverbs_attr_bundle *attrs) num_read_wqs++) { wq =uobj_get_obj_read (wq,UVERBS_OBJECT_WQ , wqs_handles[num_read_wqs], attrs); -if (!wq) { - err = -EINVAL ; +if (IS_ERR (wq)) { + err =PTR_ERR (wq); goto put_wqs; }
@@ -3252,8 +3260,8 @@ static int ib_uverbs_ex_create_flow(struct uverbs_attr_bundle *attrs) } qp =uobj_get_obj_read (qp,UVERBS_OBJECT_QP , cmd.qp_handle, attrs); -if (!qp) { - err = -EINVAL ; +if (IS_ERR (qp)) { + err =PTR_ERR (qp); goto err_uobj; }
@@ -3399,15 +3407,15 @@ static int __uverbs_create_xsrq(struct uverbs_attr_bundle *attrs,if (ib_srq_has_cq (cmd->srq_type)) { attr.ext.cq =uobj_get_obj_read (cq,UVERBS_OBJECT_CQ , cmd->cq_handle, attrs); -if (!attr.ext.cq) { - ret = -EINVAL ; +if (IS_ERR (attr.ext.cq)) { + ret =PTR_ERR (attr.ext.cq); goto err_put_xrcd; } } pd =uobj_get_obj_read (pd,UVERBS_OBJECT_PD , cmd->pd_handle, attrs); -if (!pd) { - ret = -EINVAL ; +if (IS_ERR (pd)) { + ret =PTR_ERR (pd); goto err_put_cq; }
@@ -3514,8 +3522,8 @@ static int ib_uverbs_modify_srq(struct uverbs_attr_bundle *attrs)return ret; srq =uobj_get_obj_read (srq,UVERBS_OBJECT_SRQ , cmd.srq_handle, attrs); -if (!srq) -return -EINVAL ; +if (IS_ERR (srq)) +return PTR_ERR (srq); attr.max_wr = cmd.max_wr; attr.srq_limit = cmd.srq_limit;
@@ -3542,8 +3550,8 @@ static int ib_uverbs_query_srq(struct uverbs_attr_bundle *attrs)return ret; srq =uobj_get_obj_read (srq,UVERBS_OBJECT_SRQ , cmd.srq_handle, attrs); -if (!srq) -return -EINVAL ; +if (IS_ERR (srq)) +return PTR_ERR (srq); ret =ib_query_srq (srq, &attr);
@@ -3668,8 +3676,8 @@ static int ib_uverbs_ex_modify_cq(struct uverbs_attr_bundle *attrs)return -EOPNOTSUPP ; cq =uobj_get_obj_read (cq,UVERBS_OBJECT_CQ , cmd.cq_handle, attrs); -if (!cq) -return -EINVAL ; +if (IS_ERR (cq)) +return PTR_ERR (cq); ret =rdma_set_cq_moderation (cq, cmd.attr.cq_count, cmd.attr.cq_period);
include/rdma/uverbs_std_types.h +1 -1
@@ -34,7 +34,7 @@static inline void *_uobj_get_obj_read (struct ib_uobject *uobj) {if (IS_ERR (uobj)) -return NULL ; +return ERR_CAST (uobj);return uobj->object; }#define uobj_get_obj_read (_object, _type, _id, _attrs) \
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 111/444 posix-timers: Add cond_resched() to posix_timer_add() search loop
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
[ Upstream commit 5f2909c6cd13564a07ae692a95457f52295c4f22 ]
With a large number of POSIX timers the search for a valid ID might cause a soft lockup on PREEMPT_NONE/VOLUNTARY kernels.
Add cond_resched() to the loop to prevent that.
[ tglx: Split out from Eric's series ]
--- kernel/time/posix-timers.c | 1 + 1 file changed, 1 insertion(+)
kernel/time/posix-timers.c +1 -0
@@ -118,6 +118,7 @@ static int posix_timer_add(struct k_itimer *timer)return id; }spin_unlock (&hash_lock); +cond_resched (); }/* POSIX return code when no timer ID could be allocated */ return -EAGAIN ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 112/444 timer_list: Dont use %pK through printk()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Weißschuh <[email protected]>
[ Upstream commit a52067c24ccf6ee4c85acffa0f155e9714f9adce ]
This reverts commit f590308536db ("timer debug: Hide kernel addresses via %pK in /proc/timer_list")
The timer list helper SEQ_printf() uses either the real seq_printf() for procfs output or vprintk() to print to the kernel log, when invoked from SysRq-q. It uses %pK for printing pointers.
In the past %pK was prefered over %p as it would not leak raw pointer values into the kernel log. Since commit ad67b74d2469 ("printk: hash addresses printed with %p") the regular %p has been improved to avoid this issue.
Furthermore, restricted pointers ("%pK") were never meant to be used through printk(). They can still unintentionally leak raw pointers or acquire sleeping looks in atomic contexts.
Switch to the regular pointer formatting which is safer, easier to reason about and sufficient here.
--- kernel/time/timer_list.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/time/timer_list.c +2 -2
@@ -46,7 +46,7 @@ static void print_timer(struct seq_file *m, struct hrtimer *taddr, struct hrtimer *timer, int idx, u64 now) { - SEQ_printf(m, " #%d: <%pK>, %ps", idx, taddr, timer->function); + SEQ_printf(m, " #%d: <%p>, %ps", idx, taddr, timer->function);SEQ_printf (m,", S:%02x" , timer->state);SEQ_printf (m,"\n" ); SEQ_printf(m, " # expires at %Lu-%Lu nsecs [in %Ld to %Ld nsecs]\n",
@@ -98,7 +98,7 @@ print_active_timers(struct seq_file *m, struct hrtimer_clock_base *base,static void print_base (struct seq_file *m,struct hrtimer_clock_base *base,u64 now) { -SEQ_printf (m," .base: %pK\n" , base); +SEQ_printf (m," .base: %p\n" , base);SEQ_printf (m," .index: %d\n" , base->index);SEQ_printf (m," .resolution: %u nsecs\n" , hrtimer_resolution);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 113/444 netfilter: conntrack: Bound nf_conntrack sysctl writes
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nicolas Bouchinet <[email protected]>
[ Upstream commit 8b6861390ffee6b8ed78b9395e3776c16fec6579 ]
nf_conntrack_max and nf_conntrack_expect_max sysctls were authorized to be written any negative value, which would then be stored in the unsigned int variables nf_conntrack_max and nf_ct_expect_max variables.
While the do_proc_dointvec_conv function is supposed to limit writing handled by proc_dointvec proc_handler to INT_MAX. Such a negative value being written in an unsigned int leads to a very high value, exceeding this limit.
Moreover, the nf_conntrack_expect_max sysctl documentation specifies the minimum value is 1.
The proc_handlers have thus been updated to proc_dointvec_minmax in order to specify the following write bounds :
* Bound nf_conntrack_max sysctl writings between SYSCTL_ZERO and SYSCTL_INT_MAX.
* Bound nf_conntrack_expect_max sysctl writings between SYSCTL_ONE and SYSCTL_INT_MAX as defined in the sysctl documentation.
With this patch applied, sysctl writes outside the defined in the bound will thus lead to a write error :
``` sysctl -w net.netfilter.nf_conntrack_expect_max=-1 sysctl: setting key "net.netfilter.nf_conntrack_expect_max": Invalid argument ```
--- net/netfilter/nf_conntrack_standalone.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
net/netfilter/nf_conntrack_standalone.c +9 -3
@@ -621,7 +621,9 @@ static struct ctl_table nf_ct_sysctl_table[] = { .data = &nf_conntrack_max, .maxlen = sizeof(int), .mode = 0644, - .proc_handler = proc_dointvec, + .proc_handler = proc_dointvec_minmax, + .extra1 = SYSCTL_ZERO, + .extra2 = SYSCTL_INT_MAX, }, [NF_SYSCTL_CT_COUNT] = { .procname = "nf_conntrack_count",
@@ -657,7 +659,9 @@ static struct ctl_table nf_ct_sysctl_table[] = { .data = &nf_ct_expect_max, .maxlen = sizeof(int), .mode = 0644, - .proc_handler = proc_dointvec, + .proc_handler = proc_dointvec_minmax, + .extra1 = SYSCTL_ONE, + .extra2 = SYSCTL_INT_MAX, }, [NF_SYSCTL_CT_ACCT] = { .procname = "nf_conntrack_acct",
@@ -951,7 +955,9 @@ static struct ctl_table nf_ct_netfilter_table[] = { .data = &nf_conntrack_max, .maxlen = sizeof(int), .mode = 0644, - .proc_handler = proc_dointvec, + .proc_handler = proc_dointvec_minmax, + .extra1 = SYSCTL_ZERO, + .extra2 = SYSCTL_INT_MAX, }, { } };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 114/444 arm64/mm: Check PUD_TYPE_TABLE in pud_bad()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ryan Roberts <[email protected]>
[ Upstream commit bfb1d2b9021c21891427acc86eb848ccedeb274e ]
pud_bad() is currently defined in terms of pud_table(). Although for some configs, pud_table() is hard-coded to true i.e. when using 64K base pages or when page table levels are less than 3.
pud_bad() is intended to check that the pud is configured correctly. Hence let's open-code the same check that the full version of pud_table() uses into pud_bad(). Then it always performs the check regardless of the config.
--- arch/arm64/include/asm/pgtable.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm64/include/asm/pgtable.h +2 -1
@@ -679,7 +679,8 @@ static inline unsigned long pmd_page_vaddr(pmd_t pmd) pr_err("%s:%d: bad pmd %016llx.\n", __FILE__, __LINE__, pmd_val(e))#define pud_none (pud) (!pud_val(pud)) -#define pud_bad (pud) (!pud_table(pud)) +#define pud_bad (pud) ((pud_val(pud) & PUD_TYPE_MASK) != \ + PUD_TYPE_TABLE)#define pud_present (pud) pte_present(pud_pte(pud))#define pud_leaf (pud) (pud_present(pud) && !pud_table(pud))#define pud_valid (pud) pte_valid(pud_pte(pud))
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 115/444 mmc: dw_mmc: add exynos7870 DW MMC support
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kaustabh Chakraborty <[email protected]>
[ Upstream commit 7cbe799ac10fd8be85af5e0615c4337f81e575f3 ]
Add support for Exynos7870 DW MMC controllers, for both SMU and non-SMU variants. These controllers require a quirk to access 64-bit FIFO in 32-bit accesses (DW_MMC_QUIRK_FIFO64_32).
--- drivers/mmc/host/dw_mmc-exynos.c | 41 +++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-)
drivers/mmc/host/dw_mmc-exynos.c +40 -1
@@ -28,6 +28,8 @@ enum dw_mci_exynos_type {DW_MCI_TYPE_EXYNOS5420_SMU ,DW_MCI_TYPE_EXYNOS7 ,DW_MCI_TYPE_EXYNOS7_SMU , +DW_MCI_TYPE_EXYNOS7870 , +DW_MCI_TYPE_EXYNOS7870_SMU , DW_MCI_TYPE_ARTPEC8, };
@@ -70,6 +72,12 @@ static struct dw_mci_exynos_compatible { }, { .compatible = "samsung,exynos7-dw-mshc-smu", .ctrl_type = DW_MCI_TYPE_EXYNOS7_SMU, + }, { + .compatible = "samsung,exynos7870-dw-mshc", + .ctrl_type = DW_MCI_TYPE_EXYNOS7870, + }, { + .compatible = "samsung,exynos7870-dw-mshc-smu", + .ctrl_type = DW_MCI_TYPE_EXYNOS7870_SMU, }, { .compatible = "axis,artpec8-dw-mshc", .ctrl_type = DW_MCI_TYPE_ARTPEC8,
@@ -86,6 +94,8 @@ static inline u8 dw_mci_exynos_get_ciu_div(struct dw_mci *host)return EXYNOS4210_FIXED_CIU_CLK_DIV ; else if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 || priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU || + priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870 || + priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870_SMU || priv->ctrl_type == DW_MCI_TYPE_ARTPEC8) return SDMMC_CLKSEL_GET_DIV(mci_readl(host, CLKSEL64)) + 1; else
@@ -101,7 +111,8 @@ static void dw_mci_exynos_config_smu(struct dw_mci *host)* set for non-ecryption mode at this time. */ if (priv->ctrl_type ==DW_MCI_TYPE_EXYNOS5420_SMU || - priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7_SMU ) { + priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7_SMU || + priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7870_SMU ) {mci_writel (host,MPSBEGIN0 ,0 );mci_writel (host,MPSEND0 ,SDMMC_ENDING_SEC_NR_MAX ); mci_writel(host, MPSCTRL0, SDMMC_MPSCTRL_SECURE_WRITE_BIT |
@@ -127,6 +138,12 @@ static int dw_mci_exynos_priv_init(struct dw_mci *host)DQS_CTRL_GET_RD_DELAY (priv->saved_strobe_ctrl); } +if (priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7870 || + priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7870_SMU ) { +/* Quirk needed for certain Exynos SoCs */ + host->quirks |=DW_MMC_QUIRK_FIFO64_32 ; + } +if (priv->ctrl_type ==DW_MCI_TYPE_ARTPEC8 ) {/* Quirk needed for the ARTPEC-8 SoC */ host->quirks |=DW_MMC_QUIRK_EXTENDED_TMOUT ;
@@ -144,6 +161,8 @@ static void dw_mci_exynos_set_clksel_timing(struct dw_mci *host, u32 timing)if (priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7 || priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7_SMU || + priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7870 || + priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7870_SMU || priv->ctrl_type ==DW_MCI_TYPE_ARTPEC8 ) clksel =mci_readl (host,CLKSEL64 );else
@@ -153,6 +172,8 @@ static void dw_mci_exynos_set_clksel_timing(struct dw_mci *host, u32 timing)if (priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7 || priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7_SMU || + priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7870 || + priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7870_SMU || priv->ctrl_type ==DW_MCI_TYPE_ARTPEC8 )mci_writel (host,CLKSEL64 , clksel);else
@@ -223,6 +244,8 @@ static int dw_mci_exynos_resume_noirq(struct device *dev)if (priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7 || priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7_SMU || + priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7870 || + priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7870_SMU || priv->ctrl_type ==DW_MCI_TYPE_ARTPEC8 ) clksel =mci_readl (host,CLKSEL64 );else
@@ -231,6 +254,8 @@ static int dw_mci_exynos_resume_noirq(struct device *dev)if (clksel &SDMMC_CLKSEL_WAKEUP_INT ) {if (priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7 || priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7_SMU || + priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7870 || + priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7870_SMU || priv->ctrl_type ==DW_MCI_TYPE_ARTPEC8 )mci_writel (host,CLKSEL64 , clksel);else
@@ -410,6 +435,8 @@ static inline u8 dw_mci_exynos_get_clksmpl(struct dw_mci *host)if (priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7 || priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7_SMU || + priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7870 || + priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7870_SMU || priv->ctrl_type ==DW_MCI_TYPE_ARTPEC8 )return SDMMC_CLKSEL_CCLK_SAMPLE (mci_readl (host,CLKSEL64 ));else
@@ -423,6 +450,8 @@ static inline void dw_mci_exynos_set_clksmpl(struct dw_mci *host, u8 sample)if (priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7 || priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7_SMU || + priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7870 || + priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7870_SMU || priv->ctrl_type ==DW_MCI_TYPE_ARTPEC8 ) clksel =mci_readl (host,CLKSEL64 );else
@@ -430,6 +459,8 @@ static inline void dw_mci_exynos_set_clksmpl(struct dw_mci *host, u8 sample) clksel =SDMMC_CLKSEL_UP_SAMPLE (clksel, sample);if (priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7 || priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7_SMU || + priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7870 || + priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7870_SMU || priv->ctrl_type ==DW_MCI_TYPE_ARTPEC8 )mci_writel (host,CLKSEL64 , clksel);else
@@ -444,6 +475,8 @@ static inline u8 dw_mci_exynos_move_next_clksmpl(struct dw_mci *host)if (priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7 || priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7_SMU || + priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7870 || + priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7870_SMU || priv->ctrl_type ==DW_MCI_TYPE_ARTPEC8 ) clksel =mci_readl (host,CLKSEL64 );else
@@ -454,6 +487,8 @@ static inline u8 dw_mci_exynos_move_next_clksmpl(struct dw_mci *host)if (priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7 || priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7_SMU || + priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7870 || + priv->ctrl_type ==DW_MCI_TYPE_EXYNOS7870_SMU || priv->ctrl_type ==DW_MCI_TYPE_ARTPEC8 )mci_writel (host,CLKSEL64 , clksel);else
@@ -633,6 +668,10 @@ static const struct of_device_id dw_mci_exynos_match[] = { .data = &exynos_drv_data, }, { .compatible = "samsung,exynos7-dw-mshc-smu", .data = &exynos_drv_data, }, + { .compatible = "samsung,exynos7870-dw-mshc", + .data = &exynos_drv_data, }, + { .compatible = "samsung,exynos7870-dw-mshc-smu", + .data = &exynos_drv_data, }, { .compatible = "axis,artpec8-dw-mshc", .data = &artpec_drv_data, }, {},
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 116/444 mmc: sdhci: Disable SD card clock before changing parameters
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Erick Shepherd <[email protected]>
[ Upstream commit fb3bbc46c94f261b6156ee863c1b06c84cf157dc ]
Per the SD Host Controller Simplified Specification v4.20 §3.2.3, change the SD card clock parameters only after first disabling the external card clock. Doing this fixes a spurious clock pulse on Baytrail and Apollo Lake SD controllers which otherwise breaks voltage switching with a specific Swissbit SD card.
--- drivers/mmc/host/sdhci.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/mmc/host/sdhci.c +7 -2
@@ -2035,10 +2035,15 @@ void sdhci_set_clock(struct sdhci_host *host, unsigned int clock) host->mmc->actual_clock =0 ; -sdhci_writew (host,0 ,SDHCI_CLOCK_CONTROL ); + clk =sdhci_readw (host,SDHCI_CLOCK_CONTROL ); +if (clk &SDHCI_CLOCK_CARD_EN ) +sdhci_writew (host, clk & ~SDHCI_CLOCK_CARD_EN , +SDHCI_CLOCK_CONTROL ); -if (clock ==0 ) +if (clock ==0 ) { +sdhci_writew (host,0 ,SDHCI_CLOCK_CONTROL );return ; + } clk =sdhci_calc_clk (host, clock, &host->mmc->actual_clock);sdhci_enable_clk (host, clk);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 117/444 usb: xhci: Dont change the status of stalled TDs on failed Stop EP
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michal Pecio <[email protected]>
[ Upstream commit dfc88357b6b6356dadea06b2c0bc8041f5e11720 ]
When the device stalls an endpoint, current TD is assigned -EPIPE status and Reset Endpoint is queued. If a Stop Endpoint is pending at the time, it will run before Reset Endpoint and fail due to the stall. Its handler will change TD's status to -EPROTO before Reset Endpoint handler runs and initiates giveback.
Check if the stall has already been handled and don't try to do it again. Since xhci_handle_halted_endpoint() performs this check too, not overwriting td->status is the only difference.
I haven't seen this case yet, but I have seen a related one where the xHC has already executed Reset Endpoint, EP Context state is now Stopped and EP_HALTED is set. If the xHC took a bit longer to execute Reset Endpoint, said case would become this one.
--- drivers/usb/host/xhci-ring.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
drivers/usb/host/xhci-ring.c +11 -1
@@ -1180,7 +1180,14 @@ static void xhci_handle_cmd_stop_ep(struct xhci_hcd *xhci, int slot_id,*/ switch (GET_EP_CTX_STATE (ep_ctx)) {case EP_STATE_HALTED : -xhci_dbg (xhci,"Stop ep completion raced with stall, reset ep\n" ); +xhci_dbg (xhci,"Stop ep completion raced with stall\n" ); +/* +* If the halt happened before Stop Endpoint failed, its transfer event +* should have already been handled and Reset Endpoint should be pending. +*/ +if (ep->ep_state &EP_HALTED ) + goto reset_done; +if (ep->ep_state &EP_HAS_STREAMS ) { reset_type =EP_SOFT_RESET ; }else {
@@ -1191,8 +1198,11 @@ static void xhci_handle_cmd_stop_ep(struct xhci_hcd *xhci, int slot_id, }/* reset ep, reset handler cleans up cancelled tds */ err =xhci_handle_halted_endpoint (xhci, ep, td, reset_type); +xhci_dbg (xhci,"Stop ep completion resetting ep, status %d\n" , err);if (err)break ; +reset_done: +/* Reset EP handler will clean up cancelled TDs */ ep->ep_state &= ~EP_STOP_CMD_PENDING ;return ;case EP_STATE_STOPPED :
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 118/444 hwmon: (dell-smm) Increment the number of fans
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kurt Borja <[email protected]>
[ Upstream commit dbcfcb239b3b452ef8782842c36fb17dd1b9092f ]
Some Alienware laptops that support the SMM interface, may have up to 4 fans.
Tested on an Alienware x15 r1.
--- Documentation/hwmon/dell-smm-hwmon.rst | 14 +++++++------- drivers/hwmon/dell-smm-hwmon.c | 5 ++++- 2 files changed, 11 insertions(+), 8 deletions(-)
Documentation/hwmon/dell-smm-hwmon.rst +7 -7
@@ -32,12 +32,12 @@ Temperature sensors and fans can be queried and set via the standard =============================== ======= ======================================= Name Perm Description =============================== ======= ======================================= -fan[1-3]_input RO Fan speed in RPM. -fan[1-3]_label RO Fan label. -fan[1-3]_min RO Minimal Fan speed in RPM -fan[1-3]_max RO Maximal Fan speed in RPM -fan[1-3]_target RO Expected Fan speed in RPM -pwm[1-3] RW Control the fan PWM duty-cycle. +fan[1-4]_input RO Fan speed in RPM. +fan[1-4]_label RO Fan label. +fan[1-4]_min RO Minimal Fan speed in RPM +fan[1-4]_max RO Maximal Fan speed in RPM +fan[1-4]_target RO Expected Fan speed in RPM +pwm[1-4] RW Control the fan PWM duty-cycle. pwm1_enable WO Enable or disable automatic BIOS fan control (not supported on all laptops, see below for details).
@@ -93,7 +93,7 @@ Again, when you find new codes, we'd be happy to have your patches! --------------------------- The driver also exports the fans as thermal cooling devices with -``type`` set to ``dell-smm-fan[1-3]``. This allows for easy fan control +``type`` set to ``dell-smm-fan[1-4]``. This allows for easy fan control using one of the thermal governors. Module parameters
drivers/hwmon/dell-smm-hwmon.c +4 -1
@@ -67,7 +67,7 @@#define I8K_POWER_BATTERY 0x01#define DELL_SMM_NO_TEMP 10 -#define DELL_SMM_NO_FANS 3 +#define DELL_SMM_NO_FANS 4struct dell_smm_data {struct mutex i8k_mutex;/* lock for sensors writes */
@@ -940,11 +940,14 @@ static const struct hwmon_channel_info * const dell_smm_info[] = { HWMON_F_INPUT | HWMON_F_LABEL | HWMON_F_MIN | HWMON_F_MAX | HWMON_F_TARGET, HWMON_F_INPUT | HWMON_F_LABEL | HWMON_F_MIN | HWMON_F_MAX | + HWMON_F_TARGET, + HWMON_F_INPUT | HWMON_F_LABEL | HWMON_F_MIN | HWMON_F_MAX | HWMON_F_TARGET ),HWMON_CHANNEL_INFO (pwm,HWMON_PWM_INPUT |HWMON_PWM_ENABLE ,HWMON_PWM_INPUT , +HWMON_PWM_INPUT ,HWMON_PWM_INPUT ),NULL
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 119/444 printk: Check CON_SUSPEND when unblanking a console
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marcos Paulo de Souza <[email protected]>
[ Upstream commit 72c96a2dacc0fb056d13a5f02b0845c4c910fe54 ]
The commit 9e70a5e109a4 ("printk: Add per-console suspended state") introduced the CON_SUSPENDED flag for consoles. The suspended consoles will stop receiving messages, so don't unblank suspended consoles because it won't be showing anything either way.
--- kernel/printk/printk.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
kernel/printk/printk.c +12 -2
@@ -3119,7 +3119,12 @@ void console_unblank(void)*/ cookie =console_srcu_read_lock ();for_each_console_srcu (c) { -if ((console_srcu_read_flags (c) &CON_ENABLED ) && c->unblank) { +short flags =console_srcu_read_flags (c); + +if (flags &CON_SUSPENDED ) +continue ; + +if ((flags &CON_ENABLED ) && c->unblank) { found_unblank = true;break ; }
@@ -3156,7 +3161,12 @@ void console_unblank(void) cookie =console_srcu_read_lock ();for_each_console_srcu (c) { -if ((console_srcu_read_flags (c) &CON_ENABLED ) && c->unblank) +short flags =console_srcu_read_flags (c); + +if (flags &CON_SUSPENDED ) +continue ; + +if ((flags &CON_ENABLED ) && c->unblank) c->unblank (); }console_srcu_read_unlock (cookie);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 120/444 wifi: iwlwifi: fix debug actions order
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johannes Berg <[email protected]>
[ Upstream commit eb29b4ffafb20281624dcd2cbb768d6f30edf600 ]
The order of actions taken for debug was implemented incorrectly. Now we implemented the dump split and do the FW reset only in the middle of the dump (rather than the FW killing itself on error.) As a result, some of the actions taken when applying the config will now crash the device, so we need to fix the order.
--- drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c +5 -5
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause /* -* Copyright (C) 2018-2024 Intel Corporation +* Copyright (C) 2018-2025 Intel Corporation */ #include <linux/firmware.h> #include "iwl-drv.h"
@@ -1382,15 +1382,15 @@ void _iwl_dbg_tlv_time_point(struct iwl_fw_runtime *fwrt,switch (tp_id) {case IWL_FW_INI_TIME_POINT_EARLY :iwl_dbg_tlv_init_cfg (fwrt); -iwl_dbg_tlv_apply_config (fwrt, conf_list);iwl_dbg_tlv_update_drams (fwrt);iwl_dbg_tlv_tp_trigger (fwrt, sync, trig_list, tp_data,NULL ); +iwl_dbg_tlv_apply_config (fwrt, conf_list);break ;case IWL_FW_INI_TIME_POINT_AFTER_ALIVE :iwl_dbg_tlv_apply_buffers (fwrt);iwl_dbg_tlv_send_hcmds (fwrt, hcmd_list); -iwl_dbg_tlv_apply_config (fwrt, conf_list);iwl_dbg_tlv_tp_trigger (fwrt, sync, trig_list, tp_data,NULL ); +iwl_dbg_tlv_apply_config (fwrt, conf_list);break ;case IWL_FW_INI_TIME_POINT_PERIODIC :iwl_dbg_tlv_set_periodic_trigs (fwrt);
@@ -1400,14 +1400,14 @@ void _iwl_dbg_tlv_time_point(struct iwl_fw_runtime *fwrt,case IWL_FW_INI_TIME_POINT_MISSED_BEACONS :case IWL_FW_INI_TIME_POINT_FW_DHC_NOTIFICATION :iwl_dbg_tlv_send_hcmds (fwrt, hcmd_list); -iwl_dbg_tlv_apply_config (fwrt, conf_list);iwl_dbg_tlv_tp_trigger (fwrt, sync, trig_list, tp_data, iwl_dbg_tlv_check_fw_pkt); +iwl_dbg_tlv_apply_config (fwrt, conf_list);break ;default :iwl_dbg_tlv_send_hcmds (fwrt, hcmd_list); -iwl_dbg_tlv_apply_config (fwrt, conf_list);iwl_dbg_tlv_tp_trigger (fwrt, sync, trig_list, tp_data,NULL ); +iwl_dbg_tlv_apply_config (fwrt, conf_list);break ; } }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 121/444 ipv6: save dontfrag in cork
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Willem de Bruijn <[email protected]>
[ Upstream commit a18dfa9925b9ef6107ea3aa5814ca3c704d34a8a ]
When spanning datagram construction over multiple send calls using MSG_MORE, per datagram settings are configured on the first send.
That is when ip(6)_setup_cork stores these settings for subsequent use in __ip(6)_append_data and others.
The only flag that escaped this was dontfrag. As a result, a datagram could be constructed with df=0 on the first sendmsg, but df=1 on a next. Which is what cmsg_ip.sh does in an upcoming MSG_MORE test in the "diff" scenario.
Changing datagram conditions in the middle of constructing an skb makes this already complex code path even more convoluted. It is here unintentional. Bring this flag in line with expected sockopt/cmsg behavior.
And stop passing ipc6 to __ip6_append_data, to avoid such issues in the future. This is already the case for __ip_append_data.
inet6_cork had a 6 byte hole, so the 1B flag has no impact.
--- include/linux/ipv6.h | 1 + net/ipv6/ip6_output.c | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-)
include/linux/ipv6.h +1 -0
@@ -199,6 +199,7 @@ struct inet6_cork {struct ipv6_txoptions *opt;u8 hop_limit;u8 tclass; + u8 dontfrag:1; };/* struct ipv6_pinfo - ipv6 private area */
net/ipv6/ip6_output.c +5 -4
@@ -1452,6 +1452,7 @@ static int ip6_setup_cork(struct sock *sk, struct inet_cork_full *cork, } v6_cork->hop_limit = ipc6->hlimit; v6_cork->tclass = ipc6->tclass; + v6_cork->dontfrag = ipc6->dontfrag;if (rt->dst.flags &DST_XFRM_TUNNEL ) mtu = np->pmtudisc >=IPV6_PMTUDISC_PROBE ?READ_ONCE (rt->dst.dev->mtu) :dst_mtu (&rt->dst);
@@ -1485,7 +1486,7 @@ static int __ip6_append_data(struct sock *sk,int getfrag (void *from,char *to,int offset,int len,int odd,struct sk_buff *skb), void *from, size_t length, int transhdrlen, - unsigned int flags, struct ipcm6_cookie *ipc6) + unsigned int flags) { struct sk_buff *skb, *skb_prev = NULL;struct inet_cork *cork = &cork_full->base;
@@ -1541,7 +1542,7 @@ static int __ip6_append_data(struct sock *sk,if (headersize + transhdrlen > mtu) goto emsgsize; -if (cork->length + length > mtu - headersize && ipc6->dontfrag && +if (cork->length + length > mtu - headersize && v6_cork->dontfrag && (sk->sk_protocol ==IPPROTO_UDP || sk->sk_protocol ==IPPROTO_ICMPV6 || sk->sk_protocol ==IPPROTO_RAW )) {
@@ -1913,7 +1914,7 @@ int ip6_append_data(struct sock *sk,return __ip6_append_data (sk, &sk->sk_write_queue, &inet->cork, &np->cork,sk_page_frag (sk), getfrag, - from, length, transhdrlen, flags, ipc6); + from, length, transhdrlen, flags); }EXPORT_SYMBOL_GPL (ip6_append_data);
@@ -2118,7 +2119,7 @@ struct sk_buff *ip6_make_skb(struct sock *sk, err =__ip6_append_data (sk, &queue, cork, &v6_cork, ¤t->task_frag, getfrag, from, length + exthdrlen, transhdrlen + exthdrlen, - flags, ipc6); + flags);if (err) {__ip6_flush_pending_frames (sk, &queue, cork, &v6_cork);return ERR_PTR (err);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 122/444 drm/amd/display: remove minimum Dispclk and apply oem panel timing.
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Charlene Liu <[email protected]>
[ Upstream commit 756e58e83e89d372b94269c0cde61fe55da76947 ]
[why & how]
1. apply oem panel timing (not only on OLED)
2. remove MIN_DPP_DISP_CLK request in driver.
This fix will apply for dcn31x but not
sync with DML's output.
--- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c | 2 -- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c | 2 -- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 3 ++- 3 files changed, 2 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c +0 -2
@@ -194,8 +194,6 @@ static void dcn315_update_clocks(struct clk_mgr *clk_mgr_base,// workaround: Limit dppclk to 100Mhz to avoid lower eDP panel switch to plus 4K monitor underflow. if (new_clocks->dppclk_khz <MIN_DPP_DISP_CLK ) new_clocks->dppclk_khz =MIN_DPP_DISP_CLK ; -if (new_clocks->dispclk_khz <MIN_DPP_DISP_CLK ) - new_clocks->dispclk_khz =MIN_DPP_DISP_CLK ;if (should_set_clock (safe_to_lower, new_clocks->dppclk_khz, clk_mgr->base.clks.dppclk_khz)) {if (clk_mgr->base.clks.dppclk_khz > new_clocks->dppclk_khz)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c +0 -2
@@ -201,8 +201,6 @@ static void dcn316_update_clocks(struct clk_mgr *clk_mgr_base,// workaround: Limit dppclk to 100Mhz to avoid lower eDP panel switch to plus 4K monitor underflow. if (new_clocks->dppclk_khz <100000 ) new_clocks->dppclk_khz =100000 ; -if (new_clocks->dispclk_khz <100000 ) - new_clocks->dispclk_khz =100000 ;if (should_set_clock (safe_to_lower, new_clocks->dppclk_khz, clk_mgr->base.clks.dppclk_khz)) {if (clk_mgr->base.clks.dppclk_khz > new_clocks->dppclk_khz)
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +2 -1
@@ -1066,7 +1066,8 @@ void dce110_edp_backlight_control(DC_LOG_DC ("edp_receiver_ready_T9 skipped\n" ); } -if (!enable && link->dpcd_sink_ext_caps.bits.oled) { +if (!enable) { +/*follow oem panel config's requirement*/ pre_T11_delay += link->panel_config.pps.extra_pre_t11_ms;msleep (pre_T11_delay); }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 123/444 drm/amd/display: calculate the remain segments for all pipes
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhikai Zhai <[email protected]>
[ Upstream commit d3069feecdb5542604d29b59acfd1fd213bad95b ]
[WHY]
In some cases the remain de-tile buffer segments will be greater than zero if we don't add the non-top pipe to calculate, at this time the override de-tile buffer size will be valid and used. But it makes the de-tile buffer segments used finally for all of pipes exceed the maximum.
[HOW]
Add the non-top pipe to calculate the remain de-tile buffer segments. Don't set override size to use the average according to pipe count if the value exceed the maximum.
--- .../amd/display/dc/dcn315/dcn315_resource.c | 42 +++++++++---------- 1 file changed, 20 insertions(+), 22 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c +20 -22
@@ -1692,7 +1692,7 @@ static int dcn315_populate_dml_pipes_from_context( pipes[pipe_cnt].dout.dsc_input_bpc =0 ;DC_FP_START ();dcn31_zero_pipe_dcc_fraction (pipes, pipe_cnt); -if (pixel_rate_crb && !pipe->top_pipe && !pipe->prev_odm_pipe) { +if (pixel_rate_crb) {int bpp =source_format_to_bpp (pipes[pipe_cnt].pipe.src.source_format);/* Ceil to crb segment size */ int approx_det_segs_required_for_pstate = dcn_get_approx_det_segs_required_for_pstate(
@@ -1749,28 +1749,26 @@ static int dcn315_populate_dml_pipes_from_context(continue ; } -if (!pipe->top_pipe && !pipe->prev_odm_pipe) { -bool split_required = pipe->stream->timing.pix_clk_100hz >=dcn_get_max_non_odm_pix_rate_100hz (&dc->dml.soc) - || (pipe->plane_state && pipe->plane_state->src_rect.width >5120 ); - -if (remaining_det_segs >MIN_RESERVED_DET_SEGS && crb_pipes !=0 ) - pipes[pipe_cnt].pipe.src.det_size_override += (remaining_det_segs -MIN_RESERVED_DET_SEGS ) / crb_pipes + - (crb_idx < (remaining_det_segs -MIN_RESERVED_DET_SEGS ) % crb_pipes ?1 :0 ); -if (pipes[pipe_cnt].pipe.src.det_size_override >2 *DCN3_15_MAX_DET_SEGS ) { -/* Clamp to 2 pipe split max det segments */ - remaining_det_segs += pipes[pipe_cnt].pipe.src.det_size_override -2 * (DCN3_15_MAX_DET_SEGS ); - pipes[pipe_cnt].pipe.src.det_size_override =2 *DCN3_15_MAX_DET_SEGS ; - } -if (pipes[pipe_cnt].pipe.src.det_size_override >DCN3_15_MAX_DET_SEGS || split_required) { -/* If we are splitting we must have an even number of segments */ - remaining_det_segs += pipes[pipe_cnt].pipe.src.det_size_override %2 ; - pipes[pipe_cnt].pipe.src.det_size_override -= pipes[pipe_cnt].pipe.src.det_size_override %2 ; - } -/* Convert segments into size for DML use */ - pipes[pipe_cnt].pipe.src.det_size_override *=DCN3_15_CRB_SEGMENT_SIZE_KB ; - - crb_idx++; +bool split_required = pipe->stream->timing.pix_clk_100hz >=dcn_get_max_non_odm_pix_rate_100hz (&dc->dml.soc) + || (pipe->plane_state && pipe->plane_state->src_rect.width >5120 ); + +if (remaining_det_segs >MIN_RESERVED_DET_SEGS && crb_pipes !=0 ) + pipes[pipe_cnt].pipe.src.det_size_override += (remaining_det_segs -MIN_RESERVED_DET_SEGS ) / crb_pipes + + (crb_idx < (remaining_det_segs -MIN_RESERVED_DET_SEGS ) % crb_pipes ?1 :0 ); +if (pipes[pipe_cnt].pipe.src.det_size_override >2 *DCN3_15_MAX_DET_SEGS ) { +/* Clamp to 2 pipe split max det segments */ + remaining_det_segs += pipes[pipe_cnt].pipe.src.det_size_override -2 * (DCN3_15_MAX_DET_SEGS ); + pipes[pipe_cnt].pipe.src.det_size_override =2 *DCN3_15_MAX_DET_SEGS ; + } +if (pipes[pipe_cnt].pipe.src.det_size_override >DCN3_15_MAX_DET_SEGS || split_required) { +/* If we are splitting we must have an even number of segments */ + remaining_det_segs += pipes[pipe_cnt].pipe.src.det_size_override %2 ; + pipes[pipe_cnt].pipe.src.det_size_override -= pipes[pipe_cnt].pipe.src.det_size_override %2 ; } +/* Convert segments into size for DML use */ + pipes[pipe_cnt].pipe.src.det_size_override *=DCN3_15_CRB_SEGMENT_SIZE_KB ; + + crb_idx++; pipe_cnt++; } }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 124/444 drm/amd/display: Fix incorrect DPCD configs while Replay/PSR switch
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Leon Huang <[email protected]>
[ Upstream commit 0d9cabc8f591ea1cd97c071b853b75b155c13259 ]
[Why]
When switching between PSR/Replay,
the DPCD config of previous mode is not cleared, resulting in unexpected behavior in TCON.
[How]
Initialize the DPCD in setup function
--- .../link/protocols/link_edp_panel_control.c | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c +22 -3
@@ -662,6 +662,18 @@ bool edp_setup_psr(struct dc_link *link,if (!link)return false; +//Clear PSR cfg +memset (&psr_configuration,0 ,sizeof (psr_configuration)); +dm_helpers_dp_write_dpcd ( + link->ctx, + link, +DP_PSR_EN_CFG , + &psr_configuration.raw, +sizeof (psr_configuration.raw)); + +if (link->psr_settings.psr_version ==DC_PSR_VERSION_UNSUPPORTED ) +return false; + dc = link->ctx->dc; dmcu = dc->res_pool->dmcu; psr = dc->res_pool->psr;
@@ -672,9 +684,6 @@ bool edp_setup_psr(struct dc_link *link,if (!dc_get_edp_link_panel_inst (dc, link, &panel_inst))return false; - -memset (&psr_configuration,0 ,sizeof (psr_configuration)); - psr_configuration.bits.ENABLE =1 ; psr_configuration.bits.CRC_VERIFICATION =1 ; psr_configuration.bits.FRAME_CAPTURE_INDICATION =
@@ -938,6 +947,16 @@ bool edp_setup_replay(struct dc_link *link, const struct dc_stream_state *streamif (!link)return false; +//Clear Replay config +dm_helpers_dp_write_dpcd (link->ctx, link, +DP_SINK_PR_ENABLE_AND_CONFIGURATION , + (uint8_t *)&(replay_config.raw),sizeof (uint8_t )); + +if (!(link->replay_settings.config.replay_supported)) +return false; + + link->replay_settings.config.replay_error_status.raw =0 ; + dc = link->ctx->dc; replay = dc->res_pool->replay;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 125/444 gfs2: Check for empty queue in run_queue
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andreas Gruenbacher <[email protected]>
[ Upstream commit d838605fea6eabae3746a276fd448f6719eb3926 ]
In run_queue(), check if the queue of pending requests is empty instead of blindly assuming that it won't be.
--- fs/gfs2/glock.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
fs/gfs2/glock.c +8 -3
@@ -853,11 +853,12 @@ static void run_queue(struct gfs2_glock *gl, const int nonblock) __releases(&gl->gl_lockref.lock) __acquires(&gl->gl_lockref.lock) { -struct gfs2_holder *gh =NULL ; +struct gfs2_holder *gh;if (test_and_set_bit (GLF_LOCK , &gl->gl_flags))return ; +/* While a demote is in progress, the GLF_LOCK flag must be set. */ GLOCK_BUG_ON (gl,test_bit (GLF_DEMOTE_IN_PROGRESS , &gl->gl_flags)); if (test_bit(GLF_DEMOTE, &gl->gl_flags) &&
@@ -869,18 +870,22 @@ __acquires(&gl->gl_lockref.lock)set_bit (GLF_DEMOTE_IN_PROGRESS , &gl->gl_flags);GLOCK_BUG_ON (gl, gl->gl_demote_state ==LM_ST_EXCLUSIVE ); gl->gl_target = gl->gl_demote_state; +do_xmote (gl,NULL , gl->gl_target); +return ; }else {if (test_bit (GLF_DEMOTE , &gl->gl_flags))gfs2_demote_wake (gl);if (do_promote (gl)) goto out_unlock; gh =find_first_waiter (gl); +if (!gh) + goto out_unlock; gl->gl_target = gh->gh_state;if (!(gh->gh_flags & (LM_FLAG_TRY |LM_FLAG_TRY_1CB )))do_error (gl,0 );/* Fail queued try locks */ +do_xmote (gl, gh, gl->gl_target); +return ; } -do_xmote (gl, gh, gl->gl_target); -return ; out_sched:clear_bit (GLF_LOCK , &gl->gl_flags);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 126/444 auxdisplay: charlcd: Partially revert "Move hwidth and bwidth to struct hd44780_common"
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andy Shevchenko <[email protected]>
[ Upstream commit 09965a142078080fe7807bab0f6f1890cb5987a4 ]
Commit 2545c1c948a6 ("auxdisplay: Move hwidth and bwidth to struct hd44780_common") makes charlcd_alloc() argument-less effectively dropping the single allocation for the struct charlcd_priv object along with the driver specific one. Restore that behaviour here.
--- drivers/auxdisplay/charlcd.c | 5 +++-- drivers/auxdisplay/charlcd.h | 5 +++-- drivers/auxdisplay/hd44780.c | 2 +- drivers/auxdisplay/lcd2s.c | 2 +- drivers/auxdisplay/panel.c | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-)
drivers/auxdisplay/charlcd.c +3 -2
@@ -594,18 +594,19 @@ static int charlcd_init(struct charlcd *lcd)return 0 ; } -struct charlcd *charlcd_alloc (void ) +struct charlcd *charlcd_alloc (unsigned int drvdata_size) {struct charlcd_priv *priv;struct charlcd *lcd; - priv =kzalloc (sizeof (*priv),GFP_KERNEL ); + priv =kzalloc (sizeof (*priv) + drvdata_size,GFP_KERNEL );if (!priv)return NULL ; priv->esc_seq.len =-1 ; lcd = &priv->lcd; + lcd->drvdata = priv->drvdata;return lcd; }
drivers/auxdisplay/charlcd.h +3 -2
@@ -49,7 +49,7 @@ struct charlcd {unsigned long y; } addr; -void *drvdata; +void *drvdata;/* Set by charlcd_alloc() */ };/**
@@ -93,7 +93,8 @@ struct charlcd_ops { };void charlcd_backlight (struct charlcd *lcd,enum charlcd_onoff on); -struct charlcd *charlcd_alloc (void ); + +struct charlcd *charlcd_alloc (unsigned int drvdata_size);void charlcd_free (struct charlcd *lcd);int charlcd_register (struct charlcd *lcd);
drivers/auxdisplay/hd44780.c +1 -1
@@ -226,7 +226,7 @@ static int hd44780_probe(struct platform_device *pdev)if (!hdc)return -ENOMEM ; - lcd =charlcd_alloc (); + lcd =charlcd_alloc (0 );if (!lcd) goto fail1;
drivers/auxdisplay/lcd2s.c +1 -1
@@ -307,7 +307,7 @@ static int lcd2s_i2c_probe(struct i2c_client *i2c)if (err <0 )return err; - lcd =charlcd_alloc (); + lcd =charlcd_alloc (0 );if (!lcd)return -ENOMEM ;
drivers/auxdisplay/panel.c +1 -1
@@ -835,7 +835,7 @@ static void lcd_init(void)if (!hdc)return ; - charlcd =charlcd_alloc (); + charlcd =charlcd_alloc (0 );if (!charlcd) {kfree (hdc);return ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 127/444 ASoC: qcom: sm8250: explicitly set format in sm8250_be_hw_params_fixup()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexey Klimov <[email protected]>
[ Upstream commit 89be3c15a58b2ccf31e969223c8ac93ca8932d81 ]
Setting format to s16le is required for compressed playback on compatible soundcards.
--- sound/soc/qcom/sm8250.c | 3 +++ 1 file changed, 3 insertions(+)
sound/soc/qcom/sm8250.c +3 -0
@@ -7,6 +7,7 @@#include <sound/soc.h> #include <sound/soc-dapm.h> #include <sound/pcm.h> +#include <sound/pcm_params.h> #include <linux/soundwire/sdw.h> #include <sound/jack.h> #include <linux/input-event-codes.h>
@@ -39,9 +40,11 @@ static int sm8250_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, SNDRV_PCM_HW_PARAM_RATE);struct snd_interval *channels =hw_param_interval (params,SNDRV_PCM_HW_PARAM_CHANNELS ); +struct snd_mask *fmt =hw_param_mask (params,SNDRV_PCM_HW_PARAM_FORMAT ); rate->min = rate->max =48000 ; channels->min = channels->max =2 ; +snd_mask_set_format (fmt,SNDRV_PCM_FORMAT_S16_LE );return 0 ; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 128/444 iommu/amd/pgtbl_v2: Improve error handling
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vasant Hegde <[email protected]>
[ Upstream commit 36a1cfd497435ba5e37572fe9463bb62a7b1b984 ]
Return -ENOMEM if v2_alloc_pte() fails to allocate memory.
--- drivers/iommu/amd/io_pgtable_v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/amd/io_pgtable_v2.c +1 -1
@@ -259,7 +259,7 @@ static int iommu_v2_map_pages(struct io_pgtable_ops *ops, unsigned long iova, pte =v2_alloc_pte (pdom->nid, pdom->iop.pgd, iova, map_size, gfp, &updated);if (!pte) { - ret = -EINVAL ; + ret = -ENOMEM ; goto out; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 129/444 cpufreq: tegra186: Share policy per cluster
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aaron Kling <[email protected]>
[ Upstream commit be4ae8c19492cd6d5de61ccb34ffb3f5ede5eec8 ]
This functionally brings tegra186 in line with tegra210 and tegra194, sharing a cpufreq policy between all cores in a cluster.
--- drivers/cpufreq/tegra186-cpufreq.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/cpufreq/tegra186-cpufreq.c +7 -0
@@ -73,11 +73,18 @@ static int tegra186_cpufreq_init(struct cpufreq_policy *policy) {struct tegra186_cpufreq_data *data =cpufreq_get_driver_data ();unsigned int cluster = data->cpus[policy->cpu].bpmp_cluster_id; +u32 cpu; policy->freq_table = data->clusters[cluster].table; policy->cpuinfo.transition_latency =300 *1000 ; policy->driver_data =NULL ; +/* set same policy for all cpus in a cluster */ +for (cpu =0 ; cpu <ARRAY_SIZE (tegra186_cpus); cpu++) { +if (data->cpus[cpu].bpmp_cluster_id == cluster) +cpumask_set_cpu (cpu, policy->cpus); + } +return 0 ; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 130/444 watchdog: aspeed: Update bootstatus handling
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chin-Ting Kuo <[email protected]>
[ Upstream commit 5c03f9f4d36292150c14ebd90788c4d3273ed9dc ]
The boot status in the watchdog device struct is updated during controller probe stage. Application layer can get the boot status through the command, cat /sys/class/watchdog/watchdogX/bootstatus. The bootstatus can be,WDIOF_CARDRESET => System is reset due to WDT timeout occurs.
Others => Other reset events, e.g., power on reset.
On ASPEED platforms, boot status is recorded in the SCU registers.
- AST2400: Only a bit is used to represent system reset triggered by any WDT controller.
- AST2500/AST2600: System reset triggered by different WDT controllers can be distinguished by different SCU bits.
Besides, on AST2400 and AST2500, since alternating boot event is also triggered by using WDT timeout mechanism, it is classified as WDIOF_CARDRESET.
--- drivers/watchdog/aspeed_wdt.c | 81 ++++++++++++++++++++++++++++++++++- 1 file changed, 79 insertions(+), 2 deletions(-)
drivers/watchdog/aspeed_wdt.c +79 -2
@@ -11,21 +11,30 @@#include <linux/io.h> #include <linux/kernel.h> #include <linux/kstrtox.h> +#include <linux/mfd/syscon.h> #include <linux/module.h> #include <linux/of.h> #include <linux/of_irq.h> #include <linux/platform_device.h> +#include <linux/regmap.h> #include <linux/watchdog.h> static bool nowayout =WATCHDOG_NOWAYOUT ;module_param (nowayout, bool,0 ); MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); +struct aspeed_wdt_scu { +const char *compatible; +u32 reset_status_reg; +u32 wdt_reset_mask; +u32 wdt_reset_mask_shift; +};struct aspeed_wdt_config {u32 ext_pulse_width_mask;u32 irq_shift;u32 irq_mask; +struct aspeed_wdt_scu scu; };struct aspeed_wdt {
@@ -39,18 +48,36 @@ static const struct aspeed_wdt_config ast2400_config = { .ext_pulse_width_mask = 0xff, .irq_shift = 0, .irq_mask = 0, + .scu = { + .compatible = "aspeed,ast2400-scu", + .reset_status_reg = 0x3c, + .wdt_reset_mask = 0x1, + .wdt_reset_mask_shift = 1, + }, };static const struct aspeed_wdt_config ast2500_config = { .ext_pulse_width_mask =0xfffff , .irq_shift =12 , .irq_mask =GENMASK (31 ,12 ), + .scu = { + .compatible ="aspeed,ast2500-scu" , + .reset_status_reg =0x3c , + .wdt_reset_mask =0x1 , + .wdt_reset_mask_shift =2 , + }, };static const struct aspeed_wdt_config ast2600_config = { .ext_pulse_width_mask =0xfffff , .irq_shift =0 , .irq_mask =GENMASK (31 ,10 ), + .scu = { + .compatible ="aspeed,ast2600-scu" , + .reset_status_reg =0x74 , + .wdt_reset_mask =0xf , + .wdt_reset_mask_shift =16 , + }, };static const struct of_device_id aspeed_wdt_of_table[] = {
@@ -211,6 +238,56 @@ static int aspeed_wdt_restart(struct watchdog_device *wdd,return 0 ; } +static void aspeed_wdt_update_bootstatus (struct platform_device *pdev, +struct aspeed_wdt *wdt) +{ +const struct resource *res; +struct aspeed_wdt_scu scu = wdt->cfg->scu; +struct regmap *scu_base; +u32 reset_mask_width; +u32 reset_mask_shift; +u32 idx =0 ; +u32 status; +int ret; + +if (!of_device_is_compatible (pdev->dev.of_node,"aspeed,ast2400-wdt" )) { + res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); + idx = ((intptr_t )wdt->base &0x00000fff ) /resource_size (res); + } + + scu_base =syscon_regmap_lookup_by_compatible (scu.compatible); +if (IS_ERR (scu_base)) { + wdt->wdd.bootstatus =WDIOS_UNKNOWN ; +return ; + } + + ret =regmap_read (scu_base, scu.reset_status_reg, &status); +if (ret) { + wdt->wdd.bootstatus =WDIOS_UNKNOWN ; +return ; + } + + reset_mask_width =hweight32 (scu.wdt_reset_mask); + reset_mask_shift = scu.wdt_reset_mask_shift + + reset_mask_width * idx; + +if (status & (scu.wdt_reset_mask << reset_mask_shift)) + wdt->wdd.bootstatus =WDIOF_CARDRESET ; + +/* clear wdt reset event flag */ +if (of_device_is_compatible (pdev->dev.of_node,"aspeed,ast2400-wdt" ) || +of_device_is_compatible (pdev->dev.of_node,"aspeed,ast2500-wdt" )) { + ret =regmap_read (scu_base, scu.reset_status_reg, &status); +if (!ret) { + status &= ~(scu.wdt_reset_mask << reset_mask_shift); +regmap_write (scu_base, scu.reset_status_reg, status); + } + }else { +regmap_write (scu_base, scu.reset_status_reg, + scu.wdt_reset_mask << reset_mask_shift); + } +} +/* access_cs0 shows if cs0 is accessible, hence the reverted bit */ static ssize_t access_cs0_show (struct device *dev,struct device_attribute *attr,char *buf)
@@ -447,10 +524,10 @@ static int aspeed_wdt_probe(struct platform_device *pdev)writel (duration -1 , wdt->base +WDT_RESET_WIDTH ); } +aspeed_wdt_update_bootstatus (pdev, wdt); + status =readl (wdt->base +WDT_TIMEOUT_STATUS );if (status &WDT_TIMEOUT_STATUS_BOOT_SECONDARY ) { - wdt->wdd.bootstatus =WDIOF_CARDRESET ; -if (of_device_is_compatible (np,"aspeed,ast2400-wdt" ) ||of_device_is_compatible (np,"aspeed,ast2500-wdt" )) wdt->wdd.groups = bswitch_groups;
Signature · 1 line
2.39.5