6.6.42-rc1 review
Subsystems (2)
Greg Kroah-Hartman
maintainercover 6.6.42-rc1 review
This is the start of the stable review cycle for the 6.6.42 release. There are 129 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 25 Jul 2024 18:03:23 +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.42-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.42-rc1
Baokun Li <[email protected]>
cachefiles: fix slab-use-after-free in cachefiles_withdraw_cookie()
Baokun Li <[email protected]>
cachefiles: fix slab-use-after-free in fscache_withdraw_volume()
Baokun Li <[email protected]>
netfs, fscache: export fscache_put_volume() and add fscache_try_get_volume()
Emmanuel Grumbach <[email protected]>
wifi: iwlwifi: mvm: don't wake up rx_sync_waitq upon RFKILL
Johannes Berg <[email protected]>
wifi: mac80211: disable softirqs for queued frame handling
Johannes Berg <[email protected]>
wifi: cfg80211: wext: set ssids=NULL for passive scans
Marc Zyngier <[email protected]>
of/irq: Disable "interrupt-map" parsing for PASEMI Nemo
Luiz Augusto von Dentz <[email protected]>
Bluetooth: L2CAP: Fix deadlock
Yang Shi <[email protected]>
mm: page_ref: remove folio_try_get_rcu()
Masahiro Yamada <[email protected]>
ARM: 9324/1: fix get_user() broken with veneer
Steve French <[email protected]>
cifs: fix noisy message on copy_file_range
Takashi Iwai <[email protected]>
ALSA: hda: Use imply for suggesting CONFIG_SERIAL_MULTI_INSTANTIATE
David Lechner <[email protected]>
spi: mux: set ctlr->bits_per_word_mask
Daniel Borkmann <[email protected]>
selftests/bpf: Extend tcx tests to cover late tcx_entry release
Edward Adam Davis <[email protected]>
hfsplus: fix uninit-value in copy_name
John Hubbard <[email protected]>
selftests/vDSO: fix clang build errors and warnings
John Hubbard <[email protected]>
selftest/timerns: fix clang build failures for abs() calls
Peter Ujfalusi <[email protected]>
ASoC: SOF: Intel: hda-pcm: Limit the maximum number of periods by MAX_BDL_ENTRIES
Namjae Jeon <[email protected]>
ksmbd: return FILE_DEVICE_DISK instead of super magic
Uwe Kleine-König <[email protected]>
spi: imx: Don't expect DMA for i.MX{25,35,50,51,53} cspi devicesPuranjay Mohan <[email protected]>
riscv: stacktrace: fix usage of ftrace_graph_ret_addr()
Samuel Holland <[email protected]>
drivers/perf: riscv: Reset the counter to hpmevent mapping while starting cpus
Daniel Gabay <[email protected]>
wifi: iwlwifi: properly set WIPHY_FLAG_SUPPORTS_EXT_KEK_KCK
Christian Brauner <[email protected]>
fs: better handle deep ancestor chains in is_subdir()
Pierre-Eric Pelloux-Prayer <[email protected]>
drm/radeon: check bo_va->bo is non-NULL before using it
Tom Chung <[email protected]>
drm/amd/display: Fix refresh rate range for some panel
Alvin Lee <[email protected]>
drm/amd/display: Account for cursor prefetch BW in DML1 mode support
Tom Chung <[email protected]>
drm/amd/display: Add refresh rate range check
Gao Xiang <[email protected]>
erofs: ensure m_llen is reset to 0 if metadata is invalid
Edward Adam Davis <[email protected]>
bluetooth/l2cap: sync sock recv cb and release
Neeraj Sanjay Kale <[email protected]>
Bluetooth: btnxpuart: Enable Power Save feature on startup
Tetsuo Handa <[email protected]>
Bluetooth: hci_core: cancel all works upon hci_unregister_dev()
Mark-PK Tsai <[email protected]>
tee: optee: ffa: Fix missing-field-initializers warning
Xingui Yang <[email protected]>
scsi: libsas: Fix exp-attached device scan after probe failure scanned in again after probe failed
Ganesh Goudar <[email protected]>
powerpc/eeh: avoid possible crash when edev->pdev changes
Anjali K <[email protected]>
powerpc/pseries: Whitelist dtl slub object for copying to userspace
Yunshui Jiang <[email protected]>
net: mac802154: Fix racy device stats updates by DEV_STATS_INC() and DEV_STATS_ADD()
Daniele Palmas <[email protected]>
net: usb: qmi_wwan: add Telit FN912 compositions
Vyacheslav Frantsishko <[email protected]>
ASoC: amd: yc: Fix non-functional mic on ASUS M5602RA
Shengjiu Wang <[email protected]>
ALSA: dmaengine_pcm: terminate dmaengine before synchronize
Aivaz Latypov <[email protected]>
ALSA: hda/relatek: Enable Mute LED on HP Laptop 15-gw0xxx
Takashi Iwai <[email protected]>
ALSA: PCM: Allow resume only for suspended streams
Nick Child <[email protected]>
ibmvnic: Add tx check to prevent skb leak
Filipe Manana <[email protected]>
btrfs: qgroup: fix quota root leak after quota disable failure
Armin Wolf <[email protected]>
platform/x86: lg-laptop: Use ACPI device handle when evaluating WMAB/WMBB
Armin Wolf <[email protected]>
platform/x86: lg-laptop: Change ACPI device id
Armin Wolf <[email protected]>
platform/x86: lg-laptop: Remove LGEX0815 hotkey handling
Armin Wolf <[email protected]>
platform/x86: wireless-hotkey: Add support for LG Airplane Button
Chen Ni <[email protected]>
platform/mellanox: nvsw-sn2201: Add check for platform_device_add_resources
Heiko Carstens <[email protected]>
s390/sclp: Fix sclp_init() cleanup on failure
Ratheesh Kannoth <[email protected]>
octeontx2-pf: Fix coverity and klockwork issues in octeon PF driver
Ian Ray <[email protected]>
gpio: pca953x: fix pca953x_irq_bus_sync_unlock race
Chen Ni <[email protected]>
can: kvaser_usb: fix return value for hif_usb_send_regout
Alexander Stein <[email protected]>
Input: ads7846 - use spi_device_id table
Boyang Yu <[email protected]>
nvme: fix NVME_NS_DEAC may incorrectly identifying the disk as EXT_LBA.
Jack Yu <[email protected]>
ASoC: rt722-sdca-sdw: add debounce time for type detection
Peter Ujfalusi <[email protected]>
ASoC: SOF: sof-audio: Skip unprepare for in-use widgets on error rollback
Primoz Fiser <[email protected]>
ASoC: ti: omap-hdmi: Fix too long driver name
Jai Luthra <[email protected]>
ASoC: ti: davinci-mcasp: Set min period size using FIFO config
Jai Luthra <[email protected]>
ALSA: dmaengine: Synchronize dma channel after drop()
Thomas GENTY <[email protected]>
bytcr_rt5640 : inverse jack detect for Archos 101 cesium
Amadeusz Sławiński <[email protected]>
ASoC: topology: Do not assign fields that are already set
Amadeusz Sławiński <[email protected]>
ASoC: topology: Fix references to freed memory
Luke D. Jones <[email protected]>
Input: xpad - add support for ASUS ROG RAIKIRI PRO
Jack Yu <[email protected]>
ASoC: rt722-sdca-sdw: add silence detection register as volatile
Tobias Jakobi <[email protected]>
Input: i8042 - add Ayaneo Kun to i8042 quirk table
Jonathan Denose <[email protected]>
Input: elantech - fix touchpad state on resume for Lenovo N24
Arnd Bergmann <[email protected]>
mips: fix compat_sys_lseek syscall
Simon Trimmer <[email protected]>
ALSA: hda: cs35l56: Select SERIAL_MULTI_INSTANTIATE
Harish Kasiviswanathan <[email protected]>
drm/amdgpu: Indicate CU havest info to CP
Adrian Moreno <[email protected]>
selftests: openvswitch: Set value to nla flags.
Linus Torvalds <[email protected]>
cpumask: limit FORCE_NR_CPUS to just the UP case
Patrice Chotard <[email protected]>
spi: Fix OCTAL mode support
Kailang Yang <[email protected]>
ALSA: hda/realtek: Add more codec ID to no shutup pins list
Alexey Makhalov <[email protected]>
drm/vmwgfx: Fix missing HYPERVISOR_GUEST dependency
Michael Ellerman <[email protected]>
KVM: PPC: Book3S HV: Prevent UAF in kvm_spapr_tce_attach_iommu_group()
Stefan Binding <[email protected]>
ALSA: hda/realtek: Support Lenovo Thinkbook 16P Gen 5
Dmitry Antipov <[email protected]>
wifi: cfg80211: wext: add extra SIOCSIWSCAN data check
Simon Trimmer <[email protected]>
ALSA: hda: cs35l56: Fix lifecycle of codec pointer
Daniel Wagner <[email protected]>
nvmet: always initialize cqe.result
Chunguang Xu <[email protected]>
nvme: avoid double free special payload
Douglas Anderson <[email protected]>
drm/mediatek: Call drm_atomic_helper_shutdown() at shutdown time
Tobias Jakobi <[email protected]>
drm: panel-orientation-quirks: Add quirk for Aya Neo KUN
Krzysztof Kozlowski <[email protected]>
drm/exynos: dp: drop driver owner initialization
Ritesh Harjani (IBM) <[email protected]>
iomap: Fix iomap_adjust_read_range for plen calculation
Alexander Usyskin <[email protected]>
mei: demote client disconnect warning on suspend to debug
Yuntao Wang <[email protected]>
fs/file: fix the check in find_next_fd()
Baokun Li <[email protected]>
cachefiles: make on-demand read killable
Zizhi Wo <[email protected]>
cachefiles: Set object to close if ondemand_id < 0 in copen
Baokun Li <[email protected]>
cachefiles: add consistency check for copen/cread
Scott Mayhew <[email protected]>
nfs: don't invalidate dentries on transient errors
Jan Kara <[email protected]>
nfs: Avoid flushing many pages with NFS_FILE_SYNC
Sagi Grimberg <[email protected]>
nfs: propagate readlink errors in nfs_symlink_filler
Dmitry Mastykin <[email protected]>
NFSv4: Fix memory leak in nfs4_set_security_label
Louis Dalibard <[email protected]>
HID: Ignore battery for ELAN touchscreens 2F2C and 4116
Aseda Aboagye <[email protected]>
input: Add support for "Do Not Disturb"
Aseda Aboagye <[email protected]>
input: Add event code for accessibility key
Masahiro Yamada <[email protected]>
kconfig: remove wrong expr_trans_bool()
Masahiro Yamada <[email protected]>
kconfig: gconf: give a proper initial state to the Save button
Andreas Hindborg <[email protected]>
null_blk: fix validation of block size
Wei Li <[email protected]>
arm64: armv8_deprecated: Fix warning in isndep cpuhp starting process
Eric Dumazet <[email protected]>
ila: block BH in ila_output()
Eric Dumazet <[email protected]>
net: ipv6: rpl_iptunnel: block BH in rpl_output() and rpl_input()
Hans de Goede <[email protected]>
Input: silead - Always support 10 fingers
Rob Herring (Arm) <[email protected]>
of/irq: Factor out parsing of interrupt-map parent phandle+args from of_irq_parse_raw()
John Hubbard <[email protected]>
selftests/futex: pass _GNU_SOURCE without a value to the compiler
Michael Ellerman <[email protected]>
selftests/openat2: Fix build warnings on ppc64
Michael Ellerman <[email protected]>
selftests: cachestat: Fix build warnings on ppc64
Dmitry Antipov <[email protected]>
wifi: mac80211: fix UBSAN noise in ieee80211_prep_hw_scan()
Ilan Peer <[email protected]>
wifi: iwlwifi: mvm: Fix scan abort handling with HW rfkill
Ayala Beker <[email protected]>
wifi: iwlwifi: mvm: properly set 6 GHz channel direct probe option
Johannes Berg <[email protected]>
wifi: iwlwifi: mvm: handle BA session teardown in RF-kill
Yedidya Benshimol <[email protected]>
wifi: iwlwifi: mvm: Handle BIGTK cipher in kek_kck cmd
Benjamin Berg <[email protected]>
wifi: iwlwifi: mvm: remove stale STA link data during restart
Yedidya Benshimol <[email protected]>
wifi: iwlwifi: mvm: d3: fix WoWLAN command version lookup
Johannes Berg <[email protected]>
wifi: cfg80211: fix 6 GHz scan request building
Johannes Berg <[email protected]>
wifi: mac80211: handle tasklet frames before stopping
Johannes Berg <[email protected]>
wifi: mac80211: apply mcast rate only if interface is up
Nicolas Escande <[email protected]>
wifi: mac80211: mesh: init nonpeer_pm to active by default in mesh sdata
Dhananjay Ugwekar <[email protected]>
tools/power/cpupower: Fix Pstate frequency reporting on AMD Family 1Ah CPUs
Armin Wolf <[email protected]>
ACPI: EC: Avoid returning AE_OK on errors in address space handler
Armin Wolf <[email protected]>
ACPI: EC: Abort address space access upon error
Nathan Chancellor <[email protected]>
efi/libstub: zboot.lds: Discard .discard sections
Saurav Kashyap <[email protected]>
scsi: qedf: Set qed_slowpath_params to zero before use
Saurav Kashyap <[email protected]>
scsi: qedf: Wait for stag work during unload
Saurav Kashyap <[email protected]>
scsi: qedf: Don't process stag work during unload and recovery
Justin Stitt <[email protected]>
scsi: sr: Fix unintentional arithmetic wraparound
Martin Wilck <[email protected]>
scsi: core: alua: I/O errors for ALUA state transitions
Jann Horn <[email protected]>
filelock: Remove locks reliably when fcntl/close race is detected
-------------
Diffstat:
Documentation/cdrom/cdrom-standard.rst | 4 +- Makefile | 4 +- arch/arm/include/asm/uaccess.h | 14 +- arch/arm64/kernel/armv8_deprecated.c | 3 + arch/mips/kernel/syscalls/syscall_o32.tbl | 2 +- arch/powerpc/kernel/eeh_pe.c | 7 +- arch/powerpc/kvm/book3s_64_vio.c | 18 ++- arch/powerpc/platforms/pseries/setup.c | 4 +- arch/riscv/kernel/stacktrace.c | 3 +- drivers/acpi/ec.c | 9 +- drivers/block/null_blk/main.c | 4 +- drivers/bluetooth/btnxpuart.c | 2 +- drivers/firmware/efi/libstub/zboot.lds | 1 + drivers/gpio/gpio-pca953x.c | 2 + drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 15 ++- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 52 +++++++- .../amd/display/dc/dml/dcn32/display_mode_vba_32.c | 3 + drivers/gpu/drm/drm_panel_orientation_quirks.c | 6 + drivers/gpu/drm/exynos/exynos_dp.c | 1 - drivers/gpu/drm/mediatek/mtk_drm_drv.c | 8 ++ drivers/gpu/drm/radeon/radeon_gem.c | 2 +- drivers/gpu/drm/vmwgfx/Kconfig | 2 +- drivers/hid/hid-debug.c | 2 + drivers/hid/hid-ids.h | 2 + drivers/hid/hid-input.c | 13 ++ drivers/input/joystick/xpad.c | 1 + drivers/input/mouse/elantech.c | 31 +++++ drivers/input/serio/i8042-acpipnpio.h | 18 ++- drivers/input/touchscreen/ads7846.c | 12 +- drivers/input/touchscreen/silead.c | 19 +-- drivers/misc/mei/main.c | 2 +- drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 2 +- drivers/net/ethernet/ibm/ibmvnic.c | 12 ++ .../ethernet/marvell/octeontx2/nic/otx2_common.c | 10 +- .../net/ethernet/marvell/octeontx2/nic/otx2_reg.h | 55 ++++---- .../net/ethernet/marvell/octeontx2/nic/otx2_txrx.c | 2 +- drivers/net/ethernet/marvell/octeontx2/nic/qos.c | 3 +- drivers/net/usb/qmi_wwan.c | 2 + drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 16 ++- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 47 ++++++- drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c | 13 +- drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 8 +- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 12 +- drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 5 + drivers/nvme/host/core.c | 1 + drivers/nvme/host/nvme.h | 2 +- drivers/nvme/target/core.c | 1 + drivers/nvme/target/fabrics-cmd-auth.c | 3 - drivers/nvme/target/fabrics-cmd.c | 6 - drivers/of/irq.c | 143 +++++++++++---------- drivers/of/of_private.h | 3 + drivers/perf/riscv_pmu_sbi.c | 2 +- drivers/platform/mellanox/nvsw-sn2201.c | 5 +- drivers/platform/x86/lg-laptop.c | 89 +++++-------- drivers/platform/x86/wireless-hotkey.c | 2 + drivers/s390/char/sclp.c | 1 + drivers/scsi/device_handler/scsi_dh_alua.c | 31 +++-- drivers/scsi/libsas/sas_internal.h | 14 ++ drivers/scsi/qedf/qedf.h | 1 + drivers/scsi/qedf/qedf_main.c | 47 ++++++- drivers/scsi/sr.h | 2 +- drivers/scsi/sr_ioctl.c | 5 +- drivers/spi/spi-imx.c | 2 +- drivers/spi/spi-mux.c | 1 + drivers/spi/spi.c | 6 +- drivers/tee/optee/ffa_abi.c | 12 +- fs/afs/write.c | 2 +- fs/btrfs/qgroup.c | 4 +- fs/cachefiles/cache.c | 45 ++++++- fs/cachefiles/ondemand.c | 74 ++++++++--- fs/cachefiles/volume.c | 1 - fs/dcache.c | 31 ++--- fs/erofs/zmap.c | 2 + fs/file.c | 4 +- fs/fscache/internal.h | 2 - fs/fscache/volume.c | 14 ++ fs/hfsplus/xattr.c | 2 +- fs/iomap/buffered-io.c | 3 +- fs/locks.c | 9 +- fs/nfs/dir.c | 27 ++-- fs/nfs/nfs4proc.c | 1 + fs/nfs/pagelist.c | 5 + fs/nfs/symlink.c | 2 +- fs/smb/client/cifsfs.c | 2 +- fs/smb/client/file.c | 4 +- fs/smb/common/smb2pdu.h | 34 +++++ fs/smb/server/smb2pdu.c | 9 +- include/linux/cdrom.h | 2 +- include/linux/fscache-cache.h | 6 + include/linux/page_ref.h | 49 +------ include/linux/spi/spi.h | 5 +- include/net/bluetooth/hci_sync.h | 2 + include/sound/dmaengine_pcm.h | 1 + include/trace/events/fscache.h | 4 + include/uapi/linux/input-event-codes.h | 2 + lib/Kconfig | 8 +- mm/filemap.c | 10 +- mm/gup.c | 2 +- net/bluetooth/hci_core.c | 76 ++++------- net/bluetooth/hci_sync.c | 13 ++ net/bluetooth/l2cap_core.c | 3 + net/bluetooth/l2cap_sock.c | 14 +- net/ipv6/ila/ila_lwt.c | 7 +- net/ipv6/rpl_iptunnel.c | 14 +- net/mac80211/cfg.c | 5 +- net/mac80211/ieee80211_i.h | 2 + net/mac80211/main.c | 11 +- net/mac80211/mesh.c | 1 + net/mac80211/scan.c | 14 +- net/mac80211/util.c | 4 + net/mac802154/tx.c | 8 +- net/wireless/rdev-ops.h | 6 +- net/wireless/scan.c | 59 ++++++--- scripts/kconfig/expr.c | 29 ----- scripts/kconfig/expr.h | 1 - scripts/kconfig/gconf.c | 3 +- scripts/kconfig/menu.c | 2 - sound/core/pcm_dmaengine.c | 22 ++++ sound/core/pcm_native.c | 2 + sound/pci/hda/Kconfig | 2 + sound/pci/hda/cs35l56_hda.c | 5 + sound/pci/hda/patch_realtek.c | 7 + sound/soc/amd/yc/acp6x-mach.c | 7 + sound/soc/codecs/rt722-sdca-sdw.c | 4 +- sound/soc/intel/boards/bytcr_rt5640.c | 11 ++ sound/soc/soc-generic-dmaengine-pcm.c | 8 ++ sound/soc/soc-topology.c | 29 +++-- sound/soc/sof/intel/hda-pcm.c | 6 + sound/soc/sof/sof-audio.c | 2 +- sound/soc/ti/davinci-mcasp.c | 9 +- sound/soc/ti/omap-hdmi.c | 6 +- tools/power/cpupower/utils/helpers/amd.c | 26 +++- tools/testing/selftests/bpf/config | 3 + tools/testing/selftests/bpf/prog_tests/tc_links.c | 61 +++++++++ tools/testing/selftests/cachestat/test_cachestat.c | 1 + tools/testing/selftests/futex/functional/Makefile | 2 +- .../testing/selftests/net/openvswitch/ovs-dpctl.py | 2 +- tools/testing/selftests/openat2/openat2_test.c | 1 + tools/testing/selftests/timens/exec.c | 6 +- tools/testing/selftests/timens/timer.c | 2 +- tools/testing/selftests/timens/timerfd.c | 2 +- tools/testing/selftests/timens/vfork_exec.c | 4 +- tools/testing/selftests/vDSO/parse_vdso.c | 16 ++- .../selftests/vDSO/vdso_standalone_test_x86.c | 18 ++- 144 files changed, 1168 insertions(+), 568 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/129 filelock: Remove locks reliably when fcntl/close race is detected
6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jann Horn <[email protected]>
commit 3cad1bc010416c6dd780643476bc59ed742436b9 upstream.
When fcntl_setlk() races with close(), it removes the created lock with do_lock_file_wait().
However, LSMs can allow the first do_lock_file_wait() that created the lock while denying the second do_lock_file_wait() that tries to remove the lock. In theory (but AFAIK not in practice), posix_lock_file() could also fail to remove a lock due to GFP_KERNEL allocation failure (when splitting a range in the middle).
After the bug has been triggered, use-after-free reads will occur in lock_get_status() when userspace reads /proc/locks. This can likely be used to read arbitrary kernel memory, but can't corrupt kernel memory. This only affects systems with SELinux / Smack / AppArmor / BPF-LSM in enforcing mode and only works from some security contexts.
Fix it by calling locks_remove_posix() instead, which is designed to reliably get rid of POSIX locks associated with the given file and files_struct and is also used by filp_flush().
--- fs/locks.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
fs/locks.c +4 -5
@@ -2381,8 +2381,9 @@ int fcntl_setlk(unsigned int fd, struct error =do_lock_file_wait (filp, cmd, file_lock);/* -* Attempt to detect a close/fcntl race and recover by releasing the -* lock that was just acquired. There is no need to do that when we're +* Detect close/fcntl races and recover by zapping all POSIX locks +* associated with this file and our files_struct, just like on +* filp_flush(). There is no need to do that when we're * unlocking though, or for OFD locks. */ if (!error && file_lock->fl_type != F_UNLCK &&
@@ -2397,9 +2398,7 @@ int fcntl_setlk(unsigned int fd, struct f =files_lookup_fd_locked (files, fd);spin_unlock (&files->file_lock);if (f != filp) { - file_lock->fl_type =F_UNLCK ; - error =do_lock_file_wait (filp, cmd, file_lock); -WARN_ON_ONCE (error); +locks_remove_posix (filp, files); error = -EBADF ; } }
Greg Kroah-Hartman
maintainerPATCH 2/129 scsi: core: alua: I/O errors for ALUA state transitions
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Martin Wilck <[email protected]>
[ Upstream commit 10157b1fc1a762293381e9145041253420dfc6ad ]
When a host is configured with a few LUNs and I/O is running, injecting FC faults repeatedly leads to path recovery problems. The LUNs have 4 paths each and 3 of them come back active after say an FC fault which makes 2 of the paths go down, instead of all 4. This happens after several iterations of continuous FC faults.
Reason here is that we're returning an I/O error whenever we're encountering sense code 06/04/0a (LOGICAL UNIT NOT ACCESSIBLE, ASYMMETRIC ACCESS STATE TRANSITION) instead of retrying.
[mwilck: The original patch was developed by Rajashekhar M A and Hannes Reinecke. I moved the code to alua_check_sense() as suggested by Mike Christie [1]. Evan Milne had raised the question whether pg->state should be set to transitioning in the UA case [2]. I believe that doing this is correct. SCSI_ACCESS_STATE_TRANSITIONING by itself doesn't cause I/O errors. Our handler schedules an RTPG, which will only result in an I/O error condition if the transitioning timeout expires.]
[1] https://lore.kernel.org/all/[email protected]/
[2] https://lore.kernel.org/all/CAGtn9r=kicnTDE2o7Gt5Y=yoidHYD7tG8XdMHEBJTBraVEoOCw@mail.gmail.com/
--- drivers/scsi/device_handler/scsi_dh_alua.c | 31 +++++++++++++++------- 1 file changed, 22 insertions(+), 9 deletions(-)
drivers/scsi/device_handler/scsi_dh_alua.c +22 -9
@@ -414,28 +414,40 @@ static char print_alua_state(unsigned char state) } } -static enum scsi_disposition alua_check_sense (struct scsi_device *sdev, -struct scsi_sense_hdr *sense_hdr) +static void alua_handle_state_transition (struct scsi_device *sdev) {struct alua_dh_data *h = sdev->handler_data;struct alua_port_group *pg; +rcu_read_lock (); + pg =rcu_dereference (h->pg); +if (pg) + pg->state =SCSI_ACCESS_STATE_TRANSITIONING ; +rcu_read_unlock (); +alua_check (sdev, false); +} + +static enum scsi_disposition alua_check_sense (struct scsi_device *sdev, +struct scsi_sense_hdr *sense_hdr) +{switch (sense_hdr->sense_key) {case NOT_READY :if (sense_hdr->asc ==0x04 && sense_hdr->ascq ==0x0a ) {/* * LUN Not Accessible - ALUA state transition */ -rcu_read_lock (); - pg =rcu_dereference (h->pg); -if (pg) - pg->state =SCSI_ACCESS_STATE_TRANSITIONING ; -rcu_read_unlock (); -alua_check (sdev, false); +alua_handle_state_transition (sdev);return NEEDS_RETRY ; }break ;case UNIT_ATTENTION : +if (sense_hdr->asc ==0x04 && sense_hdr->ascq ==0x0a ) { +/* +* LUN Not Accessible - ALUA state transition +*/ +alua_handle_state_transition (sdev); +return NEEDS_RETRY ; + }if (sense_hdr->asc ==0x29 && sense_hdr->ascq ==0x00 ) {/* * Power On, Reset, or Bus Device Reset.
@@ -502,7 +514,8 @@ static int alua_tur(struct scsi_device *sdev) retval =scsi_test_unit_ready (sdev,ALUA_FAILOVER_TIMEOUT *HZ ,ALUA_FAILOVER_RETRIES , &sense_hdr); -if (sense_hdr.sense_key ==NOT_READY && +if ((sense_hdr.sense_key ==NOT_READY || + sense_hdr.sense_key ==UNIT_ATTENTION ) && sense_hdr.asc ==0x04 && sense_hdr.ascq ==0x0a )return SCSI_DH_RETRY ;else if (retval)
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 3/129 scsi: sr: Fix unintentional arithmetic wraparound
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Justin Stitt <[email protected]>
[ Upstream commit 9fad9d560af5c654bb38e0b07ee54a4e9acdc5cd ]
Running syzkaller with the newly reintroduced signed integer overflow sanitizer produces this report:
[ 65.194362] ------------[ cut here ]------------ [ 65.197752] UBSAN: signed-integer-overflow in ../drivers/scsi/sr_ioctl.c:436:9 [ 65.203607] -2147483648 * 177 cannot be represented in type 'int' [ 65.207911] CPU: 2 PID: 10416 Comm: syz-executor.1 Not tainted 6.8.0-rc2-00035-gb3ef86b5a957 #1 [ 65.213585] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 65.219923] Call Trace: [ 65.221556] <TASK> [ 65.223029] dump_stack_lvl+0x93/0xd0 [ 65.225573] handle_overflow+0x171/0x1b0 [ 65.228219] sr_select_speed+0xeb/0xf0 [ 65.230786] ? __pm_runtime_resume+0xe6/0x130 [ 65.233606] sr_block_ioctl+0x15d/0x1d0
...
Historically, the signed integer overflow sanitizer did not work in the kernel due to its interaction with -fwrapv but this has since been changed [1] in the newest version of Clang. It was re-enabled in the kernel with Commit 557f8c582a9b ("ubsan: Reintroduce signed overflow sanitizer").
Firstly, let's change the type of "speed" to unsigned long as sr_select_speed()'s only caller passes in an unsigned long anyways.
$ git grep '\.select_speed'
| drivers/scsi/sr.c: .select_speed = sr_select_speed,
...
| static int cdrom_ioctl_select_speed(struct cdrom_device_info *cdi,
| unsigned long arg)
| {
| ...
| return cdi->ops->select_speed(cdi, arg);
| }Next, let's add an extra check to make sure we don't exceed 0xffff/177
(350) since 0xffff is the max speed. This has two benefits: 1) we deal with integer overflow before it happens and 2) we properly respect the max speed of 0xffff. There are some "magic" numbers here but I did not want to change more than what was necessary.
--- Documentation/cdrom/cdrom-standard.rst | 4 ++-- drivers/scsi/sr.h | 2 +- drivers/scsi/sr_ioctl.c | 5 ++++- include/linux/cdrom.h | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-)
Documentation/cdrom/cdrom-standard.rst +2 -2
@@ -217,7 +217,7 @@ current *struct* is:: int (*media_changed)(struct cdrom_device_info *, int); int (*tray_move)(struct cdrom_device_info *, int); int (*lock_door)(struct cdrom_device_info *, int); - int (*select_speed)(struct cdrom_device_info *, int); + int (*select_speed)(struct cdrom_device_info *, unsigned long); int (*get_last_session) (struct cdrom_device_info *, struct cdrom_multisession *); int (*get_mcn)(struct cdrom_device_info *, struct cdrom_mcn *);
@@ -396,7 +396,7 @@ action need be taken, and the return value should be 0. :: - int select_speed(struct cdrom_device_info *cdi, int speed) + int select_speed(struct cdrom_device_info *cdi, unsigned long speed) Some CD-ROM drives are capable of changing their head-speed. There are several reasons for changing the speed of a CD-ROM drive. Badly
drivers/scsi/sr.h +1 -1
@@ -65,7 +65,7 @@ int sr_disk_status(struct cdrom_device_info *);int sr_get_last_session (struct cdrom_device_info *,struct cdrom_multisession *);int sr_get_mcn (struct cdrom_device_info *,struct cdrom_mcn *);int sr_reset (struct cdrom_device_info *); -int sr_select_speed (struct cdrom_device_info *cdi,int speed); +int sr_select_speed (struct cdrom_device_info *cdi,unsigned long speed);int sr_audio_ioctl (struct cdrom_device_info *,unsigned int ,void *);int sr_is_xa (Scsi_CD *);
drivers/scsi/sr_ioctl.c +4 -1
@@ -425,11 +425,14 @@ int sr_reset(struct cdrom_device_info *cdi)return 0 ; } -int sr_select_speed (struct cdrom_device_info *cdi,int speed) +int sr_select_speed (struct cdrom_device_info *cdi,unsigned long speed) {Scsi_CD *cd = cdi->handle;struct packet_command cgc; +/* avoid exceeding the max speed or overflowing integer bounds */ + speed =clamp (0 , speed,0xffff /177 ); +if (speed ==0 ) speed =0xffff ;/* set to max */ else
include/linux/cdrom.h +1 -1
@@ -77,7 +77,7 @@ struct cdrom_device_ops { unsigned int clearing, int slot);int (*tray_move) (struct cdrom_device_info *,int );int (*lock_door) (struct cdrom_device_info *,int ); -int (*select_speed) (struct cdrom_device_info *,int ); +int (*select_speed) (struct cdrom_device_info *,unsigned long );int (*get_last_session) (struct cdrom_device_info *,struct cdrom_multisession *); int (*get_mcn) (struct cdrom_device_info *,
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 4/129 scsi: qedf: Dont process stag work during unload and recovery
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Saurav Kashyap <[email protected]>
[ Upstream commit 51071f0831ea975fc045526dd7e17efe669dc6e1 ]
Stag work can cause issues during unload and recovery, hence don't process it.
--- drivers/scsi/qedf/qedf_main.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
drivers/scsi/qedf/qedf_main.c +16 -0
@@ -3996,6 +3996,22 @@ void qedf_stag_change_work(struct work_struct *work)struct qedf_ctx *qedf = container_of(work, struct qedf_ctx, stag_work.work); +if (!qedf) { +QEDF_ERR (&qedf->dbg_ctx,"qedf is NULL" ); +return ; + } + +if (test_bit (QEDF_IN_RECOVERY , &qedf->flags)) { +QEDF_ERR (&qedf->dbg_ctx, +"Already is in recovery, hence not calling software context reset.\n" ); +return ; + } + +if (test_bit (QEDF_UNLOADING , &qedf->flags)) { +QEDF_ERR (&qedf->dbg_ctx,"Driver unloading\n" ); +return ; + } +printk_ratelimited ("[%s]:[%s:%d]:%d: Performing software context reset." ,dev_name (&qedf->pdev->dev), __func__, __LINE__, qedf->dbg_ctx.host_no);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 5/129 scsi: qedf: Wait for stag work during unload
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Saurav Kashyap <[email protected]>
[ Upstream commit 78e88472b60936025b83eba57cffa59d3501dc07 ]
If stag work is already scheduled and unload is called, it can lead to issues as unload cleans up the work element. Wait for stag work to get completed before cleanup during unload.
--- drivers/scsi/qedf/qedf.h | 1 + drivers/scsi/qedf/qedf_main.c | 30 +++++++++++++++++++++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-)
drivers/scsi/qedf/qedf.h +1 -0
@@ -362,6 +362,7 @@ struct qedf_ctx {#define QEDF_IN_RECOVERY 5#define QEDF_DBG_STOP_IO 6#define QEDF_PROBING 8 +#define QEDF_STAG_IN_PROGRESS 9unsigned long flags;/* Miscellaneous state flags */ int fipvlan_retries;u8 num_queues;
drivers/scsi/qedf/qedf_main.c +27 -3
@@ -318,11 +318,18 @@ static struct fc_seq *qedf_elsct_send(struct fc_lport *lport, u32 did,*/ if (resp == fc_lport_flogi_resp) { qedf->flogi_cnt++; + qedf->flogi_pending++; + +if (test_bit (QEDF_UNLOADING , &qedf->flags)) { +QEDF_ERR (&qedf->dbg_ctx,"Driver unloading\n" ); + qedf->flogi_pending =0 ; + } +if (qedf->flogi_pending >=QEDF_FLOGI_RETRY_CNT ) {schedule_delayed_work (&qedf->stag_work,2 );return NULL ; } - qedf->flogi_pending++; +return fc_elsct_send (lport, did, fp, op, qedf_flogi_resp, arg, timeout); }
@@ -911,13 +918,14 @@ void qedf_ctx_soft_reset(struct fc_lport *lport)struct qedf_ctx *qedf;struct qed_link_output if_link; + qedf =lport_priv (lport); +if (lport->vport) { +clear_bit (QEDF_STAG_IN_PROGRESS , &qedf->flags);printk_ratelimited ("Cannot issue host reset on NPIV port.\n" );return ; } - qedf =lport_priv (lport); - qedf->flogi_pending =0 ;/* For host reset, essentially do a soft link up/down */ atomic_set (&qedf->link_state,QEDF_LINK_DOWN );
@@ -937,6 +945,7 @@ void qedf_ctx_soft_reset(struct fc_lport *lport)if (!if_link.link_up) {QEDF_INFO (&qedf->dbg_ctx,QEDF_LOG_DISC ,"Physical link is not up.\n" ); +clear_bit (QEDF_STAG_IN_PROGRESS , &qedf->flags);return ; }/* Flush and wait to make sure link down is processed */
@@ -949,6 +958,7 @@ void qedf_ctx_soft_reset(struct fc_lport *lport) "Queue link up work.\n");queue_delayed_work (qedf->link_update_wq, &qedf->link_update,0 ); +clear_bit (QEDF_STAG_IN_PROGRESS , &qedf->flags); }/* Reset the host by gracefully logging out and then logging back in */
@@ -3720,6 +3730,7 @@ static void __qedf_remove(struct pci_dev *pdev, int mode) {struct qedf_ctx *qedf;int rc; +int cnt =0 ;if (!pdev) {QEDF_ERR (NULL ,"pdev is NULL.\n" );
@@ -3737,6 +3748,17 @@ static void __qedf_remove(struct pci_dev *pdev, int mode)return ; } +stag_in_prog: +if (test_bit (QEDF_STAG_IN_PROGRESS , &qedf->flags)) { +QEDF_ERR (&qedf->dbg_ctx,"Stag in progress, cnt=%d.\n" , cnt); + cnt++; + +if (cnt <5 ) { +msleep (500 ); + goto stag_in_prog; + } + } +if (mode !=QEDF_MODE_RECOVERY )set_bit (QEDF_UNLOADING , &qedf->flags);
@@ -4012,6 +4034,8 @@ void qedf_stag_change_work(struct work_struct *work)return ; } +set_bit (QEDF_STAG_IN_PROGRESS , &qedf->flags); +printk_ratelimited ("[%s]:[%s:%d]:%d: Performing software context reset." ,dev_name (&qedf->pdev->dev), __func__, __LINE__, qedf->dbg_ctx.host_no);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 6/129 scsi: qedf: Set qed_slowpath_params to zero before use
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Saurav Kashyap <[email protected]>
[ Upstream commit 6c3bb589debd763dc4b94803ddf3c13b4fcca776 ]
Zero qed_slowpath_params before use.
--- drivers/scsi/qedf/qedf_main.c | 1 + 1 file changed, 1 insertion(+)
drivers/scsi/qedf/qedf_main.c +1 -0
@@ -3472,6 +3472,7 @@ static int __qedf_probe(struct pci_dev *pdev, int mode) }/* Start the Slowpath-process */ +memset (&slowpath_params,0 ,sizeof (struct qed_slowpath_params )); slowpath_params.int_mode =QED_INT_MODE_MSIX ; slowpath_params.drv_major =QEDF_DRIVER_MAJOR_VER ; slowpath_params.drv_minor =QEDF_DRIVER_MINOR_VER ;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 7/129 efi/libstub: zboot.lds: Discard .discard sections
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nathan Chancellor <[email protected]>
[ Upstream commit 5134acb15d9ef27aa2b90aad46d4e89fcef79fdc ]
When building ARCH=loongarch defconfig + CONFIG_UNWINDER_ORC=y using LLVM, there is a warning from ld.lld when linking the EFI zboot image due to the use of unreachable() in number() in vsprintf.c:
ld.lld: warning: drivers/firmware/efi/libstub/lib.a(vsprintf.stub.o):(.discard.unreachable+0x0): has non-ABS relocation R_LARCH_32_PCREL against symbol ''
If the compiler cannot eliminate the default case for any reason, the .discard.unreachable section will remain in the final binary but the entire point of any section prefixed with .discard is that it is only used at compile time, so it can be discarded via /DISCARD/ in a linker script. The asm-generic vmlinux.lds.h includes .discard and .discard.* in the COMMON_DISCARDS macro but that is not used for zboot.lds, as it is not a kernel image linker script.
Add .discard and .discard.* to /DISCARD/ in zboot.lds, so that any sections meant to be discarded at link time are not included in the final zboot image. This issue is not specific to LoongArch, it is just the first architecture to select CONFIG_OBJTOOL, which defines annotate_unreachable() as an asm statement to add the .discard.unreachable section, and use the EFI stub.
--- drivers/firmware/efi/libstub/zboot.lds | 1 + 1 file changed, 1 insertion(+)
drivers/firmware/efi/libstub/zboot.lds +1 -0
@@ -41,6 +41,7 @@ SECTIONS } /DISCARD/ : { + *(.discard .discard.*) *(.modinfo .init.modinfo) } }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 8/129 ACPI: EC: Abort address space access upon error
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Armin Wolf <[email protected]>
[ Upstream commit f6f172dc6a6d7775b2df6adfd1350700e9a847ec ]
When a multi-byte address space access is requested, acpi_ec_read()/ acpi_ec_write() is being called multiple times.
Abort such operations if a single call to acpi_ec_read() / acpi_ec_write() fails, as the data read from / written to the EC might be incomplete.
--- drivers/acpi/ec.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/acpi/ec.c +4 -1
@@ -1333,10 +1333,13 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address,if (ec->busy_polling || bits >8 )acpi_ec_burst_enable (ec); -for (i =0 ; i < bytes; ++i, ++address, ++value) +for (i =0 ; i < bytes; ++i, ++address, ++value) { result = (function ==ACPI_READ ) ?acpi_ec_read (ec, address, value) :acpi_ec_write (ec, address, *value); +if (result <0 ) +break ; + }if (ec->busy_polling || bits >8 )acpi_ec_burst_disable (ec);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 9/129 ACPI: EC: Avoid returning AE_OK on errors in address space handler
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Armin Wolf <[email protected]>
[ Upstream commit c4bd7f1d78340e63de4d073fd3dbe5391e2996e5 ]
If an error code other than EINVAL, ENODEV or ETIME is returned by acpi_ec_read() / acpi_ec_write(), then AE_OK is incorrectly returned by acpi_ec_space_handler().
Fix this by only returning AE_OK on success, and return AE_ERROR otherwise.
--- drivers/acpi/ec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/acpi/ec.c +3 -1
@@ -1351,8 +1351,10 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address,return AE_NOT_FOUND ;case -ETIME :return AE_TIME ; -default : +case 0 :return AE_OK ; +default : +return AE_ERROR ; } }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 10/129 tools/power/cpupower: Fix Pstate frequency reporting on AMD Family 1Ah CPUs
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dhananjay Ugwekar <[email protected]>
[ Upstream commit 43cad521c6d228ea0c51e248f8e5b3a6295a2849 ]
Update cpupower's P-State frequency calculation and reporting with AMD Family 1Ah+ processors, when using the acpi-cpufreq driver. This is due to a change in the PStateDef MSR layout in AMD Family 1Ah+.
Tested on 4th and 5th Gen AMD EPYC system
--- tools/power/cpupower/utils/helpers/amd.c | 26 +++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-)
tools/power/cpupower/utils/helpers/amd.c +23 -3
@@ -41,6 +41,16 @@ union core_pstate { unsigned res1:31; unsigned en:1; } pstatedef; +/* since fam 1Ah: */ +struct { +unsigned fid:12 ; +unsigned res1:2 ; +unsigned vid:8 ; +unsigned iddval:8 ; +unsigned idddiv:2 ; +unsigned res2:31 ; +unsigned en:1 ; + } pstatedef2;unsigned long long val; };
@@ -48,6 +58,10 @@ static int get_did(union core_pstate pstate) {int t; +/* Fam 1Ah onward do not use did */ +if (cpupower_cpu_info.family >=0x1A ) +return 0 ; +if (cpupower_cpu_info.caps &CPUPOWER_CAP_AMD_PSTATEDEF ) t = pstate.pstatedef.did;else if (cpupower_cpu_info.family ==0x12 )
@@ -61,12 +75,18 @@ static int get_did(union core_pstate pstate)static int get_cof (union core_pstate pstate) {int t; -int fid, did, cof; +int fid, did, cof =0 ; did =get_did (pstate);if (cpupower_cpu_info.caps &CPUPOWER_CAP_AMD_PSTATEDEF ) { - fid = pstate.pstatedef.fid; - cof =200 * fid / did; +if (cpupower_cpu_info.family >=0x1A ) { + fid = pstate.pstatedef2.fid; +if (fid >0x0f ) + cof = (fid *5 ); + }else { + fid = pstate.pstatedef.fid; + cof =200 * fid / did; + } }else { t =0x10 ; fid = pstate.pstate.fid;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 11/129 wifi: mac80211: mesh: init nonpeer_pm to active by default in mesh sdata
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nicolas Escande <[email protected]>
[ Upstream commit 6f6291f09a322c1c1578badac8072d049363f4e6 ]
With a ath9k device I can see that:
iw phy phy0 interface add mesh0 type mp
ip link set mesh0 up
iw dev mesh0 scan
Will start a scan with the Power Management bit set in the Frame Control Field. This is because we set this bit depending on the nonpeer_pm variable of the mesh iface sdata and when there are no active links on the interface it remains to NL80211_MESH_POWER_UNKNOWN.
As soon as links starts to be established, it wil switch to NL80211_MESH_POWER_ACTIVE as it is the value set by befault on the per sta nonpeer_pm field.
As we want no power save by default, (as expressed with the per sta ini values), lets init it to the expected default value of NL80211_MESH_POWER_ACTIVE.
Also please note that we cannot change the default value from userspace prior to establishing a link as using NL80211_CMD_SET_MESH_CONFIG will not work before NL80211_CMD_JOIN_MESH has been issued. So too late for our initial scan.
--- net/mac80211/mesh.c | 1 + 1 file changed, 1 insertion(+)
net/mac80211/mesh.c +1 -0
@@ -1792,6 +1792,7 @@ void ieee80211_mesh_init_sdata(struct ieee80211_sub_if_data *sdata) ifmsh->last_preq = jiffies; ifmsh->next_perr = jiffies; ifmsh->csa_role =IEEE80211_MESH_CSA_ROLE_NONE ; + ifmsh->nonpeer_pm =NL80211_MESH_POWER_ACTIVE ;/* Allocate all mesh structures when creating the first mesh interface. */ if (!mesh_allocated)ieee80211s_init ();
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 12/129 wifi: mac80211: apply mcast rate only if interface is up
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 02c665f048a439c0d58cc45334c94634bd7c18e6 ]
If the interface isn't enabled, don't apply multicast rate changes immediately.
--- net/mac80211/cfg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
net/mac80211/cfg.c +3 -2
@@ -2953,8 +2953,9 @@ static int ieee80211_set_mcast_rate(struct wiphy *wiphy, struct net_device *dev,memcpy (sdata->vif.bss_conf.mcast_rate, rate,sizeof (int ) *NUM_NL80211_BANDS ); -ieee80211_link_info_change_notify (sdata, &sdata->deflink, -BSS_CHANGED_MCAST_RATE ); +if (ieee80211_sdata_running (sdata)) +ieee80211_link_info_change_notify (sdata, &sdata->deflink, +BSS_CHANGED_MCAST_RATE );return 0 ; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 13/129 wifi: mac80211: handle tasklet frames before stopping
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 177c6ae9725d783f9e96f02593ce8fb2639be22f ]
The code itself doesn't want to handle frames from the driver if it's already stopped, but if the tasklet was queued before and runs after the stop, then all bets are off. Flush queues before actually stopping, RX should be off at this point since all the interfaces are removed already, etc.
--- net/mac80211/ieee80211_i.h | 2 ++ net/mac80211/main.c | 10 ++++++++-- net/mac80211/util.c | 2 ++ 3 files changed, 12 insertions(+), 2 deletions(-)
net/mac80211/ieee80211_i.h +2 -0
@@ -1846,6 +1846,8 @@ void ieee80211_link_info_change_notify(struct ieee80211_sub_if_data *sdata,void ieee80211_configure_filter (struct ieee80211_local *local);u64 ieee80211_reset_erp_info (struct ieee80211_sub_if_data *sdata); +void ieee80211_handle_queued_frames (struct ieee80211_local *local); +u64 ieee80211_mgmt_tx_cookie (struct ieee80211_local *local);int ieee80211_attach_ack_skb (struct ieee80211_local *local,struct sk_buff *skb,u64 *cookie,gfp_t gfp);
net/mac80211/main.c +8 -2
@@ -301,9 +301,8 @@ u64 ieee80211_reset_erp_info(struct ieee80211_sub_if_data *sdata)BSS_CHANGED_ERP_SLOT ; } -static void ieee80211_tasklet_handler (struct tasklet_struct *t) +void ieee80211_handle_queued_frames (struct ieee80211_local *local) { -struct ieee80211_local *local =from_tasklet (local, t, tasklet);struct sk_buff *skb; while ((skb = skb_dequeue(&local->skb_queue)) ||
@@ -328,6 +327,13 @@ static void ieee80211_tasklet_handler(struct tasklet_struct *t) } } +static void ieee80211_tasklet_handler (struct tasklet_struct *t) +{ +struct ieee80211_local *local =from_tasklet (local, t, tasklet); + +ieee80211_handle_queued_frames (local); +} +static void ieee80211_restart_work (struct work_struct *work) { struct ieee80211_local *local =
net/mac80211/util.c +2 -0
@@ -2313,6 +2313,8 @@ u32 ieee80211_sta_get_rates(struct ieee80211_sub_if_data *sdata,void ieee80211_stop_device (struct ieee80211_local *local) { +ieee80211_handle_queued_frames (local); +ieee80211_led_radio (local, false);ieee80211_mod_tpt_led_trig (local,0 ,IEEE80211_TPT_LEDTRIG_FL_RADIO );
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 14/129 wifi: cfg80211: fix 6 GHz scan request building
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 f7a8b10bfd614d7a9a16fbe80d28ead4f063cb00 ]
The 6 GHz scan request struct allocated by cfg80211_scan_6ghz() is meant to be formed this way:
[base struct][channels][ssids][6ghz_params]
It is allocated with [channels] as the maximum number of channels supported by the driver in the 6 GHz band, since allocation is before knowing how many there will be.
However, the inner pointers are set incorrectly: initially, the 6 GHz scan parameters pointer is set:
[base struct][channels]
^ scan_6ghz_params
and later the SSID pointer is set to the end of the actually _used_ channels.
[base struct][channels]
^ ssids
If many APs were to be discovered, and many channels used, and there were many SSIDs, then the SSIDs could overlap the 6 GHz parameters.
Additionally, the request->ssids for most of the function points to the original request still (given the struct copy) but is used normally, which is confusing.
Clear this up, by actually using the allocated space for 6 GHz parameters _after_ the SSIDs, and set up the SSIDs initially so they are used more clearly. Just like in nl80211.c, set them only if there actually are SSIDs though.
Finally, also copy the elements (ie/ie_len) so they're part of the same request, not pointing to the old request.
--- net/wireless/rdev-ops.h | 6 +++++- net/wireless/scan.c | 47 +++++++++++++++++++++++++++-------------- 2 files changed, 36 insertions(+), 17 deletions(-)
net/wireless/rdev-ops.h +5 -1
@@ -2,7 +2,7 @@/* * Portions of this file * Copyright(c) 2016-2017 Intel Deutschland GmbH -* Copyright (C) 2018, 2021-2023 Intel Corporation +* Copyright (C) 2018, 2021-2024 Intel Corporation */ #ifndef __CFG80211_RDEV_OPS#define __CFG80211_RDEV_OPS
@@ -458,6 +458,10 @@ static inline int rdev_scan(struct cfg80211_registered_device *rdev, struct cfg80211_scan_request *request) {int ret; + +if (WARN_ON_ONCE (!request->n_ssids && request->ssids)) +return -EINVAL ; +trace_rdev_scan (&rdev->wiphy, request); ret = rdev->ops->scan (&rdev->wiphy, request);trace_rdev_return_int (&rdev->wiphy, ret);
net/wireless/scan.c +31 -16
72 lines not on this page · raw message
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 15/129 wifi: iwlwifi: mvm: d3: fix WoWLAN command version lookup
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yedidya Benshimol <[email protected]>
[ Upstream commit b7ffca99313d856f7d1cc89038d9061b128e8e97 ]
After moving from commands to notificaitons in the d3 resume flow, removing the WOWLAN_GET_STATUSES and REPLY_OFFLOADS_QUERY_CMD causes the return of the default value when looking up their version. Returning zero here results in the driver sending the not supported NON_QOS_TX_COUNTER_CMD.
--- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/intel/iwlwifi/mvm/d3.c +2 -1
@@ -2102,7 +2102,8 @@ static bool iwl_mvm_setup_connection_keep(struct iwl_mvm *mvm, out:if (iwl_fw_lookup_notif_ver (mvm->fw,LONG_GROUP , -WOWLAN_GET_STATUSES ,0 ) <10 ) { +WOWLAN_GET_STATUSES , +IWL_FW_CMD_VER_UNKNOWN ) <10 ) { mvmvif->seqno_valid = true;/* +0x10 because the set API expects next-to-use, not last-used */ mvmvif->seqno = status->non_qos_seq_ctr +0x10 ;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 16/129 wifi: iwlwifi: mvm: remove stale STA link data during restart
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 cc3ba78f202de9752aceb16342ab62bdfbffac7e ]
If pre-recovery mac80211 tried to disable a link but this disablement failed, then there might be a mismatch between mac80211 assuming the link has been disabled and the driver still having the data around. During recover itself, that is not a problem, but should the link be activated again at a later point, iwlwifi will refuse the activation as it detects the inconsistent state.
Solve this corner-case by iterating the station in the restart cleanup handler.
--- .../net/wireless/intel/iwlwifi/mvm/mac80211.c | 37 +++++++++++++++++++ .../net/wireless/intel/iwlwifi/mvm/mld-sta.c | 10 ++--- drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 5 +++ 3 files changed, 47 insertions(+), 5 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +37 -0
@@ -1051,6 +1051,39 @@ static void iwl_mvm_cleanup_iterator(void *data, u8 *mac,RCU_INIT_POINTER (mvmvif->deflink.probe_resp_data,NULL ); } +static void iwl_mvm_cleanup_sta_iterator (void *data,struct ieee80211_sta *sta) +{ +struct iwl_mvm *mvm = data; +struct iwl_mvm_sta *mvm_sta; +struct ieee80211_vif *vif; +int link_id; + + mvm_sta =iwl_mvm_sta_from_mac80211 (sta); + vif = mvm_sta->vif; + +if (!sta->valid_links) +return ; + +for (link_id =0 ; link_id <ARRAY_SIZE ((sta)->link); link_id++) { +struct iwl_mvm_link_sta *mvm_link_sta; + + mvm_link_sta = +rcu_dereference_check (mvm_sta->link[link_id], +lockdep_is_held (&mvm->mutex)); +if (mvm_link_sta && !(vif->active_links &BIT (link_id))) { +/* +* We have a link STA but the link is inactive in +* mac80211. This will happen if we failed to +* deactivate the link but mac80211 roll back the +* deactivation of the link. +* Delete the stale data to avoid issues later on. +*/ +iwl_mvm_mld_free_sta_link (mvm, mvm_sta, mvm_link_sta, + link_id, false); + } + } +} +static void iwl_mvm_restart_cleanup (struct iwl_mvm *mvm) {iwl_mvm_stop_device (mvm);
@@ -1073,6 +1106,10 @@ static void iwl_mvm_restart_cleanup(struct iwl_mvm *mvm)*/ ieee80211_iterate_interfaces (mvm->hw,0 , iwl_mvm_cleanup_iterator, mvm); +/* cleanup stations as links may be gone after restart */ +ieee80211_iterate_stations_atomic (mvm->hw, + iwl_mvm_cleanup_sta_iterator, mvm); + mvm->p2p_device_vif =NULL ;iwl_mvm_reset_phy_ctxts (mvm);
drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c +5 -5
@@ -515,11 +515,11 @@ static int iwl_mvm_mld_cfg_sta(struct iwl_mvm *mvm, struct ieee80211_sta *sta,return iwl_mvm_mld_send_sta_cmd (mvm, &cmd); } -static void iwl_mvm_mld_free_sta_link (struct iwl_mvm *mvm, -struct iwl_mvm_sta *mvm_sta, -struct iwl_mvm_link_sta *mvm_sta_link, -unsigned int link_id, -bool is_in_fw) +void iwl_mvm_mld_free_sta_link (struct iwl_mvm *mvm, +struct iwl_mvm_sta *mvm_sta, +struct iwl_mvm_link_sta *mvm_sta_link, +unsigned int link_id, +bool is_in_fw) {RCU_INIT_POINTER (mvm->fw_id_to_mac_id[mvm_sta_link->sta_id], is_in_fw ?ERR_PTR (-EINVAL ) :NULL );
drivers/net/wireless/intel/iwlwifi/mvm/sta.h +5 -0
@@ -642,6 +642,11 @@ int iwl_mvm_mld_update_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif, struct ieee80211_sta *sta);int iwl_mvm_mld_rm_sta (struct iwl_mvm *mvm,struct ieee80211_vif *vif,struct ieee80211_sta *sta); +void iwl_mvm_mld_free_sta_link (struct iwl_mvm *mvm, +struct iwl_mvm_sta *mvm_sta, +struct iwl_mvm_link_sta *mvm_sta_link, +unsigned int link_id, +bool is_in_fw);int iwl_mvm_mld_rm_sta_id (struct iwl_mvm *mvm,u8 sta_id); int iwl_mvm_mld_update_sta_links(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 17/129 wifi: iwlwifi: mvm: Handle BIGTK cipher in kek_kck cmd
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yedidya Benshimol <[email protected]>
[ Upstream commit 08b16d1b5997dc378533318e2a9cd73c7a898284 ]
The BIGTK cipher field was added to the kek_kck_material_cmd but wasn't assigned. Fix that by differentiating between the IGTK/BIGTK keys and assign the ciphers fields accordingly.
--- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/d3.c +11 -2
@@ -595,6 +595,12 @@ static void iwl_mvm_wowlan_gtk_type_iter(struct ieee80211_hw *hw, void *_data) {struct wowlan_key_gtk_type_iter *data = _data; +__le32 *cipher =NULL ; + +if (key->keyidx ==4 || key->keyidx ==5 ) + cipher = &data->kek_kck_cmd->igtk_cipher; +if (key->keyidx ==6 || key->keyidx ==7 ) + cipher = &data->kek_kck_cmd->bigtk_cipher;switch (key->cipher) {default :
@@ -606,10 +612,13 @@ static void iwl_mvm_wowlan_gtk_type_iter(struct ieee80211_hw *hw,return ;case WLAN_CIPHER_SUITE_BIP_GMAC_256 :case WLAN_CIPHER_SUITE_BIP_GMAC_128 : - data->kek_kck_cmd->igtk_cipher =cpu_to_le32 (STA_KEY_FLG_GCMP ); +if (cipher) + *cipher =cpu_to_le32 (STA_KEY_FLG_GCMP );return ;case WLAN_CIPHER_SUITE_AES_CMAC : - data->kek_kck_cmd->igtk_cipher =cpu_to_le32 (STA_KEY_FLG_CCM ); +case WLAN_CIPHER_SUITE_BIP_CMAC_256 : +if (cipher) + *cipher =cpu_to_le32 (STA_KEY_FLG_CCM );return ;case WLAN_CIPHER_SUITE_CCMP :if (!sta)
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 18/129 wifi: iwlwifi: mvm: handle BA session teardown in RF-kill
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 4d08c0b3357cba0aeffaf3abc62cae0c154f2816 ]
When entering RF-kill, mac80211 tears down BA sessions, but due to RF-kill the commands aren't sent to the device. As a result, there can be frames pending on the reorder buffer or perhaps even received while doing so, leading to warnings.
Avoid the warnings by doing the BA session teardown normally even in RF-kill, which also requires queue sync.
--- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c | 3 ++- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 12 ++++++++---- 3 files changed, 11 insertions(+), 6 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +1 -1
@@ -6069,7 +6069,7 @@ void iwl_mvm_sync_rx_queues_internal(struct iwl_mvm *mvm, .len[0] = sizeof(cmd), .data[1] = data, .len[1] = size, - .flags = sync ? 0 : CMD_ASYNC, + .flags = CMD_SEND_IN_RFKILL | (sync ? 0 : CMD_ASYNC), };int ret;
drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c +2 -1
@@ -1007,7 +1007,8 @@ static int iwl_mvm_mld_update_sta_baids(struct iwl_mvm *mvm, cmd.modify.tid =cpu_to_le32 (data->tid); - ret =iwl_mvm_send_cmd_pdu (mvm, cmd_id,0 ,sizeof (cmd), &cmd); + ret =iwl_mvm_send_cmd_pdu (mvm, cmd_id,CMD_SEND_IN_RFKILL , +sizeof (cmd), &cmd); data->sta_mask = new_sta_mask;if (ret)return ret;
drivers/net/wireless/intel/iwlwifi/mvm/sta.c +8 -4
@@ -2819,7 +2819,12 @@ static int iwl_mvm_fw_baid_op_cmd(struct iwl_mvm *mvm, .action = start ? cpu_to_le32(IWL_RX_BAID_ACTION_ADD) : cpu_to_le32(IWL_RX_BAID_ACTION_REMOVE), }; -u32 cmd_id =WIDE_ID (DATA_PATH_GROUP ,RX_BAID_ALLOCATION_CONFIG_CMD ); +struct iwl_host_cmd hcmd = { + .id =WIDE_ID (DATA_PATH_GROUP ,RX_BAID_ALLOCATION_CONFIG_CMD ), + .flags =CMD_SEND_IN_RFKILL , + .len[0 ] =sizeof (cmd), + .data[0 ] = &cmd, + };int ret;BUILD_BUG_ON (sizeof (struct iwl_rx_baid_cfg_resp ) !=sizeof (baid));
@@ -2831,7 +2836,7 @@ static int iwl_mvm_fw_baid_op_cmd(struct iwl_mvm *mvm, cmd.alloc.ssn =cpu_to_le16 (ssn); cmd.alloc.win_size =cpu_to_le16 (buf_size); baid = -EIO ; - }else if (iwl_fw_lookup_cmd_ver (mvm->fw, cmd_id,1 ) ==1 ) { + }else if (iwl_fw_lookup_cmd_ver (mvm->fw, hcmd.id,1 ) ==1 ) { cmd.remove_v1.baid =cpu_to_le32 (baid);BUILD_BUG_ON (sizeof (cmd.remove_v1) >sizeof (cmd.remove)); }else {
@@ -2840,8 +2845,7 @@ static int iwl_mvm_fw_baid_op_cmd(struct iwl_mvm *mvm, cmd.remove.tid =cpu_to_le32 (tid); } - ret =iwl_mvm_send_cmd_pdu_status (mvm, cmd_id,sizeof (cmd), - &cmd, &baid); + ret =iwl_mvm_send_cmd_status (mvm, &hcmd, &baid);if (ret)return ret;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 19/129 wifi: iwlwifi: mvm: properly set 6 GHz channel direct probe option
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ayala Beker <[email protected]>
[ Upstream commit 989830d1cf16bd149bf0690d889a9caef95fb5b1 ]
Ensure that the 6 GHz channel is configured with a valid direct BSSID, avoiding any invalid or multicast BSSID addresses.
--- drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/wireless/intel/iwlwifi/mvm/scan.c +4 -1
@@ -1718,7 +1718,10 @@ iwl_mvm_umac_scan_fill_6g_chan_list(struct iwl_mvm *mvm,break ; } -if (k == idex_b && idex_b <SCAN_BSSID_MAX_SIZE ) { +if (k == idex_b && idex_b <SCAN_BSSID_MAX_SIZE && + !WARN_ONCE (!is_valid_ether_addr (scan_6ghz_params[j].bssid), +"scan: invalid BSSID at index %u, index_b=%u\n" , + j, idex_b)) {memcpy (&pp->bssid_array[idex_b++], scan_6ghz_params[j].bssid,ETH_ALEN ); }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 20/129 wifi: iwlwifi: mvm: Fix scan abort handling with HW rfkill
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilan Peer <[email protected]>
[ Upstream commit e6dd2936ce7ce94a1915b799f8af8193ec628e87 ]
When HW rfkill is toggled to disable the RF, the flow to stop scan is called. When trying to send the command to abort the scan, since HW rfkill is toggled, the command is not sent due to rfkill being asserted, and -ERFKILL is returned from iwl_trans_send_cmd(), but this is silently ignored in iwl_mvm_send_cmd() and thus the scan abort flow continues to wait for scan complete notification and fails. Since it fails, the UID to type mapping is not cleared, and thus a warning is later fired when trying to stop the interface.
To fix this, modify the UMAC scan abort flow to force sending the scan abort command even when in rfkill, so stop the FW from accessing the radio etc.
--- drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/intel/iwlwifi/mvm/scan.c +2 -1
@@ -3242,10 +3242,11 @@ static int iwl_mvm_umac_scan_abort(struct iwl_mvm *mvm, int type) ret =iwl_mvm_send_cmd_pdu (mvm,WIDE_ID (IWL_ALWAYS_LONG_GROUP ,SCAN_ABORT_UMAC ), -0 ,sizeof (cmd), &cmd); +CMD_SEND_IN_RFKILL ,sizeof (cmd), &cmd);if (!ret) mvm->scan_uid_status[uid] = type <<IWL_MVM_SCAN_STOPPING_SHIFT ; +IWL_DEBUG_SCAN (mvm,"Scan abort: ret=%d\n" , ret);return ret; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 21/129 wifi: mac80211: fix UBSAN noise in ieee80211_prep_hw_scan()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Antipov <[email protected]>
[ Upstream commit 92ecbb3ac6f3fe8ae9edf3226c76aa17b6800699 ]
When testing the previous patch with CONFIG_UBSAN_BOUNDS, I've noticed the following:
UBSAN: array-index-out-of-bounds in net/mac80211/scan.c:372:4 index 0 is out of range for type 'struct ieee80211_channel *[]' CPU: 0 PID: 1435 Comm: wpa_supplicant Not tainted 6.9.0+ #1 Hardware name: LENOVO 20UN005QRT/20UN005QRT <...BIOS details...> Call Trace: <TASK> dump_stack_lvl+0x2d/0x90 __ubsan_handle_out_of_bounds+0xe7/0x140 ? timerqueue_add+0x98/0xb0 ieee80211_prep_hw_scan+0x2db/0x480 [mac80211] ? __kmalloc+0xe1/0x470 __ieee80211_start_scan+0x541/0x760 [mac80211] rdev_scan+0x1f/0xe0 [cfg80211] nl80211_trigger_scan+0x9b6/0xae0 [cfg80211] ...<the rest is not too useful...>
Since '__ieee80211_start_scan()' leaves 'hw_scan_req->req.n_channels' uninitialized, actual boundaries of 'hw_scan_req->req.channels' can't be checked in 'ieee80211_prep_hw_scan()'. Although an initialization of 'hw_scan_req->req.n_channels' introduces some confusion around allocated vs. used VLA members, this shouldn't be a problem since everything is correctly adjusted soon in 'ieee80211_prep_hw_scan()'.
Cleanup 'kmalloc()' math in '__ieee80211_start_scan()' by using the convenient 'struct_size()' as well.
--- net/mac80211/scan.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
net/mac80211/scan.c +10 -4
@@ -722,15 +722,21 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata, local->hw_scan_ies_bufsize *= n_bands; } - local->hw_scan_req =kmalloc ( -sizeof (*local->hw_scan_req) + - req->n_channels *sizeof (req->channels[0 ]) + - local->hw_scan_ies_bufsize,GFP_KERNEL ); + local->hw_scan_req =kmalloc (struct_size (local->hw_scan_req, + req.channels, + req->n_channels) + + local->hw_scan_ies_bufsize, +GFP_KERNEL );if (!local->hw_scan_req)return -ENOMEM ; local->hw_scan_req->req.ssids = req->ssids; local->hw_scan_req->req.n_ssids = req->n_ssids; +/* None of the channels are actually set +* up but let UBSAN know the boundaries. +*/ + local->hw_scan_req->req.n_channels = req->n_channels; + ies = (u8 *)local->hw_scan_req +sizeof (*local->hw_scan_req) + req->n_channels *sizeof (req->channels[0 ]);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 22/129 selftests: cachestat: Fix build warnings on ppc64
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Ellerman <[email protected]>
[ Upstream commit bc4d5f5d2debf8bb65fba188313481549ead8576 ]
Fix warnings like:
test_cachestat.c: In function ‘print_cachestat’:
test_cachestat.c:30:38: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘__u64’ {aka ‘long unsigned int’} [-Wformat=]
By switching to unsigned long long for u64 for ppc64 builds.
--- tools/testing/selftests/cachestat/test_cachestat.c | 1 + 1 file changed, 1 insertion(+)
tools/testing/selftests/cachestat/test_cachestat.c +1 -0
@@ -1,5 +1,6 @@// SPDX-License-Identifier: GPL-2.0 #define _GNU_SOURCE +#define __SANE_USERSPACE_TYPES__// Use ll64 #include <stdio.h> #include <stdbool.h>
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 23/129 selftests/openat2: Fix build warnings on ppc64
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Ellerman <[email protected]>
[ Upstream commit 84b6df4c49a1cc2854a16937acd5fd3e6315d083 ]
Fix warnings like:
openat2_test.c: In function ‘test_openat2_flags’:
openat2_test.c:303:73: warning: format ‘%llX’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘__u64’ {aka ‘long unsigned int’} [-Wformat=]
By switching to unsigned long long for u64 for ppc64 builds.
--- tools/testing/selftests/openat2/openat2_test.c | 1 + 1 file changed, 1 insertion(+)
tools/testing/selftests/openat2/openat2_test.c +1 -0
@@ -5,6 +5,7 @@*/ #define _GNU_SOURCE +#define __SANE_USERSPACE_TYPES__// Use ll64 #include <fcntl.h> #include <sched.h> #include <sys/stat.h>
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 24/129 selftests/futex: pass _GNU_SOURCE without a value to the compiler
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: John Hubbard <[email protected]>
[ Upstream commit cb708ab9f584f159798b60853edcf0c8b67ce295 ]
It's slightly better to set _GNU_SOURCE in the source code, but if one must do it via the compiler invocation, then the best way to do so is this:
$(CC) -D_GNU_SOURCE=
...because otherwise, if this form is used:
$(CC) -D_GNU_SOURCE
...then that leads the compiler to set a value, as if you had passed in:
$(CC) -D_GNU_SOURCE=1
That, in turn, leads to warnings under both gcc and clang, like this:
futex_requeue_pi.c:20: warning: "_GNU_SOURCE" redefined
Fix this by using the "-D_GNU_SOURCE=" form.
--- tools/testing/selftests/futex/functional/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/futex/functional/Makefile +1 -1
@@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 INCLUDES := -I../include -I../../ $(KHDR_INCLUDES) -CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE -pthread $(INCLUDES) $(KHDR_INCLUDES) +CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE= -pthread $(INCLUDES) $(KHDR_INCLUDES) LDLIBS := -lpthread -lrt LOCAL_HDRS := \
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 25/129 of/irq: Factor out parsing of interrupt-map parent phandle+args from of_irq_parse_raw()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rob Herring (Arm) <[email protected]>
[ Upstream commit 935df1bd40d43c4ee91838c42a20e9af751885cc ]
Factor out the parsing of interrupt-map interrupt parent phandle and its arg cells to a separate function, of_irq_parse_imap_parent(), so that it can be used in other parsing scenarios (e.g. fw_devlink).
There was a refcount leak on non-matching entries when iterating thru "interrupt-map" which is fixed.
--- drivers/of/irq.c | 125 ++++++++++++++++++++++++---------------- drivers/of/of_private.h | 3 + 2 files changed, 77 insertions(+), 51 deletions(-)
drivers/of/irq.c +74 -51
@@ -25,6 +25,8 @@#include <linux/string.h> #include <linux/slab.h> +#include "of_private.h" +/** * irq_of_parse_and_map - Parse and map an interrupt into linux virq space * @dev: Device node of the device whose interrupt is to be mapped
@@ -96,6 +98,57 @@ static const char * const of_irq_imap_abusers[] = { NULL, }; +const __be32 *of_irq_parse_imap_parent (const __be32 *imap,int len,struct of_phandle_args *out_irq) +{ +u32 intsize, addrsize; +struct device_node *np; + +/* Get the interrupt parent */ +if (of_irq_workarounds &OF_IMAP_NO_PHANDLE ) + np =of_node_get (of_irq_dflt_pic); +else + np =of_find_node_by_phandle (be32_to_cpup (imap)); + imap++; + +/* Check if not found */ +if (!np) { +pr_debug (" -> imap parent not found !\n" ); +return NULL ; + } + +/* Get #interrupt-cells and #address-cells of new parent */ +if (of_property_read_u32 (np,"#interrupt-cells" , + &intsize)) { +pr_debug (" -> parent lacks #interrupt-cells!\n" ); +of_node_put (np); +return NULL ; + } +if (of_property_read_u32 (np,"#address-cells" , + &addrsize)) + addrsize =0 ; + +pr_debug (" -> intsize=%d, addrsize=%d\n" , + intsize, addrsize); + +/* Check for malformed properties */ +if (WARN_ON (addrsize + intsize >MAX_PHANDLE_ARGS ) + || (len < (addrsize + intsize))) { +of_node_put (np); +return NULL ; + } + +pr_debug (" -> imaplen=%d\n" , len); + + imap += addrsize + intsize; + + out_irq->np = np; +for (int i =0 ; i < intsize; i++) + out_irq->args[i] =be32_to_cpup (imap - intsize + i); + out_irq->args_count = intsize; + +return imap; +} +/** * of_irq_parse_raw - Low level interrupt tree parsing * @addr: address specifier (start of "reg" property of the device) in be32 format
@@ -112,12 +165,12 @@ static const char * const of_irq_imap_abusers[] = {*/ int of_irq_parse_raw (const __be32 *addr,struct of_phandle_args *out_irq) { -struct device_node *ipar, *tnode, *old =NULL , *newpar =NULL ; +struct device_node *ipar, *tnode, *old =NULL ;__be32 initial_match_array[MAX_PHANDLE_ARGS ];const __be32 *match_array = initial_match_array; -const __be32 *tmp, *imap, *imask, dummy_imask[] = { [0 ...MAX_PHANDLE_ARGS ] =cpu_to_be32 (~0 ) }; -u32 intsize =1 , addrsize, newintsize =0 , newaddrsize =0 ; -int imaplen, match, i, rc = -EINVAL ; +const __be32 *tmp, dummy_imask[] = { [0 ...MAX_PHANDLE_ARGS ] =cpu_to_be32 (~0 ) }; +u32 intsize =1 , addrsize; +int i, rc = -EINVAL ;#ifdef DEBUG of_print_phandle_args ("of_irq_parse_raw: " , out_irq);
@@ -176,6 +229,9 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq)/* Now start the actual "proper" walk of the interrupt tree */ while (ipar !=NULL ) { +int imaplen, match; +const __be32 *imap, *oldimap, *imask; +struct device_node *newpar;/* * Now check if cursor is an interrupt-controller and * if it is then we are done, unless there is an
@@ -216,7 +272,7 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq)/* Parse interrupt-map */ match =0 ; -while (imaplen > (addrsize + intsize +1 ) && !match) { +while (imaplen > (addrsize + intsize +1 )) {/* Compare specifiers */ match =1 ;for (i =0 ; i < (addrsize + intsize); i++, imaplen--)
@@ -224,48 +280,17 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq)pr_debug (" -> match=%d (imaplen=%d)\n" , match, imaplen); -/* Get the interrupt parent */ -if (of_irq_workarounds &OF_IMAP_NO_PHANDLE ) - newpar =of_node_get (of_irq_dflt_pic); -else - newpar =of_find_node_by_phandle (be32_to_cpup (imap)); - imap++; - --imaplen; - -/* Check if not found */ -if (newpar ==NULL ) { -pr_debug (" -> imap parent not found !\n" ); - goto fail; - } - -if (!of_device_is_available (newpar)) - match =0 ; - -/* Get #interrupt-cells and #address-cells of new -* parent -*/ -if (of_property_read_u32 (newpar,"#interrupt-cells" , - &newintsize)) { -pr_debug (" -> parent lacks #interrupt-cells!\n" ); - goto fail; - } -if (of_property_read_u32 (newpar,"#address-cells" , - &newaddrsize)) - newaddrsize =0 ; - -pr_debug (" -> newintsize=%d, newaddrsize=%d\n" , - newintsize, newaddrsize); - -/* Check for malformed properties */ -if (WARN_ON (newaddrsize + newintsize >MAX_PHANDLE_ARGS ) - || (imaplen < (newaddrsize + newintsize))) { - rc = -EFAULT ; + oldimap = imap; + imap =of_irq_parse_imap_parent (oldimap, imaplen, out_irq); +if (!imap) goto fail; - } - imap += newaddrsize + newintsize; - imaplen -= newaddrsize + newintsize; + match &=of_device_is_available (out_irq->np); +if (match) +break ; +of_node_put (out_irq->np); + imaplen -= imap - oldimap;pr_debug (" -> imaplen=%d\n" , imaplen); }if (!match) {
@@ -287,11 +312,11 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq)* Successfully parsed an interrupt-map translation; copy new * interrupt specifier into the out_irq structure */ - match_array = imap - newaddrsize - newintsize; -for (i =0 ; i < newintsize; i++) - out_irq->args[i] =be32_to_cpup (imap - newintsize + i); - out_irq->args_count = intsize = newintsize; - addrsize = newaddrsize; + match_array = oldimap +1 ; + + newpar = out_irq->np; + intsize = out_irq->args_count; + addrsize = (imap - match_array) - intsize;if (ipar == newpar) {pr_debug ("%pOF interrupt-map entry to self\n" , ipar);
@@ -300,7 +325,6 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq) skiplevel:/* Iterate again with new parent */ - out_irq->np = newpar;pr_debug (" -> new parent: %pOF\n" , newpar);of_node_put (ipar); ipar = newpar;
@@ -310,7 +334,6 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq) fail:of_node_put (ipar); -of_node_put (newpar);return rc; }
drivers/of/of_private.h +3 -0
@@ -158,6 +158,9 @@ extern void __of_sysfs_remove_bin_file(struct device_node *np,extern int of_bus_n_addr_cells (struct device_node *np);extern int of_bus_n_size_cells (struct device_node *np); +const __be32 *of_irq_parse_imap_parent (const __be32 *imap,int len, +struct of_phandle_args *out_irq); +struct bus_dma_region ;#if defined(CONFIG_OF_ADDRESS ) && defined(CONFIG_HAS_DMA ) int of_dma_get_range(struct device_node *np,
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 26/129 Input: silead - Always support 10 fingers
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hans de Goede <[email protected]>
[ Upstream commit 38a38f5a36da9820680d413972cb733349400532 ]
When support for Silead touchscreens was orginal added some touchscreens with older firmware versions only supported 5 fingers and this was made the default requiring the setting of a "silead,max-fingers=10" uint32 device-property for all touchscreen models which do support 10 fingers.
There are very few models with the old 5 finger fw, so in practice the setting of the "silead,max-fingers=10" is boilerplate which needs to be copy and pasted to every touchscreen config.
Reporting that 10 fingers are supported on devices which only support 5 fingers doesn't cause any problems for userspace in practice, since at max 4 finger gestures are supported anyways. Drop the max_fingers configuration and simply always assume 10 fingers.
--- drivers/input/touchscreen/silead.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-)
drivers/input/touchscreen/silead.c +5 -14
@@ -71,7 +71,6 @@ struct silead_ts_data {struct regulator_bulk_data regulators[2 ];char fw_name[64 ];struct touchscreen_properties prop; -u32 max_fingers;u32 chip_id;struct input_mt_pos pos[SILEAD_MAX_FINGERS ];int slots[SILEAD_MAX_FINGERS ];
@@ -136,7 +135,7 @@ static int silead_ts_request_input_dev(struct silead_ts_data *data)touchscreen_parse_properties (data->input, true, &data->prop);silead_apply_efi_fw_min_max (data); -input_mt_init_slots (data->input, data->max_fingers, +input_mt_init_slots (data->input,SILEAD_MAX_FINGERS ,INPUT_MT_DIRECT |INPUT_MT_DROP_UNUSED |INPUT_MT_TRACK );
@@ -256,10 +255,10 @@ static void silead_ts_read_data(struct i2c_client *client)return ; } -if (buf[0 ] > data->max_fingers) { +if (buf[0 ] >SILEAD_MAX_FINGERS ) {dev_warn (dev,"More touches reported then supported %d > %d\n" , - buf[0 ], data->max_fingers); - buf[0 ] = data->max_fingers; + buf[0 ],SILEAD_MAX_FINGERS ); + buf[0 ] =SILEAD_MAX_FINGERS ; }if (silead_ts_handle_pen_data (data, buf))
@@ -315,7 +314,6 @@ static void silead_ts_read_data(struct i2c_client *client)static int silead_ts_init (struct i2c_client *client) { -struct silead_ts_data *data =i2c_get_clientdata (client);int error; error = i2c_smbus_write_byte_data(client, SILEAD_REG_RESET,
@@ -325,7 +323,7 @@ static int silead_ts_init(struct i2c_client *client)usleep_range (SILEAD_CMD_SLEEP_MIN ,SILEAD_CMD_SLEEP_MAX ); error =i2c_smbus_write_byte_data (client,SILEAD_REG_TOUCH_NR , - data->max_fingers); +SILEAD_MAX_FINGERS );if (error) goto i2c_write_err;usleep_range (SILEAD_CMD_SLEEP_MIN ,SILEAD_CMD_SLEEP_MAX );
@@ -591,13 +589,6 @@ static void silead_ts_read_props(struct i2c_client *client)const char *str;int error; - error =device_property_read_u32 (dev,"silead,max-fingers" , - &data->max_fingers); -if (error) { -dev_dbg (dev,"Max fingers read error %d\n" , error); - data->max_fingers =5 ;/* Most devices handle up-to 5 fingers */ - } - error =device_property_read_string (dev,"firmware-name" , &str);if (!error) snprintf(data->fw_name, sizeof(data->fw_name),
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 27/129 net: ipv6: rpl_iptunnel: block BH in rpl_output() and rpl_input()
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 db0090c6eb12c31246438b7fe2a8f1b833e7a653 ]
As explained in commit 1378817486d6 ("tipc: block BH before using dst_cache"), net/core/dst_cache.c helpers need to be called with BH disabled.
Disabling preemption in rpl_output() is not good enough, because rpl_output() is called from process context, lwtunnel_output() only uses rcu_read_lock().
We might be interrupted by a softirq, re-enter rpl_output() and corrupt dst_cache data structures.
Fix the race by using local_bh_disable() instead of preempt_disable().
Apply a similar change in rpl_input().
--- net/ipv6/rpl_iptunnel.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)
net/ipv6/rpl_iptunnel.c +6 -8
@@ -212,9 +212,9 @@ static int rpl_output(struct net *net, struct sock *sk, struct sk_buff *skb)if (unlikely (err)) goto drop; -preempt_disable (); +local_bh_disable (); dst =dst_cache_get (&rlwt->cache); -preempt_enable (); +local_bh_enable ();if (unlikely (!dst)) {struct ipv6hdr *hdr =ipv6_hdr (skb);
@@ -234,9 +234,9 @@ static int rpl_output(struct net *net, struct sock *sk, struct sk_buff *skb) goto drop; } -preempt_disable (); +local_bh_disable ();dst_cache_set_ip6 (&rlwt->cache, dst, &fl6.saddr); -preempt_enable (); +local_bh_enable (); }skb_dst_drop (skb);
@@ -268,23 +268,21 @@ static int rpl_input(struct sk_buff *skb)return err; } -preempt_disable (); +local_bh_disable (); dst =dst_cache_get (&rlwt->cache); -preempt_enable ();if (!dst) {ip6_route_input (skb); dst =skb_dst (skb);if (!dst->error) { -preempt_disable ();dst_cache_set_ip6 (&rlwt->cache, dst, &ipv6_hdr (skb)->saddr); -preempt_enable (); } }else {skb_dst_drop (skb);skb_dst_set (skb, dst); } +local_bh_enable (); err =skb_cow_head (skb,LL_RESERVED_SPACE (dst->dev));if (unlikely (err))
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 28/129 ila: block BH in ila_output()
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 cf28ff8e4c02e1ffa850755288ac954b6ff0db8c ]
As explained in commit 1378817486d6 ("tipc: block BH before using dst_cache"), net/core/dst_cache.c helpers need to be called with BH disabled.
ila_output() is called from lwtunnel_output() possibly from process context, and under rcu_read_lock().
We might be interrupted by a softirq, re-enter ila_output() and corrupt dst_cache data structures.
Fix the race by using local_bh_disable().
--- net/ipv6/ila/ila_lwt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
net/ipv6/ila/ila_lwt.c +6 -1
@@ -58,7 +58,9 @@ static int ila_output(struct net *net, struct sock *sk, struct sk_buff *skb)return orig_dst->lwtstate->orig_output (net, sk, skb); } +local_bh_disable (); dst =dst_cache_get (&ilwt->dst_cache); +local_bh_enable ();if (unlikely (!dst)) {struct ipv6hdr *ip6h =ipv6_hdr (skb);struct flowi6 fl6;
@@ -86,8 +88,11 @@ static int ila_output(struct net *net, struct sock *sk, struct sk_buff *skb) goto drop; } -if (ilwt->connected) +if (ilwt->connected) { +local_bh_disable ();dst_cache_set_ip6 (&ilwt->dst_cache, dst, &fl6.saddr); +local_bh_enable (); + } }skb_dst_set (skb, dst);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 29/129 arm64: armv8_deprecated: Fix warning in isndep cpuhp starting process
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wei Li <[email protected]>
[ Upstream commit 14951beaec93696b092a906baa0f29322cf34004 ]
The function run_all_insn_set_hw_mode() is registered as startup callback of 'CPUHP_AP_ARM64_ISNDEP_STARTING', it invokes set_hw_mode() methods of all emulated instructions.
As the STARTING callbacks are not expected to fail, if one of the set_hw_mode() fails, e.g. due to el0 mixed-endian is not supported for 'setend', it will report a warning:
``` CPU[2] cannot support the emulation of setend CPU 2 UP state arm64/isndep:starting (136) failed (-22) CPU2: Booted secondary processor 0x0000000002 [0x414fd0c1] ```
To fix it, add a check for INSN_UNAVAILABLE status and skip the process.
--- arch/arm64/kernel/armv8_deprecated.c | 3 +++ 1 file changed, 3 insertions(+)
arch/arm64/kernel/armv8_deprecated.c +3 -0
@@ -464,6 +464,9 @@ static int run_all_insn_set_hw_mode(unsigned int cpu)for (int i =0 ; i <ARRAY_SIZE (insn_emulations); i++) {struct insn_emulation *insn = insn_emulations[i];bool enable =READ_ONCE (insn->current_mode) ==INSN_HW ; +if (insn->status ==INSN_UNAVAILABLE ) +continue ; +if (insn->set_hw_mode && insn->set_hw_mode (enable)) {pr_warn ("CPU[%u] cannot support the emulation of %s" , cpu, insn->name);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 30/129 null_blk: fix validation of block size
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andreas Hindborg <[email protected]>
[ Upstream commit c462ecd659b5fce731f1d592285832fd6ad54053 ]
Block size should be between 512 and PAGE_SIZE and be a power of 2. The current check does not validate this, so update the check.
Without this patch, null_blk would Oops due to a null pointer deref when loaded with bs=1536 [1].
--- drivers/block/null_blk/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/block/null_blk/main.c +2 -2
@@ -2013,8 +2013,8 @@ static int null_validate_conf(struct nullb_device *dev)return -EINVAL ; } - dev->blocksize =round_down (dev->blocksize,512 ); - dev->blocksize = clamp_t(unsigned int, dev->blocksize, 512, 4096); +if (blk_validate_block_size (dev->blocksize)) +return -EINVAL ;if (dev->queue_mode ==NULL_Q_MQ && dev->use_per_node_hctx) {if (dev->submit_queues != nr_online_nodes)
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 31/129 kconfig: gconf: give a proper initial state to the Save button
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Masahiro Yamada <[email protected]>
[ Upstream commit 46edf4372e336ef3a61c3126e49518099d2e2e6d ]
Currently, the initial state of the "Save" button is always active.
If none of the CONFIG options are changed while loading the .config file, the "Save" button should be greyed out.
This can be fixed by calling conf_read() after widget initialization.
--- scripts/kconfig/gconf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
scripts/kconfig/gconf.c +2 -1
@@ -1478,7 +1478,6 @@ int main(int ac, char *av[])conf_parse (name);fixup_rootmenu (&rootmenu); -conf_read (NULL );/* Load the interface and connect signals */ init_main_window (glade_file);
@@ -1486,6 +1485,8 @@ int main(int ac, char *av[])init_left_tree ();init_right_tree (); +conf_read (NULL ); +switch (view_mode) {case SINGLE_VIEW :display_tree_part ();
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 32/129 kconfig: remove wrong expr_trans_bool()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Masahiro Yamada <[email protected]>
[ Upstream commit 77a92660d8fe8d29503fae768d9f5eb529c88b36 ]
expr_trans_bool() performs an incorrect transformation.
[Test Code]
config MODULES
def_bool y
modules
config A
def_bool y
select C if B != n
config B
def_tristate m
config C
tristate[Result]
CONFIG_MODULES=y
CONFIG_A=y
CONFIG_B=m
CONFIG_C=m
This output is incorrect because CONFIG_C=y is expected.
Documentation/kbuild/kconfig-language.rst clearly explains the function of the '!=' operator:
If the values of both symbols are equal, it returns 'n', otherwise 'y'.
Therefore, the statement:
select C if B != n
should be equivalent to:
select C if y
Or, more simply:
select C
Hence, the symbol C should be selected by the value of A, which is 'y'.
However, expr_trans_bool() wrongly transforms it to:
select C if B
Therefore, the symbol C is selected by (A && B), which is 'm'.
The comment block of expr_trans_bool() correctly explains its intention:
* bool FOO!=n => FOO
^^^^
If FOO is bool, FOO!=n can be simplified into FOO. This is correct.
However, the actual code performs this transformation when FOO is tristate:
if (e->left.sym->type == S_TRISTATE) {
^^^^^^^^^^While it can be fixed to S_BOOLEAN, there is no point in doing so because expr_tranform() already transforms FOO!=n to FOO when FOO is bool. (see the "case E_UNEQUAL" part)
expr_trans_bool() is wrong and unnecessary.
--- scripts/kconfig/expr.c | 29 ----------------------------- scripts/kconfig/expr.h | 1 - scripts/kconfig/menu.c | 2 -- 3 files changed, 32 deletions(-)
scripts/kconfig/expr.c +0 -29
@@ -396,35 +396,6 @@ static struct expr *expr_eliminate_yn(struct expr *e)return e; } -/* -* bool FOO!=n => FOO -*/ -struct expr *expr_trans_bool (struct expr *e) -{ -if (!e) -return NULL ; -switch (e->type) { -case E_AND : -case E_OR : -case E_NOT : - e->left.expr =expr_trans_bool (e->left.expr); - e->right.expr =expr_trans_bool (e->right.expr); -break ; -case E_UNEQUAL : -// FOO!=n -> FOO -if (e->left.sym->type ==S_TRISTATE ) { -if (e->right.sym == &symbol_no) { - e->type =E_SYMBOL ; - e->right.sym =NULL ; - } - } -break ; -default : - ; - } -return e; -} -/* * e1 || e2 -> ? */
scripts/kconfig/expr.h +0 -1
@@ -295,7 +295,6 @@ void expr_free(struct expr *e);void expr_eliminate_eq (struct expr **ep1,struct expr **ep2);int expr_eq (struct expr *e1,struct expr *e2);tristate expr_calc_value (struct expr *e); -struct expr *expr_trans_bool (struct expr *e);struct expr *expr_eliminate_dups (struct expr *e);struct expr *expr_transform (struct expr *e);int expr_contains_symbol (struct expr *dep,struct symbol *sym);
scripts/kconfig/menu.c +0 -2
@@ -380,8 +380,6 @@ void menu_finalize(struct menu *parent) dep =expr_transform (dep); dep =expr_alloc_and (expr_copy (basedep), dep); dep =expr_eliminate_dups (dep); -if (menu->sym && menu->sym->type !=S_TRISTATE ) - dep =expr_trans_bool (dep); prop->visible.expr = dep;/*
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 33/129 input: Add event code for accessibility key
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aseda Aboagye <[email protected]>
[ Upstream commit 0c7dd00de018ff70b3452c424901816e26366a8a ]
HUTRR116 added support for a new usage titled "System Accessibility Binding" which toggles a system-wide bound accessibility UI or command. This commit simply adds a new event code for the usage.
--- drivers/hid/hid-debug.c | 1 + drivers/hid/hid-input.c | 1 + include/uapi/linux/input-event-codes.h | 1 + 3 files changed, 3 insertions(+)
drivers/hid/hid-debug.c +1 -0
@@ -974,6 +974,7 @@ static const char *keys[KEY_MAX + 1] = { [KEY_CAMERA_ACCESS_ENABLE] = "CameraAccessEnable", [KEY_CAMERA_ACCESS_DISABLE] = "CameraAccessDisable", [KEY_CAMERA_ACCESS_TOGGLE] = "CameraAccessToggle", + [KEY_ACCESSIBILITY] = "Accessibility", [KEY_DICTATE] = "Dictate", [KEY_MICMUTE] = "MicrophoneMute", [KEY_BRIGHTNESS_MIN] = "BrightnessMin",
drivers/hid/hid-input.c +1 -0
@@ -836,6 +836,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fielif ((usage->hid &0xf0 ) ==0xa0 ) {/* SystemControl */ switch (usage->hid &0xf ) {case 0x9 :map_key_clear (KEY_MICMUTE );break ; +case 0xa :map_key_clear (KEY_ACCESSIBILITY );break ;default : goto ignore; }break ;
include/uapi/linux/input-event-codes.h +1 -0
@@ -618,6 +618,7 @@#define KEY_CAMERA_ACCESS_ENABLE 0x24b/* Enables programmatic access to camera devices. (HUTRR72) */ #define KEY_CAMERA_ACCESS_DISABLE 0x24c/* Disables programmatic access to camera devices. (HUTRR72) */ #define KEY_CAMERA_ACCESS_TOGGLE 0x24d/* Toggles the current state of the camera access control. (HUTRR72) */ +#define KEY_ACCESSIBILITY 0x24e/* Toggles the system bound accessibility UI/command (HUTRR116) */ #define KEY_BRIGHTNESS_MIN 0x250/* Set Brightness to Minimum */ #define KEY_BRIGHTNESS_MAX 0x251/* Set Brightness to Maximum */
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 34/129 input: Add support for "Do Not Disturb"
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aseda Aboagye <[email protected]>
[ Upstream commit 22d6d060ac77955291deb43efc2f3f4f9632c6cb ]
HUTRR94 added support for a new usage titled "System Do Not Disturb" which toggles a system-wide Do Not Disturb setting. This commit simply adds a new event code for the usage.
--- drivers/hid/hid-debug.c | 1 + drivers/hid/hid-input.c | 8 ++++++++ include/uapi/linux/input-event-codes.h | 1 + 3 files changed, 10 insertions(+)
drivers/hid/hid-debug.c +1 -0
@@ -975,6 +975,7 @@ static const char *keys[KEY_MAX + 1] = { [KEY_CAMERA_ACCESS_DISABLE] = "CameraAccessDisable", [KEY_CAMERA_ACCESS_TOGGLE] = "CameraAccessToggle", [KEY_ACCESSIBILITY] = "Accessibility", + [KEY_DO_NOT_DISTURB] = "DoNotDisturb", [KEY_DICTATE] = "Dictate", [KEY_MICMUTE] = "MicrophoneMute", [KEY_BRIGHTNESS_MIN] = "BrightnessMin",
drivers/hid/hid-input.c +8 -0
@@ -833,6 +833,14 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fielbreak ; } +if ((usage->hid &0xf0 ) ==0x90 ) {/* SystemControl*/ +switch (usage->hid &0xf ) { +case 0xb :map_key_clear (KEY_DO_NOT_DISTURB );break ; +default : goto ignore; + } +break ; + } +if ((usage->hid &0xf0 ) ==0xa0 ) {/* SystemControl */ switch (usage->hid &0xf ) {case 0x9 :map_key_clear (KEY_MICMUTE );break ;
include/uapi/linux/input-event-codes.h +1 -0
@@ -619,6 +619,7 @@#define KEY_CAMERA_ACCESS_DISABLE 0x24c/* Disables programmatic access to camera devices. (HUTRR72) */ #define KEY_CAMERA_ACCESS_TOGGLE 0x24d/* Toggles the current state of the camera access control. (HUTRR72) */ #define KEY_ACCESSIBILITY 0x24e/* Toggles the system bound accessibility UI/command (HUTRR116) */ +#define KEY_DO_NOT_DISTURB 0x24f/* Toggles the system-wide "Do Not Disturb" control (HUTRR94)*/ #define KEY_BRIGHTNESS_MIN 0x250/* Set Brightness to Minimum */ #define KEY_BRIGHTNESS_MAX 0x251/* Set Brightness to Maximum */
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 35/129 HID: Ignore battery for ELAN touchscreens 2F2C and 4116
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Louis Dalibard <[email protected]>
[ Upstream commit a3a5a37efba11b7cf1a86abe7bccfbcdb521764e ]
At least ASUS Zenbook 14 (2023) and ASUS Zenbook 14 Pro (2023) are affected.
The touchscreen reports a battery status of 0% and jumps to 1% when a stylus is used.
The device ID was added and the battery ignore quirk was enabled for it.
--- drivers/hid/hid-ids.h | 2 ++ drivers/hid/hid-input.c | 4 ++++ 2 files changed, 6 insertions(+)
drivers/hid/hid-ids.h +2 -0
@@ -418,6 +418,8 @@#define I2C_DEVICE_ID_HP_SPECTRE_X360_13_AW0020NG 0x29DF#define I2C_DEVICE_ID_ASUS_TP420IA_TOUCHSCREEN 0x2BC8#define I2C_DEVICE_ID_ASUS_GV301RA_TOUCHSCREEN 0x2C82 +#define I2C_DEVICE_ID_ASUS_UX3402_TOUCHSCREEN 0x2F2C +#define I2C_DEVICE_ID_ASUS_UX6404_TOUCHSCREEN 0x4116#define USB_DEVICE_ID_ASUS_UX550VE_TOUCHSCREEN 0x2544#define USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN 0x2706#define I2C_DEVICE_ID_SURFACE_GO_TOUCHSCREEN 0x261A
drivers/hid/hid-input.c +4 -0
@@ -377,6 +377,10 @@ static const struct hid_device_id hid_battery_quirks[] = { HID_BATTERY_QUIRK_IGNORE }, {HID_I2C_DEVICE (USB_VENDOR_ID_ELAN ,I2C_DEVICE_ID_ASUS_GV301RA_TOUCHSCREEN ), HID_BATTERY_QUIRK_IGNORE }, + { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_ASUS_UX3402_TOUCHSCREEN), + HID_BATTERY_QUIRK_IGNORE }, + { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_ASUS_UX6404_TOUCHSCREEN), + HID_BATTERY_QUIRK_IGNORE }, { HID_USB_DEVICE(USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN), HID_BATTERY_QUIRK_IGNORE }, { HID_USB_DEVICE(USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ASUS_UX550VE_TOUCHSCREEN),
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 36/129 NFSv4: Fix memory leak in nfs4_set_security_label
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Mastykin <[email protected]>
[ Upstream commit aad11473f8f4be3df86461081ce35ec5b145ba68 ]
We leak nfs_fattr and nfs4_label every time we set a security xattr.
--- fs/nfs/nfs4proc.c | 1 + 1 file changed, 1 insertion(+)
fs/nfs/nfs4proc.c +1 -0
@@ -6268,6 +6268,7 @@ nfs4_set_security_label(struct inode *inode, const void *buf, size_t buflen)if (status ==0 )nfs_setsecurity (inode, fattr); +nfs_free_fattr (fattr); return status; }#endif /* CONFIG_NFS_V4_SECURITY_LABEL */
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 37/129 nfs: propagate readlink errors in nfs_symlink_filler
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sagi Grimberg <[email protected]>
[ Upstream commit 134d0b3f2440cdddd12fc3444c9c0f62331ce6fc ]
There is an inherent race where a symlink file may have been overriden (by a different client) between lookup and readlink, resulting in a spurious EIO error returned to userspace. Fix this by propagating back ESTALE errors such that the vfs will retry the lookup/get_link (similar to nfs4_file_open) at least once.
--- fs/nfs/symlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfs/symlink.c +1 -1
@@ -41,7 +41,7 @@ static int nfs_symlink_filler(struct file *file, struct folio *folio) error:folio_set_error (folio);folio_unlock (folio); -return -EIO ; +return error; } static const char *nfs_get_link(struct dentry *dentry,
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 38/129 nfs: Avoid flushing many pages with NFS_FILE_SYNC
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 a527c3ba41c4c61e2069bfce4091e5515f06a8dd ]
When we are doing WB_SYNC_ALL writeback, nfs submits write requests with NFS_FILE_SYNC flag to the server (which then generally treats it as an O_SYNC write). This helps to reduce latency for single requests but when submitting more requests, additional fsyncs on the server side hurt latency. NFS generally avoids this additional overhead by not setting NFS_FILE_SYNC if desc->pg_moreio is set.
However this logic doesn't always work. When we do random 4k writes to a huge file and then call fsync(2), each page writeback is going to be sent with NFS_FILE_SYNC because after preparing one page for writeback, we start writing back next, nfs_do_writepage() will call nfs_pageio_cond_complete() which finds the page is not contiguous with previously prepared IO and submits is *without* setting desc->pg_moreio. Hence NFS_FILE_SYNC is used resulting in poor performance.
Fix the problem by setting desc->pg_moreio in nfs_pageio_cond_complete() before submitting outstanding IO. This improves throughput of fsync-after-random-writes on my test SSD from ~70MB/s to ~250MB/s.
--- fs/nfs/pagelist.c | 5 +++++ 1 file changed, 5 insertions(+)
fs/nfs/pagelist.c +5 -0
@@ -1545,6 +1545,11 @@ void nfs_pageio_cond_complete(struct nfs_pageio_descriptor *desc, pgoff_t index)continue ; }else if (index == prev->wb_index +1 )continue ; +/* +* We will submit more requests after these. Indicate +* this to the underlying layers. +*/ + desc->pg_moreio =1 ;nfs_pageio_complete (desc);break ; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 39/129 nfs: dont invalidate dentries on transient errors
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Scott Mayhew <[email protected]>
[ Upstream commit 0c8c7c559740d2d8b66048162af6c4dba8f0c88c ]
This is a slight variation on a patch previously proposed by Neil Brown that never got merged.
Prior to commit 5ceb9d7fdaaf ("NFS: Refactor nfs_lookup_revalidate()"), any error from nfs_lookup_verify_inode() other than -ESTALE would result in nfs_lookup_revalidate() returning that error (-ESTALE is mapped to zero).
Since that commit, all errors result in nfs_lookup_revalidate() returning zero, resulting in dentries being invalidated where they previously were not (particularly in the case of -ERESTARTSYS).
Fix it by passing the actual error code to nfs_lookup_revalidate_done(), and leaving the decision on whether to map the error code to zero or one to nfs_lookup_revalidate_done().
A simple reproducer is to run the following python code in a subdirectory of an NFS mount (not in the root of the NFS mount):
---8<---
import os
import multiprocessing
import time
if __name__=="__main__":
multiprocessing.set_start_method("spawn")
count = 0
while True:
try:
os.getcwd()
pool = multiprocessing.Pool(10) pool.close()
pool.terminate()
count += 1
except Exception as e:
print(f"Failed after {count} iterations") print(e)
break
---8<---
Prior to commit 5ceb9d7fdaaf, the above code would run indefinitely. After commit 5ceb9d7fdaaf, it fails almost immediately with -ENOENT.
--- fs/nfs/dir.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-)
fs/nfs/dir.c +13 -14
@@ -1625,7 +1625,16 @@ nfs_lookup_revalidate_done(struct inode *dir, struct dentry *dentry,switch (error) {case 1 :break ; -case 0 : +case -ETIMEDOUT : +if (inode && (IS_ROOT (dentry) || +NFS_SERVER (inode)->flags &NFS_MOUNT_SOFTREVAL )) + error =1 ; +break ; +case -ESTALE : +case -ENOENT : + error =0 ; + fallthrough; +default :/* * We can't d_drop the root of a disconnected tree: * its d_hash is on the s_anon list and d_drop() would hide
@@ -1680,18 +1689,8 @@ static int nfs_lookup_revalidate_dentry(struct inode *dir, dir_verifier =nfs_save_change_attribute (dir); ret =NFS_PROTO (dir)->lookup (dir, dentry, fhandle, fattr); -if (ret <0 ) { -switch (ret) { -case -ESTALE : -case -ENOENT : - ret =0 ; -break ; -case -ETIMEDOUT : -if (NFS_SERVER (inode)->flags &NFS_MOUNT_SOFTREVAL ) - ret =1 ; - } +if (ret <0 ) goto out; - }/* Request help from readdirplus */ nfs_lookup_advise_force_readdirplus (dir, flags);
@@ -1735,7 +1734,7 @@ nfs_do_lookup_revalidate(struct inode *dir, struct dentry *dentry, unsigned int flags) {struct inode *inode; -int error; +int error =0 ;nfs_inc_stats (dir,NFSIOS_DENTRYREVALIDATE ); inode =d_inode (dentry);
@@ -1780,7 +1779,7 @@ nfs_do_lookup_revalidate(struct inode *dir, struct dentry *dentry, out_bad:if (flags &LOOKUP_RCU )return -ECHILD ; -return nfs_lookup_revalidate_done (dir, dentry, inode,0 ); +return nfs_lookup_revalidate_done (dir, dentry, inode, error); } static int
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 40/129 cachefiles: add consistency check for copen/cread
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 a26dc49df37e996876f50a0210039b2d211fdd6f ]
This prevents malicious processes from completing random copen/cread requests and crashing the system. Added checks are listed below:
* Generic, copen can only complete open requests, and cread can only complete read requests.
* For copen, ondemand_id must not be 0, because this indicates that the request has not been read by the daemon.
* For cread, the object corresponding to fd and req should be the same.
--- fs/cachefiles/ondemand.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-)
fs/cachefiles/ondemand.c +20 -7
@@ -97,12 +97,12 @@ static loff_t cachefiles_ondemand_fd_llseek(struct file *filp, loff_t pos, }static long cachefiles_ondemand_fd_ioctl (struct file *filp,unsigned int ioctl, -unsigned long arg) +unsigned long id) {struct cachefiles_object *object = filp->private_data;struct cachefiles_cache *cache = object->volume->cache;struct cachefiles_req *req; -unsigned long id; +XA_STATE (xas, &cache->reqs, id);if (ioctl !=CACHEFILES_IOC_READ_COMPLETE )return -EINVAL ;
@@ -110,10 +110,15 @@ static long cachefiles_ondemand_fd_ioctl(struct file *filp, unsigned int ioctl,if (!test_bit (CACHEFILES_ONDEMAND_MODE , &cache->flags))return -EOPNOTSUPP ; - id = arg; - req =xa_erase (&cache->reqs, id); -if (!req) +xa_lock (&cache->reqs); + req =xas_load (&xas); +if (!req || req->msg.opcode !=CACHEFILES_OP_READ || + req->object != object) { +xa_unlock (&cache->reqs);return -EINVAL ; + } +xas_store (&xas,NULL ); +xa_unlock (&cache->reqs);trace_cachefiles_ondemand_cread (object, id);complete (&req->done);
@@ -142,6 +147,7 @@ int cachefiles_ondemand_copen(struct cachefiles_cache *cache, char *args)unsigned long id;long size;int ret; +XA_STATE (xas, &cache->reqs,0 );if (!test_bit (CACHEFILES_ONDEMAND_MODE , &cache->flags))return -EOPNOTSUPP ;
@@ -165,9 +171,16 @@ int cachefiles_ondemand_copen(struct cachefiles_cache *cache, char *args)if (ret)return ret; - req =xa_erase (&cache->reqs, id); -if (!req) +xa_lock (&cache->reqs); + xas.xa_index = id; + req =xas_load (&xas); +if (!req || req->msg.opcode !=CACHEFILES_OP_OPEN || + !req->object->ondemand->ondemand_id) { +xa_unlock (&cache->reqs);return -EINVAL ; + } +xas_store (&xas,NULL ); +xa_unlock (&cache->reqs);/* fail OPEN request if copen format is invalid */ ret =kstrtol (psize,0 , &size);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 41/129 cachefiles: Set object to close if ondemand_id < 0 in copen
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zizhi Wo <[email protected]>
[ Upstream commit 4f8703fb3482f92edcfd31661857b16fec89c2c0 ]
If copen is maliciously called in the user mode, it may delete the request corresponding to the random id. And the request may have not been read yet.
Note that when the object is set to reopen, the open request will be done with the still reopen state in above case. As a result, the request corresponding to this object is always skipped in select_req function, so the read request is never completed and blocks other process.
Fix this issue by simply set object to close if its id < 0 in copen.
--- fs/cachefiles/ondemand.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
fs/cachefiles/ondemand.c +6 -1
@@ -182,6 +182,7 @@ int cachefiles_ondemand_copen(struct cachefiles_cache *cache, char *args)xas_store (&xas,NULL );xa_unlock (&cache->reqs); + info = req->object->ondemand;/* fail OPEN request if copen format is invalid */ ret =kstrtol (psize,0 , &size);if (ret) {
@@ -201,7 +202,6 @@ int cachefiles_ondemand_copen(struct cachefiles_cache *cache, char *args) goto out; } - info = req->object->ondemand;spin_lock (&info->lock);/* * The anonymous fd was closed before copen ? Fail the request.
@@ -241,6 +241,11 @@ int cachefiles_ondemand_copen(struct cachefiles_cache *cache, char *args)wake_up_all (&cache->daemon_pollwq); out: +spin_lock (&info->lock); +/* Need to set object close to avoid reopen status continuing */ +if (info->ondemand_id ==CACHEFILES_ONDEMAND_ID_CLOSED ) +cachefiles_ondemand_set_object_close (req->object); +spin_unlock (&info->lock);complete (&req->done);return ret; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 42/129 cachefiles: make on-demand read killable
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 bc9dde6155464e906e630a0a5c17a4cab241ffbb ]
Replacing wait_for_completion() with wait_for_completion_killable() in cachefiles_ondemand_send_req() allows us to kill processes that might trigger a hunk_task if the daemon is abnormal.
But now only CACHEFILES_OP_READ is killable, because OP_CLOSE and OP_OPEN is initiated from kworker context and the signal is prohibited in these kworker.
Note that when the req in xas changes, i.e. xas_load(&xas) != req, it means that a process will complete the current request soon, so wait again for the request to be completed.
In addition, add the cachefiles_ondemand_finish_req() helper function to simplify the code.
--- fs/cachefiles/ondemand.c | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-)
fs/cachefiles/ondemand.c +28 -12
@@ -380,6 +380,20 @@ static struct cachefiles_req *cachefiles_ondemand_select_req(struct xa_state *xareturn NULL ; } +static inline bool cachefiles_ondemand_finish_req (struct cachefiles_req *req, +struct xa_state *xas,int err) +{ +if (unlikely (!xas || !req)) +return false; + +if (xa_cmpxchg (xas->xa, xas->xa_index, req,NULL ,0 ) != req) +return false; + + req->error = err; +complete (&req->done); +return true; +} +ssize_t cachefiles_ondemand_daemon_read (struct cachefiles_cache *cache,char __user *_buffer,size_t buflen) {
@@ -443,16 +457,8 @@ ssize_t cachefiles_ondemand_daemon_read(struct cachefiles_cache *cache, out:cachefiles_put_object (req->object, cachefiles_obj_put_read_req);/* Remove error request and CLOSE request has no reply */ -if (ret || msg->opcode ==CACHEFILES_OP_CLOSE ) { -xas_reset (&xas); -xas_lock (&xas); -if (xas_load (&xas) == req) { - req->error = ret; -complete (&req->done); -xas_store (&xas,NULL ); - } -xas_unlock (&xas); - } +if (ret || msg->opcode ==CACHEFILES_OP_CLOSE ) +cachefiles_ondemand_finish_req (req, &xas, ret);cachefiles_req_put (req);return ret ? ret : n; }
@@ -557,8 +563,18 @@ static int cachefiles_ondemand_send_req(struct cachefiles_object *object, goto out;wake_up_all (&cache->daemon_pollwq); -wait_for_completion (&req->done); - ret = req->error; +wait: + ret =wait_for_completion_killable (&req->done); +if (!ret) { + ret = req->error; + }else { + ret = -EINTR ; +if (!cachefiles_ondemand_finish_req (req, &xas, ret)) { +/* Someone will complete it soon. */ +cpu_relax (); + goto wait; + } + }cachefiles_req_put (req);return ret; out:
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 43/129 fs/file: fix the check in find_next_fd()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yuntao Wang <[email protected]>
[ Upstream commit ed8c7fbdfe117abbef81f65428ba263118ef298a ]
The maximum possible return value of find_next_zero_bit(fdt->full_fds_bits, maxbit, bitbit) is maxbit. This return value, multiplied by BITS_PER_LONG, gives the value of bitbit, which can never be greater than maxfd, it can only be equal to maxfd at most, so the following check 'if (bitbit > maxfd)' will never be true.
Moreover, when bitbit equals maxfd, it indicates that there are no unused fds, and the function can directly return.
Fix this check.
--- fs/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/file.c +2 -2
@@ -481,12 +481,12 @@ struct files_struct init_files = {static unsigned int find_next_fd (struct fdtable *fdt,unsigned int start) { -unsigned int maxfd = fdt->max_fds; +unsigned int maxfd = fdt->max_fds;/* always multiple of BITS_PER_LONG */ unsigned int maxbit = maxfd /BITS_PER_LONG ;unsigned int bitbit = start /BITS_PER_LONG ; bitbit =find_next_zero_bit (fdt->full_fds_bits, maxbit, bitbit) *BITS_PER_LONG ; -if (bitbit > maxfd) +if (bitbit >= maxfd)return maxfd;if (bitbit > start) start = bitbit;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 44/129 mei: demote client disconnect warning on suspend to debug
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Usyskin <[email protected]>
[ Upstream commit 1db5322b7e6b58e1b304ce69a50e9dca798ca95b ]
Change level for the "not connected" client message in the write callback from error to debug.
The MEI driver currently disconnects all clients upon system suspend. This behavior is by design and user-space applications with open connections before the suspend are expected to handle errors upon resume, by reopening their handles, reconnecting,
and retrying their operations.
However, the current driver implementation logs an error message every time a write operation is attempted on a disconnected client. Since this is a normal and expected flow after system resume logging this as an error can be misleading.
--- drivers/misc/mei/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/mei/main.c +1 -1
@@ -329,7 +329,7 @@ static ssize_t mei_write(struct file *file, const char __user *ubuf, }if (!mei_cl_is_connected (cl)) { -cl_err (dev, cl,"is not connected" ); +cl_dbg (dev, cl,"is not connected" ); rets = -ENODEV ; goto out; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 45/129 iomap: Fix iomap_adjust_read_range for plen calculation
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ritesh Harjani (IBM) <[email protected]>
[ Upstream commit f5ceb1bbc98c69536d4673a97315e8427e67de1b ]
If the extent spans the block that contains i_size, we need to handle both halves separately so that we properly zero data in the page cache for blocks that are entirely outside of i_size. But this is needed only when i_size is within the current folio under processing. "orig_pos + length > isize" can be true for all folios if the mapped extent length is greater than the folio size. That is making plen to break for every folio instead of only the last folio.
So use orig_plen for checking if "orig_pos + orig_plen > isize".
--- fs/iomap/buffered-io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/iomap/buffered-io.c +2 -1
@@ -201,6 +201,7 @@ static void iomap_adjust_read_range(struct inode *inode, struct folio *folio,unsigned block_size = (1 << block_bits);size_t poff =offset_in_folio (folio, *pos);size_t plen =min_t (loff_t,folio_size (folio) - poff, length); +size_t orig_plen = plen;unsigned first = poff >> block_bits;unsigned last = (poff + plen -1 ) >> block_bits;
@@ -237,7 +238,7 @@ static void iomap_adjust_read_range(struct inode *inode, struct folio *folio,* handle both halves separately so that we properly zero data in the * page cache for blocks that are entirely outside of i_size. */ -if (orig_pos <= isize && orig_pos + length > isize) { +if (orig_pos <= isize && orig_pos + orig_plen > isize) {unsigned end =offset_in_folio (folio, isize -1 ) >> block_bits;if (first <= end && last > end)
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 46/129 drm/exynos: dp: drop driver owner initialization
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 1f3512cdf8299f9edaea9046d53ea324a7730bab ]
Core in platform_driver_register() already sets the .owner, so driver does not need to. Whatever is set here will be anyway overwritten by main driver calling platform_driver_register().
--- drivers/gpu/drm/exynos/exynos_dp.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/exynos/exynos_dp.c +0 -1
@@ -288,7 +288,6 @@ struct platform_driver dp_driver = { .remove = exynos_dp_remove, .driver = { .name = "exynos-dp", - .owner = THIS_MODULE, .pm = pm_ptr(&exynos_dp_pm_ops), .of_match_table = exynos_dp_match, },
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 47/129 drm: panel-orientation-quirks: Add quirk for Aya Neo KUN
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tobias Jakobi <[email protected]>
[ Upstream commit f74fb5df429ebc6a614dc5aa9e44d7194d402e5a ]
Similar to the other Aya Neo devices this one features again a portrait screen, here with a native resolution of 1600x2560.
--- drivers/gpu/drm/drm_panel_orientation_quirks.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/drm_panel_orientation_quirks.c +6 -0
@@ -202,6 +202,12 @@ static const struct dmi_system_id orientation_data[] = { DMI_MATCH(DMI_BOARD_NAME, "NEXT"), }, .driver_data = (void *)&lcd800x1280_rightside_up, + }, { /* AYA NEO KUN */ + .matches = { +DMI_EXACT_MATCH (DMI_BOARD_VENDOR ,"AYANEO" ), + DMI_MATCH(DMI_BOARD_NAME, "KUN"), + }, + .driver_data = (void *)&lcd1600x2560_rightside_up, }, { /* Chuwi HiBook (CWI514) */ .matches = { DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 48/129 drm/mediatek: Call drm_atomic_helper_shutdown() at shutdown time
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Douglas Anderson <[email protected]>
[ Upstream commit c38896ca6318c2df20bbe6c8e3f633e071fda910 ]
Based on grepping through the source code this driver appears to be missing a call to drm_atomic_helper_shutdown() at system shutdown time. Among other things, this means that if a panel is in use that it won't be cleanly powered off at system shutdown time.
The fact that we should call drm_atomic_helper_shutdown() in the case of OS shutdown/restart comes straight out of the kernel doc "driver instance overview" in drm_drv.c.
This driver users the component model and shutdown happens in the base driver. The "drvdata" for this driver will always be valid if shutdown() is called and as of commit 2a073968289d ("drm/atomic-helper: drm_atomic_helper_shutdown(NULL) should be a noop") we don't need to confirm that "drm" is non-NULL.
--- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/gpu/drm/mediatek/mtk_drm_drv.c +8 -0
@@ -926,6 +926,13 @@ static void mtk_drm_remove(struct platform_device *pdev)of_node_put (private->comp_node[i]); } +static void mtk_drm_shutdown (struct platform_device *pdev) +{ +struct mtk_drm_private *private =platform_get_drvdata (pdev); + +drm_atomic_helper_shutdown (private->drm); +} +static int mtk_drm_sys_prepare (struct device *dev) {struct mtk_drm_private *private =dev_get_drvdata (dev);
@@ -957,6 +964,7 @@ static const struct dev_pm_ops mtk_drm_pm_ops = {static struct platform_driver mtk_drm_platform_driver = { .probe = mtk_drm_probe, .remove_new = mtk_drm_remove, + .shutdown = mtk_drm_shutdown, .driver = { .name ="mediatek-drm" , .pm = &mtk_drm_pm_ops,
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 49/129 nvme: avoid double free special payload
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chunguang Xu <[email protected]>
[ Upstream commit e5d574ab37f5f2e7937405613d9b1a724811e5ad ]
If a discard request needs to be retried, and that retry may fail before a new special payload is added, a double free will result. Clear the RQF_SPECIAL_LOAD when the request is cleaned.
--- drivers/nvme/host/core.c | 1 + 1 file changed, 1 insertion(+)
drivers/nvme/host/core.c +1 -0
@@ -938,6 +938,7 @@ void nvme_cleanup_cmd(struct request *req)clear_bit_unlock (0 , &ctrl->discard_page_busy); else kfree(bvec_virt(&req->special_vec)); + req->rq_flags &= ~RQF_SPECIAL_PAYLOAD ; } }EXPORT_SYMBOL_GPL (nvme_cleanup_cmd);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 50/129 nvmet: always initialize cqe.result
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Wagner <[email protected]>
[ Upstream commit cd0c1b8e045a8d2785342b385cb2684d9b48e426 ]
The spec doesn't mandate that the first two double words (aka results) for the command queue entry need to be set to 0 when they are not used (not specified). Though, the target implemention returns 0 for TCP and FC but not for RDMA.
Let's make RDMA behave the same and thus explicitly initializing the result field. This prevents leaking any data from the stack.
--- drivers/nvme/target/core.c | 1 + drivers/nvme/target/fabrics-cmd-auth.c | 3 --- drivers/nvme/target/fabrics-cmd.c | 6 ------ 3 files changed, 1 insertion(+), 9 deletions(-)
drivers/nvme/target/core.c +1 -0
@@ -945,6 +945,7 @@ bool nvmet_req_init(struct nvmet_req *req, struct nvmet_cq *cq, req->metadata_sg_cnt =0 ; req->transfer_len =0 ; req->metadata_len =0 ; + req->cqe->result.u64 =0 ; req->cqe->status =0 ; req->cqe->sq_head =0 ; req->ns =NULL ;
drivers/nvme/target/fabrics-cmd-auth.c +0 -3
@@ -332,7 +332,6 @@ void nvmet_execute_auth_send(struct nvmet_req *req)pr_debug ("%s: ctrl %d qid %d nvme status %x error loc %d\n" , __func__, ctrl->cntlid, req->sq->qid, status, req->error_loc); - req->cqe->result.u64 =0 ;if (req->sq->dhchap_step !=NVME_AUTH_DHCHAP_MESSAGE_SUCCESS2 && req->sq->dhchap_step !=NVME_AUTH_DHCHAP_MESSAGE_FAILURE2 ) {unsigned long auth_expire_secs = ctrl->kato ? ctrl->kato :120 ;
@@ -515,8 +514,6 @@ void nvmet_execute_auth_receive(struct nvmet_req *req) status =nvmet_copy_to_sgl (req,0 , d, al);kfree (d); done: - req->cqe->result.u64 =0 ; -if (req->sq->dhchap_step ==NVME_AUTH_DHCHAP_MESSAGE_SUCCESS2 )nvmet_auth_sq_free (req->sq);else if (req->sq->dhchap_step ==NVME_AUTH_DHCHAP_MESSAGE_FAILURE1 ) {
drivers/nvme/target/fabrics-cmd.c +0 -6
@@ -225,9 +225,6 @@ static void nvmet_execute_admin_connect(struct nvmet_req *req)if (status) goto out; -/* zero out initial completion result, assign values as needed */ - req->cqe->result.u32 =0 ; -if (c->recfmt !=0 ) {pr_warn ("invalid connect version (%d).\n" ,le16_to_cpu (c->recfmt));
@@ -305,9 +302,6 @@ static void nvmet_execute_io_connect(struct nvmet_req *req)if (status) goto out; -/* zero out initial completion result, assign values as needed */ - req->cqe->result.u32 =0 ; -if (c->recfmt !=0 ) {pr_warn ("invalid connect version (%d).\n" ,le16_to_cpu (c->recfmt));
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 51/129 ALSA: hda: cs35l56: Fix lifecycle of codec pointer
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Simon Trimmer <[email protected]>
[ Upstream commit d339131bf02d4ed918415574082caf5e8af6e664 ]
The codec should be cleared when the amp driver is unbound and when resuming it should be tested to prevent loading firmware into the device and ALSA in a partially configured system state.
--- sound/pci/hda/cs35l56_hda.c | 5 +++++ 1 file changed, 5 insertions(+)
sound/pci/hda/cs35l56_hda.c +5 -0
@@ -702,6 +702,8 @@ static void cs35l56_hda_unbind(struct device *dev, struct device *master, void *if (comps[cs35l56->index].dev == dev)memset (&comps[cs35l56->index],0 ,sizeof (*comps)); + cs35l56->codec =NULL ; +dev_dbg (cs35l56->base.dev,"Unbound\n" ); }
@@ -807,6 +809,9 @@ static int cs35l56_hda_system_resume(struct device *dev) cs35l56->suspended = false; +if (!cs35l56->codec) +return 0 ; + ret =cs35l56_is_fw_reload_needed (&cs35l56->base);dev_dbg (cs35l56->base.dev,"fw_reload_needed: %d\n" , ret);if (ret >0 ) {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 52/129 wifi: cfg80211: wext: add extra SIOCSIWSCAN data check
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Antipov <[email protected]>
[ Upstream commit 6ef09cdc5ba0f93826c09d810c141a8d103a80fc ]
In 'cfg80211_wext_siwscan()', add extra check whether number of channels passed via 'ioctl(sock, SIOCSIWSCAN, ...)' doesn't exceed IW_MAX_FREQUENCIES and reject invalid request with -EINVAL otherwise.
--- net/wireless/scan.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
net/wireless/scan.c +6 -2
@@ -3178,10 +3178,14 @@ int cfg80211_wext_siwscan(struct net_device *dev, wiphy = &rdev->wiphy;/* Determine number of channels, needed to allocate creq */ -if (wreq && wreq->num_channels) +if (wreq && wreq->num_channels) { +/* Passed from userspace so should be checked */ +if (unlikely (wreq->num_channels >IW_MAX_FREQUENCIES )) +return -EINVAL ; n_channels = wreq->num_channels; -else + }else { n_channels =ieee80211_get_num_supported_channels (wiphy); + } creq = kzalloc(sizeof(*creq) + sizeof(struct cfg80211_ssid) + n_channels * sizeof(void *),
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 53/129 ALSA: hda/realtek: Support Lenovo Thinkbook 16P Gen 5
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stefan Binding <[email protected]>
[ Upstream commit 75f2ea939b5c694b36aad8ef823a2f9bcf7b3d7d ]
Add support for this laptop, which uses CS35L41 HDA amps. The laptop does not contain valid _DSD for these amps, so requires entries into the CS35L41 configuration table to function correctly.
[ fixed to lower hex numbers in quirk entries -- tiwai ]
--- sound/pci/hda/patch_realtek.c | 2 ++ 1 file changed, 2 insertions(+)
sound/pci/hda/patch_realtek.c +2 -0
@@ -10288,6 +10288,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x17aa ,0x38cd ,"Y790 VECO DUAL" ,ALC287_FIXUP_TAS2781_I2C ),SND_PCI_QUIRK (0x17aa ,0x38d2 ,"Lenovo Yoga 9 14IMH9" ,ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN ),SND_PCI_QUIRK (0x17aa ,0x38d7 ,"Lenovo Yoga 9 14IMH9" ,ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN ), +SND_PCI_QUIRK (0x17aa ,0x38f9 ,"Thinkbook 16P Gen5" ,ALC287_FIXUP_CS35L41_I2C_2 ), +SND_PCI_QUIRK (0x17aa ,0x38fa ,"Thinkbook 16P Gen5" ,ALC287_FIXUP_CS35L41_I2C_2 ),SND_PCI_QUIRK (0x17aa ,0x3902 ,"Lenovo E50-80" ,ALC269_FIXUP_DMIC_THINKPAD_ACPI ),SND_PCI_QUIRK (0x17aa ,0x3977 ,"IdeaPad S210" ,ALC283_FIXUP_INT_MIC ), SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 54/129 KVM: PPC: Book3S HV: Prevent UAF in kvm_spapr_tce_attach_iommu_group()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Ellerman <[email protected]>
[ Upstream commit a986fa57fd81a1430e00b3c6cf8a325d6f894a63 ]
Al reported a possible use-after-free (UAF) in kvm_spapr_tce_attach_iommu_group().
It looks up stt from tablefd, but then continues to use it after doing fdput() on the returned fd. After the fdput() the tablefd is free to be closed by another thread. The close calls kvm_spapr_tce_release() and then release_spapr_tce_table() (via call_rcu()) which frees stt.
Although there are calls to rcu_read_lock() in kvm_spapr_tce_attach_iommu_group() they are not sufficient to prevent the UAF, because stt is used outside the locked regions.
With an artifcial delay after the fdput() and a userspace program which triggers the race, KASAN detects the UAF:
BUG: KASAN: slab-use-after-free in kvm_spapr_tce_attach_iommu_group+0x298/0x720 [kvm]
Read of size 4 at addr c000200027552c30 by task kvm-vfio/2505
CPU: 54 PID: 2505 Comm: kvm-vfio Not tainted 6.10.0-rc3-next-20240612-dirty #1
Hardware name: 8335-GTH POWER9 0x4e1202 opal:skiboot-v6.5.3-35-g1851b2a06 PowerNV
Call Trace:
dump_stack_lvl+0xb4/0x108 (unreliable)
print_report+0x2b4/0x6ec
kasan_report+0x118/0x2b0
__asan_load4+0xb8/0xd0
kvm_spapr_tce_attach_iommu_group+0x298/0x720 [kvm]
kvm_vfio_set_attr+0x524/0xac0 [kvm]
kvm_device_ioctl+0x144/0x240 [kvm]
sys_ioctl+0x62c/0x1810
system_call_exception+0x190/0x440
system_call_vectored_common+0x15c/0x2ec
...
Freed by task 0:
...
kfree+0xec/0x3e0
release_spapr_tce_table+0xd4/0x11c [kvm]
rcu_core+0x568/0x16a0
handle_softirqs+0x23c/0x920
do_softirq_own_stack+0x6c/0x90
do_softirq_own_stack+0x58/0x90
__irq_exit_rcu+0x218/0x2d0
irq_exit+0x30/0x80
arch_local_irq_restore+0x128/0x230
arch_local_irq_enable+0x1c/0x30
cpuidle_enter_state+0x134/0x5cc
cpuidle_enter+0x6c/0xb0
call_cpuidle+0x7c/0x100
do_idle+0x394/0x410
cpu_startup_entry+0x60/0x70
start_secondary+0x3fc/0x410
start_secondary_prolog+0x10/0x14Fix it by delaying the fdput() until stt is no longer in use, which is effectively the entire function. To keep the patch minimal add a call to fdput() at each of the existing return paths. Future work can convert the function to goto or __cleanup style cleanup.
With the fix in place the test case no longer triggers the UAF.
--- arch/powerpc/kvm/book3s_64_vio.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-)
arch/powerpc/kvm/book3s_64_vio.c +13 -5
@@ -129,14 +129,16 @@ extern long kvm_spapr_tce_attach_iommu_group(struct kvm *kvm, int tablefd, }rcu_read_unlock (); -fdput (f); - -if (!found) +if (!found) { +fdput (f);return -EINVAL ; + } table_group =iommu_group_get_iommudata (grp); -if (WARN_ON (!table_group)) +if (WARN_ON (!table_group)) { +fdput (f);return -EFAULT ; + }for (i =0 ; i <IOMMU_TABLE_GROUP_MAX_TABLES ; ++i) {struct iommu_table *tbltmp = table_group->tables[i];
@@ -157,8 +159,10 @@ extern long kvm_spapr_tce_attach_iommu_group(struct kvm *kvm, int tablefd,break ; } } -if (!tbl) +if (!tbl) { +fdput (f);return -EINVAL ; + }rcu_read_lock ();list_for_each_entry_rcu (stit, &stt->iommu_tables, next) {
@@ -169,6 +173,7 @@ extern long kvm_spapr_tce_attach_iommu_group(struct kvm *kvm, int tablefd,/* stit is being destroyed */ iommu_tce_table_put (tbl);rcu_read_unlock (); +fdput (f);return -ENOTTY ; }/*
@@ -176,6 +181,7 @@ extern long kvm_spapr_tce_attach_iommu_group(struct kvm *kvm, int tablefd,* its KVM reference counter and can return. */ rcu_read_unlock (); +fdput (f);return 0 ; }rcu_read_unlock ();
@@ -183,6 +189,7 @@ extern long kvm_spapr_tce_attach_iommu_group(struct kvm *kvm, int tablefd, stit =kzalloc (sizeof (*stit),GFP_KERNEL );if (!stit) {iommu_tce_table_put (tbl); +fdput (f);return -ENOMEM ; }
@@ -191,6 +198,7 @@ extern long kvm_spapr_tce_attach_iommu_group(struct kvm *kvm, int tablefd,list_add_rcu (&stit->next, &stt->iommu_tables); +fdput (f);return 0 ; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 55/129 drm/vmwgfx: Fix missing HYPERVISOR_GUEST dependency
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexey Makhalov <[email protected]>
[ Upstream commit 8c4d6945fe5bd04ff847c3c788abd34ca354ecee ]
VMWARE_HYPERCALL alternative will not work as intended without VMware guest code initialization.
[ bp: note that this doesn't reproduce with newer gccs so it must be
something gcc-9-specific. ]
--- drivers/gpu/drm/vmwgfx/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vmwgfx/Kconfig +1 -1
@@ -2,7 +2,7 @@ config DRM_VMWGFX tristate "DRM driver for VMware Virtual GPU" depends on DRM && PCI && MMU - depends on X86 || ARM64 + depends on (X86 && HYPERVISOR_GUEST) || ARM64 select DRM_TTM select DRM_TTM_HELPER select MAPPING_DIRTY_HELPERS
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 56/129 ALSA: hda/realtek: Add more codec ID to no shutup pins list
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kailang Yang <[email protected]>
[ Upstream commit 70794b9563fe011988bcf6a081af9777e63e8d37 ]
If it enter to runtime D3 state, it didn't shutup Headset MIC pin.
--- sound/pci/hda/patch_realtek.c | 4 ++++ 1 file changed, 4 insertions(+)
sound/pci/hda/patch_realtek.c +4 -0
@@ -585,10 +585,14 @@ static void alc_shutup_pins(struct hda_codec *codec)switch (codec->core.vendor_id) {case 0x10ec0236 :case 0x10ec0256 : +case 0x10ec0257 :case 0x19e58326 :case 0x10ec0283 : +case 0x10ec0285 :case 0x10ec0286 : +case 0x10ec0287 :case 0x10ec0288 : +case 0x10ec0295 :case 0x10ec0298 :alc_headset_mic_no_shutup (codec);break ;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 57/129 spi: Fix OCTAL mode support
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Patrice Chotard <[email protected]>
[ Upstream commit d6a711a898672dd873aab3844f754a3ca40723a5 ]
Add OCTAL mode support.
Issue detected using "--octal" spidev_test's option.
--- drivers/spi/spi.c | 6 ++++-- include/linux/spi/spi.h | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-)
drivers/spi/spi.c +4 -2
@@ -4000,7 +4000,8 @@ static int __spi_validate(struct spi_device *spi, struct spi_message *message)return -EINVAL ;if (xfer->tx_nbits !=SPI_NBITS_SINGLE && xfer->tx_nbits !=SPI_NBITS_DUAL && - xfer->tx_nbits !=SPI_NBITS_QUAD ) + xfer->tx_nbits !=SPI_NBITS_QUAD && + xfer->tx_nbits !=SPI_NBITS_OCTAL )return -EINVAL ;if ((xfer->tx_nbits ==SPI_NBITS_DUAL ) && !(spi->mode & (SPI_TX_DUAL |SPI_TX_QUAD )))
@@ -4015,7 +4016,8 @@ static int __spi_validate(struct spi_device *spi, struct spi_message *message)return -EINVAL ;if (xfer->rx_nbits !=SPI_NBITS_SINGLE && xfer->rx_nbits !=SPI_NBITS_DUAL && - xfer->rx_nbits !=SPI_NBITS_QUAD ) + xfer->rx_nbits !=SPI_NBITS_QUAD && + xfer->rx_nbits !=SPI_NBITS_OCTAL )return -EINVAL ;if ((xfer->rx_nbits ==SPI_NBITS_DUAL ) && !(spi->mode & (SPI_RX_DUAL |SPI_RX_QUAD )))
include/linux/spi/spi.h +3 -2
@@ -1049,12 +1049,13 @@ struct spi_transfer { unsigned dummy_data:1; unsigned cs_off:1; unsigned cs_change:1; - unsigned tx_nbits:3; - unsigned rx_nbits:3; + unsigned tx_nbits:4; + unsigned rx_nbits:4; unsigned timestamped:1;#define SPI_NBITS_SINGLE 0x01/* 1-bit transfer */ #define SPI_NBITS_DUAL 0x02/* 2-bit transfer */ #define SPI_NBITS_QUAD 0x04/* 4-bit transfer */ +#define SPI_NBITS_OCTAL 0x08/* 8-bit transfer */ u8 bits_per_word;struct spi_delay delay;struct spi_delay cs_change_delay;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 58/129 cpumask: limit FORCE_NR_CPUS to just the UP case
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Torvalds <[email protected]>
[ Upstream commit 5d272dd1b3430bb31fa30042490fa081512424e4 ]
Hardcoding the number of CPUs at compile time does improve code generation, but if you get it wrong the result will be confusion.
We already limited this earlier to only "experts" (see commit fe5759d5bfda "cpumask: limit visibility of FORCE_NR_CPUS"), but with distro kernel configs often having EXPERT enabled, that turns out to not be much of a limit.
To quote the philosophers at Disney: "Everyone can be an expert. And when everyone's an expert, no one will be".
There's a runtime warning if you then set nr_cpus to anything but the forced number, but apparently that can be ignored too [1] and by then it's pretty much too late anyway.
If we had some real way to limit this to "embedded only", maybe it would be worth it, but let's see if anybody even notices that the option is gone. We need to simplify kernel configuration anyway.
--- lib/Kconfig | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
lib/Kconfig +1 -7
@@ -539,13 +539,7 @@ config CPUMASK_OFFSTACK stack overflow. config FORCE_NR_CPUS - bool "Set number of CPUs at compile time" - depends on SMP && EXPERT && !COMPILE_TEST - help - Say Yes if you have NR_CPUS set to an actual number of possible - CPUs in your system, not to a default value. This forces the core - code to rely on compile-time value and optimize kernel routines - better. + def_bool !SMP config CPU_RMAP bool
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 59/129 selftests: openvswitch: Set value to nla flags.
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Adrian Moreno <[email protected]>
[ Upstream commit a8763466669d21b570b26160d0a5e0a2ee529d22 ]
Netlink flags, although they don't have payload at the netlink level, are represented as having "True" as value in pyroute2.
Without it, trying to add a flow with a flag-type action (e.g: pop_vlan) fails with the following traceback:
Traceback (most recent call last):
File "[...]/ovs-dpctl.py", line 2498, in <module>
sys.exit(main(sys.argv))
^^^^^^^^^^^^^^
File "[...]/ovs-dpctl.py", line 2487, in main
ovsflow.add_flow(rep["dpifindex"], flow)
File "[...]/ovs-dpctl.py", line 2136, in add_flow
reply = self.nlm_request(
^^^^^^^^^^^^^^^^^ File "[...]/pyroute2/netlink/nlsocket.py", line 822, in nlm_request
return tuple(self._genlm_request(*argv, **kwarg))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "[...]/pyroute2/netlink/generic/__init__.py", line 126, innlm_request
return tuple(super().nlm_request(*argv, **kwarg))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "[...]/pyroute2/netlink/nlsocket.py", line 1124, in nlm_request
self.put(msg, msg_type, msg_flags, msg_seq=msg_seq)
File "[...]/pyroute2/netlink/nlsocket.py", line 389, in put
self.sendto_gate(msg, addr)
File "[...]/pyroute2/netlink/nlsocket.py", line 1056, in sendto_gate
msg.encode()
File "[...]/pyroute2/netlink/__init__.py", line 1245, in encode
offset = self.encode_nlas(offset)
^^^^^^^^^^^^^^^^^^^^^^^^
File "[...]/pyroute2/netlink/__init__.py", line 1560, in encode_nlas
nla_instance.setvalue(cell[1])
File "[...]/pyroute2/netlink/__init__.py", line 1265, in setvalue
nlv.setvalue(nla_tuple[1])
~~~~~~~~~^^^IndexError: list index out of range
--- tools/testing/selftests/net/openvswitch/ovs-dpctl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/net/openvswitch/ovs-dpctl.py +1 -1
@@ -531,7 +531,7 @@ class ovsactions(nla): for flat_act in parse_flat_map: if parse_starts_block(actstr, flat_act[0], False): actstr = actstr[len(flat_act[0]):] - self["attrs"].append([flat_act[1]]) + self["attrs"].append([flat_act[1], True]) actstr = actstr[strspn(actstr, ", ") :] parsed = True
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 60/129 drm/amdgpu: Indicate CU havest info to CP
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Harish Kasiviswanathan <[email protected]>
[ Upstream commit 49c9ffabde555c841392858d8b9e6cf58998a50c ]
To achieve full occupancy CP hardware needs to know if CUs in SE are symmetrically or asymmetrically harvested
v2: Reset is_symmetric_cus for each loop
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +13 -2
@@ -4290,9 +4290,10 @@ static u32 gfx_v9_4_3_get_cu_active_bitmap(struct amdgpu_device *adev, int xcc_istatic int gfx_v9_4_3_get_cu_info (struct amdgpu_device *adev,struct amdgpu_cu_info *cu_info) { -int i, j, k, counter, xcc_id, active_cu_number =0 ; -u32 mask, bitmap, ao_bitmap, ao_cu_mask =0 ; +int i, j, k, prev_counter, counter, xcc_id, active_cu_number =0 ; +u32 mask, bitmap, ao_bitmap, ao_cu_mask =0 , tmp;unsigned disable_masks[4 *4 ]; +bool is_symmetric_cus;if (!adev || !cu_info)return -EINVAL ;
@@ -4310,6 +4311,7 @@ static int gfx_v9_4_3_get_cu_info(struct amdgpu_device *adev,mutex_lock (&adev->grbm_idx_mutex);for (xcc_id =0 ; xcc_id <NUM_XCC (adev->gfx.xcc_mask); xcc_id++) { + is_symmetric_cus = true;for (i =0 ; i < adev->gfx.config.max_shader_engines; i++) {for (j =0 ; j < adev->gfx.config.max_sh_per_se; j++) { mask =1 ;
@@ -4337,6 +4339,15 @@ static int gfx_v9_4_3_get_cu_info(struct amdgpu_device *adev, ao_cu_mask |= (ao_bitmap << (i *16 + j *8 )); cu_info->ao_cu_bitmap[i][j] = ao_bitmap; } +if (i && is_symmetric_cus && prev_counter != counter) + is_symmetric_cus = false; + prev_counter = counter; + } +if (is_symmetric_cus) { + tmp =RREG32_SOC15 (GC ,GET_INST (GC , xcc_id), regCP_CPC_DEBUG); + tmp =REG_SET_FIELD (tmp,CP_CPC_DEBUG ,CPC_HARVESTING_RELAUNCH_DISABLE ,1 ); + tmp =REG_SET_FIELD (tmp,CP_CPC_DEBUG ,CPC_HARVESTING_DISPATCH_DISABLE ,1 ); +WREG32_SOC15 (GC ,GET_INST (GC , xcc_id), regCP_CPC_DEBUG, tmp); }gfx_v9_4_3_xcc_select_se_sh (adev,0xffffffff ,0xffffffff ,0xffffffff , xcc_id);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 61/129 ALSA: hda: cs35l56: Select SERIAL_MULTI_INSTANTIATE
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Simon Trimmer <[email protected]>
[ Upstream commit 9b1effff19cdf2230d3ecb07ff4038a0da32e9cc ]
The ACPI IDs used in the CS35L56 HDA drivers are all handled by the serial multi-instantiate driver which starts multiple Linux device instances from a single ACPI Device() node.
As serial multi-instantiate is not an optional part of the system add it as a dependency in Kconfig so that it is not overlooked.
--- sound/pci/hda/Kconfig | 2 ++ 1 file changed, 2 insertions(+)
sound/pci/hda/Kconfig +2 -0
@@ -141,6 +141,7 @@ config SND_HDA_SCODEC_CS35L56_I2C depends on ACPI || COMPILE_TEST depends on SND_SOC select FW_CS_DSP + select SERIAL_MULTI_INSTANTIATE select SND_HDA_GENERIC select SND_SOC_CS35L56_SHARED select SND_HDA_SCODEC_CS35L56
@@ -155,6 +156,7 @@ config SND_HDA_SCODEC_CS35L56_SPI depends on ACPI || COMPILE_TEST depends on SND_SOC select FW_CS_DSP + select SERIAL_MULTI_INSTANTIATE select SND_HDA_GENERIC select SND_SOC_CS35L56_SHARED select SND_HDA_SCODEC_CS35L56
Signature · 1 line
2.43.0
RE: [PATCH 6.6 061/129] ALSA: hda: cs35l56: Select SERIAL_MULTI_INSTANTIATE
Quoted 11 lines
-----Original Message-----
From: Greg Kroah-Hartman <[email protected]>
Sent: Tuesday, July 23, 2024 7:23 PM
To: [email protected]
Cc: Greg Kroah-Hartman <[email protected]>; [email protected]; Simon Trimmer <[email protected]>; Takashi Iwai <[email protected]>; Sasha Levin <[email protected]>
Subject: [PATCH 6.6 061/129] ALSA: hda: cs35l56: SelectSERIAL_MULTI_INSTANTIATE6.6-stable review patch. If anyone has any objections, please let me
know.
Hi Greg,
(As remarked on 6.9-stable) Takashi made a corrective patch to this one as there were some build problems -
https://lore.kernel.org/all/[email protected]/
Thanks,
-Simon
Quoted 47 lines
------------------
From: Simon Trimmer <[email protected]>
[ Upstream commit
9b1effff19cdf2230d3ecb07ff4038a0da32e9cc]The ACPI IDs used in the CS35L56 HDA drivers are all handled by the serial multi-instantiate driver which starts multiple Linux device instances from a single ACPI
Device()node.As serial multi-instantiate is not an optional part of the system add it as a dependency in
Kconfigso that it is not overlooked.Signed-off-by Simon Trimmer <[email protected]>Signed-off-by Takashi Iwai <[email protected]>Signed-off-by Sasha Levin <[email protected]>--- sound/pci/hda/Kconfig | 2 ++ 1 file changed, 2 insertions(+)sound/pci/hda/Kconfig +2
-1@@ -141,6 +141,7 @@ config SND_HDA_SCODEC_CS35L56_I2C depends on ACPI || COMPILE_TEST depends on SND_SOC select FW_CS_DSP + select SERIAL_MULTI_INSTANTIATE select SND_HDA_GENERIC select SND_SOC_CS35L56_SHARED select SND_HDA_SCODEC_CS35L56@@ -155,6 +156,7 @@ config SND_HDA_SCODEC_CS35L56_SPI depends on ACPI || COMPILE_TEST depends on SND_SOC select FW_CS_DSP + select SERIAL_MULTI_INSTANTIATE select SND_HDA_GENERIC select SND_SOC_CS35L56_SHARED select SND_HDA_SCODEC_CS35L56 --2.43.0
'Greg Kroah-Hartman'
maintainerRe: [PATCH 6.6 061/129] ALSA: hda: cs35l56: Select SERIAL_MULTI_INSTANTIATE
Quoted 10 lines · Simon Trimmer
Quoted 10 lines
-----Original Message-----
From: Greg Kroah-Hartman <[email protected]>
Sent: Tuesday, July 23, 2024 7:23 PM
To: [email protected]
Cc: Greg Kroah-Hartman <[email protected]>; [email protected]; Simon Trimmer <[email protected]>; Takashi Iwai <[email protected]>; Sasha Levin <[email protected]>
Subject: [PATCH 6.6 061/129] ALSA: hda: cs35l56: SelectSERIAL_MULTI_INSTANTIATE
Quoted 7 lines
Quoted 1 line
6.6-stable review patch. If anyone has any objections, please let me
know.
Hi Greg,
(As remarked on 6.9-stable) Takashi made a corrective patch to this one as there were some build problems -
https://lore.kernel.org/all/[email protected]/
And that commit should be in here already.
thanks,
greg k-h
RE: [PATCH 6.6 061/129] ALSA: hda: cs35l56: Select SERIAL_MULTI_INSTANTIATE
Quoted 9 lines
-----Original Message-----
From: 'Greg Kroah-Hartman' <[email protected]>
Sent: Wednesday, July 24, 2024 2:48 PM
To: Simon Trimmer <[email protected]>
Cc: [email protected]; [email protected]; 'Takashi Iwai' <[email protected]>; 'Sasha Levin' <[email protected]>
Subject: Re: [PATCH 6.6 061/129] ALSA: hda: cs35l56: SelectSERIAL_MULTI_INSTANTIATE
Quoted 17 lines
Quoted 6 lines · Simon Trimmer
Quoted 6 lines
-----Original Message-----
From: Greg Kroah-Hartman <[email protected]>
Sent: Tuesday, July 23, 2024 7:23 PM
To: [email protected]
Cc: Greg Kroah-Hartman <[email protected]>; [email protected]; Simon TrimmerQuoted 9 lines
Quoted 5 lines
Takashi Iwai <[email protected]>; Sasha Levin <[email protected]>
Subject: [PATCH 6.6 061/129] ALSA: hda: cs35l56: SelectSERIAL_MULTI_INSTANTIATE6.6-stable review patch. If anyone has any objections, please let me
know.
Hi Greg,
(As remarked on 6.9-stable) Takashi made a corrective patch to this one
as
Quoted 8 lines
Quoted 2 lines
there were some build problems -
https://lore.kernel.org/all/[email protected]/And that commit should be in here already.
thanks,
greg k-h
Absolutely, just checking!
Cheers,
-Simon
Greg Kroah-Hartman
maintainerPATCH 62/129 mips: fix compat_sys_lseek syscall
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnd Bergmann <[email protected]>
[ Upstream commit 0d5679a0aae2d8cda72169452c32e5cb88a7ab33 ]
This is almost compatible, but passing a negative offset should result in a EINVAL error, but on mips o32 compat mode would seek to a large 32-bit byte offset.
Use compat_sys_lseek() to correctly sign-extend the argument.
--- arch/mips/kernel/syscalls/syscall_o32.tbl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/kernel/syscalls/syscall_o32.tbl +1 -1
@@ -27,7 +27,7 @@ 17 o32 break sys_ni_syscall # 18 was sys_stat 18 o32 unused18 sys_ni_syscall -19 o32 lseek sys_lseek +19 o32 lseek sys_lseek compat_sys_lseek 20 o32 getpid sys_getpid 21 o32 mount sys_mount 22 o32 umount sys_oldumount
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 63/129 Input: elantech - fix touchpad state on resume for Lenovo N24
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jonathan Denose <[email protected]>
[ Upstream commit a69ce592cbe0417664bc5a075205aa75c2ec1273 ]
The Lenovo N24 on resume becomes stuck in a state where it sends incorrect packets, causing elantech_packet_check_v4 to fail. The only way for the device to resume sending the correct packets is for it to be disabled and then re-enabled.
This change adds a dmi check to trigger this behavior on resume.
--- drivers/input/mouse/elantech.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+)
drivers/input/mouse/elantech.c +31 -0
@@ -1476,16 +1476,47 @@ static void elantech_disconnect(struct psmouse *psmouse) psmouse->private =NULL ; } +/* +* Some hw_version 4 models fail to properly activate absolute mode on +* resume without going through disable/enable cycle. +*/ +static const struct dmi_system_id elantech_needs_reenable[] = { +#if defined(CONFIG_DMI) && defined(CONFIG_X86) + { +/* Lenovo N24 */ + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"LENOVO" ), +DMI_MATCH (DMI_PRODUCT_NAME ,"81AF" ), + }, + }, +#endif + { } +}; +/* * Put the touchpad back into absolute mode when reconnecting */ static int elantech_reconnect (struct psmouse *psmouse) { +int err; +psmouse_reset (psmouse);if (elantech_detect (psmouse,0 ))return -1 ; +if (dmi_check_system (elantech_needs_reenable)) { + err =ps2_command (&psmouse->ps2dev,NULL ,PSMOUSE_CMD_DISABLE ); +if (err) +psmouse_warn (psmouse,"failed to deactivate mouse on %s: %d\n" , + psmouse->ps2dev.serio->phys, err); + + err =ps2_command (&psmouse->ps2dev,NULL ,PSMOUSE_CMD_ENABLE ); +if (err) +psmouse_warn (psmouse,"failed to reactivate mouse on %s: %d\n" , + psmouse->ps2dev.serio->phys, err); + } +if (elantech_set_absolute_mode (psmouse)) {psmouse_err (psmouse,"failed to put touchpad back into absolute mode.\n" );
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 64/129 Input: i8042 - add Ayaneo Kun to i8042 quirk table
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tobias Jakobi <[email protected]>
[ Upstream commit 955af6355ddfe35140f9706a635838212a32513b ]
See the added comment for details. Also fix a typo in the quirk's define.
--- drivers/input/serio/i8042-acpipnpio.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-)
drivers/input/serio/i8042-acpipnpio.h +16 -2
@@ -76,7 +76,7 @@ static inline void i8042_write_command(int val)#define SERIO_QUIRK_PROBE_DEFER BIT(5)#define SERIO_QUIRK_RESET_ALWAYS BIT(6)#define SERIO_QUIRK_RESET_NEVER BIT(7) -#define SERIO_QUIRK_DIECT BIT(8) +#define SERIO_QUIRK_DIRECT BIT(8)#define SERIO_QUIRK_DUMBKBD BIT(9)#define SERIO_QUIRK_NOLOOP BIT(10)#define SERIO_QUIRK_NOTIMEOUT BIT(11)
@@ -1332,6 +1332,20 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = { .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) }, + { + /* + * The Ayaneo Kun is a handheld device where some the buttons + * are handled by an AT keyboard. The keyboard is usually + * detected as raw, but sometimes, usually after a cold boot, + * it is detected as translated. Make sure that the keyboard + * is always in raw mode. + */ + .matches = { + DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AYANEO"), + DMI_MATCH(DMI_BOARD_NAME, "KUN"), + }, + .driver_data = (void *)(SERIO_QUIRK_DIRECT) + }, { } };
@@ -1655,7 +1669,7 @@ static void __init i8042_check_quirks(void)if (quirks &SERIO_QUIRK_RESET_NEVER ) i8042_reset =I8042_RESET_NEVER ; } -if (quirks &SERIO_QUIRK_DIECT ) +if (quirks &SERIO_QUIRK_DIRECT ) i8042_direct = true;if (quirks &SERIO_QUIRK_DUMBKBD ) i8042_dumbkbd = true;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 65/129 ASoC: rt722-sdca-sdw: add silence detection register as volatile
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jack Yu <[email protected]>
[ Upstream commit 968c974c08106fcf911d8d390d0f049af855d348 ]
Including silence detection register as volatile.
--- sound/soc/codecs/rt722-sdca-sdw.c | 2 ++ 1 file changed, 2 insertions(+)
sound/soc/codecs/rt722-sdca-sdw.c +2 -0
@@ -68,6 +68,7 @@ static bool rt722_sdca_mbq_readable_register(struct device *dev, unsigned int recase 0x200007f : case 0x2000082 ... 0x200008e: case 0x2000090 ... 0x2000094: +case 0x3110000 : case 0x5300000 ... 0x5300002:case 0x5400002 : case 0x5600000 ... 0x5600007:
@@ -125,6 +126,7 @@ static bool rt722_sdca_mbq_volatile_register(struct device *dev, unsigned int recase 0x2000067 :case 0x2000084 :case 0x2000086 : +case 0x3110000 :return true;default :return false;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 66/129 Input: xpad - add support for ASUS ROG RAIKIRI PRO
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luke D. Jones <[email protected]>
[ Upstream commit cee77149ebe9cd971ba238d87aa10e09bd98f1c9 ]
Add the VID/PID for ASUS ROG RAIKIRI PRO to the list of known devices.
--- drivers/input/joystick/xpad.c | 1 + 1 file changed, 1 insertion(+)
drivers/input/joystick/xpad.c +1 -0
@@ -208,6 +208,7 @@ static const struct xpad_device { { 0x0738, 0xf738, "Super SFIV FightStick TE S", 0, XTYPE_XBOX360 }, { 0x07ff, 0xffff, "Mad Catz GamePad", 0, XTYPE_XBOX360 }, { 0x0b05, 0x1a38, "ASUS ROG RAIKIRI", 0, XTYPE_XBOXONE }, + { 0x0b05, 0x1abb, "ASUS ROG RAIKIRI PRO", 0, XTYPE_XBOXONE }, { 0x0c12, 0x0005, "Intec wireless", 0, XTYPE_XBOX }, { 0x0c12, 0x8801, "Nyko Xbox Controller", 0, XTYPE_XBOX }, { 0x0c12, 0x8802, "Zeroplus Xbox Controller", 0, XTYPE_XBOX },
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 67/129 ASoC: topology: Fix references to freed memory
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Amadeusz Sławiński <[email protected]>
[ Upstream commit 97ab304ecd95c0b1703ff8c8c3956dc6e2afe8e1 ]
Most users after parsing a topology file, release memory used by it, so having pointer references directly into topology file contents is wrong. Use devm_kmemdup(), to allocate memory as needed.
--- sound/soc/soc-topology.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-)
sound/soc/soc-topology.c +22 -5
@@ -1060,15 +1060,32 @@ static int soc_tplg_dapm_graph_elems_load(struct soc_tplg *tplg,break ; } - route->source = elem->source; - route->sink = elem->sink; + route->source =devm_kmemdup (tplg->dev, elem->source, +min (strlen (elem->source), +SNDRV_CTL_ELEM_ID_NAME_MAXLEN ), +GFP_KERNEL ); + route->sink =devm_kmemdup (tplg->dev, elem->sink, +min (strlen (elem->sink),SNDRV_CTL_ELEM_ID_NAME_MAXLEN ), +GFP_KERNEL ); +if (!route->source || !route->sink) { + ret = -ENOMEM ; +break ; + }/* set to NULL atm for tplg users */ route->connected =NULL ; -if (strnlen (elem->control,SNDRV_CTL_ELEM_ID_NAME_MAXLEN ) ==0 ) +if (strnlen (elem->control,SNDRV_CTL_ELEM_ID_NAME_MAXLEN ) ==0 ) { route->control =NULL ; -else - route->control = elem->control; + }else { + route->control =devm_kmemdup (tplg->dev, elem->control, +min (strlen (elem->control), +SNDRV_CTL_ELEM_ID_NAME_MAXLEN ), +GFP_KERNEL ); +if (!route->control) { + ret = -ENOMEM ; +break ; + } + }/* add route dobj to dobj_list */ route->dobj.type =SND_SOC_DOBJ_GRAPH ;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 68/129 ASoC: topology: Do not assign fields that are already set
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Amadeusz Sławiński <[email protected]>
[ Upstream commit daf0b99d4720c9f05bdb81c73b2efdb43fa9def3 ]
The routes are allocated with kzalloc(), so all fields are zeroed by default, skip unnecessary assignments.
--- sound/soc/soc-topology.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
sound/soc/soc-topology.c +1 -5
@@ -1072,11 +1072,7 @@ static int soc_tplg_dapm_graph_elems_load(struct soc_tplg *tplg,break ; } -/* set to NULL atm for tplg users */ - route->connected =NULL ; -if (strnlen (elem->control,SNDRV_CTL_ELEM_ID_NAME_MAXLEN ) ==0 ) { - route->control =NULL ; - }else { +if (strnlen (elem->control,SNDRV_CTL_ELEM_ID_NAME_MAXLEN ) !=0 ) { route->control = devm_kmemdup(tplg->dev, elem->control, min(strlen(elem->control), SNDRV_CTL_ELEM_ID_NAME_MAXLEN),
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 69/129 bytcr_rt5640 : inverse jack detect for Archos 101 cesium
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas GENTY <[email protected]>
[ Upstream commit e3209a1827646daaab744aa6a5767b1f57fb5385 ]
When headphones are plugged in, they appear absent; when they are removed, they appear present.
Add a specific entry in bytcr_rt5640 for this device
--- sound/soc/intel/boards/bytcr_rt5640.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
sound/soc/intel/boards/bytcr_rt5640.c +11 -0
@@ -610,6 +610,17 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {BYT_RT5640_SSP0_AIF1 | BYT_RT5640_MCLK_EN), }, + { + .matches = { +DMI_EXACT_MATCH (DMI_SYS_VENDOR ,"ARCHOS" ), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "ARCHOS 101 CESIUM"), + }, + .driver_data = (void *)(BYTCR_INPUT_DEFAULTS | +BYT_RT5640_JD_NOT_INV | +BYT_RT5640_DIFF_MIC | +BYT_RT5640_SSP0_AIF1 | + BYT_RT5640_MCLK_EN), + }, { .matches = { DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ARCHOS"),
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 70/129 ALSA: dmaengine: Synchronize dma channel after drop()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jai Luthra <[email protected]>
[ Upstream commit e8343410ddf08fc36a9b9cc7c51a4e53a262d4c6 ]
Sometimes the stream may be stopped due to XRUN events, in which case the userspace can call snd_pcm_drop() and snd_pcm_prepare() to stop and start the stream again.
In these cases, we must wait for the DMA channel to synchronize before marking the stream as prepared for playback, as the DMA channel gets stopped by drop() without any synchronization. Make sure the ALSA core synchronizes the DMA channel by adding a sync_stop() hook.
--- include/sound/dmaengine_pcm.h | 1 + sound/core/pcm_dmaengine.c | 10 ++++++++++ sound/soc/soc-generic-dmaengine-pcm.c | 8 ++++++++ 3 files changed, 19 insertions(+)
include/sound/dmaengine_pcm.h +1 -0
@@ -36,6 +36,7 @@ snd_pcm_uframes_t snd_dmaengine_pcm_pointer_no_residue(struct snd_pcm_substreamint snd_dmaengine_pcm_open (struct snd_pcm_substream *substream,struct dma_chan *chan);int snd_dmaengine_pcm_close (struct snd_pcm_substream *substream); +int snd_dmaengine_pcm_sync_stop (struct snd_pcm_substream *substream);int snd_dmaengine_pcm_open_request_chan (struct snd_pcm_substream *substream,dma_filter_fn filter_fn,void *filter_data);
sound/core/pcm_dmaengine.c +10 -0
@@ -349,6 +349,16 @@ int snd_dmaengine_pcm_open_request_chan(struct snd_pcm_substream *substream, }EXPORT_SYMBOL_GPL (snd_dmaengine_pcm_open_request_chan); +int snd_dmaengine_pcm_sync_stop (struct snd_pcm_substream *substream) +{ +struct dmaengine_pcm_runtime_data *prtd =substream_to_prtd (substream); + +dmaengine_synchronize (prtd->dma_chan); + +return 0 ; +} +EXPORT_SYMBOL_GPL (snd_dmaengine_pcm_sync_stop); +/** * snd_dmaengine_pcm_close - Close a dmaengine based PCM substream * @substream: PCM substream
sound/soc/soc-generic-dmaengine-pcm.c +8 -0
@@ -318,6 +318,12 @@ static int dmaengine_copy(struct snd_soc_component *component,return 0 ; } +static int dmaengine_pcm_sync_stop (struct snd_soc_component *component, +struct snd_pcm_substream *substream) +{ +return snd_dmaengine_pcm_sync_stop (substream); +} +static const struct snd_soc_component_driver dmaengine_pcm_component = { .name =SND_DMAENGINE_PCM_DRV_NAME , .probe_order =SND_SOC_COMP_ORDER_LATE ,
@@ -327,6 +333,7 @@ static const struct snd_soc_component_driver dmaengine_pcm_component = { .trigger = dmaengine_pcm_trigger, .pointer = dmaengine_pcm_pointer, .pcm_construct = dmaengine_pcm_new, + .sync_stop = dmaengine_pcm_sync_stop, };static const struct snd_soc_component_driver dmaengine_pcm_component_process = {
@@ -339,6 +346,7 @@ static const struct snd_soc_component_driver dmaengine_pcm_component_process = { .pointer = dmaengine_pcm_pointer, .copy = dmaengine_copy, .pcm_construct = dmaengine_pcm_new, + .sync_stop = dmaengine_pcm_sync_stop, };static const char *const dmaengine_pcm_dma_channel_names[] = {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 71/129 ASoC: ti: davinci-mcasp: Set min period size using FIFO config
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jai Luthra <[email protected]>
[ Upstream commit c5dcf8ab10606e76c1d8a0ec77f27d84a392e874 ]
The minimum period size was enforced to 64 as older devices integrating McASP with EDMA used an internal FIFO of 64 samples.
With UDMA based platforms this internal McASP FIFO is optional, as the DMA engine internally does some buffering which is already accounted for when registering the platform. So we should read the actual FIFO configuration (txnumevt/rxnumevt) instead of hardcoding frames.min to 64.
--- sound/soc/ti/davinci-mcasp.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
sound/soc/ti/davinci-mcasp.c +7 -2
@@ -1474,10 +1474,11 @@ static int davinci_mcasp_hw_rule_min_periodsize( {struct snd_interval *period_size =hw_param_interval (params,SNDRV_PCM_HW_PARAM_PERIOD_SIZE ); +u8 numevt = *((u8 *)rule->private);struct snd_interval frames;snd_interval_any (&frames); - frames.min =64 ; + frames.min = numevt; frames.integer =1 ;return snd_interval_refine (period_size, &frames);
@@ -1492,6 +1493,7 @@ static int davinci_mcasp_startup(struct snd_pcm_substream *substream,u32 max_channels =0 ;int i, dir, ret;int tdm_slots = mcasp->tdm_slots; +u8 *numevt;/* Do not allow more then one stream per direction */ if (mcasp->substreams[substream->stream])
@@ -1591,9 +1593,12 @@ static int davinci_mcasp_startup(struct snd_pcm_substream *substream,return ret; } + numevt = (substream->stream ==SNDRV_PCM_STREAM_PLAYBACK ) ? + &mcasp->txnumevt : + &mcasp->rxnumevt;snd_pcm_hw_rule_add (substream->runtime,0 ,SNDRV_PCM_HW_PARAM_PERIOD_SIZE , - davinci_mcasp_hw_rule_min_periodsize,NULL , + davinci_mcasp_hw_rule_min_periodsize, numevt,SNDRV_PCM_HW_PARAM_PERIOD_SIZE ,-1 );return 0 ;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 72/129 ASoC: ti: omap-hdmi: Fix too long driver name
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Primoz Fiser <[email protected]>
[ Upstream commit 524d3f126362b6033e92cbe107ae2158d7fbff94 ]
Set driver name to "HDMI". This simplifies the code and gets rid of the following error messages:
ASoC: driver name too long 'HDMI 58040000.encoder' -> 'HDMI_58040000_e'
--- sound/soc/ti/omap-hdmi.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
sound/soc/ti/omap-hdmi.c +1 -5
@@ -354,11 +354,7 @@ static int omap_hdmi_audio_probe(struct platform_device *pdev)if (!card)return -ENOMEM ; - card->name =devm_kasprintf (dev,GFP_KERNEL , -"HDMI %s" ,dev_name (ad->dssdev)); -if (!card->name) -return -ENOMEM ; - + card->name ="HDMI" ; card->owner =THIS_MODULE ; card->dai_link =devm_kzalloc (dev,sizeof (*(card->dai_link)),GFP_KERNEL );
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 73/129 ASoC: SOF: sof-audio: Skip unprepare for in-use widgets on error rollback
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Ujfalusi <[email protected]>
[ Upstream commit 6f2a43e3d14f6e31a3b041a1043195d02c54d615 ]
If the ipc_prepare() callback fails for a module instance, on error rewind we must skip the ipc_unprepare() call for ones that has positive use count.
The positive use count means that the module instance is in active use, it cannot be unprepared.
The issue affects capture direction paths with branches (single dai with multiple PCMs), the affected widgets are in the shared part of the paths.
--- sound/soc/sof/sof-audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/sof/sof-audio.c +1 -1
@@ -488,7 +488,7 @@ sof_prepare_widgets_in_path(struct snd_sof_dev *sdev, struct snd_soc_dapm_widgetif (ret <0 ) {/* unprepare the source widget */ if (widget_ops[widget->id].ipc_unprepare && - swidget && swidget->prepared) { + swidget && swidget->prepared && swidget->use_count ==0 ) { widget_ops[widget->id].ipc_unprepare (swidget); swidget->prepared = false; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 74/129 ASoC: rt722-sdca-sdw: add debounce time for type detection
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jack Yu <[email protected]>
[ Upstream commit f3b198e4788fcc8d03ed0c8bd5e3856c6a5760c5 ]
Add debounce time in headset type detection for better performance.
--- sound/soc/codecs/rt722-sdca-sdw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/rt722-sdca-sdw.c +1 -1
@@ -349,7 +349,7 @@ static int rt722_sdca_interrupt_callback(struct sdw_slave *slave,if (status->sdca_cascade && !rt722->disable_irq)mod_delayed_work (system_power_efficient_wq, - &rt722->jack_detect_work,msecs_to_jiffies (30 )); + &rt722->jack_detect_work,msecs_to_jiffies (280 ));mutex_unlock (&rt722->disable_irq_lock);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 75/129 nvme: fix NVME_NS_DEAC may incorrectly identifying the disk as EXT_LBA.
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Boyang Yu <[email protected]>
[ Upstream commit 9570a48847e3acfa1a741cef431c923325ddc637 ]
The value of NVME_NS_DEAC is 3,
which means NVME_NS_METADATA_SUPPORTED | NVME_NS_EXT_LBAS. Provide a unique value for this feature flag.
Fixes 1b96f862eccc ("nvme: implement the DEAC bit for the Write Zeroes command")
--- drivers/nvme/host/nvme.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/nvme.h +1 -1
@@ -485,7 +485,7 @@ static inline bool nvme_ns_head_multipath(struct nvme_ns_head *head)enum nvme_ns_features {NVME_NS_EXT_LBAS =1 <<0 ,/* support extended LBA format */ NVME_NS_METADATA_SUPPORTED =1 <<1 ,/* support getting generated md */ -NVME_NS_DEAC ,/* DEAC bit in Write Zeores supported */ +NVME_NS_DEAC =1 <<2 ,/* DEAC bit in Write Zeores supported */ };struct nvme_ns {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 76/129 Input: ads7846 - use spi_device_id table
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Stein <[email protected]>
[ Upstream commit 7c7b1be19b228b450c2945ec379d7fc6bfef9852 ]
As the driver supports more devices over time the single MODULE_ALIAS is complete and raises several warnings:
SPI driver ads7846 has no spi_device_id for ti,tsc2046
SPI driver ads7846 has no spi_device_id for ti,ads7843
SPI driver ads7846 has no spi_device_id for ti,ads7845
SPI driver ads7846 has no spi_device_id for ti,ads7873
Fix this by adding a spi_device_id table and removing the manual MODULE_ALIAS.
--- drivers/input/touchscreen/ads7846.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
drivers/input/touchscreen/ads7846.c +11 -1
@@ -1114,6 +1114,16 @@ static const struct of_device_id ads7846_dt_ids[] = { };MODULE_DEVICE_TABLE (of, ads7846_dt_ids); +static const struct spi_device_id ads7846_spi_ids[] = { + {"tsc2046" ,7846 }, + {"ads7843" ,7843 }, + {"ads7845" ,7845 }, + {"ads7846" ,7846 }, + {"ads7873" ,7873 }, + { }, +}; +MODULE_DEVICE_TABLE (spi, ads7846_spi_ids); +static const struct ads7846_platform_data *ads7846_get_props (struct device *dev) {struct ads7846_platform_data *pdata;
@@ -1392,10 +1402,10 @@ static struct spi_driver ads7846_driver = { }, .probe = ads7846_probe, .remove = ads7846_remove, + .id_table = ads7846_spi_ids, };module_spi_driver (ads7846_driver);MODULE_DESCRIPTION ("ADS7846 TouchScreen Driver" );MODULE_LICENSE ("GPL" ); -MODULE_ALIAS ("spi:ads7846" );
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 77/129 can: kvaser_usb: fix return value for hif_usb_send_regout
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen Ni <[email protected]>
[ Upstream commit 0d34d8163fd87978a6abd792e2d8ad849f4c3d57 ]
As the potential failure of usb_submit_urb(), it should be better to return the err variable to catch the error.
--- drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c +1 -1
@@ -292,7 +292,7 @@ int kvaser_usb_send_cmd_async(struct kvaser_usb_net_priv *priv, void *cmd, }usb_free_urb (urb); -return 0 ; +return err; }int kvaser_usb_can_rx_over_error (struct net_device *netdev)
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 78/129 gpio: pca953x: fix pca953x_irq_bus_sync_unlock race
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Ray <[email protected]>
[ Upstream commit bfc6444b57dc7186b6acc964705d7516cbaf3904 ]
Ensure that `i2c_lock' is held when setting interrupt latch and mask in pca953x_irq_bus_sync_unlock() in order to avoid races.
The other (non-probe) call site pca953x_gpio_set_multiple() ensures the lock is held before calling pca953x_write_regs().
The problem occurred when a request raced against irq_bus_sync_unlock() approximately once per thousand reboots on an i.MX8MP based system.
* Normal case
0-0022: write register AI|3a {03,02,00,00,01} Input latch P0
0-0022: write register AI|49 {fc,fd,ff,ff,fe} Interrupt mask P0
0-0022: write register AI|08 {ff,00,00,00,00} Output P3
0-0022: write register AI|12 {fc,00,00,00,00} Config P3* Race case
0-0022: write register AI|08 {ff,00,00,00,00} Output P3
0-0022: write register AI|08 {03,02,00,00,01} *** Wrong register ***
0-0022: write register AI|12 {fc,00,00,00,00} Config P3
0-0022: write register AI|49 {fc,fd,ff,ff,fe} Interrupt mask P0--- drivers/gpio/gpio-pca953x.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpio/gpio-pca953x.c +2 -0
@@ -766,6 +766,8 @@ static void pca953x_irq_bus_sync_unlock(struct irq_data *d)int level;if (chip->driver_data &PCA_PCAL ) { +guard (mutex)(&chip->i2c_lock); +/* Enable latch on interrupt-enabled inputs */ pca953x_write_regs (chip,PCAL953X_IN_LATCH , chip->irq_mask);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 79/129 octeontx2-pf: Fix coverity and klockwork issues in octeon PF driver
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ratheesh Kannoth <[email protected]>
[ Upstream commit 02ea312055da84e08e3e5bce2539c1ff11c8b5f2 ]
Fix unintended sign extension and klockwork issues. These are not real issue but for sanity checks.
--- .../marvell/octeontx2/nic/otx2_common.c | 10 ++-- .../ethernet/marvell/octeontx2/nic/otx2_reg.h | 55 ++++++++++--------- .../marvell/octeontx2/nic/otx2_txrx.c | 2 +- .../net/ethernet/marvell/octeontx2/nic/qos.c | 3 +- 4 files changed, 35 insertions(+), 35 deletions(-)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c +5 -5
@@ -648,14 +648,14 @@ int otx2_txschq_config(struct otx2_nic *pfvf, int lvl, int prio, bool txschq_for }else if (lvl ==NIX_TXSCH_LVL_TL4 ) { parent = schq_list[NIX_TXSCH_LVL_TL3 ][prio]; req->reg[0 ] =NIX_AF_TL4X_PARENT (schq); - req->regval[0 ] = parent <<16 ; + req->regval[0 ] = (u64 )parent <<16 ; req->num_regs++; req->reg[1 ] =NIX_AF_TL4X_SCHEDULE (schq); req->regval[1 ] = dwrr_val; }else if (lvl ==NIX_TXSCH_LVL_TL3 ) { parent = schq_list[NIX_TXSCH_LVL_TL2 ][prio]; req->reg[0 ] =NIX_AF_TL3X_PARENT (schq); - req->regval[0 ] = parent <<16 ; + req->regval[0 ] = (u64 )parent <<16 ; req->num_regs++; req->reg[1 ] =NIX_AF_TL3X_SCHEDULE (schq); req->regval[1 ] = dwrr_val;
@@ -670,11 +670,11 @@ int otx2_txschq_config(struct otx2_nic *pfvf, int lvl, int prio, bool txschq_for }else if (lvl ==NIX_TXSCH_LVL_TL2 ) { parent = schq_list[NIX_TXSCH_LVL_TL1 ][prio]; req->reg[0 ] =NIX_AF_TL2X_PARENT (schq); - req->regval[0 ] = parent <<16 ; + req->regval[0 ] = (u64 )parent <<16 ; req->num_regs++; req->reg[1 ] =NIX_AF_TL2X_SCHEDULE (schq); - req->regval[1 ] =TXSCH_TL1_DFLT_RR_PRIO <<24 | dwrr_val; + req->regval[1 ] = (u64 )hw->txschq_aggr_lvl_rr_prio <<24 | dwrr_val;if (lvl == hw->txschq_link_cfg_lvl) { req->num_regs++;
@@ -698,7 +698,7 @@ int otx2_txschq_config(struct otx2_nic *pfvf, int lvl, int prio, bool txschq_for req->num_regs++; req->reg[1 ] =NIX_AF_TL1X_TOPOLOGY (schq); - req->regval[1 ] = (TXSCH_TL1_DFLT_RR_PRIO <<1 ); + req->regval[1 ] = hw->txschq_aggr_lvl_rr_prio <<1 ; req->num_regs++; req->reg[2 ] =NIX_AF_TL1X_CIR (schq);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_reg.h +28 -27
61 lines not on this page · raw message
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c +1 -1
@@ -510,7 +510,7 @@ static int otx2_tx_napi_handler(struct otx2_nic *pfvf,static void otx2_adjust_adaptive_coalese (struct otx2_nic *pfvf,struct otx2_cq_poll *cq_poll) { -struct dim_sample dim_sample; +struct dim_sample dim_sample = {0 };u64 rx_frames, rx_bytes;u64 tx_frames, tx_bytes;
drivers/net/ethernet/marvell/octeontx2/nic/qos.c +1 -2
@@ -153,7 +153,6 @@ static void __otx2_qos_txschq_cfg(struct otx2_nic *pfvf, num_regs++;otx2_config_sched_shaping (pfvf, node, cfg, &num_regs); - }else if (level ==NIX_TXSCH_LVL_TL4 ) {otx2_config_sched_shaping (pfvf, node, cfg, &num_regs); }else if (level ==NIX_TXSCH_LVL_TL3 ) {
@@ -176,7 +175,7 @@ static void __otx2_qos_txschq_cfg(struct otx2_nic *pfvf,/* check if node is root */ if (node->qid ==OTX2_QOS_QID_INNER && !node->parent) { cfg->reg[num_regs] =NIX_AF_TL2X_SCHEDULE (node->schq); - cfg->regval[num_regs] =TXSCH_TL1_DFLT_RR_PRIO <<24 | + cfg->regval[num_regs] = (u64 )hw->txschq_aggr_lvl_rr_prio <<24 |mtu_to_dwrr_weight (pfvf, pfvf->tx_max_pktlen); num_regs++;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 80/129 s390/sclp: Fix sclp_init() cleanup on failure
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Carstens <[email protected]>
[ Upstream commit 6434b33faaa063df500af355ee6c3942e0f8d982 ]
If sclp_init() fails it only partially cleans up: if there are multiple failing calls to sclp_init() sclp_state_change_event will be added several times to sclp_reg_list, which results in the following warning:
------------[ cut here ]------------
list_add double add: new=000003ffe1598c10, prev=000003ffe1598bf0, next=000003ffe1598c10.
WARNING: CPU: 0 PID: 1 at lib/list_debug.c:35 __list_add_valid_or_report+0xde/0xf8
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.10.0-rc3
Krnl PSW : 0404c00180000000 000003ffe0d6076a (__list_add_valid_or_report+0xe2/0xf8)
R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:3 CC:0 PM:0 RI:0 EA:3
...
Call Trace:
[<000003ffe0d6076a>] __list_add_valid_or_report+0xe2/0xf8
([<000003ffe0d60766>] __list_add_valid_or_report+0xde/0xf8)
[<000003ffe0a8d37e>] sclp_init+0x40e/0x450
[<000003ffe00009f2>] do_one_initcall+0x42/0x1e0
[<000003ffe15b77a6>] do_initcalls+0x126/0x150
[<000003ffe15b7a0a>] kernel_init_freeable+0x1ba/0x1f8
[<000003ffe0d6650e>] kernel_init+0x2e/0x180
[<000003ffe000301c>] __ret_from_fork+0x3c/0x60
[<000003ffe0d759ca>] ret_from_fork+0xa/0x30Fix this by removing sclp_state_change_event from sclp_reg_list when sclp_init() fails.
--- drivers/s390/char/sclp.c | 1 + 1 file changed, 1 insertion(+)
drivers/s390/char/sclp.c +1 -0
@@ -1293,6 +1293,7 @@ sclp_init(void) fail_unregister_reboot_notifier:unregister_reboot_notifier (&sclp_reboot_notifier); fail_init_state_uninitialized: +list_del (&sclp_state_change_event.list); sclp_init_state = sclp_init_state_uninitialized;free_page ((unsigned long ) sclp_read_sccb);free_page ((unsigned long ) sclp_init_sccb);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 81/129 platform/mellanox: nvsw-sn2201: Add check for platform_device_add_resources
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen Ni <[email protected]>
[ Upstream commit d56fbfbaf592a115b2e11c1044829afba34069d2 ]
Add check for the return value of platform_device_add_resources() and return the error if it fails in order to catch the error.
--- drivers/platform/mellanox/nvsw-sn2201.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/platform/mellanox/nvsw-sn2201.c +4 -1
@@ -1198,6 +1198,7 @@ static int nvsw_sn2201_config_pre_init(struct nvsw_sn2201 *nvsw_sn2201)static int nvsw_sn2201_probe (struct platform_device *pdev) {struct nvsw_sn2201 *nvsw_sn2201; +int ret; nvsw_sn2201 =devm_kzalloc (&pdev->dev,sizeof (*nvsw_sn2201),GFP_KERNEL );if (!nvsw_sn2201)
@@ -1205,8 +1206,10 @@ static int nvsw_sn2201_probe(struct platform_device *pdev) nvsw_sn2201->dev = &pdev->dev;platform_set_drvdata (pdev, nvsw_sn2201); -platform_device_add_resources (pdev, nvsw_sn2201_lpc_io_resources, + ret =platform_device_add_resources (pdev, nvsw_sn2201_lpc_io_resources,ARRAY_SIZE (nvsw_sn2201_lpc_io_resources)); +if (ret) +return ret; nvsw_sn2201->main_mux_deferred_nr =NVSW_SN2201_MAIN_MUX_DEFER_NR ; nvsw_sn2201->main_mux_devs = nvsw_sn2201_main_mux_brdinfo;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 82/129 platform/x86: wireless-hotkey: Add support for LG Airplane Button
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Armin Wolf <[email protected]>
[ Upstream commit 151e78a0b89ee6dec93382dbdf5b1ef83f9c4716 ]
The LGEX0815 ACPI device is used by the "LG Airplane Mode Button" Windows driver for handling rfkill requests. When the ACPI device receives an 0x80 ACPI notification, an rfkill event is to be send to userspace.
Add support for the LGEX0815 ACPI device to the driver.
--- drivers/platform/x86/wireless-hotkey.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/platform/x86/wireless-hotkey.c +2 -0
@@ -19,6 +19,7 @@ MODULE_AUTHOR("Alex Hung");MODULE_ALIAS ("acpi*:HPQ6001:*" );MODULE_ALIAS ("acpi*:WSTADEF:*" );MODULE_ALIAS ("acpi*:AMDI0051:*" ); +MODULE_ALIAS ("acpi*:LGEX0815:*" );struct wl_button {struct input_dev *input_dev;
@@ -29,6 +30,7 @@ static const struct acpi_device_id wl_ids[] = { {"HPQ6001", 0}, {"WSTADEF", 0}, {"AMDI0051", 0}, + {"LGEX0815", 0}, {"", 0}, };
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 83/129 platform/x86: lg-laptop: Remove LGEX0815 hotkey handling
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Armin Wolf <[email protected]>
[ Upstream commit 413c204595ca98a4f33414a948c18d7314087342 ]
The rfkill hotkey handling is already provided by the wireless-hotkey driver. Remove the now unnecessary rfkill hotkey handling to avoid duplicating functionality.
The ACPI notify handler still prints debugging information when receiving ACPI notifications to aid in reverse-engineering.
--- drivers/platform/x86/lg-laptop.c | 8 -------- 1 file changed, 8 deletions(-)
drivers/platform/x86/lg-laptop.c +0 -8
@@ -84,7 +84,6 @@ static const struct key_entry wmi_keymap[] = {* this key both sends an event and * changes backlight level. */ - {KE_KEY, 0x80, {KEY_RFKILL} }, {KE_END, 0} };
@@ -272,14 +271,7 @@ static void wmi_input_setup(void)static void acpi_notify (struct acpi_device *device,u32 event) { -struct key_entry *key; -acpi_handle_debug (device->handle,"notify: %d\n" , event); -if (inited &INIT_SPARSE_KEYMAP ) { - key =sparse_keymap_entry_from_scancode (wmi_input_dev,0x80 ); -if (key && key->type ==KE_KEY ) -sparse_keymap_report_entry (wmi_input_dev, key,1 , true); - } } static ssize_t fan_mode_store(struct device *dev,
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 84/129 platform/x86: lg-laptop: Change ACPI device id
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Armin Wolf <[email protected]>
[ Upstream commit 58a54f27a0dac81f7fd3514be01012635219a53c ]
The LGEX0815 ACPI device id is used for handling hotkey events, but this functionality is already handled by the wireless-hotkey driver.
The LGEX0820 ACPI device id however is used to manage various platform features using the WMAB/WMBB ACPI methods. Use this ACPI device id to avoid blocking the wireless-hotkey driver from probing.
--- drivers/platform/x86/lg-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/lg-laptop.c +1 -1
@@ -768,7 +768,7 @@ static void acpi_remove(struct acpi_device *device) }static const struct acpi_device_id device_ids[] = { - {"LGEX0815" ,0 }, + {"LGEX0820" ,0 }, {"" ,0 } };MODULE_DEVICE_TABLE (acpi, device_ids);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 85/129 platform/x86: lg-laptop: Use ACPI device handle when evaluating WMAB/WMBB
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Armin Wolf <[email protected]>
[ Upstream commit b27ea279556121b54d3f45d0529706cf100cdb3a ]
On the LG Gram 16Z90S, the WMAB and WMBB ACPI methods are not mapped under \XINI, but instead are mapped under \_SB.XINI.
The reason for this is that the LGEX0820 ACPI device used by this driver is mapped at \_SB.XINI, so the ACPI methods where moved as well to appear below the LGEX0820 ACPI device.
Fix this by using the ACPI handle from the ACPI device when evaluating both methods.
--- drivers/platform/x86/lg-laptop.c | 79 +++++++++++++------------------- 1 file changed, 33 insertions(+), 46 deletions(-)
drivers/platform/x86/lg-laptop.c +33 -46
@@ -39,8 +39,6 @@ MODULE_LICENSE("GPL");#define WMI_METHOD_WMBB "2B4F501A-BD3C-4394-8DCF-00A7D2BC8210"#define WMI_EVENT_GUID WMI_EVENT_GUID0 -#define WMAB_METHOD "\\XINI.WMAB" -#define WMBB_METHOD "\\XINI.WMBB"#define SB_GGOV_METHOD "\\_SB.GGOV"#define GOV_TLED 0x2020008#define WM_GET 1
@@ -74,7 +72,7 @@ static u32 inited;static int battery_limit_use_wmbb;static struct led_classdev kbd_backlight; -static enum led_brightness get_kbd_backlight_level (void ); +static enum led_brightness get_kbd_backlight_level (struct device *dev);static const struct key_entry wmi_keymap[] = { {KE_KEY ,0x70 , {KEY_F15 } },/* LG control panel (F1) */
@@ -127,11 +125,10 @@ static int ggov(u32 arg0)return res; } -static union acpi_object *lg_wmab (u32 method,u32 arg1,u32 arg2) +static union acpi_object *lg_wmab (struct device *dev,u32 method,u32 arg1,u32 arg2) {union acpi_object args[3 ];acpi_status status; -acpi_handle handle;struct acpi_object_list arg;struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER ,NULL };
@@ -142,29 +139,22 @@ static union acpi_object *lg_wmab(u32 method, u32 arg1, u32 arg2) args[2 ].type =ACPI_TYPE_INTEGER ; args[2 ].integer.value = arg2; - status =acpi_get_handle (NULL , (acpi_string )WMAB_METHOD , &handle); -if (ACPI_FAILURE (status)) { -pr_err ("Cannot get handle" ); -return NULL ; - } - arg.count =3 ; arg.pointer = args; - status =acpi_evaluate_object (handle,NULL , &arg, &buffer); + status =acpi_evaluate_object (ACPI_HANDLE (dev),"WMAB" , &arg, &buffer);if (ACPI_FAILURE (status)) { -acpi_handle_err (handle,"WMAB: call failed.\n" ); +dev_err (dev,"WMAB: call failed.\n" );return NULL ; }return buffer.pointer; } -static union acpi_object *lg_wmbb (u32 method_id,u32 arg1,u32 arg2) +static union acpi_object *lg_wmbb (struct device *dev,u32 method_id,u32 arg1,u32 arg2) {union acpi_object args[3 ];acpi_status status; -acpi_handle handle;struct acpi_object_list arg;struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER ,NULL };u8 buf[32 ];
@@ -180,18 +170,12 @@ static union acpi_object *lg_wmbb(u32 method_id, u32 arg1, u32 arg2) args[2 ].buffer.length =32 ; args[2 ].buffer.pointer = buf; - status =acpi_get_handle (NULL , (acpi_string )WMBB_METHOD , &handle); -if (ACPI_FAILURE (status)) { -pr_err ("Cannot get handle" ); -return NULL ; - } - arg.count =3 ; arg.pointer = args; - status =acpi_evaluate_object (handle,NULL , &arg, &buffer); + status =acpi_evaluate_object (ACPI_HANDLE (dev),"WMBB" , &arg, &buffer);if (ACPI_FAILURE (status)) { -acpi_handle_err (handle,"WMAB: call failed.\n" ); +dev_err (dev,"WMBB: call failed.\n" );return NULL ; }
@@ -222,7 +206,7 @@ static void wmi_notify(u32 value, void *context)if (eventcode ==0x10000000 ) {led_classdev_notify_brightness_hw_changed ( - &kbd_backlight,get_kbd_backlight_level ()); + &kbd_backlight,get_kbd_backlight_level (kbd_backlight.dev->parent)); }else { key =sparse_keymap_entry_from_scancode ( wmi_input_dev, eventcode);
@@ -287,7 +271,7 @@ static ssize_t fan_mode_store(struct device *dev,if (ret)return ret; - r =lg_wmab (WM_FAN_MODE ,WM_GET ,0 ); + r =lg_wmab (dev,WM_FAN_MODE ,WM_GET ,0 );if (!r)return -EIO ;
@@ -298,9 +282,9 @@ static ssize_t fan_mode_store(struct device *dev, m = r->integer.value;kfree (r); - r =lg_wmab (WM_FAN_MODE ,WM_SET , (m &0xffffff0f ) | (value <<4 )); + r =lg_wmab (dev,WM_FAN_MODE ,WM_SET , (m &0xffffff0f ) | (value <<4 ));kfree (r); - r =lg_wmab (WM_FAN_MODE ,WM_SET , (m &0xfffffff0 ) | value); + r =lg_wmab (dev,WM_FAN_MODE ,WM_SET , (m &0xfffffff0 ) | value);kfree (r);return count;
@@ -312,7 +296,7 @@ static ssize_t fan_mode_show(struct device *dev,unsigned int status;union acpi_object *r; - r =lg_wmab (WM_FAN_MODE ,WM_GET ,0 ); + r =lg_wmab (dev,WM_FAN_MODE ,WM_GET ,0 );if (!r)return -EIO ;
@@ -339,7 +323,7 @@ static ssize_t usb_charge_store(struct device *dev,if (ret)return ret; - r =lg_wmbb (WMBB_USB_CHARGE ,WM_SET , value); + r =lg_wmbb (dev,WMBB_USB_CHARGE ,WM_SET , value);if (!r)return -EIO ;
@@ -353,7 +337,7 @@ static ssize_t usb_charge_show(struct device *dev,unsigned int status;union acpi_object *r; - r =lg_wmbb (WMBB_USB_CHARGE ,WM_GET ,0 ); + r =lg_wmbb (dev,WMBB_USB_CHARGE ,WM_GET ,0 );if (!r)return -EIO ;
@@ -381,7 +365,7 @@ static ssize_t reader_mode_store(struct device *dev,if (ret)return ret; - r =lg_wmab (WM_READER_MODE ,WM_SET , value); + r =lg_wmab (dev,WM_READER_MODE ,WM_SET , value);if (!r)return -EIO ;
@@ -395,7 +379,7 @@ static ssize_t reader_mode_show(struct device *dev,unsigned int status;union acpi_object *r; - r =lg_wmab (WM_READER_MODE ,WM_GET ,0 ); + r =lg_wmab (dev,WM_READER_MODE ,WM_GET ,0 );if (!r)return -EIO ;
@@ -423,7 +407,7 @@ static ssize_t fn_lock_store(struct device *dev,if (ret)return ret; - r =lg_wmab (WM_FN_LOCK ,WM_SET , value); + r =lg_wmab (dev,WM_FN_LOCK ,WM_SET , value);if (!r)return -EIO ;
@@ -437,7 +421,7 @@ static ssize_t fn_lock_show(struct device *dev,unsigned int status;union acpi_object *r; - r =lg_wmab (WM_FN_LOCK ,WM_GET ,0 ); + r =lg_wmab (dev,WM_FN_LOCK ,WM_GET ,0 );if (!r)return -EIO ;
@@ -467,9 +451,9 @@ static ssize_t charge_control_end_threshold_store(struct device *dev,union acpi_object *r;if (battery_limit_use_wmbb) - r =lg_wmbb (WMBB_BATT_LIMIT ,WM_SET , value); + r =lg_wmbb (&pf_device->dev,WMBB_BATT_LIMIT ,WM_SET , value);else - r =lg_wmab (WM_BATT_LIMIT ,WM_SET , value); + r =lg_wmab (&pf_device->dev,WM_BATT_LIMIT ,WM_SET , value);if (!r)return -EIO ;
@@ -488,7 +472,7 @@ static ssize_t charge_control_end_threshold_show(struct device *device,union acpi_object *r;if (battery_limit_use_wmbb) { - r =lg_wmbb (WMBB_BATT_LIMIT ,WM_GET ,0 ); + r =lg_wmbb (&pf_device->dev,WMBB_BATT_LIMIT ,WM_GET ,0 );if (!r)return -EIO ;
@@ -499,7 +483,7 @@ static ssize_t charge_control_end_threshold_show(struct device *device, status = r->buffer.pointer[0x10 ]; }else { - r =lg_wmab (WM_BATT_LIMIT ,WM_GET ,0 ); + r =lg_wmab (&pf_device->dev,WM_BATT_LIMIT ,WM_GET ,0 );if (!r)return -EIO ;
@@ -578,7 +562,7 @@ static void tpad_led_set(struct led_classdev *cdev, {union acpi_object *r; - r =lg_wmab (WM_TLED ,WM_SET , brightness >LED_OFF ); + r =lg_wmab (cdev->dev->parent,WM_TLED ,WM_SET , brightness >LED_OFF );kfree (r); }
@@ -600,16 +584,16 @@ static void kbd_backlight_set(struct led_classdev *cdev, val =0 ;if (brightness >=LED_FULL ) val =0x24 ; - r =lg_wmab (WM_KEY_LIGHT ,WM_SET , val); + r =lg_wmab (cdev->dev->parent,WM_KEY_LIGHT ,WM_SET , val);kfree (r); } -static enum led_brightness get_kbd_backlight_level (void ) +static enum led_brightness get_kbd_backlight_level (struct device *dev) {union acpi_object *r;int val; - r =lg_wmab (WM_KEY_LIGHT ,WM_GET ,0 ); + r =lg_wmab (dev,WM_KEY_LIGHT ,WM_GET ,0 );if (!r)return LED_OFF ;
@@ -637,7 +621,7 @@ static enum led_brightness get_kbd_backlight_level(void)static enum led_brightness kbd_backlight_get (struct led_classdev *cdev) { -return get_kbd_backlight_level (); +return get_kbd_backlight_level (cdev->dev->parent); } static LED_DEVICE(kbd_backlight, 255, LED_BRIGHT_HW_CHANGED);
@@ -664,6 +648,11 @@ static struct platform_driver pf_driver = {static int acpi_add (struct acpi_device *device) { +struct platform_device_info pdev_info = { + .fwnode =acpi_fwnode_handle (device), + .name =PLATFORM_NAME , + .id =PLATFORM_DEVID_NONE , + };int ret;const char *product;int year =2017 ;
@@ -675,9 +664,7 @@ static int acpi_add(struct acpi_device *device)if (ret)return ret; - pf_device =platform_device_register_simple (PLATFORM_NAME , -PLATFORM_DEVID_NONE , -NULL ,0 ); + pf_device =platform_device_register_full (&pdev_info);if (IS_ERR (pf_device)) { ret =PTR_ERR (pf_device); pf_device =NULL ;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 86/129 btrfs: qgroup: fix quota root leak after quota disable failure
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 a7e4c6a3031c74078dba7fa36239d0f4fe476c53 ]
If during the quota disable we fail when cleaning the quota tree or when deleting the root from the root tree, we jump to the 'out' label without ever dropping the reference on the quota root, resulting in a leak of the root since fs_info->quota_root is no longer pointing to the root (we have set it to NULL just before those steps).
Fix this by always doing a btrfs_put_root() call under the 'out' label. This is a problem that exists since qgroups were first added in 2012 by commit bed92eae26cc ("Btrfs: qgroup implementation and prototypes"), but back then we missed a kfree on the quota root and free_extent_buffer() calls on its root and commit root nodes, since back then roots were not yet reference counted.
--- fs/btrfs/qgroup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/btrfs/qgroup.c +2 -2
@@ -1228,7 +1228,7 @@ int btrfs_quota_enable(struct btrfs_fs_info *fs_info)int btrfs_quota_disable (struct btrfs_fs_info *fs_info) { -struct btrfs_root *quota_root; +struct btrfs_root *quota_root =NULL ;struct btrfs_trans_handle *trans =NULL ;int ret =0 ;
@@ -1323,9 +1323,9 @@ int btrfs_quota_disable(struct btrfs_fs_info *fs_info)btrfs_free_tree_block (trans,btrfs_root_id (quota_root), quota_root->node,0 ,1 ); -btrfs_put_root (quota_root); out: +btrfs_put_root (quota_root);mutex_unlock (&fs_info->qgroup_ioctl_lock);if (ret && trans)btrfs_end_transaction (trans);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 87/129 ibmvnic: Add tx check to prevent skb leak
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nick Child <[email protected]>
[ Upstream commit 0983d288caf984de0202c66641577b739caad561 ]
Below is a summary of how the driver stores a reference to an skb during transmit:
tx_buff[free_map[consumer_index]]->skb = new_skb;
free_map[consumer_index] = IBMVNIC_INVALID_MAP;
consumer_index ++;
Where variable data looks like this:
free_map == [4, IBMVNIC_INVALID_MAP, IBMVNIC_INVALID_MAP, 0, 3]
consumer_index^
tx_buff == [skb=null, skb=<ptr>, skb=<ptr>, skb=null, skb=null]The driver has checks to ensure that free_map[consumer_index] pointed to a valid index but there was no check to ensure that this index pointed to an unused/null skb address. So, if, by some chance, our free_map and tx_buff lists become out of sync then we were previously risking an skb memory leak. This could then cause tcp congestion control to stop sending packets, eventually leading to ETIMEDOUT.
Therefore, add a conditional to ensure that the skb address is null. If not then warn the user (because this is still a bug that should be patched) and free the old pointer to prevent memleak/tcp problems.
--- drivers/net/ethernet/ibm/ibmvnic.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/net/ethernet/ibm/ibmvnic.c +12 -0
@@ -2478,6 +2478,18 @@ static netdev_tx_t ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev) (tx_pool->consumer_index +1 ) % tx_pool->num_buffers; tx_buff = &tx_pool->tx_buff[bufidx]; + +/* Sanity checks on our free map to make sure it points to an index +* that is not being occupied by another skb. If skb memory is +* not freed then we see congestion control kick in and halt tx. +*/ +if (unlikely (tx_buff->skb)) { +dev_warn_ratelimited (dev,"TX free map points to untracked skb (%s %d idx=%d)\n" , +skb_is_gso (skb) ?"tso_pool" :"tx_pool" , + queue_num, bufidx); +dev_kfree_skb_any (tx_buff->skb); + } + tx_buff->skb = skb; tx_buff->index = bufidx; tx_buff->pool_index = queue_num;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 88/129 ALSA: PCM: Allow resume only for suspended streams
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <[email protected]>
[ Upstream commit 1225675ca74c746f09211528588e83b3def1ff6a ]
snd_pcm_resume() should bail out if the stream isn't in a suspended state. Otherwise it'd allow doubly resume.
--- sound/core/pcm_native.c | 2 ++ 1 file changed, 2 insertions(+)
sound/core/pcm_native.c +2 -0
@@ -1783,6 +1783,8 @@ static int snd_pcm_pre_resume(struct snd_pcm_substream *substream, snd_pcm_state_t state) {struct snd_pcm_runtime *runtime = substream->runtime; +if (runtime->state !=SNDRV_PCM_STATE_SUSPENDED ) +return -EBADFD ;if (!(runtime->info &SNDRV_PCM_INFO_RESUME ))return -ENOSYS ; runtime->trigger_master = substream;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 89/129 ALSA: hda/relatek: Enable Mute LED on HP Laptop 15-gw0xxx
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aivaz Latypov <[email protected]>
[ Upstream commit 1d091a98c399c17d0571fa1d91a7123a698446e4 ]
This HP Laptop uses ALC236 codec with COEF 0x07 controlling the mute LED. Enable existing quirk for this device.
--- sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+)
sound/pci/hda/patch_realtek.c +1 -0
@@ -9857,6 +9857,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x103c ,0x8788 ,"HP OMEN 15" ,ALC285_FIXUP_HP_MUTE_LED ),SND_PCI_QUIRK (0x103c ,0x87b7 ,"HP Laptop 14-fq0xxx" ,ALC236_FIXUP_HP_MUTE_LED_COEFBIT2 ),SND_PCI_QUIRK (0x103c ,0x87c8 ,"HP" ,ALC287_FIXUP_HP_GPIO_LED ), +SND_PCI_QUIRK (0x103c ,0x87d3 ,"HP Laptop 15-gw0xxx" ,ALC236_FIXUP_HP_MUTE_LED_COEFBIT2 ),SND_PCI_QUIRK (0x103c ,0x87e5 ,"HP ProBook 440 G8 Notebook PC" ,ALC236_FIXUP_HP_GPIO_LED ),SND_PCI_QUIRK (0x103c ,0x87e7 ,"HP ProBook 450 G8 Notebook PC" ,ALC236_FIXUP_HP_GPIO_LED ), SND_PCI_QUIRK(0x103c, 0x87f1, "HP ProBook 630 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 90/129 ALSA: dmaengine_pcm: terminate dmaengine before synchronize
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shengjiu Wang <[email protected]>
[ Upstream commit 6a7db25aad8ce6512b366d2ce1d0e60bac00a09d ]
When dmaengine supports pause function, in suspend state, dmaengine_pause() is called instead of dmaengine_terminate_async(),
In end of playback stream, the runtime->state will go to SNDRV_PCM_STATE_DRAINING, if system suspend & resume happen at this time, application will not resume playback stream, the stream will be closed directly, the dmaengine_terminate_async() will not be called before the dmaengine_synchronize(), which violates the call sequence for dmaengine_synchronize().
This behavior also happens for capture streams, but there is no SNDRV_PCM_STATE_DRAINING state for capture. So use dmaengine_tx_status() to check the DMA status if the status is DMA_PAUSED, then call dmaengine_terminate_async() to terminate dmaengine before dmaengine_synchronize().
--- sound/core/pcm_dmaengine.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
sound/core/pcm_dmaengine.c +12 -0
@@ -368,6 +368,12 @@ EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_sync_stop);int snd_dmaengine_pcm_close (struct snd_pcm_substream *substream) {struct dmaengine_pcm_runtime_data *prtd =substream_to_prtd (substream); +struct dma_tx_state state; +enum dma_status status; + + status =dmaengine_tx_status (prtd->dma_chan, prtd->cookie, &state); +if (status ==DMA_PAUSED ) +dmaengine_terminate_async (prtd->dma_chan);dmaengine_synchronize (prtd->dma_chan);kfree (prtd);
@@ -388,6 +394,12 @@ EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_close);int snd_dmaengine_pcm_close_release_chan (struct snd_pcm_substream *substream) {struct dmaengine_pcm_runtime_data *prtd =substream_to_prtd (substream); +struct dma_tx_state state; +enum dma_status status; + + status =dmaengine_tx_status (prtd->dma_chan, prtd->cookie, &state); +if (status ==DMA_PAUSED ) +dmaengine_terminate_async (prtd->dma_chan);dmaengine_synchronize (prtd->dma_chan);dma_release_channel (prtd->dma_chan);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 91/129 ASoC: amd: yc: Fix non-functional mic on ASUS M5602RA
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vyacheslav Frantsishko <[email protected]>
[ Upstream commit 63b47f026cc841bd3d3438dd6fccbc394dfead87 ]
The Vivobook S 16X IPS needs a quirks-table entry for the internal microphone to function properly.
--- sound/soc/amd/yc/acp6x-mach.c | 7 +++++++ 1 file changed, 7 insertions(+)
sound/soc/amd/yc/acp6x-mach.c +7 -0
@@ -283,6 +283,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "M5402RA"), } }, + { + .driver_data = &acp6x_card, + .matches = { +DMI_MATCH (DMI_BOARD_VENDOR ,"ASUSTeK COMPUTER INC." ), + DMI_MATCH(DMI_PRODUCT_NAME, "M5602RA"), + } + }, { .driver_data = &acp6x_card, .matches = {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 92/129 net: usb: qmi_wwan: add Telit FN912 compositions
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniele Palmas <[email protected]>
[ Upstream commit 77453e2b015b5ced5b3f45364dd5a72dfc3bdecb ]
Add the following Telit FN912 compositions:
0x3000: rmnet + tty (AT/NMEA) + tty (AT) + tty (diag)
T: Bus=03 Lev=01 Prnt=03 Port=07 Cnt=01 Dev#= 8 Spd=480 MxCh= 0 D: Ver= 2.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1bc7 ProdID=3000 Rev=05.15 S: Manufacturer=Telit Cinterion S: Product=FN912 S: SerialNumber=92c4c4d8 C: #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=32ms I: If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=60 Driver=option E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=84(I) Atr=03(Int.) MxPS= 10 Ivl=32ms I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=86(I) Atr=03(Int.) MxPS= 10 Ivl=32ms I: If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
0x3001: rmnet + tty (AT) + tty (diag) + DPL (data packet logging) + adb
T: Bus=03 Lev=01 Prnt=03 Port=07 Cnt=01 Dev#= 7 Spd=480 MxCh= 0 D: Ver= 2.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1bc7 ProdID=3001 Rev=05.15 S: Manufacturer=Telit Cinterion S: Product=FN912 S: SerialNumber=92c4c4d8 C: #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=32ms I: If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=84(I) Atr=03(Int.) MxPS= 10 Ivl=32ms I: If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 3 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=80 Driver=(none) E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=usbfs E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
--- drivers/net/usb/qmi_wwan.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/usb/qmi_wwan.c +2 -0
@@ -1380,6 +1380,8 @@ static const struct usb_device_id products[] = { {QMI_QUIRK_SET_DTR(0x1bc7, 0x1260, 2)}, /* Telit LE910Cx */ {QMI_QUIRK_SET_DTR(0x1bc7, 0x1261, 2)}, /* Telit LE910Cx */ {QMI_QUIRK_SET_DTR(0x1bc7, 0x1900, 1)}, /* Telit LN940 series */ + {QMI_QUIRK_SET_DTR(0x1bc7, 0x3000, 0)}, /* Telit FN912 series */ + {QMI_QUIRK_SET_DTR(0x1bc7, 0x3001, 0)}, /* Telit FN912 series */ {QMI_FIXED_INTF(0x1c9e, 0x9801, 3)}, /* Telewell TW-3G HSPA+ */ {QMI_FIXED_INTF(0x1c9e, 0x9803, 4)}, /* Telewell TW-3G HSPA+ */ {QMI_FIXED_INTF(0x1c9e, 0x9b01, 3)}, /* XS Stick W100-2 from 4G Systems */
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 93/129 net: mac802154: Fix racy device stats updates by DEV_STATS_INC() and DEV_STATS_ADD()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yunshui Jiang <[email protected]>
[ Upstream commit b8ec0dc3845f6c9089573cb5c2c4b05f7fc10728 ]
mac802154 devices update their dev->stats fields locklessly. Therefore these counters should be updated atomically. Adopt SMP safe DEV_STATS_INC() and DEV_STATS_ADD() to achieve this.
Message-ID: <[email protected]>
--- net/mac802154/tx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
net/mac802154/tx.c +4 -4
@@ -34,8 +34,8 @@ void ieee802154_xmit_sync_worker(struct work_struct *work)if (res) goto err_tx; - dev->stats.tx_packets++; - dev->stats.tx_bytes += skb->len; +DEV_STATS_INC (dev, tx_packets); +DEV_STATS_ADD (dev, tx_bytes, skb->len);ieee802154_xmit_complete (&local->hw, skb, false);
@@ -90,8 +90,8 @@ ieee802154_tx(struct ieee802154_local *local, struct sk_buff *skb)if (ret) goto err_wake_netif_queue; - dev->stats.tx_packets++; - dev->stats.tx_bytes += len; +DEV_STATS_INC (dev, tx_packets); +DEV_STATS_ADD (dev, tx_bytes, len); }else { local->tx_skb = skb;queue_work (local->workqueue, &local->sync_tx_work);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 94/129 powerpc/pseries: Whitelist dtl slub object for copying to userspace
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Anjali K <[email protected]>
[ Upstream commit 1a14150e1656f7a332a943154fc486504db4d586 ]
Reading the dispatch trace log from /sys/kernel/debug/powerpc/dtl/cpu-* results in a BUG() when the config CONFIG_HARDENED_USERCOPY is enabled as shown below.
kernel BUG at mm/usercopy.c:102!
Oops: Exception in kernel mode, sig: 5 [#1]
LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA pSeries
Modules linked in: xfs libcrc32c dm_service_time sd_mod t10_pi sg ibmvfc
scsi_transport_fc ibmveth pseries_wdt dm_multipath dm_mirror dm_region_hash dm_log dm_mod fuse
CPU: 27 PID: 1815 Comm: python3 Not tainted 6.10.0-rc3 #85
Hardware name: IBM,9040-MRX POWER10 (raw) 0x800200 0xf000006 of:IBM,FW1060.00 (NM1060_042) hv:phyp pSeries
NIP: c0000000005d23d4 LR: c0000000005d23d0 CTR: 00000000006ee6f8
REGS: c000000120c078c0 TRAP: 0700 Not tainted (6.10.0-rc3)
MSR: 8000000000029033 <SF,EE,ME,IR,DR,RI,LE> CR: 2828220f XER: 0000000e
CFAR: c0000000001fdc80 IRQMASK: 0
[ ... GPRs omitted ... ]
NIP [c0000000005d23d4] usercopy_abort+0x78/0xb0
LR [c0000000005d23d0] usercopy_abort+0x74/0xb0
Call Trace:
usercopy_abort+0x74/0xb0 (unreliable)
__check_heap_object+0xf8/0x120
check_heap_object+0x218/0x240
__check_object_size+0x84/0x1a4
dtl_file_read+0x17c/0x2c4
full_proxy_read+0x8c/0x110
vfs_read+0xdc/0x3a0
ksys_read+0x84/0x144
system_call_exception+0x124/0x330
system_call_vectored_common+0x15c/0x2ec
--- interrupt: 3000 at 0x7fff81f3ab34Commit 6d07d1cd300f ("usercopy: Restrict non-usercopy caches to size 0") requires that only whitelisted areas in slab/slub objects can be copied to userspace when usercopy hardening is enabled using CONFIG_HARDENED_USERCOPY. Dtl contains hypervisor dispatch events which are expected to be read by privileged users. Hence mark this safe for user access.
Specify useroffset=0 and usersize=DISPATCH_LOG_BYTES to whitelist the entire object.
--- arch/powerpc/platforms/pseries/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/platforms/pseries/setup.c +2 -2
@@ -343,8 +343,8 @@ static int alloc_dispatch_log_kmem_cache(void) {void (*ctor)(void *) =get_dtl_cache_ctor (); - dtl_cache =kmem_cache_create ("dtl" ,DISPATCH_LOG_BYTES , -DISPATCH_LOG_BYTES ,0 , ctor); + dtl_cache =kmem_cache_create_usercopy ("dtl" ,DISPATCH_LOG_BYTES , +DISPATCH_LOG_BYTES ,0 ,0 ,DISPATCH_LOG_BYTES , ctor);if (!dtl_cache) {pr_warn ("Failed to create dispatch trace log buffer cache\n" );pr_warn ("Stolen time statistics will be unreliable\n" );
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 95/129 powerpc/eeh: avoid possible crash when edev->pdev changes
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ganesh Goudar <[email protected]>
[ Upstream commit a1216e62d039bf63a539bbe718536ec789a853dd ]
If a PCI device is removed during eeh_pe_report_edev(), edev->pdev will change and can cause a crash, hold the PCI rescan/remove lock while taking a copy of edev->pdev->bus.
--- arch/powerpc/kernel/eeh_pe.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
arch/powerpc/kernel/eeh_pe.c +5 -2
@@ -849,6 +849,7 @@ struct pci_bus *eeh_pe_bus_get(struct eeh_pe *pe) {struct eeh_dev *edev;struct pci_dev *pdev; +struct pci_bus *bus =NULL ;if (pe->type &EEH_PE_PHB )return pe->phb->bus;
@@ -859,9 +860,11 @@ struct pci_bus *eeh_pe_bus_get(struct eeh_pe *pe)/* Retrieve the parent PCI bus of first (top) PCI device */ edev = list_first_entry_or_null(&pe->edevs, struct eeh_dev, entry); +pci_lock_rescan_remove (); pdev =eeh_dev_to_pci_dev (edev);if (pdev) -return pdev->bus; + bus = pdev->bus; +pci_unlock_rescan_remove (); -return NULL ; +return bus; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 96/129 scsi: libsas: Fix exp-attached device scan after probe failure scanned in again after probe failed
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xingui Yang <[email protected]>
[ Upstream commit ab2068a6fb84751836a84c26ca72b3beb349619d ]
The expander phy will be treated as broadcast flutter in the next revalidation after the exp-attached end device probe failed, as follows:
[78779.654026] sas: broadcast received: 0 [78779.654037] sas: REVALIDATING DOMAIN on port 0, pid:10 [78779.654680] sas: ex 500e004aaaaaaa1f phy05 change count has changed [78779.662977] sas: ex 500e004aaaaaaa1f phy05 originated BROADCAST(CHANGE) [78779.662986] sas: ex 500e004aaaaaaa1f phy05 new device attached [78779.663079] sas: ex 500e004aaaaaaa1f phy05:U:8 attached: 500e004aaaaaaa05 (stp) [78779.693542] hisi_sas_v3_hw 0000:b4:02.0: dev[16:5] found [78779.701155] sas: done REVALIDATING DOMAIN on port 0, pid:10, res 0x0 [78779.707864] sas: Enter sas_scsi_recover_host busy: 0 failed: 0 ... [78835.161307] sas: --- Exit sas_scsi_recover_host: busy: 0 failed: 0 tries: 1 [78835.171344] sas: sas_probe_sata: for exp-attached device 500e004aaaaaaa05 returned -19 [78835.180879] hisi_sas_v3_hw 0000:b4:02.0: dev[16:5] is gone [78835.187487] sas: broadcast received: 0 [78835.187504] sas: REVALIDATING DOMAIN on port 0, pid:10 [78835.188263] sas: ex 500e004aaaaaaa1f phy05 change count has changed [78835.195870] sas: ex 500e004aaaaaaa1f phy05 originated BROADCAST(CHANGE) [78835.195875] sas: ex 500e004aaaaaaa1f rediscovering phy05 [78835.196022] sas: ex 500e004aaaaaaa1f phy05:U:A attached: 500e004aaaaaaa05 (stp) [78835.196026] sas: ex 500e004aaaaaaa1f phy05 broadcast flutter [78835.197615] sas: done REVALIDATING DOMAIN on port 0, pid:10, res 0x0
The cause of the problem is that the related ex_phy's attached_sas_addr was not cleared after the end device probe failed, so reset it.
--- drivers/scsi/libsas/sas_internal.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
drivers/scsi/libsas/sas_internal.h +14 -0
@@ -133,6 +133,20 @@ static inline void sas_fail_probe(struct domain_device *dev, const char *func, i func, dev->parent ?"exp-attached" :"direct-attached" , SAS_ADDR(dev->sas_addr), err); + +/* +* If the device probe failed, the expander phy attached address +* needs to be reset so that the phy will not be treated as flutter +* in the next revalidation +*/ +if (dev->parent && !dev_is_expander (dev->dev_type)) { +struct sas_phy *phy = dev->phy; +struct domain_device *parent = dev->parent; +struct ex_phy *ex_phy = &parent->ex_dev.ex_phy[phy->number]; + +memset (ex_phy->attached_sas_addr,0 ,SAS_ADDR_SIZE ); + } +sas_unregister_dev (dev->port, dev); }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 97/129 tee: optee: ffa: Fix missing-field-initializers warning
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mark-PK Tsai <[email protected]>
[ Upstream commit e0556255a53d6d3d406a28362dffd972018a997c ]
The 'missing-field-initializers' warning was reported when building with W=2.
This patch use designated initializers for 'struct ffa_send_direct_data' to suppress the warning and clarify the initialization intent.
--- drivers/tee/optee/ffa_abi.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
drivers/tee/optee/ffa_abi.c +9 -3
@@ -657,7 +657,9 @@ static bool optee_ffa_api_is_compatbile(struct ffa_device *ffa_dev, const struct ffa_ops *ops) {const struct ffa_msg_ops *msg_ops = ops->msg_ops; -struct ffa_send_direct_data data = {OPTEE_FFA_GET_API_VERSION }; +struct ffa_send_direct_data data = { + .data0 =OPTEE_FFA_GET_API_VERSION , + };int rc; msg_ops->mode_32bit_set (ffa_dev);
@@ -674,7 +676,9 @@ static bool optee_ffa_api_is_compatbile(struct ffa_device *ffa_dev,return false; } - data = (struct ffa_send_direct_data ){OPTEE_FFA_GET_OS_VERSION }; + data = (struct ffa_send_direct_data ){ + .data0 =OPTEE_FFA_GET_OS_VERSION , + }; rc = msg_ops->sync_send_receive (ffa_dev, &data);if (rc) {pr_err ("Unexpected error %d\n" , rc);
@@ -694,7 +698,9 @@ static bool optee_ffa_exchange_caps(struct ffa_device *ffa_dev,u32 *sec_caps, unsigned int *rpc_param_count) { - struct ffa_send_direct_data data = { OPTEE_FFA_EXCHANGE_CAPABILITIES }; + struct ffa_send_direct_data data = { + .data0 =OPTEE_FFA_EXCHANGE_CAPABILITIES , + };int rc; rc = ops->msg_ops->sync_send_receive (ffa_dev, &data);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 98/129 Bluetooth: hci_core: cancel all works upon hci_unregister_dev()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tetsuo Handa <[email protected]>
[ Upstream commit 0d151a103775dd9645c78c97f77d6e2a5298d913 ]
syzbot is reporting that calling hci_release_dev() from hci_error_reset() due to hci_dev_put() from hci_error_reset() can cause deadlock at destroy_workqueue(), for hci_error_reset() is called from hdev->req_workqueue which destroy_workqueue() needs to flush.
We need to make sure that hdev->{rx_work,cmd_work,tx_work} which are queued into hdev->workqueue and hdev->{power_on,error_reset} which are queued into hdev->req_workqueue are no longer running by the moment
destroy_workqueue(hdev->workqueue);
destroy_workqueue(hdev->req_workqueue);are called from hci_release_dev().
Call cancel_work_sync() on these work items from hci_unregister_dev() as soon as hdev->list is removed from hci_dev_list.
--- net/bluetooth/hci_core.c | 4 ++++ 1 file changed, 4 insertions(+)
net/bluetooth/hci_core.c +4 -0
@@ -2704,7 +2704,11 @@ void hci_unregister_dev(struct hci_dev *hdev)list_del (&hdev->list);write_unlock (&hci_dev_list_lock); +cancel_work_sync (&hdev->rx_work); +cancel_work_sync (&hdev->cmd_work); +cancel_work_sync (&hdev->tx_work);cancel_work_sync (&hdev->power_on); +cancel_work_sync (&hdev->error_reset);hci_cmd_sync_clear (hdev);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 99/129 Bluetooth: btnxpuart: Enable Power Save feature on startup
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Neeraj Sanjay Kale <[email protected]>
[ Upstream commit 4183a7be77009fc31c5760429fe095f163bf96a9 ]
This sets the default power save mode setting to enabled.
The power save feature is now stable and stress test issues, such as the TX timeout error, have been resolved.
commit c7ee0bc8db32 ("Bluetooth: btnxpuart: Resolve TX timeout error in power save stress test")
With this setting, the driver will send the vendor command to FW at startup, to enable power save feature.
User can disable this feature using the following vendor command:
hcitool cmd 3f 23 03 00 00 (HCI_NXP_AUTO_SLEEP_MODE)
--- drivers/bluetooth/btnxpuart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bluetooth/btnxpuart.c +1 -1
@@ -280,7 +280,7 @@ static u8 crc8_table[CRC8_TABLE_SIZE];/* Default configurations */ #define DEFAULT_H2C_WAKEUP_MODE WAKEUP_METHOD_BREAK -#define DEFAULT_PS_MODE PS_MODE_DISABLE +#define DEFAULT_PS_MODE PS_MODE_ENABLE#define FW_INIT_BAUDRATE HCI_NXP_PRI_BAUDRATE static struct sk_buff *nxp_drv_send_cmd(struct hci_dev *hdev, u16 opcode,
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 100/129 bluetooth/l2cap: sync sock recv cb and release
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Edward Adam Davis <[email protected]>
[ Upstream commit 89e856e124f9ae548572c56b1b70c2255705f8fe ]
The problem occurs between the system call to close the sock and hci_rx_work, where the former releases the sock and the latter accesses it without lock protection.
CPU0 CPU1
---- ----
sock_close hci_rx_work
l2cap_sock_release hci_acldata_packet
l2cap_sock_kill l2cap_recv_frame
sk_free l2cap_conless_channel l2cap_sock_recv_cb
If hci_rx_work processes the data that needs to be received before the sock is closed, then everything is normal; Otherwise, the work thread may access the released sock when receiving data.
Add a chan mutex in the rx callback of the sock to achieve synchronization between the sock release and recv cb.
Sock is dead, so set chan data to NULL, avoid others use invalid sock pointer.
--- net/bluetooth/l2cap_sock.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-)
net/bluetooth/l2cap_sock.c +22 -3
@@ -1250,6 +1250,10 @@ static void l2cap_sock_kill(struct sock *sk)BT_DBG ("sk %p state %s" , sk,state_to_string (sk->sk_state)); +/* Sock is dead, so set chan data to NULL, avoid other task use invalid +* sock pointer. +*/ +l2cap_pi (sk)->chan->data =NULL ;/* Kill poor orphan */ l2cap_chan_put (l2cap_pi (sk)->chan);
@@ -1492,12 +1496,25 @@ static struct l2cap_chan *l2cap_sock_new_connection_cb(struct l2cap_chan *chan)static int l2cap_sock_recv_cb (struct l2cap_chan *chan,struct sk_buff *skb) { -struct sock *sk = chan->data; -struct l2cap_pinfo *pi =l2cap_pi (sk); +struct sock *sk; +struct l2cap_pinfo *pi;int err; -lock_sock (sk); +/* To avoid race with sock_release, a chan lock needs to be added here +* to synchronize the sock. +*/ +l2cap_chan_hold (chan); +l2cap_chan_lock (chan); + sk = chan->data; +if (!sk) { +l2cap_chan_unlock (chan); +l2cap_chan_put (chan); +return -ENXIO ; + } + + pi =l2cap_pi (sk); +lock_sock (sk);if (chan->mode ==L2CAP_MODE_ERTM && !list_empty (&pi->rx_busy)) { err = -ENOMEM ; goto done;
@@ -1546,6 +1563,8 @@ static int l2cap_sock_recv_cb(struct l2cap_chan *chan, struct sk_buff *skb) done:release_sock (sk); +l2cap_chan_unlock (chan); +l2cap_chan_put (chan);return err; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 101/129 erofs: ensure m_llen is reset to 0 if metadata is invalid
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gao Xiang <[email protected]>
[ Upstream commit 9b32b063be1001e322c5f6e01f2a649636947851 ]
Sometimes, the on-disk metadata might be invalid due to user interrupts, storage failures, or other unknown causes.
In that case, z_erofs_map_blocks_iter() may still return a valid m_llen while other fields remain invalid (e.g., m_plen can be 0).
Due to the return value of z_erofs_scan_folio() in some path will be ignored on purpose, the following z_erofs_scan_folio() could then use the invalid value by accident.
Let's reset m_llen to 0 to prevent this.
--- fs/erofs/zmap.c | 2 ++ 1 file changed, 2 insertions(+)
fs/erofs/zmap.c +2 -0
@@ -723,6 +723,8 @@ int z_erofs_map_blocks_iter(struct inode *inode, struct erofs_map_blocks *map, err =z_erofs_do_map_blocks (inode, map, flags); out: +if (err) + map->m_llen =0 ;trace_z_erofs_map_blocks_iter_exit (inode, map, flags, err);return err; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 102/129 drm/amd/display: Add refresh rate range check
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tom Chung <[email protected]>
[ Upstream commit 74ad26b36d303ac233eccadc5c3a8d7ee4709f31 ]
[Why]
We only enable the VRR while monitor usable refresh rate range is greater than 10 Hz.
But we did not check the range in DRM_EDID_FEATURE_CONTINUOUS_FREQ case.
[How]
Add a refresh rate range check before set the freesync_capable flag in DRM_EDID_FEATURE_CONTINUOUS_FREQ case.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -1
@@ -10759,9 +10759,11 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector,if (is_dp_capable_without_timing_msa (adev->dm.dc, amdgpu_dm_connector)) {if (edid->features &DRM_EDID_FEATURE_CONTINUOUS_FREQ ) { - freesync_capable = true; amdgpu_dm_connector->min_vfreq = connector->display_info.monitor_range.min_vfreq; amdgpu_dm_connector->max_vfreq = connector->display_info.monitor_range.max_vfreq; +if (amdgpu_dm_connector->max_vfreq - + amdgpu_dm_connector->min_vfreq >10 ) + freesync_capable = true; }else { edid_check_required = edid->version > 1 || (edid->version == 1 &&
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 103/129 drm/amd/display: Account for cursor prefetch BW in DML1 mode support
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alvin Lee <[email protected]>
[ Upstream commit 074b3a886713f69d98d30bb348b1e4cb3ce52b22 ]
[Description]
We need to ensure to take into account cursor prefetch BW in mode support or we may pass ModeQuery but fail an actual flip which will cause a hang. Flip may fail because the cursor_pre_bw is populated during mode programming (and mode programming is never called prior to ModeQuery).
--- drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c +3 -0
@@ -3364,6 +3364,9 @@ void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l &mode_lib->vba.UrgentBurstFactorLumaPre[k], &mode_lib->vba.UrgentBurstFactorChromaPre[k], &mode_lib->vba.NotUrgentLatencyHidingPre[k]); + + v->cursor_bw_pre[k] = mode_lib->vba.NumberOfCursors[k] * mode_lib->vba.CursorWidth[k][0 ] * mode_lib->vba.CursorBPP[k][0 ] / +8.0 / (mode_lib->vba.HTotal[k] / mode_lib->vba.PixelClock[k]) * v->VRatioPreY[i][j][k]; } {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 104/129 drm/amd/display: Fix refresh rate range for some panel
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tom Chung <[email protected]>
[ Upstream commit 9ef1548aeaa8858e7aee2152bf95cc71cdcd6dff ]
[Why]
Some of the panels does not have the refresh rate range info in base EDID and only have the refresh rate range info in DisplayID block.
It will cause the max/min freesync refresh rate set to 0.
[How]
Try to parse the refresh rate range info from DisplayID if the max/min refresh rate is 0.
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +48 -0
@@ -10630,6 +10630,49 @@ static bool parse_edid_cea(struct amdgpu_dm_connector *aconnector,return ret; } +static void parse_edid_displayid_vrr (struct drm_connector *connector, +struct edid *edid) +{ +u8 *edid_ext =NULL ; +int i; +int j =0 ; +u16 min_vfreq; +u16 max_vfreq; + +if (edid ==NULL || edid->extensions ==0 ) +return ; + +/* Find DisplayID extension */ +for (i =0 ; i < edid->extensions; i++) { + edid_ext = (void *)(edid + (i +1 )); +if (edid_ext[0 ] ==DISPLAYID_EXT ) +break ; + } + +if (edid_ext ==NULL ) +return ; + +while (j <EDID_LENGTH ) { +/* Get dynamic video timing range from DisplayID if available */ +if (EDID_LENGTH - j >13 && edid_ext[j] ==0x25 && + (edid_ext[j+1 ] &0xFE ) ==0 && (edid_ext[j+2 ] ==9 )) { + min_vfreq = edid_ext[j+9 ]; +if (edid_ext[j+1 ] &7 ) + max_vfreq = edid_ext[j+10 ] + ((edid_ext[j+11 ] &3 ) <<8 ); +else + max_vfreq = edid_ext[j+10 ]; + +if (max_vfreq && min_vfreq) { + connector->display_info.monitor_range.max_vfreq = max_vfreq; + connector->display_info.monitor_range.min_vfreq = min_vfreq; + +return ; + } + } + j++; + } +} +static int parse_amd_vsdb (struct amdgpu_dm_connector *aconnector,struct edid *edid,struct amdgpu_hdmi_vsdb_info *vsdb_info) {
@@ -10752,6 +10795,11 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector,if (!adev->dm.freesync_module) goto update; +/* Some eDP panels only have the refresh rate range info in DisplayID */ +if ((connector->display_info.monitor_range.min_vfreq ==0 || + connector->display_info.monitor_range.max_vfreq ==0 )) +parse_edid_displayid_vrr (connector, edid); +if (edid && (sink->sink_signal ==SIGNAL_TYPE_DISPLAY_PORT || sink->sink_signal ==SIGNAL_TYPE_EDP )) {bool edid_check_required = false;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 105/129 drm/radeon: check bo_va->bo is non-NULL before using it
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pierre-Eric Pelloux-Prayer <[email protected]>
[ Upstream commit 6fb15dcbcf4f212930350eaee174bb60ed40a536 ]
The call to radeon_vm_clear_freed might clear bo_va->bo, so we have to check it before dereferencing it.
--- drivers/gpu/drm/radeon/radeon_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/radeon/radeon_gem.c +1 -1
@@ -641,7 +641,7 @@ static void radeon_gem_va_update_vm(struct radeon_device *rdev,if (r) goto error_unlock; -if (bo_va->it.start) +if (bo_va->it.start && bo_va->bo) r =radeon_vm_bo_update (rdev, bo_va, bo_va->bo->tbo.resource); error_unlock:
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 106/129 fs: better handle deep ancestor chains in is_subdir()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian Brauner <[email protected]>
[ Upstream commit 391b59b045004d5b985d033263ccba3e941a7740 ]
Jan reported that 'cd ..' may take a long time in deep directory hierarchies under a bind-mount. If concurrent renames happen it is possible to livelock in is_subdir() because it will keep retrying.
Change is_subdir() from simply retrying over and over to retry once and then acquire the rename lock to handle deep ancestor chains better. The list of alternatives to this approach were less then pleasant. Change the scope of rcu lock to cover the whole walk while at it.
A big thanks to Jan and Linus. Both Jan and Linus had proposed effectively the same thing just that one version ended up being slightly more elegant.
--- fs/dcache.c | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-)
fs/dcache.c +14 -17
@@ -3208,28 +3208,25 @@ EXPORT_SYMBOL(d_splice_alias);bool is_subdir (struct dentry *new_dentry,struct dentry *old_dentry) { -bool result; +bool subdir;unsigned seq;if (new_dentry == old_dentry)return true; -do { -/* for restarting inner loop in case of seq retry */ - seq =read_seqbegin (&rename_lock); -/* -* Need rcu_readlock to protect against the d_parent trashing -* due to d_move -*/ -rcu_read_lock (); -if (d_ancestor (old_dentry, new_dentry)) - result = true; -else - result = false; -rcu_read_unlock (); - }while (read_seqretry (&rename_lock, seq)); - -return result; +/* Access d_parent under rcu as d_move() may change it. */ +rcu_read_lock (); + seq =read_seqbegin (&rename_lock); + subdir =d_ancestor (old_dentry, new_dentry); +/* Try lockless once... */ +if (read_seqretry (&rename_lock, seq)) { +/* ...else acquire lock for progress even on deep chains. */ +read_seqlock_excl (&rename_lock); + subdir =d_ancestor (old_dentry, new_dentry); +read_sequnlock_excl (&rename_lock); + } +rcu_read_unlock (); +return subdir; }EXPORT_SYMBOL (is_subdir);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 107/129 wifi: iwlwifi: properly set WIPHY_FLAG_SUPPORTS_EXT_KEK_KCK
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Gabay <[email protected]>
[ Upstream commit 4ec17ce716bdaf680288ce680b4621b52483cc96 ]
The WIPHY_FLAG_SUPPORTS_EXT_KEK_KCK should be set based on the WOWLAN_KEK_KCK_MATERIAL command version. Currently, the command version in the firmware has advanced to 4, which prevents the flag from being set correctly, fix that.
--- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +1 -1
@@ -600,7 +600,7 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm) hw->wiphy->features |=NL80211_FEATURE_WFA_TPC_IE_IN_PROBES ;if (iwl_fw_lookup_cmd_ver (mvm->fw,WOWLAN_KEK_KCK_MATERIAL , -IWL_FW_CMD_VER_UNKNOWN ) ==3 ) +IWL_FW_CMD_VER_UNKNOWN ) >=3 ) hw->wiphy->flags |=WIPHY_FLAG_SUPPORTS_EXT_KEK_KCK ; if (fw_has_api(&mvm->fw->ucode_capa,
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 108/129 drivers/perf: riscv: Reset the counter to hpmevent mapping while starting cpus
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 7dd646cf745c34d31e7ed2a52265e9ca8308f58f ]
Currently, we stop all the counters while a new cpu is brought online. However, the hpmevent to counter mappings are not reset. The firmware may have some stale encoding in their mapping structure which may lead to undesirable results. We have not encountered such scenario though.
--- drivers/perf/riscv_pmu_sbi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/perf/riscv_pmu_sbi.c +1 -1
@@ -611,7 +611,7 @@ static inline void pmu_sbi_stop_all(struct riscv_pmu *pmu)* which may include counters that are not enabled yet. */ sbi_ecall (SBI_EXT_PMU ,SBI_EXT_PMU_COUNTER_STOP , -0 , pmu->cmask,0 ,0 ,0 ,0 ); +0 , pmu->cmask,SBI_PMU_STOP_FLAG_RESET ,0 ,0 ,0 ); }static inline void pmu_sbi_stop_hw_ctrs (struct riscv_pmu *pmu)
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 109/129 riscv: stacktrace: fix usage of ftrace_graph_ret_addr()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Puranjay Mohan <[email protected]>
[ Upstream commit 393da6cbb2ff89aadc47683a85269f913aa1c139 ]
ftrace_graph_ret_addr() takes an idx integer pointer that is used to optimize the stack unwinding. Pass it a valid pointer to utilize the optimizations that might be available in the future.
The commit is making riscv's usage of ftrace_graph_ret_addr() match x86_64.
--- arch/riscv/kernel/stacktrace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/riscv/kernel/stacktrace.c +2 -1
@@ -32,6 +32,7 @@ void notrace walk_stackframe(struct task_struct *task, struct pt_regs *regs, bool (*fn)(void *, unsigned long), void *arg) { unsigned long fp, sp, pc; +int graph_idx =0 ;int level =0 ;if (regs) {
@@ -68,7 +69,7 @@ void notrace walk_stackframe(struct task_struct *task, struct pt_regs *regs, pc = regs->ra; }else { fp = frame->fp; - pc =ftrace_graph_ret_addr (current,NULL , frame->ra, + pc =ftrace_graph_ret_addr (current, &graph_idx, frame->ra, &frame->ra);if (pc == (unsigned long )ret_from_exception) {if (unlikely (!__kernel_text_address (pc) || !fn (arg, pc)))
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 110/129 spi: imx: Dont expect DMA for i.MX{25,35,50,51,53} cspi devices
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Uwe Kleine-König <[email protected]>
[ Upstream commit ce1dac560a74220f2e53845ec0723b562288aed4 ]
While in commit 2dd33f9cec90 ("spi: imx: support DMA for imx35") it was claimed that DMA works on i.MX25, i.MX31 and i.MX35 the respective device trees don't add DMA channels. The Reference manuals of i.MX31 and i.MX25 also don't mention the CSPI core being DMA capable. (I didn't check the others.)
Since commit e267a5b3ec59 ("spi: spi-imx: Use dev_err_probe for failed DMA channel requests") this results in an error message
spi_imx 43fa4000.spi: error -ENODEV: can't get the TX DMA channel!
during boot. However that isn't fatal and the driver gets loaded just fine, just without using DMA.
--- drivers/spi/spi-imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-imx.c +1 -1
@@ -1050,7 +1050,7 @@ static struct spi_imx_devtype_data imx35_cspi_devtype_data = { .rx_available = mx31_rx_available, .reset = mx31_reset, .fifo_size = 8, - .has_dmamode = true, + .has_dmamode = false, .dynamic_burst = false, .has_targetmode = false, .devtype = IMX35_CSPI,
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 111/129 ksmbd: return FILE_DEVICE_DISK instead of super magic
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 25a6e135569b3901452e4863c94560df7c11c492 ]
MS-SMB2 specification describes setting ->DeviceType to FILE_DEVICE_DISK or FILE_DEVICE_CD_ROM. Set FILE_DEVICE_DISK instead of super magic in FS_DEVICE_INFORMATION. And Set FILE_READ_ONLY_DEVICE for read-only share.
--- fs/smb/common/smb2pdu.h | 34 ++++++++++++++++++++++++++++++++++ fs/smb/server/smb2pdu.c | 9 +++++++-- 2 files changed, 41 insertions(+), 2 deletions(-)
fs/smb/common/smb2pdu.h +34 -0
@@ -917,6 +917,40 @@ struct smb2_query_directory_rsp {__u8 Buffer[]; } __packed; +/* DeviceType Flags */ +#define FILE_DEVICE_CD_ROM 0x00000002 +#define FILE_DEVICE_CD_ROM_FILE_SYSTEM 0x00000003 +#define FILE_DEVICE_DFS 0x00000006 +#define FILE_DEVICE_DISK 0x00000007 +#define FILE_DEVICE_DISK_FILE_SYSTEM 0x00000008 +#define FILE_DEVICE_FILE_SYSTEM 0x00000009 +#define FILE_DEVICE_NAMED_PIPE 0x00000011 +#define FILE_DEVICE_NETWORK 0x00000012 +#define FILE_DEVICE_NETWORK_FILE_SYSTEM 0x00000014 +#define FILE_DEVICE_NULL 0x00000015 +#define FILE_DEVICE_PARALLEL_PORT 0x00000016 +#define FILE_DEVICE_PRINTER 0x00000018 +#define FILE_DEVICE_SERIAL_PORT 0x0000001b +#define FILE_DEVICE_STREAMS 0x0000001e +#define FILE_DEVICE_TAPE 0x0000001f +#define FILE_DEVICE_TAPE_FILE_SYSTEM 0x00000020 +#define FILE_DEVICE_VIRTUAL_DISK 0x00000024 +#define FILE_DEVICE_NETWORK_REDIRECTOR 0x00000028 + +/* Device Characteristics */ +#define FILE_REMOVABLE_MEDIA 0x00000001 +#define FILE_READ_ONLY_DEVICE 0x00000002 +#define FILE_FLOPPY_DISKETTE 0x00000004 +#define FILE_WRITE_ONCE_MEDIA 0x00000008 +#define FILE_REMOTE_DEVICE 0x00000010 +#define FILE_DEVICE_IS_MOUNTED 0x00000020 +#define FILE_VIRTUAL_VOLUME 0x00000040 +#define FILE_DEVICE_SECURE_OPEN 0x00000100 +#define FILE_CHARACTERISTIC_TS_DEVICE 0x00001000 +#define FILE_CHARACTERISTIC_WEBDAV_DEVICE 0x00002000 +#define FILE_PORTABLE_DEVICE 0x00004000 +#define FILE_DEVICE_ALLOW_APPCONTAINER_TRAVERSAL 0x00020000 +/* * Maximum number of iovs we need for a set-info request. * The largest one is rename/hardlink
fs/smb/server/smb2pdu.c +7 -2
@@ -5323,8 +5323,13 @@ static int smb2_get_info_filesystem(struct ksmbd_work *work, info = (struct filesystem_device_info *)rsp->Buffer; - info->DeviceType =cpu_to_le32 (stfs.f_type); - info->DeviceCharacteristics =cpu_to_le32 (0x00000020 ); + info->DeviceType =cpu_to_le32 (FILE_DEVICE_DISK ); + info->DeviceCharacteristics = +cpu_to_le32 (FILE_DEVICE_IS_MOUNTED ); +if (!test_tree_conn_flag (work->tcon, +KSMBD_TREE_CONN_FLAG_WRITABLE )) + info->DeviceCharacteristics |= +cpu_to_le32 (FILE_READ_ONLY_DEVICE ); rsp->OutputBufferLength =cpu_to_le32 (8 );break ; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 112/129 ASoC: SOF: Intel: hda-pcm: Limit the maximum number of periods by MAX_BDL_ENTRIES
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Ujfalusi <[email protected]>
[ Upstream commit 82bb8db96610b558920b8c57cd250ec90567d79b ]
The HDaudio specification Section 3.6.2 limits the number of BDL entries to 256.
Make sure we don't allow more periods than this normative value.
--- sound/soc/sof/intel/hda-pcm.c | 6 ++++++ 1 file changed, 6 insertions(+)
sound/soc/sof/intel/hda-pcm.c +6 -0
@@ -254,6 +254,12 @@ int hda_dsp_pcm_open(struct snd_sof_dev *sdev,snd_pcm_hw_constraint_integer (substream->runtime,SNDRV_PCM_HW_PARAM_PERIODS ); +/* Limit the maximum number of periods to not exceed the BDL entries count */ +if (runtime->hw.periods_max >HDA_DSP_MAX_BDL_ENTRIES ) +snd_pcm_hw_constraint_minmax (runtime,SNDRV_PCM_HW_PARAM_PERIODS , + runtime->hw.periods_min, +HDA_DSP_MAX_BDL_ENTRIES ); +/* Only S16 and S32 supported by HDA hardware when used without DSP */ if (sdev->dspless_mode_selected) snd_pcm_hw_constraint_mask64(substream->runtime, SNDRV_PCM_HW_PARAM_FORMAT,
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 113/129 selftest/timerns: fix clang build failures for abs() calls
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: John Hubbard <[email protected]>
[ Upstream commit f76f9bc616b7320df6789241ca7d26cedcf03cf3 ]
When building with clang, via:
make LLVM=1 -C tools/testing/selftests
...clang warns about mismatches between the expected and required integer length being supplied to abs(3).
Fix this by using the correct variant of abs(3): labs(3) or llabs(3), in these cases.
--- tools/testing/selftests/timens/exec.c | 6 +++--- tools/testing/selftests/timens/timer.c | 2 +- tools/testing/selftests/timens/timerfd.c | 2 +- tools/testing/selftests/timens/vfork_exec.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-)
tools/testing/selftests/timens/exec.c +3 -3
@@ -30,7 +30,7 @@ int main(int argc, char *argv[])for (i =0 ; i <2 ; i++) {_gettime (CLOCK_MONOTONIC , &tst, i); -if (abs (tst.tv_sec - now.tv_sec) >5 ) +if (labs (tst.tv_sec - now.tv_sec) >5 )return pr_fail ("%ld %ld\n" , now.tv_sec, tst.tv_sec); }return 0 ;
@@ -50,7 +50,7 @@ int main(int argc, char *argv[])for (i =0 ; i <2 ; i++) {_gettime (CLOCK_MONOTONIC , &tst, i); -if (abs (tst.tv_sec - now.tv_sec) >5 ) +if (labs (tst.tv_sec - now.tv_sec) >5 )return pr_fail ("%ld %ld\n" , now.tv_sec, tst.tv_sec); }
@@ -70,7 +70,7 @@ int main(int argc, char *argv[])/* Check that a child process is in the new timens. */ for (i =0 ; i <2 ; i++) {_gettime (CLOCK_MONOTONIC , &tst, i); -if (abs (tst.tv_sec - now.tv_sec -OFFSET ) >5 ) +if (labs (tst.tv_sec - now.tv_sec -OFFSET ) >5 )return pr_fail ("%ld %ld\n" , now.tv_sec +OFFSET , tst.tv_sec); }
tools/testing/selftests/timens/timer.c +1 -1
@@ -56,7 +56,7 @@ int run_test(int clockid, struct timespec now)return pr_perror ("timerfd_gettime" ); elapsed = new_value.it_value.tv_sec; -if (abs (elapsed -3600 ) >60 ) { +if (llabs (elapsed -3600 ) >60 ) {ksft_test_result_fail ("clockid: %d elapsed: %lld\n" , clockid, elapsed);return 1 ;
tools/testing/selftests/timens/timerfd.c +1 -1
@@ -61,7 +61,7 @@ int run_test(int clockid, struct timespec now)return pr_perror ("timerfd_gettime(%d)" , clockid); elapsed = new_value.it_value.tv_sec; -if (abs (elapsed -3600 ) >60 ) { +if (llabs (elapsed -3600 ) >60 ) {ksft_test_result_fail ("clockid: %d elapsed: %lld\n" , clockid, elapsed);return 1 ;
tools/testing/selftests/timens/vfork_exec.c +2 -2
@@ -32,7 +32,7 @@ static void *tcheck(void *_args)for (i =0 ; i <2 ; i++) {_gettime (CLOCK_MONOTONIC , &tst, i); -if (abs (tst.tv_sec - now->tv_sec) >5 ) { +if (labs (tst.tv_sec - now->tv_sec) >5 ) {pr_fail ("%s: in-thread: unexpected value: %ld (%ld)\n" , args->tst_name, tst.tv_sec, now->tv_sec);return (void *)1UL ;
@@ -64,7 +64,7 @@ static int check(char *tst_name, struct timespec *now)for (i =0 ; i <2 ; i++) {_gettime (CLOCK_MONOTONIC , &tst, i); -if (abs (tst.tv_sec - now->tv_sec) >5 ) +if (labs (tst.tv_sec - now->tv_sec) >5 )return pr_fail ("%s: unexpected value: %ld (%ld)\n" , tst_name, tst.tv_sec, now->tv_sec); }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 114/129 selftests/vDSO: fix clang build errors and warnings
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: John Hubbard <[email protected]>
[ Upstream commit 73810cd45b99c6c418e1c6a487b52c1e74edb20d ]
When building with clang, via:
make LLVM=1 -C tools/testing/selftests
...there are several warnings, and an error. This fixes all of those and allows these tests to run and pass.
1. Fix linker error (undefined reference to memcpy) by providing a local version of memcpy.
2. clang complains about using this form:
if (g = h & 0xf0000000)
...so factor out the assignment into a separate step.
3. The code is passing a signed const char* to elf_hash(), which expects a const unsigned char *. There are several callers, so fix this at the source by allowing the function to accept a signed argument, and then converting to unsigned operations, once inside the function.
4. clang doesn't have __attribute__((externally_visible)) and generates a warning to that effect. Fortunately, gcc 12 and gcc 13 do not seem to require that attribute in order to build, run and pass tests here, so remove it.
--- tools/testing/selftests/vDSO/parse_vdso.c | 16 +++++++++++----- .../selftests/vDSO/vdso_standalone_test_x86.c | 18 ++++++++++++++++-- 2 files changed, 27 insertions(+), 7 deletions(-)
tools/testing/selftests/vDSO/parse_vdso.c +11 -5
@@ -55,14 +55,20 @@ static struct vdso_infoELF (Verdef) *verdef; } vdso_info; -/* Straight from the ELF specification. */ -static unsigned long elf_hash (const unsigned char *name) +/* +* Straight from the ELF specification...and then tweaked slightly, in order to +* avoid a few clang warnings. +*/ +static unsigned long elf_hash (const char *name) {unsigned long h =0 , g; -while (*name) +const unsigned char *uch_name = (const unsigned char *)name; + +while (*uch_name) { - h = (h <<4 ) + *name++; -if (g = h &0xf0000000 ) + h = (h <<4 ) + *uch_name++; + g = h &0xf0000000 ; +if (g) h ^= g >>24 ; h &= ~g; }
tools/testing/selftests/vDSO/vdso_standalone_test_x86.c +16 -2
@@ -18,7 +18,7 @@#include "parse_vdso.h" -/* We need a libc functions... */ +/* We need some libc functions... */ int strcmp (const char *a,const char *b) {/* This implementation is buggy: it never returns -1. */
@@ -34,6 +34,20 @@ int strcmp(const char *a, const char *b)return 0 ; } +/* +* The clang build needs this, although gcc does not. +* Stolen from lib/string.c. +*/ +void *memcpy (void *dest,const void *src,size_t count) +{ +char *tmp = dest; +const char *s = src; + +while (count--) + *tmp++ = *s++; +return dest; +} +/* ...and two syscalls. This is x86-specific. */ static inline long x86_syscall3 (long nr,long a0,long a1,long a2) {
@@ -70,7 +84,7 @@ void to_base10(char *lastdig, time_t n) } } -__attribute__((externally_visible))void c_main (void **stack) +void c_main (void **stack) {/* Parse the stack */ long argc = (long )*stack;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 115/129 hfsplus: fix uninit-value in copy_name
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Edward Adam Davis <[email protected]>
[ Upstream commit 0570730c16307a72f8241df12363f76600baf57d ]
[syzbot reported]
BUG: KMSAN: uninit-value in sized_strscpy+0xc4/0x160 sized_strscpy+0xc4/0x160 copy_name+0x2af/0x320 fs/hfsplus/xattr.c:411 hfsplus_listxattr+0x11e9/0x1a50 fs/hfsplus/xattr.c:750 vfs_listxattr fs/xattr.c:493 [inline] listxattr+0x1f3/0x6b0 fs/xattr.c:840 path_listxattr fs/xattr.c:864 [inline] __do_sys_listxattr fs/xattr.c:876 [inline] __se_sys_listxattr fs/xattr.c:873 [inline] __x64_sys_listxattr+0x16b/0x2f0 fs/xattr.c:873 x64_sys_call+0x2ba0/0x3b50 arch/x86/include/generated/asm/syscalls_64.h:195 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f
Uninit was created at:
slab_post_alloc_hook mm/slub.c:3877 [inline] slab_alloc_node mm/slub.c:3918 [inline] kmalloc_trace+0x57b/0xbe0 mm/slub.c:4065 kmalloc include/linux/slab.h:628 [inline] hfsplus_listxattr+0x4cc/0x1a50 fs/hfsplus/xattr.c:699 vfs_listxattr fs/xattr.c:493 [inline] listxattr+0x1f3/0x6b0 fs/xattr.c:840 path_listxattr fs/xattr.c:864 [inline] __do_sys_listxattr fs/xattr.c:876 [inline] __se_sys_listxattr fs/xattr.c:873 [inline] __x64_sys_listxattr+0x16b/0x2f0 fs/xattr.c:873 x64_sys_call+0x2ba0/0x3b50 arch/x86/include/generated/asm/syscalls_64.h:195 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f
[Fix]
When allocating memory to strbuf, initialize memory to 0.
--- fs/hfsplus/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/hfsplus/xattr.c +1 -1
@@ -698,7 +698,7 @@ ssize_t hfsplus_listxattr(struct dentry *dentry, char *buffer, size_t size)return err; } - strbuf =kmalloc (NLS_MAX_CHARSET_SIZE *HFSPLUS_ATTR_MAX_STRLEN + + strbuf =kzalloc (NLS_MAX_CHARSET_SIZE *HFSPLUS_ATTR_MAX_STRLEN +XATTR_MAC_OSX_PREFIX_LEN +1 ,GFP_KERNEL );if (!strbuf) { res = -ENOMEM ;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 116/129 selftests/bpf: Extend tcx tests to cover late tcx_entry release
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Borkmann <[email protected]>
[ Upstream commit 5f1d18de79180deac2822c93e431bbe547f7d3ce ]
Add a test case which replaces an active ingress qdisc while keeping the miniq in-tact during the transition period to the new clsact qdisc.
# ./vmtest.sh -- ./test_progs -t tc_link [...] ./test_progs -t tc_link [ 3.412871] bpf_testmod: loading out-of-tree module taints kernel. [ 3.413343] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel #332 tc_links_after:OK #333 tc_links_append:OK #334 tc_links_basic:OK #335 tc_links_before:OK #336 tc_links_chain_classic:OK #337 tc_links_chain_mixed:OK #338 tc_links_dev_chain0:OK #339 tc_links_dev_cleanup:OK #340 tc_links_dev_mixed:OK #341 tc_links_ingress:OK #342 tc_links_invalid:OK #343 tc_links_prepend:OK #344 tc_links_replace:OK #345 tc_links_revision:OK Summary: 14/0 PASSED, 0 SKIPPED, 0 FAILED
--- tools/testing/selftests/bpf/config | 3 + .../selftests/bpf/prog_tests/tc_links.c | 61 +++++++++++++++++++ 2 files changed, 64 insertions(+)
tools/testing/selftests/bpf/config +3 -0
@@ -52,9 +52,12 @@ CONFIG_MPLS=y CONFIG_MPLS_IPTUNNEL=y CONFIG_MPLS_ROUTING=y CONFIG_MPTCP=y +CONFIG_NET_ACT_SKBMOD=y +CONFIG_NET_CLS=y CONFIG_NET_CLS_ACT=y CONFIG_NET_CLS_BPF=y CONFIG_NET_CLS_FLOWER=y +CONFIG_NET_CLS_MATCHALL=y CONFIG_NET_FOU=y CONFIG_NET_FOU_IP_TUNNELS=y CONFIG_NET_IPGRE=y
tools/testing/selftests/bpf/prog_tests/tc_links.c +61 -0
73 lines not on this page · raw message
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 117/129 spi: mux: set ctlr->bits_per_word_mask
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Lechner <[email protected]>
[ Upstream commit c8bd922d924bb4ab6c6c488310157d1a27996f31 ]
Like other SPI controller flags, bits_per_word_mask may be used by a peripheral driver, so it needs to reflect the capabilities of the underlying controller.
--- drivers/spi/spi-mux.c | 1 + 1 file changed, 1 insertion(+)
drivers/spi/spi-mux.c +1 -0
@@ -156,6 +156,7 @@ static int spi_mux_probe(struct spi_device *spi)/* supported modes are the same as our parent's */ ctlr->mode_bits = spi->controller->mode_bits; ctlr->flags = spi->controller->flags; + ctlr->bits_per_word_mask = spi->controller->bits_per_word_mask; ctlr->transfer_one_message = spi_mux_transfer_one_message; ctlr->setup = spi_mux_setup; ctlr->num_chipselect =mux_control_states (priv->mux);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 118/129 ALSA: hda: Use imply for suggesting CONFIG_SERIAL_MULTI_INSTANTIATE
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <[email protected]>
[ Upstream commit 17563b4a19d1844bdbccc7a82d2f31c28ca9cfae ]
The recent fix introduced a reverse selection of CONFIG_SERIAL_MULTI_INSTANTIATE, but its condition isn't always met. Use a weak reverse selection to suggest the config for avoiding such inconsistencies, instead.
--- sound/pci/hda/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/pci/hda/Kconfig +2 -2
@@ -141,7 +141,7 @@ config SND_HDA_SCODEC_CS35L56_I2C depends on ACPI || COMPILE_TEST depends on SND_SOC select FW_CS_DSP - select SERIAL_MULTI_INSTANTIATE + imply SERIAL_MULTI_INSTANTIATE select SND_HDA_GENERIC select SND_SOC_CS35L56_SHARED select SND_HDA_SCODEC_CS35L56
@@ -156,7 +156,7 @@ config SND_HDA_SCODEC_CS35L56_SPI depends on ACPI || COMPILE_TEST depends on SND_SOC select FW_CS_DSP - select SERIAL_MULTI_INSTANTIATE + imply SERIAL_MULTI_INSTANTIATE select SND_HDA_GENERIC select SND_SOC_CS35L56_SHARED select SND_HDA_SCODEC_CS35L56
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 119/129 cifs: fix noisy message on copy_file_range
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Steve French <[email protected]>
commit ae4ccca47195332c69176b8615c5ee17efd30c46 upstream.
There are common cases where copy_file_range can noisily log "source and target of copy not on same server"
e.g. the mv command across mounts to two different server's shares. Change this to informational rather than logging as an error.
A followon patch will add dynamic trace points e.g. for cifs_file_copychunk_range
--- fs/smb/client/cifsfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/smb/client/cifsfs.c +1 -1
@@ -1404,7 +1404,7 @@ ssize_t cifs_file_copychunk_range(unsign target_tcon =tlink_tcon (smb_file_target->tlink);if (src_tcon->ses != target_tcon->ses) { -cifs_dbg (VFS ,"source and target of copy not on same server\n" ); +cifs_dbg (FYI ,"source and target of copy not on same server\n" ); goto out; }
Greg Kroah-Hartman
maintainerPATCH 120/129 ARM: 9324/1: fix get_user() broken with veneer
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Masahiro Yamada <[email protected]>
commit 24d3ba0a7b44c1617c27f5045eecc4f34752ab03 upstream.
The 32-bit ARM kernel stops working if the kernel grows to the point where veneers for __get_user_* are created.
AAPCS32 [1] states, "Register r12 (IP) may be used by a linker as a scratch register between a routine and any subroutine it calls. It can also be used within a routine to hold intermediate values between subroutine calls."
However, bl instructions buried within the inline asm are unpredictable for compilers; hence, "ip" must be added to the clobber list.
This becomes critical when veneers for __get_user_* are created because veneers use the ip register since commit 02e541db0540 ("ARM: 8323/1:
force linker to use PIC veneers").
[1]: https://github.com/ARM-software/abi-aa/blob/2023Q1/aapcs32/aapcs32.rst
--- arch/arm/include/asm/uaccess.h | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-)
arch/arm/include/asm/uaccess.h +2 -12
@@ -109,16 +109,6 @@ extern int __get_user_64t_1(void *);extern int __get_user_64t_2 (void *);extern int __get_user_64t_4 (void *); -#define __GUP_CLOBBER_1 "lr", "cc" -#ifdef CONFIG_CPU_USE_DOMAINS -#define __GUP_CLOBBER_2 "ip", "lr", "cc" -#else -#define __GUP_CLOBBER_2 "lr", "cc" -#endif -#define __GUP_CLOBBER_4 "lr", "cc" -#define __GUP_CLOBBER_32t_8 "lr", "cc" -#define __GUP_CLOBBER_8 "lr", "cc" -#define __get_user_x (__r2, __p, __e, __l, __s) \ __asm__ __volatile__ ( \ __asmeq("%0", "r0") __asmeq("%1", "r2") \
@@ -126,7 +116,7 @@ extern int __get_user_64t_4(void *); "bl __get_user_" #__s \ : "=&r" (__e), "=r" (__r2) \ : "0" (__p), "r" (__l) \ - : __GUP_CLOBBER_##__s) + : "ip", "lr", "cc")/* narrowing a double-word get into a single 32bit word register: */ #ifdef __ARMEB__
@@ -148,7 +138,7 @@ extern int __get_user_64t_4(void *); "bl __get_user_64t_" #__s \ : "=&r" (__e), "=r" (__r2) \ : "0" (__p), "r" (__l) \ - : __GUP_CLOBBER_##__s) + : "ip", "lr", "cc")#else #define __get_user_x_64t __get_user_x#endif
Greg Kroah-Hartman
maintainerPATCH 121/129 mm: page_ref: remove folio_try_get_rcu()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yang Shi <[email protected]>
commit fa2690af573dfefb47ba6eef888797a64b6b5f3c upstream.
The below bug was reported on a non-SMP kernel:
[ 275.267158][ T4335] ------------[ cut here ]------------ [ 275.267949][ T4335] kernel BUG at include/linux/page_ref.h:275! [ 275.268526][ T4335] invalid opcode: 0000 [#1] KASAN PTI [ 275.269001][ T4335] CPU: 0 PID: 4335 Comm: trinity-c3 Not tainted 6.7.0-rc4-00061-gefa7df3e3bb5 #1 [ 275.269787][ T4335] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 [ 275.270679][ T4335] RIP: 0010:try_get_folio (include/linux/page_ref.h:275 (discriminator 3) mm/gup.c:79 (discriminator 3)) [ 275.272813][ T4335] RSP: 0018:ffffc90005dcf650 EFLAGS: 00010202 [ 275.273346][ T4335] RAX: 0000000000000246 RBX: ffffea00066e0000 RCX: 0000000000000000 [ 275.274032][ T4335] RDX: fffff94000cdc007 RSI: 0000000000000004 RDI: ffffea00066e0034 [ 275.274719][ T4335] RBP: ffffea00066e0000 R08: 0000000000000000 R09: fffff94000cdc006 [ 275.275404][ T4335] R10: ffffea00066e0037 R11: 0000000000000000 R12: 0000000000000136 [ 275.276106][ T4335] R13: ffffea00066e0034 R14: dffffc0000000000 R15: ffffea00066e0008 [ 275.276790][ T4335] FS: 00007fa2f9b61740(0000) GS:ffffffff89d0d000(0000) knlGS:0000000000000000 [ 275.277570][ T4335] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 275.278143][ T4335] CR2: 00007fa2f6c00000 CR3: 0000000134b04000 CR4: 00000000000406f0 [ 275.278833][ T4335] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 275.279521][ T4335] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 275.280201][ T4335] Call Trace: [ 275.280499][ T4335] <TASK> [ 275.280751][ T4335] ? die (arch/x86/kernel/dumpstack.c:421 arch/x86/kernel/dumpstack.c:434 arch/x86/kernel/dumpstack.c:447) [ 275.281087][ T4335] ? do_trap (arch/x86/kernel/traps.c:112 arch/x86/kernel/traps.c:153) [ 275.281463][ T4335] ? try_get_folio (include/linux/page_ref.h:275 (discriminator 3) mm/gup.c:79 (discriminator 3)) [ 275.281884][ T4335] ? try_get_folio (include/linux/page_ref.h:275 (discriminator 3) mm/gup.c:79 (discriminator 3)) [ 275.282300][ T4335] ? do_error_trap (arch/x86/kernel/traps.c:174) [ 275.282711][ T4335] ? try_get_folio (include/linux/page_ref.h:275 (discriminator 3) mm/gup.c:79 (discriminator 3)) [ 275.283129][ T4335] ? handle_invalid_op (arch/x86/kernel/traps.c:212) [ 275.283561][ T4335] ? try_get_folio (include/linux/page_ref.h:275 (discriminator 3) mm/gup.c:79 (discriminator 3)) [ 275.283990][ T4335] ? exc_invalid_op (arch/x86/kernel/traps.c:264) [ 275.284415][ T4335] ? asm_exc_invalid_op (arch/x86/include/asm/idtentry.h:568) [ 275.284859][ T4335] ? try_get_folio (include/linux/page_ref.h:275 (discriminator 3) mm/gup.c:79 (discriminator 3)) [ 275.285278][ T4335] try_grab_folio (mm/gup.c:148) [ 275.285684][ T4335] __get_user_pages (mm/gup.c:1297 (discriminator 1)) [ 275.286111][ T4335] ? __pfx___get_user_pages (mm/gup.c:1188) [ 275.286579][ T4335] ? __pfx_validate_chain (kernel/locking/lockdep.c:3825) [ 275.287034][ T4335] ? mark_lock (kernel/locking/lockdep.c:4656 (discriminator 1)) [ 275.287416][ T4335] __gup_longterm_locked (mm/gup.c:1509 mm/gup.c:2209) [ 275.288192][ T4335] ? __pfx___gup_longterm_locked (mm/gup.c:2204) [ 275.288697][ T4335] ? __pfx_lock_acquire (kernel/locking/lockdep.c:5722) [ 275.289135][ T4335] ? __pfx___might_resched (kernel/sched/core.c:10106) [ 275.289595][ T4335] pin_user_pages_remote (mm/gup.c:3350) [ 275.290041][ T4335] ? __pfx_pin_user_pages_remote (mm/gup.c:3350) [ 275.290545][ T4335] ? find_held_lock (kernel/locking/lockdep.c:5244 (discriminator 1)) [ 275.290961][ T4335] ? mm_access (kernel/fork.c:1573) [ 275.291353][ T4335] process_vm_rw_single_vec+0x142/0x360 [ 275.291900][ T4335] ? __pfx_process_vm_rw_single_vec+0x10/0x10 [ 275.292471][ T4335] ? mm_access (kernel/fork.c:1573) [ 275.292859][ T4335] process_vm_rw_core+0x272/0x4e0 [ 275.293384][ T4335] ? hlock_class (arch/x86/include/asm/bitops.h:227 arch/x86/include/asm/bitops.h:239 include/asm-generic/bitops/instrumented-non-atomic.h:142 kernel/locking/lockdep.c:228) [ 275.293780][ T4335] ? __pfx_process_vm_rw_core+0x10/0x10 [ 275.294350][ T4335] process_vm_rw (mm/process_vm_access.c:284) [ 275.294748][ T4335] ? __pfx_process_vm_rw (mm/process_vm_access.c:259) [ 275.295197][ T4335] ? __task_pid_nr_ns (include/linux/rcupdate.h:306 (discriminator 1) include/linux/rcupdate.h:780 (discriminator 1) kernel/pid.c:504 (discriminator 1)) [ 275.295634][ T4335] __x64_sys_process_vm_readv (mm/process_vm_access.c:291) [ 275.296139][ T4335] ? syscall_enter_from_user_mode (kernel/entry/common.c:94 kernel/entry/common.c:112) [ 275.296642][ T4335] do_syscall_64 (arch/x86/entry/common.c:51 (discriminator 1) arch/x86/entry/common.c:82 (discriminator 1)) [ 275.297032][ T4335] ? __task_pid_nr_ns (include/linux/rcupdate.h:306 (discriminator 1) include/linux/rcupdate.h:780 (discriminator 1) kernel/pid.c:504 (discriminator 1)) [ 275.297470][ T4335] ? lockdep_hardirqs_on_prepare (kernel/locking/lockdep.c:4300 kernel/locking/lockdep.c:4359) [ 275.297988][ T4335] ? do_syscall_64 (arch/x86/include/asm/cpufeature.h:171 arch/x86/entry/common.c:97) [ 275.298389][ T4335] ? lockdep_hardirqs_on_prepare (kernel/locking/lockdep.c:4300 kernel/locking/lockdep.c:4359) [ 275.298906][ T4335] ? do_syscall_64 (arch/x86/include/asm/cpufeature.h:171 arch/x86/entry/common.c:97) [ 275.299304][ T4335] ? do_syscall_64 (arch/x86/include/asm/cpufeature.h:171 arch/x86/entry/common.c:97) [ 275.299703][ T4335] ? do_syscall_64 (arch/x86/include/asm/cpufeature.h:171 arch/x86/entry/common.c:97) [ 275.300115][ T4335] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:129)
This BUG is the VM_BUG_ON(!in_atomic() && !irqs_disabled()) assertion in folio_ref_try_add_rcu() for non-SMP kernel.
The process_vm_readv() calls GUP to pin the THP. An optimization for pinning THP instroduced by commit 57edfcfd3419 ("mm/gup: accelerate thp gup even for "pages != NULL"") calls try_grab_folio() to pin the THP, but try_grab_folio() is supposed to be called in atomic context for non-SMP kernel, for example, irq disabled or preemption disabled, due to the optimization introduced by commit e286781d5f2e ("mm: speculative page references").
The commit efa7df3e3bb5 ("mm: align larger anonymous mappings on THP boundaries") is not actually the root cause although it was bisected to. It just makes the problem exposed more likely.
The follow up discussion suggested the optimization for non-SMP kernel may be out-dated and not worth it anymore [1]. So removing the optimization to silence the BUG.
However calling try_grab_folio() in GUP slow path actually is unnecessary, so the following patch will clean this up.
[1] https://lore.kernel.org/linux-mm/821cf1d6-92b9-4ac4-bacc-d8f2364ac14f@paulmck-laptop/
--- fs/afs/write.c | 2 - fs/smb/client/file.c | 4 +-- include/linux/page_ref.h | 49 +---------------------------------------------- mm/filemap.c | 10 ++++----- mm/gup.c | 2 - 5 files changed, 11 insertions(+), 56 deletions(-)
fs/afs/write.c +1 -1
@@ -496,7 +496,7 @@ static void afs_extend_writeback(structif (folio_index (folio) != index)break ; -if (!folio_try_get_rcu (folio)) { +if (!folio_try_get (folio)) {xas_reset (&xas);continue ; }
fs/smb/client/file.c +2 -2
@@ -2749,7 +2749,7 @@ static void cifs_extend_writeback(structbreak ; } -if (!folio_try_get_rcu (folio)) { +if (!folio_try_get (folio)) {xas_reset (xas);continue ; }
@@ -2985,7 +2985,7 @@ search_again:if (!folio)break ; -if (!folio_try_get_rcu (folio)) { +if (!folio_try_get (folio)) {xas_reset (xas);continue ; }
include/linux/page_ref.h +2 -47
56 lines not on this page · raw message
mm/filemap.c +5 -5
@@ -1831,7 +1831,7 @@ repeat:if (!folio ||xa_is_value (folio)) goto out; -if (!folio_try_get_rcu (folio)) +if (!folio_try_get (folio)) goto repeat;if (unlikely (folio !=xas_reload (&xas))) {
@@ -1987,7 +1987,7 @@ retry:if (!folio ||xa_is_value (folio))return folio; -if (!folio_try_get_rcu (folio)) +if (!folio_try_get (folio)) goto reset;if (unlikely (folio !=xas_reload (xas))) {
@@ -2205,7 +2205,7 @@ unsigned filemap_get_folios_contig(strucif (xa_is_value (folio)) goto update_start; -if (!folio_try_get_rcu (folio)) +if (!folio_try_get (folio)) goto retry;if (unlikely (folio !=xas_reload (&xas)))
@@ -2340,7 +2340,7 @@ static void filemap_get_read_batch(strucbreak ;if (xa_is_sibling (folio))break ; -if (!folio_try_get_rcu (folio)) +if (!folio_try_get (folio)) goto retry;if (unlikely (folio !=xas_reload (&xas)))
@@ -3452,7 +3452,7 @@ static struct folio *next_uptodate_foliocontinue ;if (folio_test_locked (folio))continue ; -if (!folio_try_get_rcu (folio)) +if (!folio_try_get (folio))continue ;/* Has the page moved or been split? */ if (unlikely (folio !=xas_reload (xas)))
mm/gup.c +1 -1
@@ -76,7 +76,7 @@ retry: folio =page_folio (page);if (WARN_ON_ONCE (folio_ref_count (folio) <0 ))return NULL ; -if (unlikely (!folio_ref_try_add_rcu (folio, refs))) +if (unlikely (!folio_ref_try_add (folio, refs)))return NULL ;/*
Greg Kroah-Hartman
maintainerPATCH 122/129 Bluetooth: L2CAP: Fix deadlock
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luiz Augusto von Dentz <[email protected]>
commit f1a8f402f13f94263cf349216c257b2985100927 upstream.
This fixes the following deadlock introduced by 39a92a55be13 ("bluetooth/l2cap: sync sock recv cb and release")
============================================
WARNING: possible recursive locking detected 6.10.0-rc3-g4029dba6b6f1 #6823 Not tainted
--------------------------------------------
kworker/u5:0/35 is trying to acquire lock:ffff888002ec2510 (&chan->lock#2/1){+.+.}-{3:3}, at:l2cap_sock_recv_cb+0x44/0x1e0
but task is already holding lock:ffff888002ec2510 (&chan->lock#2/1){+.+.}-{3:3}, at:l2cap_get_chan_by_scid+0xaf/0xd0
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
---- lock(&chan->lock#2/1);
lock(&chan->lock#2/1);
*** DEADLOCK ***
May be due to missing lock nesting notation
3 locks held by kworker/u5:0/35:
#0: ffff888002b8a940 ((wq_completion)hci0#2){+.+.}-{0:0}, at:
process_one_work+0x750/0x930
#1: ffff888002c67dd0 ((work_completion)(&hdev->rx_work)){+.+.}-{0:0},
at: process_one_work+0x44e/0x930
#2: ffff888002ec2510 (&chan->lock#2/1){+.+.}-{3:3}, at:
l2cap_get_chan_by_scid+0xaf/0xd0To fix the original problem this introduces l2cap_chan_lock at l2cap_conless_channel to ensure that l2cap_sock_recv_cb is called with chan->lock held.
--- include/net/bluetooth/hci_sync.h | 2 + net/bluetooth/hci_core.c | 72 +++++++++------------------------------ net/bluetooth/hci_sync.c | 13 +++++++ net/bluetooth/l2cap_core.c | 3 + net/bluetooth/l2cap_sock.c | 13 ------- 5 files changed, 37 insertions(+), 66 deletions(-)
include/net/bluetooth/hci_sync.h +2 -0
@@ -38,6 +38,8 @@ int __hci_cmd_sync_status(struct hci_devint __hci_cmd_sync_status_sk (struct hci_dev *hdev,u16 opcode,u32 plen,const void *param,u8 event,u32 timeout,struct sock *sk); +int hci_cmd_sync_status (struct hci_dev *hdev,u16 opcode,u32 plen, +const void *param,u32 timeout);void hci_cmd_sync_init (struct hci_dev *hdev);void hci_cmd_sync_clear (struct hci_dev *hdev);
net/bluetooth/hci_core.c +18 -54
109 lines not on this page · raw message
net/bluetooth/hci_sync.c +13 -0
@@ -280,6 +280,19 @@ int __hci_cmd_sync_status(struct hci_dev }EXPORT_SYMBOL (__hci_cmd_sync_status); +int hci_cmd_sync_status (struct hci_dev *hdev,u16 opcode,u32 plen, +const void *param,u32 timeout) +{ +int err; + +hci_req_sync_lock (hdev); + err =__hci_cmd_sync_status (hdev, opcode, plen, param, timeout); +hci_req_sync_unlock (hdev); + +return err; +} +EXPORT_SYMBOL (hci_cmd_sync_status); +static void hci_cmd_sync_work (struct work_struct *work) { struct hci_dev *hdev = container_of(work, struct hci_dev, cmd_sync_work);
net/bluetooth/l2cap_core.c +3 -0
@@ -6762,6 +6762,8 @@ static void l2cap_conless_channel(structBT_DBG ("chan %p, len %d" , chan, skb->len); +l2cap_chan_lock (chan); +if (chan->state !=BT_BOUND && chan->state !=BT_CONNECTED ) goto drop;
@@ -6778,6 +6780,7 @@ static void l2cap_conless_channel(struct } drop: +l2cap_chan_unlock (chan);l2cap_chan_put (chan); free_skb:kfree_skb (skb);
net/bluetooth/l2cap_sock.c +1 -12
@@ -1500,18 +1500,9 @@ static int l2cap_sock_recv_cb(struct l2cstruct l2cap_pinfo *pi;int err; -/* To avoid race with sock_release, a chan lock needs to be added here -* to synchronize the sock. -*/ -l2cap_chan_hold (chan); -l2cap_chan_lock (chan); sk = chan->data; - -if (!sk) { -l2cap_chan_unlock (chan); -l2cap_chan_put (chan); +if (!sk)return -ENXIO ; - } pi =l2cap_pi (sk);lock_sock (sk);
@@ -1563,8 +1554,6 @@ static int l2cap_sock_recv_cb(struct l2c done:release_sock (sk); -l2cap_chan_unlock (chan); -l2cap_chan_put (chan);return err; }
Greg Kroah-Hartman
maintainerPATCH 123/129 of/irq: Disable "interrupt-map" parsing for PASEMI Nemo
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marc Zyngier <[email protected]>
commit 2cf6b7d15a28640117bf9f75dc050892cf78a6e8 upstream.
Once again, we've broken PASEMI Nemo boards with its incomplete "interrupt-map" translations. Commit 935df1bd40d4 ("of/irq: Factor out parsing of interrupt-map parent phandle+args from of_irq_parse_raw()") changed the behavior resulting in the existing work-around not taking effect. Rework the work-around to just skip parsing "interrupt-map" up front by using the of_irq_imap_abusers list.
--- drivers/of/irq.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-)
drivers/of/irq.c +4 -14
@@ -81,7 +81,8 @@ EXPORT_SYMBOL_GPL(of_irq_find_parent);/* * These interrupt controllers abuse interrupt-map for unspeakable * reasons and rely on the core code to *ignore* it (the drivers do -* their own parsing of the property). +* their own parsing of the property). The PAsemi entry covers a +* non-sensical interrupt-map that is better left ignored. * * If you think of adding to the list for something *new*, think * again. There is a high chance that you will be sent back to the
@@ -95,6 +96,7 @@ static const char * const of_irq_imap_ab"fsl,ls1043a-extirq" ,"fsl,ls1088a-extirq" ,"renesas,rza1-irqc" , +"pasemi,rootbus" , NULL, };
@@ -293,20 +295,8 @@ int of_irq_parse_raw(const __be32 *addr, imaplen -= imap - oldimap;pr_debug (" -> imaplen=%d\n" , imaplen); } -if (!match) { -if (intc) { -/* -* The PASEMI Nemo is a known offender, so -* let's only warn for anyone else. -*/ -WARN (!IS_ENABLED (CONFIG_PPC_PASEMI ), -"%pOF interrupt-map failed, using interrupt-controller\n" , - ipar); -return 0 ; - } - +if (!match) goto fail; - }/* * Successfully parsed an interrupt-map translation; copy new
Greg Kroah-Hartman
maintainerPATCH 124/129 wifi: cfg80211: wext: set ssids=NULL for passive scans
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johannes Berg <[email protected]>
commit 0941772342d59e48733131ac3a202fa1a4d832e9 upstream.
In nl80211, we always set the ssids of a scan request to NULL when n_ssids==0 (passive scan). Drivers have relied on this behaviour in the past, so we fixed it in 6 GHz scan requests as well, and added a warning so we'd have assurance the API would always be called that way.
syzbot found that wext doesn't ensure that, so we reach the check and trigger the warning. Fix the wext code to set the ssids pointer to NULL when there are none.
--- net/wireless/scan.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
net/wireless/scan.c +3 -1
@@ -3259,8 +3259,10 @@ int cfg80211_wext_siwscan(struct net_devmemcpy (creq->ssids[0 ].ssid, wreq->essid, wreq->essid_len); creq->ssids[0 ].ssid_len = wreq->essid_len; } -if (wreq->scan_type ==IW_SCAN_TYPE_PASSIVE ) +if (wreq->scan_type ==IW_SCAN_TYPE_PASSIVE ) { + creq->ssids =NULL ; creq->n_ssids =0 ; + } }for (i =0 ; i <NUM_NL80211_BANDS ; i++)
Greg Kroah-Hartman
maintainerPATCH 125/129 wifi: mac80211: disable softirqs for queued frame handling
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johannes Berg <[email protected]>
commit 321028bc45f01edb9e57b0ae5c11c5c3600d00ca upstream.
As noticed by syzbot, calling ieee80211_handle_queued_frames() (and actually handling frames there) requires softirqs to be disabled, since we call into the RX code. Fix that in the case of cleaning up frames left over during shutdown.
--- net/mac80211/main.c | 1 + net/mac80211/util.c | 2 ++ 2 files changed, 3 insertions(+)
net/mac80211/main.c +1 -0
@@ -301,6 +301,7 @@ u64 ieee80211_reset_erp_info(struct ieeeBSS_CHANGED_ERP_SLOT ; } +/* context: requires softirqs disabled */ void ieee80211_handle_queued_frames (struct ieee80211_local *local) {struct sk_buff *skb;
net/mac80211/util.c +2 -0
@@ -2313,7 +2313,9 @@ u32 ieee80211_sta_get_rates(struct ieee8void ieee80211_stop_device (struct ieee80211_local *local) { +local_bh_disable ();ieee80211_handle_queued_frames (local); +local_bh_enable ();ieee80211_led_radio (local, false);ieee80211_mod_tpt_led_trig (local,0 ,IEEE80211_TPT_LEDTRIG_FL_RADIO );
Greg Kroah-Hartman
maintainerPATCH 126/129 wifi: iwlwifi: mvm: dont wake up rx_sync_waitq upon RFKILL
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Emmanuel Grumbach <[email protected]>
commit e715c9302b1c6fae990b9898a80fac855549d1f0 upstream.
Since we now want to sync the queues even when we're in RFKILL, we shouldn't wake up the wait queue since we still expect to get all the notifications from the firmware.
--- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +2 -4
@@ -6094,11 +6094,9 @@ void iwl_mvm_sync_rx_queues_internal(strif (sync) {lockdep_assert_held (&mvm->mutex); ret =wait_event_timeout (mvm->rx_sync_waitq, -READ_ONCE (mvm->queue_sync_state) ==0 || -iwl_mvm_is_radio_killed (mvm), +READ_ONCE (mvm->queue_sync_state) ==0 ,HZ ); -WARN_ONCE (!ret && !iwl_mvm_is_radio_killed (mvm), -"queue sync: failed to sync, state is 0x%lx\n" , +WARN_ONCE (!ret,"queue sync: failed to sync, state is 0x%lx\n" , mvm->queue_sync_state); }
Greg Kroah-Hartman
maintainerPATCH 127/129 netfs, fscache: export fscache_put_volume() and add fscache_try_get_volume()
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 85b08b31a22b481ec6528130daf94eee4452e23f ]
Export fscache_put_volume() and add fscache_try_get_volume() helper function to allow cachefiles to get/put fscache_volume via linux/fscache-cache.h.
Stable-dep-of: 522018a0de6b ("cachefiles: fix slab-use-after-free in fscache_withdraw_volume()")
Stable-dep-of: 5d8f80578907 ("cachefiles: fix slab-use-after-free in cachefiles_withdraw_cookie()")
--- fs/fscache/internal.h | 2 -- fs/fscache/volume.c | 14 ++++++++++++++ include/linux/fscache-cache.h | 6 ++++++ 3 files changed, 20 insertions(+), 2 deletions(-)
fs/fscache/internal.h +0 -2
@@ -145,8 +145,6 @@ extern const struct seq_operations fscacstruct fscache_volume *fscache_get_volume (struct fscache_volume *volume,enum fscache_volume_trace where); -void fscache_put_volume (struct fscache_volume *volume, -enum fscache_volume_trace where);bool fscache_begin_volume_access (struct fscache_volume *volume,struct fscache_cookie *cookie,enum fscache_access_trace why);
fs/fscache/volume.c +14 -0
@@ -27,6 +27,19 @@ struct fscache_volume *fscache_get_volumreturn volume; } +struct fscache_volume *fscache_try_get_volume (struct fscache_volume *volume, +enum fscache_volume_trace where) +{ +int ref; + +if (!__refcount_inc_not_zero (&volume->ref, &ref)) +return NULL ; + +trace_fscache_volume (volume->debug_id, ref +1 , where); +return volume; +} +EXPORT_SYMBOL (fscache_try_get_volume); +static void fscache_see_volume (struct fscache_volume *volume,enum fscache_volume_trace where) {
@@ -420,6 +433,7 @@ void fscache_put_volume(struct fscache_vfscache_free_volume (volume); } } +EXPORT_SYMBOL (fscache_put_volume);/* * Relinquish a volume representation cookie.
include/linux/fscache-cache.h +6 -0
@@ -19,6 +19,7 @@enum fscache_cache_trace ;enum fscache_cookie_trace ;enum fscache_access_trace ; +enum fscache_volume_trace ;enum fscache_cache_state {FSCACHE_CACHE_IS_NOT_PRESENT ,/* No cache is present for this name */
@@ -97,6 +98,11 @@ extern void fscache_withdraw_cookie(struextern void fscache_io_error (struct fscache_cache *cache); +extern struct fscache_volume * +fscache_try_get_volume (struct fscache_volume *volume, +enum fscache_volume_trace where); +extern void fscache_put_volume (struct fscache_volume *volume, +enum fscache_volume_trace where);extern void fscache_end_volume_access (struct fscache_volume *volume,struct fscache_cookie *cookie,enum fscache_access_trace why);
Greg Kroah-Hartman
maintainerPATCH 128/129 cachefiles: fix slab-use-after-free in fscache_withdraw_volume()
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 522018a0de6b6fcce60c04f86dfc5f0e4b6a1b36 ]
We got the following issue in our fault injection stress test:
==================================================================
BUG: KASAN: slab-use-after-free in fscache_withdraw_volume+0x2e1/0x370 Read of size 4 at addr ffff88810680be08 by task ondemand-04-dae/5798 CPU: 0 PID: 5798 Comm: ondemand-04-dae Not tainted 6.8.0-dirty #565 Call Trace: kasan_check_range+0xf6/0x1b0 fscache_withdraw_volume+0x2e1/0x370 cachefiles_withdraw_volume+0x31/0x50 cachefiles_withdraw_cache+0x3ad/0x900 cachefiles_put_unbind_pincount+0x1f6/0x250 cachefiles_daemon_release+0x13b/0x290 __fput+0x204/0xa00 task_work_run+0x139/0x230 Allocated by task 5820: __kmalloc+0x1df/0x4b0 fscache_alloc_volume+0x70/0x600 __fscache_acquire_volume+0x1c/0x610 erofs_fscache_register_volume+0x96/0x1a0 erofs_fscache_register_fs+0x49a/0x690 erofs_fc_fill_super+0x6c0/0xcc0 vfs_get_super+0xa9/0x140 vfs_get_tree+0x8e/0x300 do_new_mount+0x28c/0x580 [...] Freed by task 5820: kfree+0xf1/0x2c0 fscache_put_volume.part.0+0x5cb/0x9e0 erofs_fscache_unregister_fs+0x157/0x1b0 erofs_kill_sb+0xd9/0x1c0 deactivate_locked_super+0xa3/0x100 vfs_get_super+0x105/0x140 vfs_get_tree+0x8e/0x300 do_new_mount+0x28c/0x580 [...] ==================================================================
Following is the process that triggers the issue:
mount failed | daemon exit
------------------------------------------------------------
deactivate_locked_super cachefiles_daemon_release
erofs_kill_sb
erofs_fscache_unregister_fs
fscache_relinquish_volume
__fscache_relinquish_volume
fscache_put_volume(fscache_volume, fscache_volume_put_relinquish)
zero = __refcount_dec_and_test(&fscache_volume->ref, &ref);
cachefiles_put_unbind_pincount
cachefiles_daemon_unbind
cachefiles_withdraw_cache
cachefiles_withdraw_volumes
list_del_init(&volume->cache_link)
fscache_free_volume(fscache_volume)
cache->ops->free_volume
cachefiles_free_volume
list_del_init(&cachefiles_volume->cache_link);
kfree(fscache_volume)
cachefiles_withdraw_volume
fscache_withdraw_volume
fscache_volume->n_accesses
// fscache_volume UAF !!!The fscache_volume in cache->volumes must not have been freed yet, but its reference count may be 0. So use the new fscache_try_get_volume() helper function try to get its reference count.
If the reference count of fscache_volume is 0, fscache_put_volume() is freeing it, so wait for it to be removed from cache->volumes.
If its reference count is not 0, call cachefiles_withdraw_volume() with reference count protection to avoid the above issue.
--- fs/cachefiles/cache.c | 10 ++++++++++ include/trace/events/fscache.h | 4 ++++ 2 files changed, 14 insertions(+)
fs/cachefiles/cache.c +10 -0
@@ -8,6 +8,7 @@#include <linux/slab.h> #include <linux/statfs.h> #include <linux/namei.h> +#include <trace/events/fscache.h> #include "internal.h" /*
@@ -319,12 +320,20 @@ static void cachefiles_withdraw_volumes(_enter ("" );for (;;) { +struct fscache_volume *vcookie =NULL ;struct cachefiles_volume *volume =NULL ;spin_lock (&cache->object_list_lock);if (!list_empty (&cache->volumes)) { volume =list_first_entry (&cache->volumes, struct cachefiles_volume, cache_link); + vcookie =fscache_try_get_volume (volume->vcookie, + fscache_volume_get_withdraw); +if (!vcookie) { +spin_unlock (&cache->object_list_lock); +cpu_relax (); +continue ; + }list_del_init (&volume->cache_link); }spin_unlock (&cache->object_list_lock);
@@ -332,6 +341,7 @@ static void cachefiles_withdraw_volumes(break ;cachefiles_withdraw_volume (volume); +fscache_put_volume (vcookie, fscache_volume_put_withdraw); }_leave ("" );
include/trace/events/fscache.h +4 -0
@@ -35,12 +35,14 @@ enum fscache_volume_trace { fscache_volume_get_cookie, fscache_volume_get_create_work, fscache_volume_get_hash_collision, + fscache_volume_get_withdraw, fscache_volume_free, fscache_volume_new_acquire, fscache_volume_put_cookie, fscache_volume_put_create_work, fscache_volume_put_hash_collision, fscache_volume_put_relinquish, + fscache_volume_put_withdraw, fscache_volume_see_create_work, fscache_volume_see_hash_wake, fscache_volume_wait_create_work,
@@ -120,12 +122,14 @@ enum fscache_access_trace { EM(fscache_volume_get_cookie, "GET cook ") \ EM(fscache_volume_get_create_work, "GET creat") \ EM(fscache_volume_get_hash_collision, "GET hcoll") \ + EM(fscache_volume_get_withdraw, "GET withd") \ EM(fscache_volume_free, "FREE ") \ EM(fscache_volume_new_acquire, "NEW acq ") \ EM(fscache_volume_put_cookie, "PUT cook ") \ EM(fscache_volume_put_create_work, "PUT creat") \ EM(fscache_volume_put_hash_collision, "PUT hcoll") \ EM(fscache_volume_put_relinquish, "PUT relnq") \ + EM(fscache_volume_put_withdraw, "PUT withd") \ EM(fscache_volume_see_create_work, "SEE creat") \ EM(fscache_volume_see_hash_wake, "SEE hwake") \E_ (fscache_volume_wait_create_work,"WAIT crea" )
Greg Kroah-Hartman
maintainerPATCH 129/129 cachefiles: fix slab-use-after-free in cachefiles_withdraw_cookie()
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 5d8f805789072ea7fd39504694b7bd17e5f751c4 ]
We got the following issue in our fault injection stress test:
==================================================================
BUG: KASAN: slab-use-after-free in cachefiles_withdraw_cookie+0x4d9/0x600 Read of size 8 at addr ffff888118efc000 by task kworker/u78:0/109 CPU: 13 PID: 109 Comm: kworker/u78:0 Not tainted 6.8.0-dirty #566 Call Trace: <TASK> kasan_report+0x93/0xc0 cachefiles_withdraw_cookie+0x4d9/0x600 fscache_cookie_state_machine+0x5c8/0x1230 fscache_cookie_worker+0x91/0x1c0 process_one_work+0x7fa/0x1800 [...] Allocated by task 117: kmalloc_trace+0x1b3/0x3c0 cachefiles_acquire_volume+0xf3/0x9c0 fscache_create_volume_work+0x97/0x150 process_one_work+0x7fa/0x1800 [...] Freed by task 120301: kfree+0xf1/0x2c0 cachefiles_withdraw_cache+0x3fa/0x920 cachefiles_put_unbind_pincount+0x1f6/0x250 cachefiles_daemon_release+0x13b/0x290 __fput+0x204/0xa00 task_work_run+0x139/0x230 do_exit+0x87a/0x29b0 [...] ==================================================================
Following is the process that triggers the issue:
p1 | p2
------------------------------------------------------------
fscache_begin_lookup
fscache_begin_volume_access
fscache_cache_is_live(fscache_cache)cachefiles_daemon_release
cachefiles_put_unbind_pincount
cachefiles_daemon_unbind
cachefiles_withdraw_cache
fscache_withdraw_cache
fscache_set_cache_state(cache, FSCACHE_CACHE_IS_WITHDRAWN);
cachefiles_withdraw_objects(cache)
fscache_wait_for_objects(fscache)
atomic_read(&fscache_cache->object_count) == 0
fscache_perform_lookup
cachefiles_lookup_cookie
cachefiles_alloc_object
refcount_set(&object->ref, 1);
object->volume = volume
fscache_count_object(vcookie->cache);
atomic_inc(&fscache_cache->object_count)
cachefiles_withdraw_volumes
cachefiles_withdraw_volume
fscache_withdraw_volume
__cachefiles_free_volume
kfree(cachefiles_volume)
fscache_cookie_state_machine
cachefiles_withdraw_cookie
cache = object->volume->cache;
// cachefiles_volume UAF !!!After setting FSCACHE_CACHE_IS_WITHDRAWN, wait for all the cookie lookups to complete first, and then wait for fscache_cache->object_count == 0 to avoid the cookie exiting after the volume has been freed and triggering the above issue. Therefore call fscache_withdraw_volume() before calling cachefiles_withdraw_objects().
This way, after setting FSCACHE_CACHE_IS_WITHDRAWN, only the following two cases will occur:
1) fscache_begin_lookup fails in fscache_begin_volume_access().
2) fscache_withdraw_volume() will ensure that fscache_count_object() has been executed before calling fscache_wait_for_objects().
--- fs/cachefiles/cache.c | 35 ++++++++++++++++++++++++++++++++++- fs/cachefiles/volume.c | 1 - 2 files changed, 34 insertions(+), 2 deletions(-)
fs/cachefiles/cache.c +34 -1
@@ -313,7 +313,39 @@ static void cachefiles_withdraw_objects( }/* -* Withdraw volumes. +* Withdraw fscache volumes. +*/ +static void cachefiles_withdraw_fscache_volumes (struct cachefiles_cache *cache) +{ +struct list_head *cur; +struct cachefiles_volume *volume; +struct fscache_volume *vcookie; + +_enter ("" ); +retry: +spin_lock (&cache->object_list_lock); +list_for_each (cur, &cache->volumes) { + volume = list_entry(cur, struct cachefiles_volume, cache_link); + +if (atomic_read (&volume->vcookie->n_accesses) ==0 ) +continue ; + + vcookie =fscache_try_get_volume (volume->vcookie, + fscache_volume_get_withdraw); +if (vcookie) { +spin_unlock (&cache->object_list_lock); +fscache_withdraw_volume (vcookie); +fscache_put_volume (vcookie, fscache_volume_put_withdraw); + goto retry; + } + } +spin_unlock (&cache->object_list_lock); + +_leave ("" ); +} + +/* +* Withdraw cachefiles volumes. */ static void cachefiles_withdraw_volumes (struct cachefiles_cache *cache) {
@@ -381,6 +413,7 @@ void cachefiles_withdraw_cache(struct capr_info ("File cache on %s unregistering\n" , fscache->name);fscache_withdraw_cache (fscache); +cachefiles_withdraw_fscache_volumes (cache);/* we now have to destroy all the active objects pertaining to this * cache - which we do by passing them off to thread pool to be
fs/cachefiles/volume.c +0 -1
@@ -133,7 +133,6 @@ void cachefiles_free_volume(struct fscacvoid cachefiles_withdraw_volume (struct cachefiles_volume *volume) { -fscache_withdraw_volume (volume->vcookie);cachefiles_set_volume_xattr (volume);__cachefiles_free_volume (volume); }
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.42 release. There are 129 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 25 Jul 2024 18:03:23 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.42-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels, build tested on BMIPS_GENERIC:
Signature · 1 line
Florian
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.42 release. There are 129 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 25 Jul 2024 18:03:23 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.42-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v6.6:
10 builds: 10 pass, 0 fail
26 boots: 26 pass, 0 fail
116 tests: 116 pass, 0 failLinux version: 6.6.42-rc1-gc74fd6c58fb1
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra194-p3509-0000+p3668-0000,
tegra20-ventana, tegra210-p2371-2180,
tegra210-p3450-0000, tegra30-cardhu-a04Jon
Hi Greg,
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.42 release. There are 129 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 25 Jul 2024 18:03:23 +0000. Anything received after that time might be too late.
No problems seen on x86_64 and aarch64 with our testing.
Thanks,
Harshit
Quoted 10 lines
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.42-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
Quoted 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.42 release. There are 129 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.
Quoted 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.42 release. There are 129 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.
Hi Greg
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.42 release. There are 129 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 25 Jul 2024 18:03:23 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.42-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
6.6.42-rc1 tested.
Build successfully completed.
Boot successfully completed.
No dmesg regressions.
Video output normal.
Sound output normal.
Lenovo ThinkPad X1 Carbon Gen10(Intel i7-1260P(x86_64) arch linux)
[ 0.000000] Linux version 6.6.42-rc1rv
(takeshi@ThinkPadX1Gen10J0764) (gcc (GCC) 14.1.1 20240720, GNU ld (GNU Binutils) 2.42.0) #1 SMP PREEMPT_DYNAMIC Wed Jul 24 20:33:24 JST 2024
Thanks
Am 23.07.2024 um 20:22 schrieb Greg Kroah-Hartman:
Quoted 4 lines
This is the start of the stable review cycle for the 6.6.42 release. There are 129 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.
Builds, boots and works on my 2-socket Ivy Bridge Xeon E5-2697 v2 server. No dmesg oddities or regressions found.
Beste Grüße,
Peter Schneider
Signature · 8 lines
Climb the mountain not to plant your flag, but to embrace the challenge, enjoy the air and behold the view. Climb it so you can see the world, not so the world can see you. -- David McCullough Jr. OpenPGP: 0xA3828BD796CCE11A8CADE8866E3A92C92C3FF244 Download: https://www.peters-netzplatz.de/download/pschneider1968_pub.asc https://keys.mailvelope.com/pks/lookup?op=get&[email protected] https://keys.mailvelope.com/pks/lookup?op=get&[email protected]
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.42 release. There are 129 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.
Quoted 9 lines
Responses should be made by Thu, 25 Jul 2024 18:03:23 +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.42-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.
KernelCI report for stable-rc/linux-6.6.y for this week :-
Date: 2024-07-24
## Build failures:
No **new** boot failures seen for the stable-rc/linux-6.6.y commit head \o/
## Boot failures:
No **new** boot failures seen for the stable-rc/linux-6.6.y commit head \o/
Thanks,
Shreeya Patel
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.42 release. There are 129 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 25 Jul 2024 18:03:23 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.42-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.42 release. There are 129 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 25 Jul 2024 18:03:23 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.42-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
## Build
* kernel: 6.6.42-rc1
* git: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
* git commit: c74fd6c58fb18e0bab49dfb540cb0a9b3bbddc7e
* git describe: v6.6.41-130-gc74fd6c58fb1
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.6.y/build/v6.6.41-130-gc74fd6c58fb1
## Test Regressions (compared to v6.6.38-261-g6b4f5445e6e6)
## Metric Regressions (compared to v6.6.38-261-g6b4f5445e6e6)
## Test Fixes (compared to v6.6.38-261-g6b4f5445e6e6)
## Metric Fixes (compared to v6.6.38-261-g6b4f5445e6e6)
## Test result summary
total: 220969, pass: 191018, fail: 3225, skip: 26302, xfail: 424
## Build Summary
* arc: 5 total, 5 passed, 0 failed
* arm: 127 total, 127 passed, 0 failed
* arm64: 36 total, 36 passed, 0 failed
* i386: 27 total, 27 passed, 0 failed
* mips: 24 total, 24 passed, 0 failed
* parisc: 3 total, 3 passed, 0 failed
* powerpc: 34 total, 34 passed, 0 failed
* riscv: 17 total, 17 passed, 0 failed
* s390: 12 total, 12 passed, 0 failed
* sh: 10 total, 10 passed, 0 failed
* sparc: 6 total, 6 passed, 0 failed
* x86_64: 31 total, 30 passed, 1 failed
## Test suites summary
* boot
* kselftest-arm64
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-efivarfs
* kselftest-exec
* kselftest-filesystems
* kselftest-filesystems-binderfs
* kselftest-filesystems-epoll
* kselftest-firmware
* kselftest-fpu
* kselftest-ftrace
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-kcmp
* kselftest-kvm
* kselftest-livepatch
* kselftest-membarrier
* kselftest-memfd
* kselftest-mincore
* kselftest-mqueue
* kselftest-net
* kselftest-net-mptcp
* kselftest-openat2
* kselftest-ptrace
* kselftest-rseq
* kselftest-rtc
* kselftest-seccomp
* kselftest-sigaltstack
* kselftest-size
* kselftest-tc-testing
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user_events
* kselftest-vDSO
* kselftest-watchdog
* kselftest-x86
* kunit
* kvm-unit-tests
* libgpiod
* libhugetlbfs
* log-parser-boot
* log-parser-test
* ltp-commands
* ltp-containers
* ltp-controllers
* ltp-cpuhotplug
* ltp-crypto
* ltp-cve
* ltp-dio
* ltp-fcntl-locktests
* ltp-fs
* ltp-fs_bind
* ltp-fs_perms_simple
* ltp-hugetlb
* ltp-ipc
* ltp-math
* ltp-mm
* ltp-nptl
* ltp-pty
* ltp-sched
* ltp-smoke
* ltp-smoketest
* ltp-syscalls
* ltp-tracing
* perf
* rcutorture
--
Linaro LKFT
https://lkft.linaro.org
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.6.42 release. There are 129 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 25 Jul 2024 18:03:23 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.42-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.thanks,
greg k-h
Built and booted successfully on RISC-V RV64 (HiFive Unmatched).