5.15.17-rc1 review
Subsystems (9)
Greg Kroah-Hartman
maintainerPATCH 36/846 ksmbd: add support for smb2 max credit parameter
In reply to Greg Kroah-HartmanFrom: Namjae Jeon <[email protected]>
commit 004443b3f6d722b455cf963ed7c3edd7f4772405 upstream.
Add smb2 max credits parameter to adjust maximum credits value to limit number of outstanding requests.
--- fs/ksmbd/connection.h | 1 - fs/ksmbd/ksmbd_netlink.h | 1 + fs/ksmbd/smb2misc.c | 2 +- fs/ksmbd/smb2ops.c | 16 ++++++++++++---- fs/ksmbd/smb2pdu.c | 8 ++++---- fs/ksmbd/smb2pdu.h | 1 + fs/ksmbd/smb_common.h | 1 + fs/ksmbd/transport_ipc.c | 2 ++ 8 files changed, 22 insertions(+), 10 deletions(-)
fs/ksmbd/connection.h +0 -1
@@ -62,7 +62,6 @@ struct ksmbd_conn {/* References which are made for this Server object*/ atomic_t r_count;unsigned short total_credits; -unsigned short max_credits;spinlock_t credits_lock;wait_queue_head_t req_running_q;/* Lock to protect requests list*/
fs/ksmbd/ksmbd_netlink.h +1 -0
@@ -103,6 +103,7 @@ struct ksmbd_startup_request {* we set the SPARSE_FILES bit (0x40). */ __u32 sub_auth[3 ];/* Subauth value for Security ID */ +__u32 smb2_max_credits;/* MAX credits */ __u32 ifc_list_sz;/* interfaces list size */ __s8 ____payload[]; };
fs/ksmbd/smb2misc.c +1 -1
@@ -327,7 +327,7 @@ static int smb2_validate_credit_charge(sksmbd_debug (SMB ,"Insufficient credit charge, given: %d, needed: %d\n" , credit_charge, calc_credit_num);return 1 ; - }else if (credit_charge > conn->max_credits) { + }else if (credit_charge > conn->vals->max_credits) {ksmbd_debug (SMB ,"Too large credit charge: %d\n" , credit_charge);return 1 ; }
fs/ksmbd/smb2ops.c +12 -4
@@ -20,6 +20,7 @@ static struct smb_version_values smb21_s .max_read_size = SMB21_DEFAULT_IOSIZE, .max_write_size = SMB21_DEFAULT_IOSIZE, .max_trans_size = SMB21_DEFAULT_IOSIZE, + .max_credits = SMB2_MAX_CREDITS, .large_lock_type = 0, .exclusive_lock_type = SMB2_LOCKFLAG_EXCLUSIVE, .shared_lock_type = SMB2_LOCKFLAG_SHARED,
@@ -45,6 +46,7 @@ static struct smb_version_values smb30_s .max_read_size = SMB3_DEFAULT_IOSIZE, .max_write_size = SMB3_DEFAULT_IOSIZE, .max_trans_size = SMB3_DEFAULT_TRANS_SIZE, + .max_credits = SMB2_MAX_CREDITS, .large_lock_type = 0, .exclusive_lock_type = SMB2_LOCKFLAG_EXCLUSIVE, .shared_lock_type = SMB2_LOCKFLAG_SHARED,
@@ -71,6 +73,7 @@ static struct smb_version_values smb302_ .max_read_size = SMB3_DEFAULT_IOSIZE, .max_write_size = SMB3_DEFAULT_IOSIZE, .max_trans_size = SMB3_DEFAULT_TRANS_SIZE, + .max_credits = SMB2_MAX_CREDITS, .large_lock_type = 0, .exclusive_lock_type = SMB2_LOCKFLAG_EXCLUSIVE, .shared_lock_type = SMB2_LOCKFLAG_SHARED,
@@ -97,6 +100,7 @@ static struct smb_version_values smb311_ .max_read_size = SMB3_DEFAULT_IOSIZE, .max_write_size = SMB3_DEFAULT_IOSIZE, .max_trans_size = SMB3_DEFAULT_TRANS_SIZE, + .max_credits = SMB2_MAX_CREDITS, .large_lock_type = 0, .exclusive_lock_type = SMB2_LOCKFLAG_EXCLUSIVE, .shared_lock_type = SMB2_LOCKFLAG_SHARED,
@@ -198,7 +202,6 @@ void init_smb2_1_server(struct ksmbd_con conn->ops = &smb2_0_server_ops; conn->cmds = smb2_0_server_cmds; conn->max_cmds =ARRAY_SIZE (smb2_0_server_cmds); - conn->max_credits =SMB2_MAX_CREDITS ; conn->signing_algorithm =SIGNING_ALG_HMAC_SHA256 ;if (server_conf.flags &KSMBD_GLOBAL_FLAG_SMB2_LEASES )
@@ -216,7 +219,6 @@ void init_smb3_0_server(struct ksmbd_con conn->ops = &smb3_0_server_ops; conn->cmds = smb2_0_server_cmds; conn->max_cmds =ARRAY_SIZE (smb2_0_server_cmds); - conn->max_credits =SMB2_MAX_CREDITS ; conn->signing_algorithm =SIGNING_ALG_AES_CMAC ;if (server_conf.flags &KSMBD_GLOBAL_FLAG_SMB2_LEASES )
@@ -241,7 +243,6 @@ void init_smb3_02_server(struct ksmbd_co conn->ops = &smb3_0_server_ops; conn->cmds = smb2_0_server_cmds; conn->max_cmds =ARRAY_SIZE (smb2_0_server_cmds); - conn->max_credits =SMB2_MAX_CREDITS ; conn->signing_algorithm =SIGNING_ALG_AES_CMAC ;if (server_conf.flags &KSMBD_GLOBAL_FLAG_SMB2_LEASES )
@@ -266,7 +267,6 @@ int init_smb3_11_server(struct ksmbd_con conn->ops = &smb3_11_server_ops; conn->cmds = smb2_0_server_cmds; conn->max_cmds =ARRAY_SIZE (smb2_0_server_cmds); - conn->max_credits =SMB2_MAX_CREDITS ; conn->signing_algorithm =SIGNING_ALG_AES_CMAC ;if (server_conf.flags &KSMBD_GLOBAL_FLAG_SMB2_LEASES )
@@ -305,3 +305,11 @@ void init_smb2_max_trans_size(unsigned i smb302_server_values.max_trans_size = sz; smb311_server_values.max_trans_size = sz; } + +void init_smb2_max_credits (unsigned int sz) +{ + smb21_server_values.max_credits = sz; + smb30_server_values.max_credits = sz; + smb302_server_values.max_credits = sz; + smb311_server_values.max_credits = sz; +}
fs/ksmbd/smb2pdu.c +4 -4
@@ -310,7 +310,7 @@ int smb2_set_rsp_credits(struct ksmbd_wo hdr->CreditCharge = req_hdr->CreditCharge; -if (conn->total_credits > conn->max_credits) { +if (conn->total_credits > conn->vals->max_credits) { hdr->CreditRequest =0 ;pr_err ("Total credits overflow: %d\n" , conn->total_credits);return -EINVAL ;
@@ -331,12 +331,12 @@ int smb2_set_rsp_credits(struct ksmbd_woif (hdr->Command ==SMB2_NEGOTIATE ) aux_max =0 ;else - aux_max = conn->max_credits - credit_charge; + aux_max = conn->vals->max_credits - credit_charge; aux_credits = min_t(unsigned short, aux_credits, aux_max); credits_granted = credit_charge + aux_credits; -if (conn->max_credits - conn->total_credits < credits_granted) - credits_granted = conn->max_credits - +if (conn->vals->max_credits - conn->total_credits < credits_granted) + credits_granted = conn->vals->max_credits - conn->total_credits; conn->total_credits += credits_granted;
fs/ksmbd/smb2pdu.h +1 -0
@@ -1647,6 +1647,7 @@ int init_smb3_11_server(struct ksmbd_convoid init_smb2_max_read_size (unsigned int sz);void init_smb2_max_write_size (unsigned int sz);void init_smb2_max_trans_size (unsigned int sz); +void init_smb2_max_credits (unsigned int sz);bool is_smb2_neg_cmd (struct ksmbd_work *work);bool is_smb2_rsp (struct ksmbd_work *work);
fs/ksmbd/smb_common.h +1 -0
@@ -412,6 +412,7 @@ struct smb_version_values {__u32 max_read_size;__u32 max_write_size;__u32 max_trans_size; +__u32 max_credits;__u32 large_lock_type;__u32 exclusive_lock_type;__u32 shared_lock_type;
fs/ksmbd/transport_ipc.c +2 -0
@@ -301,6 +301,8 @@ static int ipc_server_config_on_startup(init_smb2_max_write_size (req->smb2_max_write);if (req->smb2_max_trans)init_smb2_max_trans_size (req->smb2_max_trans); +if (req->smb2_max_credits) +init_smb2_max_credits (req->smb2_max_credits); ret =ksmbd_set_netbios_name (req->netbios_name); ret |=ksmbd_set_server_string (req->server_string);
Greg Kroah-Hartman
maintainerPATCH 3/846 HID: Ignore battery for Elan touchscreen on HP Envy X360 15t-dr100
In reply to Greg Kroah-HartmanFrom: Karl Kurbjun <[email protected]>
commit f3193ea1b6779023334faa72b214ece457e02656 upstream.
Battery status on Elan tablet driver is reported for the HP ENVY x360 15t-dr100. There is no separate battery for the Elan controller resulting in a battery level report of 0% or 1% depending on whether a stylus has interacted with the screen. These low battery level reports causes a variety of bad behavior in desktop environments. This patch adds the appropriate quirk to indicate that the batery status is unused for this target.
--- drivers/hid/hid-ids.h | 1 + drivers/hid/hid-input.c | 2 ++ 2 files changed, 3 insertions(+)
drivers/hid/hid-ids.h +1 -0
@@ -394,6 +394,7 @@#define USB_DEVICE_ID_HP_X2 0x074d#define USB_DEVICE_ID_HP_X2_10_COVER 0x0755#define I2C_DEVICE_ID_HP_SPECTRE_X360_15 0x2817 +#define I2C_DEVICE_ID_HP_ENVY_X360_15T_DR100 0x29CF#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 +2 -0
@@ -327,6 +327,8 @@ static const struct hid_device_id hid_ba HID_BATTERY_QUIRK_IGNORE }, {HID_USB_DEVICE (USB_VENDOR_ID_ELAN ,USB_DEVICE_ID_ASUS_UX550VE_TOUCHSCREEN ), HID_BATTERY_QUIRK_IGNORE }, + { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_ENVY_X360_15T_DR100), + HID_BATTERY_QUIRK_IGNORE }, { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_SPECTRE_X360_15), HID_BATTERY_QUIRK_IGNORE }, { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_SURFACE_GO_TOUCHSCREEN),
Greg Kroah-Hartman
maintainercover 5.15.17-rc1 review
This is the start of the stable review cycle for the 5.15.17 release. There are 846 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 26 Jan 2022 18:39:11 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.15.17-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.15.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 5.15.17-rc1
Andrey Konovalov <[email protected]>
lib/test_meminit: destroy cache in kmem_cache_alloc_bulk() test
Moshe Tal <[email protected]>
bonding: Fix extraction of ports from the packet headers
Alistair Popple <[email protected]>
mm/hmm.c: allow VM_MIXEDMAP to work with hmm_range_fault
Miaoqian Lin <[email protected]>
lib82596: Fix IRQ check in sni_82596_probe
Matthias Schiffer <[email protected]>
scripts/dtc: dtx_diff: remove broken example from help text
Maxim Mikityanskiy <[email protected]>
sch_api: Don't skip qdisc attach on ingress
Sam Protsenko <[email protected]>
dt-bindings: watchdog: Require samsung,syscon-phandle for Exynos7
Alexander Stein <[email protected]>
dt-bindings: display: meson-vpu: Add missing amlogic,canvas property
Alexander Stein <[email protected]>
dt-bindings: display: meson-dw-hdmi: add missing sound-name-prefix property
Tom Rix <[email protected]>
net: mscc: ocelot: fix using match before it is set
Claudiu Beznea <[email protected]>
net: phy: micrel: use kszphy_suspend()/kszphy_resume for irq aware devices
Ard Biesheuvel <[email protected]>
net: cpsw: avoid alignment faults by taking NET_IP_ALIGN into account
Russell King (Oracle) <[email protected]>
net: sfp: fix high power modules without diagnostic monitoring
Horatiu Vultur <[email protected]>
net: ocelot: Fix the call to switchdev_bridge_port_offload
Tom Rix <[email protected]>
net: ethernet: mtk_eth_soc: fix error checking in mtk_mac_config()
Slark Xiao <[email protected]>
net: wwan: Fix MRU mismatch issue which may lead to data connection lost
Sergey Shtylyov <[email protected]>
bcmgenet: add WOL IRQ check
Vladimir Oltean <[email protected]>
net: mscc: ocelot: don't let phylink re-enable TX PAUSE on the NPI port
Kevin Bracey <[email protected]>
net_sched: restore "mpu xxx" handling
Alex Elder <[email protected]>
net: ipa: fix atomic update in ipa_endpoint_replenish()
Jie Wang <[email protected]>
net: bonding: fix bond_xmit_broadcast return value error bug
Miroslav Lichvar <[email protected]>
net: fix sock_timestamping_bind_phc() to release device
David Heidelberg <[email protected]>
arm64: dts: qcom: msm8996: drop not documented adreno properties
Leon Romanovsky <[email protected]>
devlink: Remove misleading internal_flags from health reporter dump
Zechuan Chen <[email protected]>
perf probe: Fix ppc64 'perf probe add events failed' case
Uwe Kleine-König <[email protected]>
perf tools: Drop requirement for libstdc++.so for libopencsd check
Tudor Ambarus <[email protected]>
dmaengine: at_xdmac: Fix at_xdmac_lld struct definition
Tudor Ambarus <[email protected]>
dmaengine: at_xdmac: Fix lld view setting
Tudor Ambarus <[email protected]>
dmaengine: at_xdmac: Fix concurrency over xfers_list
Tudor Ambarus <[email protected]>
dmaengine: at_xdmac: Print debug message after realeasing the lock
Tudor Ambarus <[email protected]>
dmaengine: at_xdmac: Start transfer for cyclic channels in issue_pending
Tudor Ambarus <[email protected]>
dmaengine: at_xdmac: Don't start transactions at tx_submit level
Adrian Hunter <[email protected]>
perf script: Fix hex dump character output
Guillaume Nault <[email protected]>
libcxgb: Don't accidentally set RTO_ONLINK in cxgb_find_route()
Guillaume Nault <[email protected]>
gre: Don't accidentally set RTO_ONLINK in gre_fill_metadata_dst()
Eli Cohen <[email protected]>
vdpa/mlx5: Restore cur_num_vqs in case of failure in change_num_qps()
Guillaume Nault <[email protected]>
xfrm: Don't accidentally set RTO_ONLINK in decode_session4()
Johannes Berg <[email protected]>
iwlwifi: fix Bz NMI behaviour
Eric Dumazet <[email protected]>
netns: add schedule point in ops_exit_list()
Eric Dumazet <[email protected]>
inet: frags: annotate races around fqdir->dead and fqdir->high_thresh
Eric W. Biederman <[email protected]>
taskstats: Cleanup the use of task->exit_code
Michael S. Tsirkin <[email protected]>
virtio_ring: mark ring unused on error
Eli Cohen <[email protected]>
vdpa/mlx5: Fix wrong configuration of virtio_version_1_0
Laurence de Bruxelles <[email protected]>
rtc: pxa: fix null pointer dereference
Dmitry Torokhov <[email protected]>
HID: vivaldi: fix handling devices not using numbered reports
Johannes Berg <[email protected]>
um: gitignore: Add kernel/capflags.c
Yury Norov <[email protected]>
bitops: protect find_first_{,zero}_bit properly
Robert Hancock <[email protected]>
net: axienet: increase default TX ring size to 128
Robert Hancock <[email protected]>
net: axienet: fix for TX busy handling
Robert Hancock <[email protected]>
net: axienet: fix number of TX ring slots for available check
Robert Hancock <[email protected]>
net: axienet: Fix TX ring slot available check
Robert Hancock <[email protected]>
net: axienet: limit minimum TX ring size
Robert Hancock <[email protected]>
net: axienet: add missing memory barriers
Robert Hancock <[email protected]>
net: axienet: reset core on initialization prior to MDIO access
Robert Hancock <[email protected]>
net: axienet: Wait for PhyRstCmplt after core reset
Robert Hancock <[email protected]>
net: axienet: increase reset timeout
Wen Gu <[email protected]>
net/smc: Fix hung_task when removing SMC-R devices
Miaoqian Lin <[email protected]>
gpio: idt3243x: Fix IRQ check in idt_gpio_probe
Miaoqian Lin <[email protected]>
gpio: mpc8xxx: Fix IRQ check in mpc8xxx_probe
John Keeping <[email protected]>
pinctrl/rockchip: fix gpio device creation
Robert Hancock <[email protected]>
clk: si5341: Fix clock HW provider cleanup
Stephen Boyd <[email protected]>
clk: Emit a stern warning with writable debugfs enabled
Eric Dumazet <[email protected]>
af_unix: annote lockless accesses to unix_tot_inflight & gc_in_progress
Dan Carpenter <[email protected]>
crypto: octeontx2 - uninitialized variable in kvf_limits_store()
Chao Yu <[email protected]>
f2fs: fix to check available space of CP area correctly in update_ckpt_flags()
Chao Yu <[email protected]>
f2fs: fix to reserve space for IO align feature
Hyeong-Jun Kim <[email protected]>
f2fs: compress: fix potential deadlock of compress file
Chao Yu <[email protected]>
f2fs: fix to avoid panic in is_alive() if metadata is inconsistent
Fengnan Chang <[email protected]>
f2fs: fix remove page failed in invalidate compress pages
Zack Rusin <[email protected]>
drm/vmwgfx: Remove unused compile options
Zack Rusin <[email protected]>
drm/vmwgfx: Remove explicit transparent hugepages support
Geert Uytterhoeven <[email protected]>
riscv: dts: microchip: mpfs: Drop empty chosen node
Miaoqian Lin <[email protected]>
parisc: pdc_stable: Fix memory leak in pdcs_register_pathentries
Tobias Waldekranz <[email protected]>
net/fsl: xgmac_mdio: Fix incorrect iounmap when removing module
Tobias Waldekranz <[email protected]>
net/fsl: xgmac_mdio: Add workaround for erratum A-009885
Guillaume Nault <[email protected]>
mlx5: Don't accidentally set RTO_ONLINK before mlx5e_route_lookup_ipv4_get()
Eric Dumazet <[email protected]>
ipv4: avoid quadratic behavior in netns dismantle
Eric Dumazet <[email protected]>
ipv4: update fib_info_cnt under spinlock protection
German Gomez <[email protected]>
perf evsel: Override attr->sample_period for non-libpfm4 events
Daniel Borkmann <[email protected]>
bpf: Mark PTR_TO_FUNC register initially with zero offset
Yafang Shao <[email protected]>
bpf: Fix mount source show for bpffs
Toke Høiland-Jørgensen <[email protected]>
xdp: check prog type before updating BPF link
Quentin Monnet <[email protected]>
bpftool: Fix indent in option lists in the documentation
Quentin Monnet <[email protected]>
bpftool: Remove inclusion of utilities.mak from Makefiles
Russell King <[email protected]>
arm64/bpf: Remove 128MB limit for BPF JIT programs
Maxime Ripard <[email protected]>
drm/vc4: crtc: Copy assigned channel to the CRTC
Maxime Ripard <[email protected]>
drm/vc4: Fix non-blocking commit getting stuck forever
Maxime Ripard <[email protected]>
drm/vc4: crtc: Drop feed_txp from state
Ye Bin <[email protected]>
block: Fix fsync always failed if once failed
Jens Axboe <[email protected]>
block: fix async_depth sysfs interface for mq-deadline
Tobias Waldekranz <[email protected]>
powerpc/fsl/dts: Enable WA for erratum A-009885 on fman3l MDIO buses
Anders Roxell <[email protected]>
powerpc/cell: Fix clang -Wimplicit-fallthrough warning
Moshe Shemesh <[email protected]>
Revert "net/mlx5: Add retry mechanism to the command entry index allocation"
Amelie Delaunay <[email protected]>
dmaengine: stm32-mdma: fix STM32_MDMA_CTBR_TSEL_MASK
Chengguang Xu <[email protected]>
RDMA/rxe: Fix a typo in opcode name
Yixing Liu <[email protected]>
RDMA/hns: Modify the mapping attribute of doorbell to device
Dave Jiang <[email protected]>
dmaengine: idxd: fix wq settings post wq disable
Kunihiko Hayashi <[email protected]>
dmaengine: uniphier-xdmac: Fix type of address variables
Håkon Bugge <[email protected]>
RDMA/cma: Remove open coding of overflow checking for private_data_len
Miaoqian Lin <[email protected]>
scsi: ufs: ufs-mediatek: Fix error checking in ufs_mtk_init_va09_pwr_ctrl()
Bart Van Assche <[email protected]>
scsi: core: Show SCMD_LAST in text form
Luiz Augusto von Dentz <[email protected]>
Bluetooth: hci_sync: Fix not setting adv set duration
Markus Reichl <[email protected]>
net: usb: Correct reset handling of smsc95xx
Mark Chen <[email protected]>
Bluetooth: btusb: Return error code when getting patch status failed
Randy Dunlap <[email protected]>
Documentation: fix firewire.rst ABI file path error
Lukas Bulwahn <[email protected]>
Documentation: refer to config RANDOMIZE_BASE for kernel address-space randomization
Alexandre Ghiti <[email protected]>
Documentation, arch: Remove leftovers from CIFS_WEAK_PW_HASH
Alexandre Ghiti <[email protected]>
Documentation, arch: Remove leftovers from raw device
Sakari Ailus <[email protected]>
Documentation: ACPI: Fix data node reference documentation
Daniel Thompson <[email protected]>
Documentation: dmaengine: Correctly describe dmatest with channel unset
Mike Leach <[email protected]>
Documentation: coresight: Fix documentation issue
Randy Dunlap <[email protected]>
media: correct MEDIA_TEST_SUPPORT help text
Maxime Ripard <[email protected]>
drm/vc4: hdmi: Make sure the device is powered with CEC
Suresh Udipi <[email protected]>
media: rcar-csi2: Optimize the selection PHTW register
Marc Kleine-Budde <[email protected]>
can: mcp251xfd: mcp251xfd_tef_obj_read(): fix typo in error message
Ben Hutchings <[email protected]>
firmware: Update Kconfig help text for Google firmware
Baruch Siach <[email protected]>
of: base: Improve argument length mismatch error
Christian König <[email protected]>
drm/radeon: fix error handling in radeon_driver_open_kms
Rajneesh Bhardwaj <[email protected]>
Revert "drm/amdgpu: Don't inherit GEM object VMAs in child process"
Aaron Ma <[email protected]>
ath11k: qmi: avoid error messages when dma allocation fails
Nikita Yushchenko <[email protected]>
tracing/osnoise: Properly unhook events if start_per_cpu_kthreads() fails
Theodore Ts'o <[email protected]>
ext4: don't use the orphan list when migrating an inode
Zhang Yi <[email protected]>
ext4: fix an use-after-free issue about data=journal writeback mode
Ye Bin <[email protected]>
ext4: fix null-ptr-deref in '__ext4_journal_ensure_credits'
Sebastian Andrzej Siewior <[email protected]>
ext4: destroy ext4_fc_dentry_cachep kmemcache on module removal
Xin Yin <[email protected]>
ext4: fast commit may miss tracking unwritten range during ftruncate
Xin Yin <[email protected]>
ext4: use ext4_ext_remove_space() for fast commit replay delete range
Ye Bin <[email protected]>
ext4: Fix BUG_ON in ext4_bread when write quota data
Luís Henriques <[email protected]>
ext4: set csum seed in tmp inode while migrating to extents
Xin Yin <[email protected]>
ext4: fix fast commit may miss tracking range for FALLOC_FL_ZERO_RANGE
Harshad Shirwadkar <[email protected]>
ext4: initialize err_blk before calling __ext4_get_inode_loc
Chunguang Xu <[email protected]>
ext4: fix a possible ABBA deadlock due to busy PA
Jan Kara <[email protected]>
ext4: make sure quota gets properly shutdown on error
Jan Kara <[email protected]>
ext4: make sure to reset inode lockdep class when quota enabling fails
Filipe Manana <[email protected]>
btrfs: respect the max size in the header when activating swap file
Josef Bacik <[email protected]>
btrfs: check the root node for uptodate before returning it
Filipe Manana <[email protected]>
btrfs: fix deadlock between quota enable and other quota operations
Nicolas Dichtel <[email protected]>
xfrm: fix dflt policy check when there is no policy configured
Ghalem Boudour <[email protected]>
xfrm: fix policy lookup for ipv6 gre packets
Pali Rohár <[email protected]>
PCI: pci-bridge-emul: Set PCI_STATUS_CAP_LIST for PCIe device
Pali Rohár <[email protected]>
PCI: pci-bridge-emul: Correctly set PCIe capabilities
Pali Rohár <[email protected]>
PCI: pci-bridge-emul: Fix definitions of reserved bits
Pali Rohár <[email protected]>
PCI: pci-bridge-emul: Properly mark reserved PCIe bits in PCI config space
Pali Rohár <[email protected]>
PCI: pci-bridge-emul: Make expansion ROM Base Address register read-only
Lukas Wunner <[email protected]>
PCI: pciehp: Fix infinite loop in IRQ handler upon power fault
Hans de Goede <[email protected]>
PCI: pciehp: Use down_read/write_nested(reset_lock) to fix lockdep errors
Rob Herring <[email protected]>
PCI: xgene: Fix IB window setup
José Roberto de Souza <[email protected]>
drm/i915/display/ehl: Update voltage swing table
Alex Deucher <[email protected]>
drm/amdgpu: don't do resets on APUs which don't support it
James Smart <[email protected]>
scsi: lpfc: Fix lpfc_force_rscn ndlp kref imbalance
Nicholas Piggin <[email protected]>
powerpc/64s/radix: Fix huge vmap false positive
John David Anglin <[email protected]>
parisc: Fix lpa and lpa_user defines
Brian Norris <[email protected]>
drm/bridge: analogix_dp: Make PSR-exit block less
Ilia Mirkin <[email protected]>
drm/nouveau/kms/nv04: use vzalloc for nv04_display
Yizhuo Zhai <[email protected]>
drm/amd/display: Fix the uninitialized variable in enable_stream_features()
Lucas Stach <[email protected]>
drm/etnaviv: limit submit sizes
Dmitry Osipenko <[email protected]>
drm/tegra: submit: Add missing pm_runtime_mark_last_busy()
Sakari Ailus <[email protected]>
device property: Fix fwnode_graph_devcon_match() fwnode leak
Alexander Gordeev <[email protected]>
s390/mm: fix 2KB pgtable release race
Ilan Peer <[email protected]>
iwlwifi: mvm: Increase the scan timeout guard to 30 seconds
Christophe JAILLET <[email protected]>
remoteproc: imx_rproc: Fix a resource leak in the remove function
Steven Rostedt <[email protected]>
tracing: Have syscall trace events use trace_event_buffer_lock_reserve()
Xiangyang Zhang <[email protected]>
tracing/kprobes: 'nmissed' not showed correctly for kretprobe
Andrey Ryabinin <[email protected]>
sched/cpuacct: Fix user/system in shown cpuacct.usage*
Andrey Ryabinin <[email protected]>
cputime, cpuacct: Include guest time in user time in cpuacct.stat
Lukas Wunner <[email protected]>
serial: Fix incorrect rs485 polarity on uart open
Xie Yongji <[email protected]>
fuse: Pass correct lend value to filemap_write_and_wait_range()
Christophe JAILLET <[email protected]>
HID: magicmouse: Fix an error handling path in magicmouse_probe()
Xiao Ni <[email protected]>
md: Move alloc/free acct bioset in to personality
Oleksandr Andrushchenko <[email protected]>
xen/gntdev: fix unmap notification order
Kunihiko Hayashi <[email protected]>
spi: uniphier: Fix a bug that doesn't point to private data correctly
Dmitry Osipenko <[email protected]>
mfd: tps65910: Set PWR_OFF bit during driver probe
Patrick Williams <[email protected]>
tpm: fix NPE on probe for missing device
Lino Sanfilippo <[email protected]>
tpm: fix potential NULL pointer access in tpm_del_char_device
Petr Cvachoucek <[email protected]>
ubifs: Error path in ubifs_remount_rw() seems to wrongly free write buffers
Meng Li <[email protected]>
crypto: caam - replace this_cpu_ptr with raw_cpu_ptr
Marek Vasut <[email protected]>
crypto: stm32/crc32 - Fix kernel BUG triggered in probe()
Heiner Kallweit <[email protected]>
crypto: omap-aes - Fix broken pm_runtime_and_get() usage
Zhu Lingshan <[email protected]>
ifcvf/vDPA: fix misuse virtio-net device config size for blk dev
Arnaud Pouliquen <[email protected]>
rpmsg: core: Clean up resources on announce_create failure.
Andrew Lunn <[email protected]>
udp6: Use Segment Routing Header for dest address if present
Andrew Lunn <[email protected]>
icmp: ICMPV6: Examine invoking packet for Segment Route Headers.
Andrew Lunn <[email protected]>
seg6: export get_srh() for ICMP handling
Conor Dooley <[email protected]>
mailbox: change mailbox-mpfs compatible string
Miaoqian Lin <[email protected]>
phy: mediatek: Fix missing check in mtk_mipi_tx_probe
Ohad Sharabi <[email protected]>
habanalabs: skip read fw errors if dynamic descriptor invalid
Tzung-Bi Shih <[email protected]>
ASoC: mediatek: mt8183: fix device_node leak
Tzung-Bi Shih <[email protected]>
ASoC: mediatek: mt8173: fix device_node leak
Chunfeng Yun <[email protected]>
phy: phy-mtk-tphy: add support efuse setting
Tzung-Bi Shih <[email protected]>
ASoC: mediatek: mt8192-mt6359: fix device_node leak
Sreekanth Reddy <[email protected]>
scsi: mpi3mr: Fixes around reply request queues
Christoph Hellwig <[email protected]>
scsi: sr: Don't use GFP_DMA
Tianjia Zhang <[email protected]>
MIPS: Octeon: Fix build errors using clang
Michael Ellerman <[email protected]>
selftests/powerpc: Add a test of sigreturning to the kernel
Lakshmi Sowjanya D <[email protected]>
i2c: designware-pci: Fix to change data types of hcnt and lcnt parameters
Marc Zyngier <[email protected]>
irqchip/gic-v4: Disable redistributors' view of the VPE table at boot time
Ye Guojin <[email protected]>
MIPS: OCTEON: add put_device() after of_find_device_by_node()
Jan Kara <[email protected]>
udf: Fix error handling in udf_new_inode()
Hari Bathini <[email protected]>
powerpc/fadump: Fix inaccurate CPU state info in vmcore generated with panic
Hari Bathini <[email protected]>
powerpc: handle kdump appropriately with crash_kexec_post_notifiers option
Thadeu Lima de Souza Cascardo <[email protected]>
selftests/powerpc/spectre_v2: Return skip code when miss_percent is high
Christophe Leroy <[email protected]>
powerpc/40x: Map 32Mbytes of memory at startup
Nathan Chancellor <[email protected]>
MIPS: Loongson64: Use three arguments for slti
Takashi Iwai <[email protected]>
ALSA: seq: Set upper limit of processed events
James Smart <[email protected]>
scsi: lpfc: Trigger SLI4 firmware dump before doing driver cleanup
James Smart <[email protected]>
scsi: lpfc: Fix leaked lpfc_dmabuf mbox allocations with NPIV
Bart Van Assche <[email protected]>
scsi: ufs: Fix a kernel crash during shutdown
Stephan Gerhold <[email protected]>
interconnect: qcom: rpm: Prevent integer overflow in rate
Christoph Hellwig <[email protected]>
dm: fix alloc_dax error handling in alloc_dev
Srinivas Kandagatla <[email protected]>
nvmem: core: set size for sysfs bin file
Christophe Leroy <[email protected]>
w1: Misuse of get_user()/put_user() reported by sparse
Alexey Kardashevskiy <[email protected]>
KVM: PPC: Book3S: Suppress failed alloc warning in H_COPY_TOFROM_GUEST
Alexey Kardashevskiy <[email protected]>
KVM: PPC: Book3S: Suppress warnings when allocating too big memory slots
Christophe Leroy <[email protected]>
powerpc/powermac: Add missing lockdep_register_key()
Martin Blumenstingl <[email protected]>
clk: meson: gxbb: Fix the SDM_EN bit for MPLL0 on GXBB
Joakim Tjernlund <[email protected]>
i2c: mpc: Correct I2C reset procedure
Michael Ellerman <[email protected]>
powerpc/smp: Move setup_profiling_timer() under CONFIG_PROFILING
Heiner Kallweit <[email protected]>
i2c: i801: Don't silently correct invalid transfer size
Ye Guojin <[email protected]>
ASoC: imx-hdmi: add put_device() after of_find_device_by_node()
Nicholas Piggin <[email protected]>
powerpc/watchdog: Fix missed watchdog reset due to memory ordering race
Julia Lawall <[email protected]>
powerpc/btext: add missing of_node_put
Julia Lawall <[email protected]>
powerpc/cell: add missing of_node_put
Julia Lawall <[email protected]>
powerpc/powernv: add missing of_node_put
Julia Lawall <[email protected]>
powerpc/6xx: add missing of_node_put
Ingo Molnar <[email protected]>
x86/kbuild: Enable CONFIG_KALLSYMS_ALL=y in the defconfigs
Marc Kleine-Budde <[email protected]>
can: flexcan: add more quirks to describe RX path capabilities
Marc Kleine-Budde <[email protected]>
can: flexcan: rename RX modes
Dario Binacchi <[email protected]>
can: flexcan: allow to change quirks at runtime
Mauro Carvalho Chehab <[email protected]>
scripts: sphinx-pre-install: Fix ctex support on Debian
John David Anglin <[email protected]>
parisc: Avoid calling faulthandler_disabled() twice
Maor Dickman <[email protected]>
net/mlx5e: Unblock setting vid 0 for VF in case PF isn't eswitch manager
Maher Sanalla <[email protected]>
net/mlx5: Update log_max_qp value to FW max capability
Jason A. Donenfeld <[email protected]>
random: do not throw away excess input to crng_fast_load
Lukas Wunner <[email protected]>
serial: core: Keep mctrl register state and cached copy in sync
Lukas Wunner <[email protected]>
serial: pl011: Drop CR register reset on set_termios
Lukas Wunner <[email protected]>
serial: pl010: Drop CR register reset on set_termios
Konrad Dybcio <[email protected]>
regulator: qcom_smd: Align probe function with rpmh-regulator
Russell King (Oracle) <[email protected]>
net: gemini: allow any RGMII interface mode
Russell King (Oracle) <[email protected]>
net: phy: marvell: configure RGMII delays for 88E1118
Danielle Ratson <[email protected]>
mlxsw: pci: Avoid flow control for EMAD packets
Jiri Olsa <[email protected]>
bpf/selftests: Fix namespace mount setup in tc_redirect
Joe Thornber <[email protected]>
dm space map common: add bounds check to sm_ll_lookup_bitmap()
Joe Thornber <[email protected]>
dm btree: add a defensive bounds check to insert_at()
Ping-Ke Shih <[email protected]>
mac80211: allow non-standard VHT MCS-10/11
Florian Fainelli <[email protected]>
net: mdio: Demote probed message to debug print
Josef Bacik <[email protected]>
btrfs: remove BUG_ON(!eie) in find_parent_nodes
Josef Bacik <[email protected]>
btrfs: remove BUG_ON() in find_parent_nodes()
Mario Limonciello <[email protected]>
ACPI: CPPC: Check present CPUs for determining _CPC is valid
Thomas Weißschuh <[email protected]>
ACPI: battery: Add the ThinkPad "Not Charging" quirk
Marina Nikolic <[email protected]>
amdgpu/pm: Make sysfs pm attributes as read-only for VFs
Zongmin Zhou <[email protected]>
drm/amdgpu: fixup bad vram size on gmc v8
Rajneesh Bhardwaj <[email protected]>
drm/amdgpu: Don't inherit GEM object VMAs in child process
AngeloGioacchino Del Regno <[email protected]>
mmc: mtk-sd: Use readl_poll_timeout instead of open-coded polling
Kirill A. Shutemov <[email protected]>
ACPICA: Hardware: Do not flush CPU cache when entering S4 and S5
Sudeep Holla <[email protected]>
ACPICA: Fix wrong interpretation of PCC address
Rafael J. Wysocki <[email protected]>
ACPICA: Executer: Fix the REFCLASS_REFOF case in acpi_ex_opcode_1A_0T_1R()
Rafael J. Wysocki <[email protected]>
ACPICA: Utilities: Avoid deleting the same object twice in a row
Mark Langsdorf <[email protected]>
ACPICA: actypes.h: Expand the ACPI_ACCESS_ definitions
Kyeong Yoo <[email protected]>
jffs2: GC deadlock reading a page that is used in jffs2_write_begin()
Lucas Stach <[email protected]>
drm/etnaviv: consider completed fence seqno in hang check
Antony Antony <[email protected]>
xfrm: rate limit SA mapping change message to user space
Luiz Augusto von Dentz <[email protected]>
Bluetooth: vhci: Set HCI_QUIRK_VALID_LE_STATES
Tedd Ho-Jeong An <[email protected]>
Bluetooth: btintel: Add missing quirks and msft ext for legacy bootloader
Ben Greear <[email protected]>
ath11k: Fix napi related hang
Randy Dunlap <[email protected]>
um: registers: Rename function names to avoid conflicts and build problems
Tetsuo Handa <[email protected]>
block: check minor range in device_add_disk()
Hector Martin <[email protected]>
mmc: sdhci-pci-gli: GL9755: Support for CD/WP inversion on OF platforms
Luca Coelho <[email protected]>
iwlwifi: pcie: make sure prph_info is set when treating wakeup IRQ
Avraham Stern <[email protected]>
iwlwifi: mvm: fix AUX ROC removal
Ilan Peer <[email protected]>
iwlwifi: mvm: Fix calculation of frame length
Johannes Berg <[email protected]>
iwlwifi: remove module loading failure message
Johannes Berg <[email protected]>
iwlwifi: fix leaks/bad data after failed firmware load
Changcheng Deng <[email protected]>
PM: AVS: qcom-cpr: Use div64_ul instead of do_div
Po-Hao Huang <[email protected]>
rtw88: 8822c: update rx settings to prevent potential hw deadlock
Zekun Shen <[email protected]>
ath9k: Fix out-of-bound memcpy in ath9k_hif_usb_rx_stream
Tetsuo Handa <[email protected]>
ath9k_htc: fix NULL pointer dereference at ath9k_htc_tx_get_packet()
Tetsuo Handa <[email protected]>
ath9k_htc: fix NULL pointer dereference at ath9k_htc_rxep()
Felix Fietkau <[email protected]>
mt76: mt7615: improve wmm index allocation
Xing Song <[email protected]>
mt76: do not pass the received frame with decryption error
Peter Chiu <[email protected]>
mt76: mt7615: fix possible deadlock while mt7615_register_ext_phy()
Kai-Heng Feng <[email protected]>
usb: hub: Add delay for SuperSpeed hub resume to let links transit to U0
Rafael J. Wysocki <[email protected]>
cpufreq: Fix initialization of min and max frequency QoS requests
Rafael J. Wysocki <[email protected]>
PM: runtime: Add safety net to supplier device release
Weili Qian <[email protected]>
crypto: hisilicon/hpre - fix memory leak in hpre_curve25519_src_init()
Peter Gonda <[email protected]>
crypto: ccp - Move SEV_INIT retry for corrupted data
Thierry Reding <[email protected]>
arm64: tegra: Adjust length of CCPLEX cluster MMIO region
Biwen Li <[email protected]>
arm64: dts: ls1028a-qds: move rtc node to the correct i2c bus
Paul Moore <[email protected]>
audit: ensure userspace is penalized the same as the kernel when under pressure
Jingwen Chen <[email protected]>
drm/amd/amdgpu: fix gmc bo pin count leak in SRIOV
Jingwen Chen <[email protected]>
drm/amd/amdgpu: fix psp tmr bo pin count leak in SRIOV
Ulf Hansson <[email protected]>
mmc: core: Fixup storing of OCR for MMC_QUIRK_NONSTD_SDIO
Biju Das <[email protected]>
mmc: tmio: reinit card irqs in reset routine
Zhou Qingyang <[email protected]>
media: saa7146: hexium_gemini: Fix a NULL pointer dereference in hexium_attach()
Mikhail Rudenko <[email protected]>
media: rockchip: rkisp1: use device name for debugfs subdir name
Sean Young <[email protected]>
media: igorplugusb: receiver overflow should be reported
Alistair Francis <[email protected]>
HID: i2c-hid-of: Expose the touchscreen-inverted properties
Alistair Francis <[email protected]>
HID: quirks: Allow inverting the absolute X/Y values
Felix Kuehling <[email protected]>
drm/amdkfd: Fix error handling in svm_range_add
Paolo Abeni <[email protected]>
bpf: Do not WARN in bpf_warn_invalid_xdp_action()
David Gow <[email protected]>
kunit: Don't crash if no parameters are generated
Suresh Kumar <[email protected]>
net: bonding: debug: avoid printing debug logs when bond is not notifying peers
Borislav Petkov <[email protected]>
x86/mce: Mark mce_read_aux() noinstr
Borislav Petkov <[email protected]>
x86/mce: Mark mce_end() noinstr
Borislav Petkov <[email protected]>
x86/mce: Mark mce_panic() noinstr
Borislav Petkov <[email protected]>
x86/mce: Allow instrumentation during task work queueing
Alex Elder <[email protected]>
ARM: dts: qcom: sdx55: fix IPA interconnect definitions
Baochen Qiang <[email protected]>
ath11k: Avoid false DEADLOCK warning reported by lockdep
Heiko Carstens <[email protected]>
selftests/ftrace: make kprobe profile testcase description unique
Iwona Winiarska <[email protected]>
gpio: aspeed-sgpio: Convert aspeed_sgpio.lock to raw_spinlock
Iwona Winiarska <[email protected]>
gpio: aspeed: Convert aspeed_gpio.lock to raw_spinlock
Russell King (Oracle) <[email protected]>
net: phy: prefer 1000baseT over 1000baseKX
Antoine Tenart <[email protected]>
net-sysfs: update the queue counts in the unregistration path
Sebastian Gottschall <[email protected]>
ath10k: Fix tx hanging
Wen Gong <[email protected]>
ath11k: avoid deadlock by change ieee80211_queue_work for regd_update_work
Wander Lairson Costa <[email protected]>
rcutorture: Avoid soft lockup during cpu stall
Shaul Triebitz <[email protected]>
iwlwifi: mvm: avoid clearing a just saved session protection id
Johannes Berg <[email protected]>
iwlwifi: mvm: synchronize with FW after multicast commands
Kieran Bingham <[email protected]>
arm64: dts: renesas: Fix thermal bindings
Mika Westerberg <[email protected]>
thunderbolt: Runtime PM activate both ends of the device link
Mauro Carvalho Chehab <[email protected]>
media: m920x: don't use stack on USB reads
Tsuchiya Yuto <[email protected]>
media: atomisp: fix "variable dereferenced before check 'asd'"
Zhou Qingyang <[email protected]>
media: saa7146: hexium_orion: Fix a NULL pointer dereference in hexium_attach()
Niklas Söderlund <[email protected]>
media: rcar-vin: Update format alignment constraints
James Hilliard <[email protected]>
media: uvcvideo: Increase UVC_CTRL_CONTROL_TIMEOUT to 5 seconds.
Laurent Pinchart <[email protected]>
drm: rcar-du: Fix CRTC timings when CMM is used
Joerg Roedel <[email protected]>
x86/mm: Flush global TLB when switching to trampoline page-table
Xiongwei Song <[email protected]>
floppy: Add max size check for user space request
Neal Liu <[email protected]>
usb: uhci: add aspeed ast2600 uhci support
Kishon Vijay Abraham I <[email protected]>
arm64: dts: ti: j721e-main: Fix 'dtbs_check' in serdes_ln_ctrl node
Kishon Vijay Abraham I <[email protected]>
arm64: dts: ti: j7200-main: Fix 'dtbs_check' serdes_ln_ctrl node
Hans de Goede <[email protected]>
ACPI / x86: Add not-present quirk for the PCI0.SDHB.BRC1 device on the GPD win
Hans de Goede <[email protected]>
ACPI / x86: Allow specifying acpi_device_override_status() quirks by path
Hans de Goede <[email protected]>
ACPI: Change acpi_device_always_present() into acpi_device_override_status()
Hans de Goede <[email protected]>
ACPI / x86: Drop PWM2 device on Lenovo Yoga Book from always present table
Zack Rusin <[email protected]>
drm/vmwgfx: Introduce a new placement for MOB page tables
Zack Rusin <[email protected]>
drm/vmwgfx: Release ttm memory if probe fails
Adam Ward <[email protected]>
regulator: da9121: Prevent current limit change when enabled
Mansur Alisha Shaik <[email protected]>
media: venus: avoid calling core_clk_setrate() concurrently during concurrent video sessions
Sriram R <[email protected]>
ath11k: Avoid NULL ptr access during mgmt tx cleanup
Zekun Shen <[email protected]>
rsi: Fix out-of-bounds read in rsi_read_pkt()
Zekun Shen <[email protected]>
rsi: Fix use-after-free in rsi_rx_done_handler()
Zekun Shen <[email protected]>
mwifiex: Fix skb_over_panic in mwifiex_usb_recv()
Stephan Müller <[email protected]>
crypto: jitter - consider 32 LSB for APT
Chengfeng Ye <[email protected]>
HSI: core: Fix return freed object in hsi_new_client
Hans de Goede <[email protected]>
gpiolib: acpi: Do not set the IRQ type if the IRQ is already in use
Fugang Duan <[email protected]>
tty: serial: imx: disable UCR4_OREN in .stop_rx() instead of .shutdown()
Jiri Slaby <[email protected]>
mxser: keep only !tty test in ISR
Martyn Welch <[email protected]>
drm/bridge: megachips: Ensure both bridges are probed before registration
Martin Leung <[email protected]>
drm/amd/display: add else to avoid double destroy clk_mgr
Danielle Ratson <[email protected]>
mlxsw: pci: Add shutdown method in PCI driver
Jan Kiszka <[email protected]>
soc: ti: pruss: fix referenced node in error message
Alex Deucher <[email protected]>
drm/amdgpu/display: set vblank_disable_immediate for DC
Yang Li <[email protected]>
drm/amd/display: check top_pipe_to_program pointer
Lukas Bulwahn <[email protected]>
ARM: imx: rename DEBUG_IMX21_IMX27_UART to DEBUG_IMX27_UART
Marek Vasut <[email protected]>
soc: imx: gpcv2: Synchronously suspend MIX domains
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm8350: Shorten camera-thermal-bottom name
Dinh Nguyen <[email protected]>
EDAC/synopsys: Use the quirk for version instead of ddr version
Yang Li <[email protected]>
ethernet: renesas: Use div64_ul instead of do_div
Andrii Nakryiko <[email protected]>
libbpf: Accommodate DWARF/compiler bug with duplicated structs
Zheyu Ma <[email protected]>
media: b2c2: Add missing check in flexcop_pci_isr:
José Expósito <[email protected]>
HID: apple: Do not reset quirks when the Fn key is not found
José Expósito <[email protected]>
HID: magicmouse: Report battery level over USB
Hans de Goede <[email protected]>
drm: panel-orientation-quirks: Add quirk for the Lenovo Yoga Book X91F/L
Brian Chen <[email protected]>
psi: Fix PSI_MEM_FULL state when tasks are in memstall and doing reclaim
Pavankumar Kondeti <[email protected]>
usb: gadget: f_fs: Use stream_open() for endpoint files
Haimin Zhang <[email protected]>
USB: ehci_brcm_hub_control: Improve port index sanitizing
Amjad Ouled-Ameur <[email protected]>
usb: dwc3: meson-g12a: fix shared reset control use
Baochen Qiang <[email protected]>
ath11k: Fix crash caused by uninitialized TX ring
Mauro Carvalho Chehab <[email protected]>
media: atomisp: handle errors at sh_css_create_isp_params()
Linus Lüssing <[email protected]>
batman-adv: allow netlink usage in unprivileged containers
Wan Jiabing <[email protected]>
ARM: shmobile: rcar-gen2: Add missing of_node_put()
Mauro Carvalho Chehab <[email protected]>
media: atomisp: check before deference asd variable
Hans de Goede <[email protected]>
media: atomisp-ov2680: Fix ov2680_set_fmt() clobbering the exposure
Mauro Carvalho Chehab <[email protected]>
media: atomisp: set per-device's default mode
Mauro Carvalho Chehab <[email protected]>
media: atomisp: fix try_fmt logic
Ben Skeggs <[email protected]>
drm/nouveau/pmu/gm200-: avoid touching PMU outside of DEVINIT/PREOS/ACR
Neil Armstrong <[email protected]>
drm/bridge: dw-hdmi: handle ELD when DRM_BRIDGE_ATTACH_NO_CONNECTOR
Zekun Shen <[email protected]>
ar5523: Fix null-ptr-deref with unexpected WDCMSG_TARGET_START reply
Andrii Nakryiko <[email protected]>
selftests/bpf: Fix bpf_object leak in skb_ctx selftest
Andrii Nakryiko <[email protected]>
selftests/bpf: Destroy XDP link correctly
Andrii Nakryiko <[email protected]>
selftests/bpf: Fix memory leaks in btf_type_c_dump() helper
Qiang Yu <[email protected]>
drm/lima: fix warning when CONFIG_DEBUG_SG=y & CONFIG_DMA_API_DEBUG=y
Andrii Nakryiko <[email protected]>
libbpf: Validate that .BTF and .BTF.ext sections contain data
Alexander Aring <[email protected]>
fs: dlm: filter user dlm messages for kernel locks
Archie Pusaka <[email protected]>
Bluetooth: Fix removing adv when processing cmd complete
Brian Norris <[email protected]>
drm/panel: Delete panel on mipi_dsi_attach() failure
Wei Yongjun <[email protected]>
Bluetooth: Fix memory leak of hci device
Wei Yongjun <[email protected]>
Bluetooth: Fix debugfs entry leak in hci_register_dev()
Merlijn Wajer <[email protected]>
leds: lp55xx: initialise output direction from dts
Sicelo A. Mhlongo <[email protected]>
ARM: dts: omap3-n900: Fix lp5523 for multi color
jason-jh.lin <[email protected]>
mailbox: fix gce_num of mt8192 driver data
Paul Cercueil <[email protected]>
MIPS: compressed: Fix build with ZSTD compression
Paul Cercueil <[email protected]>
MIPS: boot/compressed/: add __ashldi3 to target for ZSTD compression
Stephen Boyd <[email protected]>
of/fdt: Don't worry about non-memory region overlap for no-map
Baruch Siach <[email protected]>
of: base: Fix phandle argument length mismatch error message
Conor Dooley <[email protected]>
clk: bm1880: remove kfrees on static allocations
Shengjiu Wang <[email protected]>
ASoC: fsl_asrc: refine the check of available clock divider
Shengjiu Wang <[email protected]>
ASoC: imx-card: improve the sound quality for low rate
Shengjiu Wang <[email protected]>
ASoC: imx-card: Fix mclk calculation issue for akcodec
Shengjiu Wang <[email protected]>
ASoC: imx-card: Need special setting for ak4497 on i.MX8MQ
Taniya Das <[email protected]>
clk: qcom: gcc-sc7280: Mark gcc_cfg_noc_lpass_clk always enabled
Kamal Heib <[email protected]>
RDMA/cxgb4: Set queue pair state when being queried
Christian A. Ehrhardt <[email protected]>
ALSA: hda/cs8409: Fix Jack detection after resume
Christian A. Ehrhardt <[email protected]>
ALSA: hda/cs8409: Increase delay during jack detection
Alyssa Ross <[email protected]>
ASoC: fsl_mqs: fix MODULE_ALIAS
Ammar Faizi <[email protected]>
powerpc/xive: Add missing null check after calling kmalloc
Randy Dunlap <[email protected]>
mips: bcm63xx: add support for clk_set_parent()
Randy Dunlap <[email protected]>
mips: lantiq: add support for clk_set_parent()
Sameer Pujar <[email protected]>
arm64: tegra: Remove non existent Tegra194 reset
Trevor Wu <[email protected]>
ASoC: mediatek: mt8195: correct pcmif BE dai control flow
Wei Yongjun <[email protected]>
misc: lattice-ecp3-config: Fix task hung when firmware load failed
Jiasheng Jiang <[email protected]>
ASoC: samsung: idma: Check of ioremap return value
Swapnil Jakhade <[email protected]>
phy: cadence: Sierra: Fix to get correct parent for mux clocks
Michael Ellerman <[email protected]>
powerpc/64s: Use EMIT_WARN_ENTRY for SRR debug warnings
Michael Ellerman <[email protected]>
powerpc/64s: Mask NIP before checking against SRR0
Jiasheng Jiang <[email protected]>
ASoC: mediatek: Check for error clk pointer
Ryuta NAKANISHI <[email protected]>
phy: uniphier-usb3ss: fix unintended writing zeros to PHY register
Alan Stern <[email protected]>
scsi: block: pm: Always set request queue runtime active in blk_post_runtime_resume()
Pingfan Liu <[email protected]>
efi: apply memblock cap after memblock_add()
Zhen Lei <[email protected]>
of: fdt: Aggregate the processing of "linux,usable-memory-range"
Trevor Wu <[email protected]>
ASoC: mediatek: mt8195: correct default value
Xiongfeng Wang <[email protected]>
iommu/iova: Fix race between FQ timeout and teardown
Cezary Rojewski <[email protected]>
ASoC: Intel: catpt: Test dmaengine_submit() result before moving on
Maxim Levitsky <[email protected]>
iommu/amd: Remove useless irq affinity notifier
Maxim Levitsky <[email protected]>
iommu/amd: X2apic mode: mask/unmask interrupts on suspend/resume
Maxim Levitsky <[email protected]>
iommu/amd: X2apic mode: setup the INTX registers on mask/unmask
Maxim Levitsky <[email protected]>
iommu/amd: X2apic mode: re-enable after resume
Maxim Levitsky <[email protected]>
iommu/amd: Restore GA log/tail pointer on host resume
Arnd Bergmann <[email protected]>
dmaengine: pxa/mmp: stop referencing config->slave_id
Lukas Bulwahn <[email protected]>
mips: fix Kconfig reference to PHYS_ADDR_T_64BIT
Lukas Bulwahn <[email protected]>
mips: add SYS_HAS_CPU_MIPS64_R5 config for MIPS Release 5 support
Dillon Min <[email protected]>
clk: stm32: Fix ltdc's clock turn off by clk_disable_unused() after system enter shell
Frank Rowand <[email protected]>
of: unittest: 64 bit dma address test requires arch support
Jim Quinlan <[email protected]>
of: unittest: fix warning on PowerPC frame size warning
Jiasheng Jiang <[email protected]>
ASoC: rt5663: Handle device_property_read_u32_array error codes
Avihai Horon <[email protected]>
RDMA/cma: Let cma_resolve_ib_dev() continue search even after empty entry
Avihai Horon <[email protected]>
RDMA/core: Let ib_find_gid() continue search even after empty entry
Rob Clark <[email protected]>
iommu/arm-smmu-qcom: Fix TTBR0 read
Christophe Leroy <[email protected]>
powerpc/powermac: Add additional missing lockdep_register_key()
Thomas Gleixner <[email protected]>
PCI/MSI: Fix pci_irq_vector()/pci_irq_get_affinity()
Kamal Heib <[email protected]>
RDMA/qedr: Fix reporting max_{send/recv}_wr attrs
Bart Van Assche <[email protected]>
scsi: ufs: Fix race conditions related to driver data
Bart Van Assche <[email protected]>
scsi: core: Fix scsi_device_max_queue_depth()
Hector Martin <[email protected]>
iommu/io-pgtable-arm: Fix table descriptor paddr formatting
Lu Baolu <[email protected]>
iommu: Extend mutex lock scope in iommu_probe_device()
Jiasheng Jiang <[email protected]>
uio: uio_dmem_genirq: Catch the Exception
Stafford Horne <[email protected]>
openrisc: Add clone3 ABI wrapper
Todd Kjos <[email protected]>
binder: avoid potential data leakage when copying txn
Todd Kjos <[email protected]>
binder: fix handling of error during copy
Kees Cook <[email protected]>
char/mwave: Adjust io port register size
Andy Shevchenko <[email protected]>
misc: at25: Make driver OF independent again
Takashi Iwai <[email protected]>
ALSA: usb-audio: Drop superfluous '0' in Presonus Studio 1810c's ID
Bixuan Cui <[email protected]>
ALSA: oss: fix compile error when OSS_DEBUG is enabled
Waiman Long <[email protected]>
clocksource: Avoid accidental unstable marking of clocksources
Christophe Leroy <[email protected]>
powerpc/32s: Fix shift-out-of-bounds in KASAN init
Christophe Leroy <[email protected]>
powerpc/modules: Don't WARN on first module allocation attempt
Athira Rajeev <[email protected]>
powerpc/perf: Fix PMU callbacks to clear pending PMI before resetting an overflown PMC
Niklas Söderlund <[email protected]>
dt-bindings: thermal: Fix definition of cooling-maps contribution property
Thomas Gleixner <[email protected]>
ALSA: hda: Make proper use of timecounter
Jack Wang <[email protected]>
RDMA/rtrs-clt: Fix the initial value of min_latency
Lukas Bulwahn <[email protected]>
ASoC: codecs: wcd938x: add SND_SOC_WCD938_SDW to codec list instead
Lukas Bulwahn <[email protected]>
ASoC: uniphier: drop selecting non-existing SND_SOC_UNIPHIER_AIO_DMA
Peiwei Hu <[email protected]>
powerpc/prom_init: Fix improper check of prom_getprop()
Adam Ford <[email protected]>
clk: imx8mn: Fix imx8mn_clko1_sels
Lad Prabhakar <[email protected]>
clk: renesas: rzg2l: propagate return value of_genpd_add_provider_simple()
Lad Prabhakar <[email protected]>
clk: renesas: rzg2l: Check return value of pm_genpd_init()
Igor Pylypiv <[email protected]>
scsi: pm80xx: Update WARN_ON check in pm8001_mpi_build_cmd()
Kamal Heib <[email protected]>
RDMA/hns: Validate the pkey index
Christophe JAILLET <[email protected]>
RDMA/bnxt_re: Scan the whole bitmap when checking if "disabling RCFW with pending cmd-bit"
Takashi Iwai <[email protected]>
ALSA: hda: Fix potential deadlock at codec unbinding
Takashi Iwai <[email protected]>
ALSA: hda: Add missing rwsem around snd_ctl_remove() calls
Takashi Iwai <[email protected]>
ALSA: PCM: Add missing rwsem around snd_ctl_remove() calls
Takashi Iwai <[email protected]>
ALSA: jack: Add missing rwsem around snd_ctl_remove() calls
Pierre-Louis Bossart <[email protected]>
ASoC: Intel: sof_sdw: fix jack detection on HP Spectre x360 convertible
Jan Kara <[email protected]>
ext4: avoid trim error on fs with small groups
Pavel Skripkin <[email protected]>
net: mcs7830: handle usb read errors properly
Edwin Peer <[email protected]>
bnxt_en: use firmware provided max timeout for messages
Edwin Peer <[email protected]>
bnxt_en: move coredump functions into dedicated file
Edwin Peer <[email protected]>
bnxt_en: Refactor coredump functions
Nathan Chancellor <[email protected]>
iwlwifi: mvm: Use div_s64 instead of do_div in iwl_mvm_ftm_rtt_smoothing()
Paul Blakey <[email protected]>
net: openvswitch: Fix ct_state nat flags for conns arriving from tc
Paul Blakey <[email protected]>
net: openvswitch: Fix matching zone id for invalid conns arriving from tc
Paul Blakey <[email protected]>
net/sched: flow_dissector: Fix matching on zone id for invalid conns
Dominik Brodowski <[email protected]>
pcmcia: fix setting of kthread task states
Lad Prabhakar <[email protected]>
can: rcar_canfd: rcar_canfd_channel_probe(): make sure we free CAN network device
Jiasheng Jiang <[email protected]>
can: xilinx_can: xcan_probe(): check for error irq
Marc Kleine-Budde <[email protected]>
can: softing: softing_startstop(): fix set but not used variable warning
Christophe Jaillet <[email protected]>
tpm_tis: Fix an error handling path in 'tpm_tis_core_init()'
Chen Jun <[email protected]>
tpm: add request_locality before write TPM_INT_ENABLE
Marc Kleine-Budde <[email protected]>
can: mcp251xfd: add missing newline to printed strings
Vladimir Oltean <[email protected]>
net: mscc: ocelot: fix incorrect balancing with down LAG ports
Fabio Estevam <[email protected]>
regmap: Call regmap_debugfs_exit() prior to _init()
Dan Carpenter <[email protected]>
netrom: fix api breakage in nr_setsockopt()
Dan Carpenter <[email protected]>
ax25: uninitialized variable in ax25_setsockopt()
Subbaraya Sundeep <[email protected]>
octeontx2-af: Increment ptp refcount before use
Miaoqian Lin <[email protected]>
spi: spi-meson-spifc: Add missing pm_runtime_disable() in meson_spifc_probe
Geliang Tang <[email protected]>
mptcp: fix a DSS option writing error
Matthieu Baerts <[email protected]>
mptcp: fix opt size when sending DSS + MP_FAIL
Paolo Abeni <[email protected]>
mptcp: fix per socket endpoint accounting
Dan Carpenter <[email protected]>
Bluetooth: L2CAP: uninitialized variables in l2cap_sock_setsockopt()
Zizhuang Deng <[email protected]>
lib/mpi: Add the return value check of kcalloc()
Moshe Shemesh <[email protected]>
net/mlx5: Set command entry semaphore up once got index free
Maor Dickman <[email protected]>
net/mlx5e: Sync VXLAN udp ports during uplink representor profile change
Shay Drory <[email protected]>
net/mlx5: Fix access to sf_dev_table on allocation failure
Paul Blakey <[email protected]>
net/mlx5e: Fix matching on modified inner ip_ecn bits
Aya Levin <[email protected]>
Revert "net/mlx5e: Block offload of outer header csum for GRE tunnel"
Aya Levin <[email protected]>
Revert "net/mlx5e: Block offload of outer header csum for UDP tunnels"
Maor Dickman <[email protected]>
net/mlx5e: Don't block routes with nexthop objects in SW
Maor Dickman <[email protected]>
net/mlx5e: Fix wrong usage of fib_info_nh when routes with nexthop objects are used
Aya Levin <[email protected]>
net/mlx5e: Fix page DMA map/unmap attributes
Huang Rui <[email protected]>
x86, sched: Fix undefined reference to init_freq_invariance_cppc() build error
Valentin Caron <[email protected]>
serial: stm32: move tx dma terminate DMA to shutdown
Alyssa Ross <[email protected]>
serial: liteuart: fix MODULE_ALIAS
Miaoqian Lin <[email protected]>
drivers/firmware: Add missing platform_device_put() in sysfb_create_simplefb
Michal Suchanek <[email protected]>
debugfs: lockdown: Allow reading debugfs files that are not world readable
José Expósito <[email protected]>
HID: hid-uclogic-params: Invalid parameter check in uclogic_params_frame_init_v1_buttonpad
José Expósito <[email protected]>
HID: hid-uclogic-params: Invalid parameter check in uclogic_params_huion_init
José Expósito <[email protected]>
HID: hid-uclogic-params: Invalid parameter check in uclogic_params_get_str_desc
José Expósito <[email protected]>
HID: hid-uclogic-params: Invalid parameter check in uclogic_params_init
Pavel Hofman <[email protected]>
usb: gadget: u_audio: Subdevice 0 for capture ctls
John Keeping <[email protected]>
usb: dwc2: gadget: initialize max_speed from params
Dinh Nguyen <[email protected]>
usb: dwc2: do not gate off the hardware if it does not support clock gating
Miaoqian Lin <[email protected]>
usb: dwc3: qcom: Fix NULL vs IS_ERR checking in dwc3_qcom_probe
Wen Gu <[email protected]>
net/smc: Reset conn->lgr when link group registration fails
Miaoqian Lin <[email protected]>
Bluetooth: hci_qca: Fix NULL vs IS_ERR_OR_NULL check in qca_serdev_probe
Jiasheng Jiang <[email protected]>
Bluetooth: hci_bcm: Check for error irq
Jiasheng Jiang <[email protected]>
fsl/fman: Check for null pointer after calling devm_ioremap
Jiasheng Jiang <[email protected]>
staging: greybus: audio: Check null pointer
Dan Carpenter <[email protected]>
rocker: fix a sleeping in atomic bug
Eric Dumazet <[email protected]>
ppp: ensure minimum packet size in ppp_write()
Miroslav Lichvar <[email protected]>
net: fix SOF_TIMESTAMPING_BIND_PHC to work with multiple sockets
Florian Westphal <[email protected]>
netfilter: nft_set_pipapo: allocate pcpu scratch maps on clone
Pablo Neira Ayuso <[email protected]>
netfilter: nft_payload: do not update layer 4 checksum when mangling fragments
Kuniyuki Iwashima <[email protected]>
bpf: Fix SO_RCVBUF/SO_SNDBUF handling in _bpf_setsockopt().
Kris Van Hees <[email protected]>
bpf: Fix verifier support for validation of async callbacks
Daniel Borkmann <[email protected]>
bpf: Don't promote bogus looking registers after null check.
John Fastabend <[email protected]>
bpf, sockmap: Fix double bpf_prog_put on error case in map_link
John Fastabend <[email protected]>
bpf, sockmap: Fix return codes from tcp_bpf_recvmsg_parser()
Xin Xiong <[email protected]>
netfilter: ipt_CLUSTERIP: fix refcount leak in clusterip_tg_check()
Vladimir Oltean <[email protected]>
net: dsa: fix incorrect function pointer check for MRP ring roles
Daniel Golle <[email protected]>
net: ethernet: mtk_eth_soc: fix return values and refactor MDIO ops
Raed Salem <[email protected]>
net/xfrm: IPsec tunnel mode fix inner_ipproto setting in sec_path
Jiasheng Jiang <[email protected]>
power: reset: mt6397: Check for null res pointer
Zhou Qingyang <[email protected]>
pcmcia: rsrc_nonstatic: Fix a NULL pointer dereference in nonstatic_find_mem_region()
Zhou Qingyang <[email protected]>
pcmcia: rsrc_nonstatic: Fix a NULL pointer dereference in __nonstatic_find_io_region()
Hans de Goede <[email protected]>
ACPI: scan: Create platform device for BCM4752 and LNV4752 ACPI nodes
Lad Prabhakar <[email protected]>
serial: 8250_bcm7271: Propagate error codes from brcmuart_probe()
Pavel Begunkov <[email protected]>
io_uring: remove double poll on poll update
Zhang Zixun <[email protected]>
x86/mce/inject: Avoid out-of-bounds write when setting flags
Arseny Demidov <[email protected]>
hwmon: (mr75203) fix wrong power-up delay value
Marijn Suijten <[email protected]>
regulator: qcom-labibb: OCP interrupts are not a failure while disabled
Dan Carpenter <[email protected]>
crypto: octeontx2 - prevent underflow in get_cores_bmap()
Nathan Chancellor <[email protected]>
x86/boot/compressed: Move CLANG_FLAGS to beginning of KBUILD_CFLAGS
Panicker Harish <[email protected]>
Bluetooth: hci_qca: Stop IBS timer during BT OFF
Clément Léger <[email protected]>
software node: fix wrong node passed to find nargs_prop
Marijn Suijten <[email protected]>
backlight: qcom-wled: Respect enabled-strings in set_brightness
Marijn Suijten <[email protected]>
backlight: qcom-wled: Use cpu_to_le16 macro to perform conversion
Marijn Suijten <[email protected]>
backlight: qcom-wled: Override default length with qcom,enabled-strings
Marijn Suijten <[email protected]>
backlight: qcom-wled: Fix off-by-one maximum with default num_strings
Marijn Suijten <[email protected]>
backlight: qcom-wled: Pass number of elements to read to read_u32_array
Marijn Suijten <[email protected]>
backlight: qcom-wled: Validate enabled string indices in DT
Paul Chaignon <[email protected]>
bpftool: Enable line buffering for stdout
Luiz Augusto von Dentz <[email protected]>
Bluetooth: L2CAP: Fix using wrong mode
Johannes Berg <[email protected]>
um: virtio_uml: Fix time-travel external time propagation
Johannes Berg <[email protected]>
lib/logic_iomem: Fix operation on 32-bit
Johannes Berg <[email protected]>
lib/logic_iomem: Fix 32-bit build
Johannes Berg <[email protected]>
um: virt-pci: Fix 32-bit compile
Johannes Berg <[email protected]>
um: rename set_signals() to um_set_signals()
Johannes Berg <[email protected]>
um: fix ndelay/udelay defines
Bernard Zhao <[email protected]>
selinux: fix potential memleak in selinux_add_opt()
Christoph Hellwig <[email protected]>
block: fix error unwinding in device_add_disk
Sergey Shtylyov <[email protected]>
mmc: meson-mx-sdio: add IRQ check
Sergey Shtylyov <[email protected]>
mmc: meson-mx-sdhc: add IRQ check
Avraham Stern <[email protected]>
iwlwifi: mvm: set protected flag only for NDP ranging
Avraham Stern <[email protected]>
iwlwifi: mvm: perform 6GHz passive scan after suspend
Nathan Errera <[email protected]>
iwlwifi: mvm: test roc running status bits before removing the sta
Johannes Berg <[email protected]>
iwlwifi: mvm: fix 32-bit build in FTM
Kai-Heng Feng <[email protected]>
rtw88: Disable PCIe ASPM while doing NAPI poll on 8821CE
Ping-Ke Shih <[email protected]>
rtw88: add quirk to disable pci caps on HP 250 G7 Notebook PC
Dan Carpenter <[email protected]>
wilc1000: fix double free error in probe()
Sean Wang <[email protected]>
mt76: mt7921: drop offload_flags overwritten
Marek Behún <[email protected]>
ARM: dts: armada-38x: Add generic compatible to UART nodes
Robert Marko <[email protected]>
arm64: dts: marvell: cn9130: enable CP0 GPIO controllers
Robert Marko <[email protected]>
arm64: dts: marvell: cn9130: add GPIO and SPI aliases
Wei Yongjun <[email protected]>
usb: ftdi-elan: fix memory leak on device disconnect
Andre Przywara <[email protected]>
ARM: 9159/1: decompressor: Avoid UNPREDICTABLE NOP encoding
Antony Antony <[email protected]>
xfrm: state and policy should fail if XFRMA_IF_ID 0
Antony Antony <[email protected]>
xfrm: interface with if_id 0 should return error
Jernej Skrabec <[email protected]>
media: hantro: Fix probe func error path
Robin Murphy <[email protected]>
drm/tegra: vic: Fix DMA API misuse
Thierry Reding <[email protected]>
drm/tegra: gr2d: Explicitly control module reset
Arnd Bergmann <[email protected]>
gpu: host1x: select CONFIG_DMA_SHARED_BUFFER
Stephen Boyd <[email protected]>
drm/bridge: ti-sn65dsi86: Set max register for regmap
Dmitry Baryshkov <[email protected]>
drm/msm/dpu: fix safe status debugfs file
Baruch Siach <[email protected]>
arm64: dts: qcom: ipq6018: Fix gpio-ranges property
Srinivas Kandagatla <[email protected]>
arm64: dts: qcom: c630: Fix soundcard setup
Kurt Kanzenbach <[email protected]>
net: dsa: hellcreek: Add missing PTP via UDP rules
Kurt Kanzenbach <[email protected]>
net: dsa: hellcreek: Allow PTP P2P measurements on blocked ports
Kurt Kanzenbach <[email protected]>
net: dsa: hellcreek: Add STP forwarding rule
Kurt Kanzenbach <[email protected]>
net: dsa: hellcreek: Fix insertion of static FDB entries
Zhou Qingyang <[email protected]>
ath11k: Fix a NULL pointer dereference in ath11k_mac_op_hw_scan()
Jiasheng Jiang <[email protected]>
media: coda/imx-vdoa: Handle dma_set_coherent_mask error codes
Wang Hai <[email protected]>
media: msi001: fix possible null-ptr-deref in msi001_probe()
Anton Vasilyev <[email protected]>
media: dw2102: Fix use after free
Robin Murphy <[email protected]>
perf/arm-cmn: Fix CPU hotplug unregistration
Christian Lamparter <[email protected]>
ARM: dts: gemini: NAS4220-B: fis-index-block with 128 KiB sectors
Hector Martin <[email protected]>
spi: Fix incorrect cs_setup delay handling
Rameshkumar Sundaram <[email protected]>
ath11k: Fix deleting uninitialized kernel timer during fragment cache flush
Weili Qian <[email protected]>
crypto: hisilicon/qm - fix incorrect return value of hisi_qm_resume()
Herbert Xu <[email protected]>
crypto: stm32 - Revert broken pm_runtime_resume_and_get changes
Nicolas Toromanoff <[email protected]>
crypto: stm32/cryp - fix bugs and crash in tests
Nicolas Toromanoff <[email protected]>
crypto: stm32/cryp - fix lrw chaining mode
Nicolas Toromanoff <[email protected]>
crypto: stm32/cryp - fix double pm exit
Nicolas Toromanoff <[email protected]>
crypto: stm32/cryp - check early input data
Nicolas Toromanoff <[email protected]>
crypto: stm32/cryp - fix xts and race condition in crypto_engine requests
Nicolas Toromanoff <[email protected]>
crypto: stm32/cryp - fix CTR counter carry
Jakub Kicinski <[email protected]>
selftests: harness: avoid false negatives if test has no ASSERTs
Anders Roxell <[email protected]>
selftests: clone3: clone3: add case CLONE3_ARGS_NO_TEST
Kees Cook <[email protected]>
x86/uaccess: Move variable into switch case statement
Eric Dumazet <[email protected]>
xfrm: fix a small bug in xfrm_sa_len()
Brian Norris <[email protected]>
mwifiex: Fix possible ABBA deadlock
Dmitry Baryshkov <[email protected]>
drm/msm/dsi: fix initialization in the bonded DSI case
Loic Poulain <[email protected]>
wcn36xx: Fix max channels retrieval
Frederic Weisbecker <[email protected]>
rcu/exp: Mark current CPU as exp-QS in IPI loop second pass
Jackie Liu <[email protected]>
drm/msm/dp: displayPort driver need algorithm rational
Rob Clark <[email protected]>
drm/msm/gpu: Don't allow zero fence_id
Nicholas Kazlauskas <[email protected]>
drm/amd/display: Fix out of bounds access on DNC31 stream encoder regs
Wayne Lin <[email protected]>
drm/amd/display: Fix bug in debugfs crc_win_update entry
Mark Chen <[email protected]>
Bluetooth: btusb: Handle download_firmware failure cases
Luiz Augusto von Dentz <[email protected]>
Bluetooth: MGMT: Use hci_dev_test_and_{set,clear}_flag
Joseph Hwang <[email protected]>
Bluetooth: refactor set_exp_feature with a feature table
Fabio Estevam <[email protected]>
ath10k: Fix the MTU size on QCA9377 SDIO
Li Hua <[email protected]>
sched/rt: Try to restart rt period timer when rt runtime exceeded
Lv Yunlong <[email protected]>
wireless: iwlwifi: Fix a double free in iwl_txq_dyn_alloc_dma
Robert Schlabbach <[email protected]>
media: si2157: Fix "warm" tuner state detection
Zhou Qingyang <[email protected]>
media: saa7146: mxb: Fix a NULL pointer dereference in mxb_attach()
Zhou Qingyang <[email protected]>
media: dib8000: Fix a memleak in dib8000_init()
Alexander Lobakin <[email protected]>
samples: bpf: Fix 'unknown warning group' build warning on Clang
Alexander Lobakin <[email protected]>
samples: bpf: Fix xdp_sample_user.o linking with Clang
Andrii Nakryiko <[email protected]>
samples/bpf: Clean up samples/bpf build failes
Quentin Monnet <[email protected]>
samples/bpf: Install libbpf headers when building
Reiji Watanabe <[email protected]>
arm64: mte: DC {GVA,GZVA} shouldn't be used when DCZID_EL0.DZP == 1Reiji Watanabe <[email protected]>
arm64: clear_page() shouldn't use DC ZVA when DCZID_EL0.DZP == 1
Kajol Jain <[email protected]>
bpf: Remove config check to enable bpf support for branch records
Hou Tao <[email protected]>
bpf: Disallow BPF_LOG_KERNEL log level for bpf(BPF_BTF_LOAD)
Alexei Starovoitov <[email protected]>
bpf: Adjust BTF log size limit.
Vincent Donnefort <[email protected]>
sched/fair: Fix per-CPU kthread and wakee stacking for asym CPU capacity
Vincent Donnefort <[email protected]>
sched/fair: Fix detection of per-CPU kthreads waking a task
Maxim Mikityanskiy <[email protected]>
bpf: Fix the test_task_vma selftest to support output shorter than 1 kB
Sean Wang <[email protected]>
Bluetooth: btmtksdio: fix resume failure
Yang Yingliang <[email protected]>
staging: rtl8192e: rtllib_module: fix error handle case in alloc_rtllib()
Yang Yingliang <[email protected]>
staging: rtl8192e: return error code from rtllib_softmac_init()
Tasos Sahanidis <[email protected]>
floppy: Fix hang in watchdog when disk is ejected
Michael Walle <[email protected]>
mtd: core: provide unique name for nvmem device
Lino Sanfilippo <[email protected]>
serial: amba-pl011: do not request memory region twice
Lizhi Hou <[email protected]>
tty: serial: uartlite: allow 64 bit address
Nishanth Menon <[email protected]>
arm64: dts: ti: k3-j7200: Correct the d-cache-sets info
Nishanth Menon <[email protected]>
arm64: dts: ti: k3-j721e: Fix the L2 cache sets
Nishanth Menon <[email protected]>
arm64: dts: ti: k3-j7200: Fix the L2 cache sets
Nishanth Menon <[email protected]>
arm64: dts: ti: k3-am642: Fix the L2 cache sets
Gaurav Jain <[email protected]>
crypto: caam - save caam memory to support crypto engine retry mechanism.
Alexei Starovoitov <[email protected]>
libbpf: Clean gen_loader's attach kind.
Zhou Qingyang <[email protected]>
drm/radeon/radeon_kms: Fix a NULL pointer dereference in radeon_driver_open_kms()
Zhou Qingyang <[email protected]>
drm/amdgpu: Fix a NULL pointer dereference in amdgpu_connector_lcd_native_mode()
Paul Gerber <[email protected]>
thermal/drivers/imx8mm: Enable ADC when enabling monitor
Rafael J. Wysocki <[email protected]>
ACPI: EC: Rework flushing of EC work while suspended to idle
William Kucharski <[email protected]>
cgroup: Trace event cgroup id fields should be u64
Zack Rusin <[email protected]>
drm/vmwgfx: Fail to initialize on broken configs
Zack Rusin <[email protected]>
drm/vmwgfx: Remove the deprecated lower mem limit
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: msm8916: fix MMC controller aliases
Mark Rutland <[email protected]>
powerpc: Avoid discarding flags in system_call_exception()
Florian Westphal <[email protected]>
netfilter: bridge: add support for pppoe filtering
Jesper Dangaard Brouer <[email protected]>
igc: AF_XDP zero-copy metadata adjust breaks SKBs on XDP_PASS
Oleksij Rempel <[email protected]>
thermal/drivers/imx: Implement runtime PM support
Bhupesh Sharma <[email protected]>
net: stmmac: Add platform level debug register dump feature
Christophe JAILLET <[email protected]>
media: venus: core: Fix a resource leak in the error handling path of 'venus_probe()'
Christophe JAILLET <[email protected]>
media: venus: core: Fix a potential NULL pointer dereference in an error handling path
Mansur Alisha Shaik <[email protected]>
media: venus: correct low power frequency calculation for encoder
Philipp Zabel <[email protected]>
media: coda: fix CODA960 JPEG encoder buffer overflow
Chen-Yu Tsai <[email protected]>
media: hantro: Hook up RK3399 JPEG encoder output
Dafna Hirschfeld <[email protected]>
media: mtk-vcodec: call v4l2_m2m_ctx_release first when file is released
Yang Yingliang <[email protected]>
media: si470x-i2c: fix possible memory leak in si470x_i2c_probe()
Fabio Estevam <[email protected]>
media: imx-pxp: Initialize the spinlock prior to using it
Suresh Udipi <[email protected]>
media: rcar-csi2: Correct the selection of hsfreqrange
Hans de Goede <[email protected]>
media: i2c: ov8865: Fix lockdep error
Daniel Scally <[email protected]>
media: i2c: Re-order runtime pm initialisation
Eugen Hristev <[email protected]>
media: i2c: imx274: fix s_frame_interval runtime resume not requested
Alan Maguire <[email protected]>
libbpf: Silence uninitialized warning/error in btf_dump_dump_type_data
Jan Kara <[email protected]>
bfq: Do not let waker requests skip proper accounting
Claudiu Beznea <[email protected]>
mfd: atmel-flexcom: Use .resume_noirq
Claudiu Beznea <[email protected]>
mfd: atmel-flexcom: Remove #ifdef CONFIG_PM_SLEEP
Tudor Ambarus <[email protected]>
tty: serial: atmel: Call dma_async_issue_pending()
Tudor Ambarus <[email protected]>
tty: serial: atmel: Check return code of dmaengine_submit()
Peng Fan <[email protected]>
arm64: dts: ti: k3-j721e: correct cache-sets info
Anilkumar Kolli <[email protected]>
ath11k: Use host CE parameters for CE interrupts configuration
Giovanni Cabiddu <[email protected]>
crypto: qat - fix undetected PFVF timeout in ACK loop
Marco Chiappero <[email protected]>
crypto: qat - make pfvf send message direction agnostic
Marco Chiappero <[email protected]>
crypto: qat - remove unnecessary collision prevention step in PFVF
Andrii Nakryiko <[email protected]>
libbpf: Fix using invalidated memory in bpf_linker
Andrii Nakryiko <[email protected]>
libbpf: Fix glob_syms memory leak in bpf_linker
Andrii Nakryiko <[email protected]>
libbpf: Fix potential misaligned memory access in btf_ext__new()
Dillon Min <[email protected]>
ARM: dts: stm32: fix dtbs_check warning on ili9341 dts binding on stm32f429 disco
Vladimir Zapolskiy <[email protected]>
cpufreq: qcom-hw: Fix probable nested interrupt handling
Lukasz Luba <[email protected]>
cpufreq: qcom-cpufreq-hw: Update offline CPUs per-cpu thermal pressure
George G. Davis <[email protected]>
mtd: hyperbus: rpc-if: fix bug in rpcif_hb_remove
Prasad Malisetty <[email protected]>
arm64: dts: qcom: sc7280: Fix incorrect clock name
Chengfeng Ye <[email protected]>
crypto: qce - fix uaf on qce_skcipher_register_one
Chengfeng Ye <[email protected]>
crypto: qce - fix uaf on qce_ahash_register_one
Chengfeng Ye <[email protected]>
crypto: qce - fix uaf on qce_aead_register_one
Tudor Ambarus <[email protected]>
crypto: atmel-aes - Reestablish the correct tfm context at dequeue
Wang Hai <[email protected]>
media: dmxdev: fix UAF when dvb_register_device() fails
Biju Das <[email protected]>
arm64: dts: renesas: cat875: Add rx/tx delays
Dan Carpenter <[email protected]>
drm/vboxvideo: fix a NULL vs IS_ERR() check
Lyude Paul <[email protected]>
drm/dp: Don't read back backlight mode in drm_edp_backlight_enable()
Alexander Aring <[email protected]>
fs: dlm: fix build with CONFIG_IPV6 disabled
Jens Wiklander <[email protected]>
tee: fix put order in teedev_close_context()
oujiefeng <[email protected]>
spi: hisi-kunpeng: Fix the debugfs directory name incorrect
Karthikeyan Kathirvel <[email protected]>
ath11k: reset RSN/WPA present state for open BSS
Karthikeyan Kathirvel <[email protected]>
ath11k: clear the keys properly via DISABLE_KEY
Sven Eckelmann <[email protected]>
ath11k: Fix ETSI regd with weather radar overlap
Pavel Skripkin <[email protected]>
Bluetooth: stop proccessing malicious adv data
Lad Prabhakar <[email protected]>
memory: renesas-rpc-if: Return error in case devm_ioremap_resource() fails
Alexander Aring <[email protected]>
fs: dlm: don't call kernel_getpeername() in error_report()
Christian Hewitt <[email protected]>
arm64: dts: meson-gxbb-wetek: fix missing GPIO binding
Christian Hewitt <[email protected]>
arm64: dts: meson-gxbb-wetek: fix HDMI in early boot
Alexander Stein <[email protected]>
arm64: dts: amlogic: Fix SPI NOR flash node name for ODROID N2/N2+
Alexander Stein <[email protected]>
arm64: dts: amlogic: meson-g12: Fix GPU operating point table node name
Jammy Huang <[email protected]>
media: aspeed: Update signal status immediately to ensure sane hw state
Dongliang Mu <[email protected]>
media: em28xx: fix memory leak in em28xx_init_dev
Jammy Huang <[email protected]>
media: aspeed: fix mode-detect always time out at 2nd run
Dan Carpenter <[email protected]>
media: atomisp: fix uninitialized bug in gmin_get_pmic_id_and_addr()
Mauro Carvalho Chehab <[email protected]>
media: atomisp: fix enum formats logic
Tsuchiya Yuto <[email protected]>
media: atomisp: add NULL check for asd obtained from atomisp_video_pipe
Tsuchiya Yuto <[email protected]>
media: atomisp: fix ifdefs in sh_css.c
Tsuchiya Yuto <[email protected]>
media: atomisp: fix inverted error check for ia_css_mipi_is_source_port_valid()
Tsuchiya Yuto <[email protected]>
media: atomisp: do not use err var when checking port validity for ISP2400
Tsuchiya Yuto <[email protected]>
media: atomisp: fix inverted logic in buffers_needed()
Tsuchiya Yuto <[email protected]>
media: atomisp: fix punit_ddr_dvfs_enable() argument for mrfld_power up case
Tsuchiya Yuto <[email protected]>
media: atomisp: add missing media_device_cleanup() in atomisp_unregister_entities()
Dillon Min <[email protected]>
media: videobuf2: Fix the size printk format
Lad Prabhakar <[email protected]>
mtd: hyperbus: rpc-if: Check return value of rpcif_sw_init()
Quentin Monnet <[email protected]>
bpftool: Fix memory leak in prog_dump()
Rameshkumar Sundaram <[email protected]>
ath11k: Send PPDU_STATS_CFG with proper pdev mask to firmware
Benjamin Li <[email protected]>
wcn36xx: fix RX BD rate mapping for 5GHz legacy rates
Benjamin Li <[email protected]>
wcn36xx: populate band before determining rate on RX
Bryan O'Donoghue <[email protected]>
wcn36xx: Put DXE block into reset before freeing memory
Bryan O'Donoghue <[email protected]>
wcn36xx: Release DMA channel descriptor allocations
Bryan O'Donoghue <[email protected]>
wcn36xx: Fix DMA channel enable/disable cycle
Andrii Nakryiko <[email protected]>
libbpf: Free up resources used by inner map definition
Maxime Ripard <[email protected]>
drm/vc4: hdmi: Enable the scrambler on reconnection
Bryan O'Donoghue <[email protected]>
wcn36xx: Indicate beacon not connection loss on MISSED_BEACON_IND
Benjamin Li <[email protected]>
wcn36xx: ensure pairing of init_scan/finish_scan and start_scan/end_scan
Maxime Ripard <[email protected]>
drm/vc4: crtc: Make sure the HDMI controller is powered when disabling
Maxime Ripard <[email protected]>
drm/vc4: hdmi: Rework the pre_crtc_configure error handling
Maxime Ripard <[email protected]>
drm/vc4: hdmi: Make sure the controller is powered up during bind
Maxime Ripard <[email protected]>
drm/vc4: hdmi: Make sure the controller is powered in detect
Maxime Ripard <[email protected]>
drm/vc4: hdmi: Move the HSM clock enable to runtime_pm
Maxime Ripard <[email protected]>
drm/vc4: hdmi: Set a default HSM rate
Maxime Ripard <[email protected]>
clk: bcm-2835: Remove rounding up the dividers
Maxime Ripard <[email protected]>
clk: bcm-2835: Pick the closest clock rate
Wang Hai <[email protected]>
Bluetooth: cmtp: fix possible panic when cmtp_init_sockets() fails
Soenke Huster <[email protected]>
Bluetooth: virtio_bt: fix memory leak in virtbt_rx_handle()
Brian Norris <[email protected]>
drm/rockchip: dsi: Reconfigure hardware on resume()
Brian Norris <[email protected]>
drm/rockchip: dsi: Disable PLL clock on bind error
Brian Norris <[email protected]>
drm/rockchip: dsi: Hold pm-runtime across bind/unbind
Brian Norris <[email protected]>
drm/rockchip: dsi: Fix unbalanced clock on probe error
Brian Norris <[email protected]>
drm/panel: innolux-p079zca: Delete panel on attach() failure
Brian Norris <[email protected]>
drm/panel: kingdisplay-kd097d04: Delete panel on attach() failure
Wang Hai <[email protected]>
drm: fix null-ptr-deref in drm_dev_init_release()
Dan Carpenter <[email protected]>
drm/bridge: display-connector: fix an uninitialized pointer in probe()
Luiz Augusto von Dentz <[email protected]>
Bluetooth: L2CAP: Fix not initializing sk_peer_pid
xinhui pan <[email protected]>
drm/ttm: Put BO in its memory manager's lru list
Gang Li <[email protected]>
shmem: fix a race between shmem_unused_huge_shrink and shmem_evict_inode
Wen Gong <[email protected]>
ath11k: add string type to search board data in board-2.bin for WCN6855
Baoquan He <[email protected]>
mm/page_alloc.c: do not warn allocation failure on zone DMA if no managed pages
Baoquan He <[email protected]>
dma/pool: create dma atomic pool only if dma zone has managed pages
Baoquan He <[email protected]>
mm_zone: add function to check if managed dma zone exists
Yifeng Li <[email protected]>
PCI: Add function 1 DMA alias quirk for Marvell 88SE9125 SATA controller
Thomas Hellström <[email protected]>
dma_fence_array: Fix PENDING_ERROR leak in dma_fence_array_signaled()
Peng Hao <[email protected]>
virtio/virtio_mem: handle a possible NULL as a memcpy parameter
Dmitry Osipenko <[email protected]>
drm/tegra: Add back arm_iommu_detach_device()
Dmitry Osipenko <[email protected]>
gpu: host1x: Add back arm_iommu_detach_device()
Yunfei Wang <[email protected]>
iommu/io-pgtable-arm-v7s: Add error handle for page table allocation failure
Hari Prasath <[email protected]>
ARM: dts: at91: update alternate function of signal PD20
D Scott Phillips <[email protected]>
arm64: errata: Fix exec handling in erratum 1418040 workaround
Dan Williams <[email protected]>
cxl/pmem: Fix reference counting for delayed work
Manivannan Sadhasivam <[email protected]>
bus: mhi: core: Fix race while handling SYS_ERR at power up
Bhaumik Bhatt <[email protected]>
bus: mhi: core: Fix reading wake_capable channel configuration
Loic Poulain <[email protected]>
bus: mhi: pci_generic: Graceful shutdown on freeze
Christophe Leroy <[email protected]>
lkdtm: Fix content of section containing lkdtm_rodata_do_nothing()
Jonathan Cameron <[email protected]>
iio: trigger: Fix a scheduling whilst atomic issue seen on tsc2046
Jonathan Cameron <[email protected]>
iio: adc: ti-adc081c: Partial revert of removal of ACPI IDs
Alexander Usyskin <[email protected]>
mei: hbm: fix client dma reply status
Johan Hovold <[email protected]>
can: softing_cs: softingcs_probe(): fix memleak on registration failure
Hans Verkuil <[email protected]>
media: cec-pin: fix interrupt en/disable handling
Johan Hovold <[email protected]>
media: stk1160: fix control-message timeouts
Johan Hovold <[email protected]>
media: pvrusb2: fix control-message timeouts
Johan Hovold <[email protected]>
media: redrat3: fix control-message timeouts
Michael Kuron <[email protected]>
media: dib0700: fix undefined behavior in tuner shutdown
Johan Hovold <[email protected]>
media: s2255: fix control-message timeouts
Johan Hovold <[email protected]>
media: cpia2: fix control-message timeouts
Johan Hovold <[email protected]>
media: em28xx: fix control-message timeouts
Johan Hovold <[email protected]>
media: mceusb: fix control-message timeouts
Johan Hovold <[email protected]>
media: flexcop-usb: fix control-message timeouts
Hans Verkuil <[email protected]>
media: v4l2-ioctl.c: readbuffers depends on V4L2_CAP_READWRITE
Sakari Ailus <[email protected]>
media: ov8865: Disable only enabled regulators on error path
Hans Verkuil <[email protected]>
media: cec: fix a deadlock situation
Namjae Jeon <[email protected]>
ksmbd: add reserved room in ipc request/response
Namjae Jeon <[email protected]>
ksmbd: limits exceeding the maximum allowable outstanding requests
Namjae Jeon <[email protected]>
ksmbd: move credit charge deduction under processing request
Namjae Jeon <[email protected]>
ksmbd: add support for smb2 max credit parameter
Namjae Jeon <[email protected]>
ksmbd: fix guest connection failure with nautilus
Dan Carpenter <[email protected]>
ksmbd: uninitialized variable in create_socket()
Mohammad Athari Bin Ismail <[email protected]>
net: phy: marvell: add Marvell specific PHY loopback
Mateusz Jończyk <[email protected]>
rtc: cmos: take rtc_lock while reading from CMOS
Willy Tarreau <[email protected]>
tools/nolibc: fix incorrect truncation of exit code
Willy Tarreau <[email protected]>
tools/nolibc: i386: fix initial stack alignment
Jakub Kicinski <[email protected]>
crypto: x86/aesni - don't require alignment of data
Ammar Faizi <[email protected]>
tools/nolibc: x86-64: Fix startup code bug
Lucas De Marchi <[email protected]>
x86/gpu: Reserve stolen memory for first integrated Intel GPU
Jisheng Zhang <[email protected]>
riscv: mm: fix wrong phys_ram_base value for RV64
Nick Kossifidis <[email protected]>
riscv: use hart id instead of cpu id on machine_kexec
Nick Kossifidis <[email protected]>
riscv: Don't use va_pa_offset on kdump
Nick Kossifidis <[email protected]>
riscv: try to allocate crashkern region from 32bit addressible memory
Sean Christopherson <[email protected]>
RISC-V: Use common riscv_cpuid_to_hartid_mask() for both SMP=y and SMP=n
Alexandre Ghiti <[email protected]>
riscv: Get rid of MAXPHYSMEM configs
Paul Cercueil <[email protected]>
mtd: rawnand: ingenic: JZ4740 needs 'oob_first' read page function
Paul Cercueil <[email protected]>
mtd: rawnand: Export nand_read_page_hwecc_oob_first()
Paul Cercueil <[email protected]>
mtd: rawnand: davinci: Rewrite function description
Paul Cercueil <[email protected]>
mtd: rawnand: davinci: Avoid duplicated page read
Paul Cercueil <[email protected]>
mtd: rawnand: davinci: Don't calculate ECC when reading page
Andreas Oetken <[email protected]>
mtd: Fixed breaking list in __mtd_del_partition.
Stefan Riedmueller <[email protected]>
mtd: rawnand: gpmi: Remove explicit default gpmi clock setting for i.MX6
Christian Eggers <[email protected]>
mtd: rawnand: gpmi: Add ERR007117 protection for nfc_apply_timings
Krzysztof Kozlowski <[email protected]>
nfc: llcp: fix NULL error pointer dereference on sendmsg() after failed bind()
Jaegeuk Kim <[email protected]>
f2fs: avoid EINVAL by SBI_NEED_FSCK when pinning a file
Chao Yu <[email protected]>
f2fs: fix to do sanity check in is_alive()
Chao Yu <[email protected]>
f2fs: fix to do sanity check on inode type during garbage collection
Takashi Iwai <[email protected]>
ALSA: core: Fix SSID quirk lookup for subvendor=0
Jason Gerecke <[email protected]>
HID: wacom: Avoid using stale array indicies to read contact count
Jason Gerecke <[email protected]>
HID: wacom: Ignore the confidence flag when a touch is removed
Jason Gerecke <[email protected]>
HID: wacom: Reset expected and received contact counts at the same time
Jann Horn <[email protected]>
HID: uhid: Fix worker destroying device without any protection
Karl Kurbjun <[email protected]>
HID: Ignore battery for Elan touchscreen on HP Envy X360 15t-dr100
Marcelo Tosatti <[email protected]>
KVM: VMX: switch blocked_vcpu_on_cpu_lock to raw spinlock
David Matlack <[email protected]>
KVM: x86/mmu: Fix write-protection of PTs mapped by the TDP MMU
-------------
Diffstat:
Documentation/admin-guide/cifs/usage.rst | 7 +- Documentation/admin-guide/devices.txt | 8 +- Documentation/admin-guide/hw-vuln/spectre.rst | 2 +- .../bindings/display/amlogic,meson-dw-hdmi.yaml | 5 + .../bindings/display/amlogic,meson-vpu.yaml | 6 + .../devicetree/bindings/input/hid-over-i2c.txt | 2 + .../devicetree/bindings/thermal/thermal-zones.yaml | 9 +- .../devicetree/bindings/watchdog/samsung-wdt.yaml | 5 +- Documentation/driver-api/dmaengine/dmatest.rst | 7 +- Documentation/driver-api/firewire.rst | 4 +- .../acpi/dsd/data-node-references.rst | 10 +- Documentation/trace/coresight/coresight-config.rst | 16 +- Makefile | 4 +- arch/arm/Kconfig.debug | 14 +- arch/arm/boot/compressed/efi-header.S | 22 +- arch/arm/boot/compressed/head.S | 3 +- arch/arm/boot/dts/armada-38x.dtsi | 4 +- arch/arm/boot/dts/gemini-nas4220b.dts | 2 +- arch/arm/boot/dts/omap3-n900.dts | 50 +- arch/arm/boot/dts/qcom-sdx55.dtsi | 6 +- arch/arm/boot/dts/sama7g5-pinfunc.h | 2 +- arch/arm/boot/dts/stm32f429-disco.dts | 2 +- arch/arm/configs/cm_x300_defconfig | 1 - arch/arm/configs/ezx_defconfig | 1 - arch/arm/configs/imote2_defconfig | 1 - arch/arm/configs/nhk8815_defconfig | 1 - arch/arm/configs/pxa_defconfig | 1 - arch/arm/configs/spear13xx_defconfig | 1 - arch/arm/configs/spear3xx_defconfig | 1 - arch/arm/configs/spear6xx_defconfig | 1 - arch/arm/include/debug/imx-uart.h | 18 +- arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c | 5 +- arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 2 +- .../boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 2 +- arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi | 3 + arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts | 14 +- arch/arm64/boot/dts/marvell/cn9130.dtsi | 15 + arch/arm64/boot/dts/nvidia/tegra186.dtsi | 2 +- arch/arm64/boot/dts/nvidia/tegra194.dtsi | 5 +- arch/arm64/boot/dts/qcom/ipq6018.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8916.dtsi | 4 +- arch/arm64/boot/dts/qcom/msm8996.dtsi | 3 - arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 +- .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 27 + arch/arm64/boot/dts/qcom/sm8350.dtsi | 2 +- arch/arm64/boot/dts/renesas/cat875.dtsi | 1 + arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 6 +- arch/arm64/boot/dts/renesas/r8a774b1.dtsi | 6 +- arch/arm64/boot/dts/renesas/r8a774e1.dtsi | 6 +- arch/arm64/boot/dts/renesas/r8a77951.dtsi | 6 +- arch/arm64/boot/dts/renesas/r8a77960.dtsi | 6 +- arch/arm64/boot/dts/renesas/r8a77961.dtsi | 6 +- arch/arm64/boot/dts/renesas/r8a77965.dtsi | 6 +- arch/arm64/boot/dts/renesas/r8a77980.dtsi | 4 +- arch/arm64/boot/dts/renesas/r8a779a0.dtsi | 10 +- arch/arm64/boot/dts/ti/k3-am642.dtsi | 2 +- arch/arm64/boot/dts/ti/k3-j7200-main.dtsi | 2 +- arch/arm64/boot/dts/ti/k3-j7200.dtsi | 6 +- arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 2 +- arch/arm64/boot/dts/ti/k3-j721e.dtsi | 6 +- arch/arm64/include/asm/extable.h | 9 - arch/arm64/include/asm/memory.h | 5 +- arch/arm64/include/asm/mte-kasan.h | 8 +- arch/arm64/kernel/process.c | 39 +- arch/arm64/kernel/traps.c | 2 +- arch/arm64/lib/clear_page.S | 10 + arch/arm64/lib/mte.S | 8 +- arch/arm64/mm/ptdump.c | 2 - arch/arm64/net/bpf_jit_comp.c | 7 +- arch/mips/Kconfig | 6 +- arch/mips/bcm63xx/clk.c | 6 + arch/mips/boot/compressed/Makefile | 2 +- arch/mips/boot/compressed/clz_ctz.c | 2 + arch/mips/cavium-octeon/octeon-platform.c | 2 + arch/mips/cavium-octeon/octeon-usb.c | 1 + arch/mips/configs/fuloong2e_defconfig | 1 - arch/mips/configs/malta_qemu_32r6_defconfig | 1 - arch/mips/configs/maltaaprp_defconfig | 1 - arch/mips/configs/maltasmvp_defconfig | 1 - arch/mips/configs/maltasmvp_eva_defconfig | 1 - arch/mips/configs/maltaup_defconfig | 1 - .../asm/mach-loongson64/kernel-entry-init.h | 4 +- arch/mips/include/asm/octeon/cvmx-bootinfo.h | 4 +- arch/mips/lantiq/clk.c | 6 + arch/openrisc/include/asm/syscalls.h | 2 + arch/openrisc/kernel/entry.S | 5 + arch/parisc/include/asm/special_insns.h | 44 +- arch/parisc/kernel/traps.c | 2 +- arch/powerpc/boot/dts/fsl/qoriq-fman3l-0.dtsi | 2 + arch/powerpc/configs/ppc6xx_defconfig | 1 - arch/powerpc/configs/pseries_defconfig | 1 - arch/powerpc/include/asm/hw_irq.h | 40 + arch/powerpc/kernel/btext.c | 4 +- arch/powerpc/kernel/fadump.c | 8 + arch/powerpc/kernel/head_40x.S | 9 +- arch/powerpc/kernel/interrupt.c | 2 +- arch/powerpc/kernel/interrupt_64.S | 10 +- arch/powerpc/kernel/module.c | 11 +- arch/powerpc/kernel/prom_init.c | 2 +- arch/powerpc/kernel/smp.c | 42 + arch/powerpc/kernel/watchdog.c | 41 +- arch/powerpc/kvm/book3s_hv.c | 8 +- arch/powerpc/kvm/book3s_hv_nested.c | 2 +- arch/powerpc/mm/book3s64/radix_pgtable.c | 4 +- arch/powerpc/mm/kasan/book3s_32.c | 3 +- arch/powerpc/mm/pgtable_64.c | 14 +- arch/powerpc/perf/core-book3s.c | 58 +- arch/powerpc/platforms/cell/iommu.c | 1 + arch/powerpc/platforms/cell/pervasive.c | 1 + arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 1 + arch/powerpc/platforms/powermac/low_i2c.c | 3 + arch/powerpc/platforms/powernv/opal-lpc.c | 1 + arch/powerpc/sysdev/xive/spapr.c | 3 + arch/riscv/Kconfig | 23 +- arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi | 3 - arch/riscv/configs/nommu_k210_defconfig | 2 - arch/riscv/configs/nommu_k210_sdcard_defconfig | 2 - arch/riscv/configs/nommu_virt_defconfig | 1 - arch/riscv/include/asm/smp.h | 10 +- arch/riscv/kernel/kexec_relocate.S | 20 +- arch/riscv/kernel/machine_kexec.c | 3 +- arch/riscv/kernel/setup.c | 10 + arch/riscv/kernel/smp.c | 10 - arch/riscv/mm/init.c | 19 +- arch/s390/mm/pgalloc.c | 4 +- arch/sh/configs/titan_defconfig | 1 - arch/um/.gitignore | 1 + arch/um/drivers/virt-pci.c | 8 +- arch/um/drivers/virtio_uml.c | 4 + arch/um/include/asm/delay.h | 4 +- arch/um/include/asm/irqflags.h | 4 +- arch/um/include/shared/longjmp.h | 2 +- arch/um/include/shared/os.h | 4 +- arch/um/include/shared/registers.h | 4 +- arch/um/kernel/ksyms.c | 2 +- arch/um/os-Linux/registers.c | 4 +- arch/um/os-Linux/sigio.c | 6 +- arch/um/os-Linux/signal.c | 8 +- arch/um/os-Linux/start_up.c | 2 +- arch/x86/boot/compressed/Makefile | 7 +- arch/x86/configs/i386_defconfig | 1 + arch/x86/configs/x86_64_defconfig | 1 + arch/x86/crypto/aesni-intel_glue.c | 4 +- arch/x86/include/asm/realmode.h | 1 + arch/x86/include/asm/topology.h | 2 +- arch/x86/include/asm/uaccess.h | 5 +- arch/x86/kernel/cpu/mce/core.c | 42 +- arch/x86/kernel/cpu/mce/inject.c | 2 +- arch/x86/kernel/early-quirks.c | 10 +- arch/x86/kernel/reboot.c | 12 +- arch/x86/kvm/mmu/tdp_mmu.c | 6 +- arch/x86/kvm/vmx/posted_intr.c | 16 +- arch/x86/realmode/init.c | 26 + arch/x86/um/syscalls_64.c | 3 +- block/bfq-iosched.c | 44 +- block/blk-flush.c | 4 +- block/blk-pm.c | 22 +- block/genhd.c | 15 +- block/mq-deadline.c | 4 +- crypto/jitterentropy.c | 3 +- drivers/acpi/acpica/exfield.c | 7 +- drivers/acpi/acpica/exoparg1.c | 3 +- drivers/acpi/acpica/hwesleep.c | 4 +- drivers/acpi/acpica/hwsleep.c | 4 +- drivers/acpi/acpica/hwxfsleep.c | 2 - drivers/acpi/acpica/utdelete.c | 1 + drivers/acpi/battery.c | 22 + drivers/acpi/bus.c | 4 +- drivers/acpi/cppc_acpi.c | 2 +- drivers/acpi/ec.c | 57 +- drivers/acpi/internal.h | 2 + drivers/acpi/scan.c | 13 +- drivers/acpi/x86/utils.c | 116 ++- drivers/android/binder.c | 98 ++- drivers/base/core.c | 3 +- drivers/base/power/runtime.c | 41 +- drivers/base/property.c | 4 +- drivers/base/regmap/regmap.c | 1 + drivers/base/swnode.c | 2 +- drivers/block/floppy.c | 6 +- drivers/bluetooth/btintel.c | 26 +- drivers/bluetooth/btmtksdio.c | 2 + drivers/bluetooth/btusb.c | 5 + drivers/bluetooth/hci_bcm.c | 7 +- drivers/bluetooth/hci_qca.c | 9 +- drivers/bluetooth/hci_vhci.c | 2 + drivers/bluetooth/virtio_bt.c | 3 + drivers/bus/mhi/core/init.c | 1 + drivers/bus/mhi/core/pm.c | 35 +- drivers/bus/mhi/pci_generic.c | 2 +- drivers/char/mwave/3780i.h | 2 +- drivers/char/random.c | 19 +- drivers/char/tpm/tpm-chip.c | 18 +- drivers/char/tpm/tpm_tis_core.c | 14 +- drivers/clk/bcm/clk-bcm2835.c | 13 +- drivers/clk/clk-bm1880.c | 20 +- drivers/clk/clk-si5341.c | 2 +- drivers/clk/clk-stm32f4.c | 4 - drivers/clk/clk.c | 18 + drivers/clk/imx/clk-imx8mn.c | 6 +- drivers/clk/meson/gxbb.c | 44 +- drivers/clk/qcom/gcc-sc7280.c | 2 +- drivers/clk/renesas/rzg2l-cpg.c | 17 +- drivers/cpufreq/cpufreq.c | 4 +- drivers/cpufreq/qcom-cpufreq-hw.c | 7 +- drivers/crypto/atmel-aes.c | 6 +- drivers/crypto/caam/caamalg.c | 6 + drivers/crypto/caam/caamalg_qi2.c | 2 +- drivers/crypto/caam/caamhash.c | 3 + drivers/crypto/caam/caampkc.c | 3 + drivers/crypto/ccp/sev-dev.c | 30 +- drivers/crypto/hisilicon/hpre/hpre_crypto.c | 2 +- drivers/crypto/hisilicon/qm.c | 2 +- drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c | 9 +- .../crypto/marvell/octeontx2/otx2_cptpf_ucode.c | 3 +- drivers/crypto/omap-aes.c | 2 +- drivers/crypto/qat/qat_common/adf_pf2vf_msg.c | 45 +- drivers/crypto/qce/aead.c | 2 +- drivers/crypto/qce/sha.c | 2 +- drivers/crypto/qce/skcipher.c | 2 +- drivers/crypto/stm32/stm32-crc32.c | 4 +- drivers/crypto/stm32/stm32-cryp.c | 938 ++++++++------------- drivers/crypto/stm32/stm32-hash.c | 6 +- drivers/cxl/pmem.c | 17 +- drivers/dma-buf/dma-fence-array.c | 6 +- drivers/dma/at_xdmac.c | 57 +- drivers/dma/idxd/device.c | 12 +- drivers/dma/mmp_pdma.c | 6 - drivers/dma/pxa_dma.c | 7 - drivers/dma/stm32-mdma.c | 2 +- drivers/dma/uniphier-xdmac.c | 5 +- drivers/edac/synopsys_edac.c | 3 +- drivers/firmware/efi/efi-init.c | 5 + drivers/firmware/google/Kconfig | 6 +- drivers/firmware/sysfb_simplefb.c | 8 +- drivers/gpio/gpio-aspeed-sgpio.c | 32 +- drivers/gpio/gpio-aspeed.c | 52 +- drivers/gpio/gpio-idt3243x.c | 4 +- drivers/gpio/gpio-mpc8xxx.c | 4 +- drivers/gpio/gpiolib-acpi.c | 15 +- drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 6 + drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 4 + drivers/gpu/drm/amd/amdgpu/cik.c | 4 + drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 4 + drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 13 +- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 4 + drivers/gpu/drm/amd/amdgpu/vi.c | 4 + drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 138 ++- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 + .../drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 5 +- drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 3 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 3 +- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 + .../gpu/drm/amd/display/dc/dcn31/dcn31_resource.c | 3 +- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 6 + drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c | 14 +- drivers/gpu/drm/bridge/display-connector.c | 2 +- .../drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c | 40 +- .../gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c | 10 +- drivers/gpu/drm/bridge/synopsys/dw-hdmi-audio.h | 4 +- .../gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c | 9 +- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 12 +- drivers/gpu/drm/bridge/ti-sn65dsi86.c | 1 + drivers/gpu/drm/drm_dp_helper.c | 40 +- drivers/gpu/drm/drm_drv.c | 9 +- drivers/gpu/drm/drm_panel_orientation_quirks.c | 6 + drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 6 + drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 1 + drivers/gpu/drm/etnaviv/etnaviv_sched.c | 4 +- drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c | 10 +- drivers/gpu/drm/lima/lima_device.c | 1 + drivers/gpu/drm/msm/Kconfig | 1 + drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 4 +- drivers/gpu/drm/msm/dsi/dsi.c | 10 +- drivers/gpu/drm/msm/dsi/dsi.h | 1 - drivers/gpu/drm/msm/dsi/dsi_manager.c | 17 - drivers/gpu/drm/msm/msm_gem_submit.c | 2 +- drivers/gpu/drm/nouveau/dispnv04/disp.c | 4 +- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c | 37 +- .../gpu/drm/panel/panel-feiyang-fy07024di26a30d.c | 8 +- drivers/gpu/drm/panel/panel-innolux-p079zca.c | 10 +- drivers/gpu/drm/panel/panel-jdi-lt070me05000.c | 8 +- drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c | 8 +- drivers/gpu/drm/panel/panel-novatek-nt36672a.c | 8 +- .../gpu/drm/panel/panel-panasonic-vvx10f034n00.c | 8 +- drivers/gpu/drm/panel/panel-ronbo-rb070d30.c | 8 +- .../drm/panel/panel-samsung-s6e88a0-ams452ef01.c | 1 + drivers/gpu/drm/panel/panel-samsung-sofef00.c | 1 + drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c | 8 +- drivers/gpu/drm/radeon/radeon_kms.c | 42 +- drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 20 +- drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 82 +- drivers/gpu/drm/tegra/drm.c | 15 + drivers/gpu/drm/tegra/gr2d.c | 33 +- drivers/gpu/drm/tegra/submit.c | 4 +- drivers/gpu/drm/tegra/vic.c | 7 +- drivers/gpu/drm/ttm/ttm_bo.c | 2 + drivers/gpu/drm/vboxvideo/vbox_main.c | 4 +- drivers/gpu/drm/vc4/vc4_crtc.c | 31 +- drivers/gpu/drm/vc4/vc4_drv.h | 29 +- drivers/gpu/drm/vc4/vc4_hdmi.c | 136 ++- drivers/gpu/drm/vc4/vc4_hvs.c | 26 +- drivers/gpu/drm/vc4/vc4_kms.c | 3 +- drivers/gpu/drm/vc4/vc4_txp.c | 4 +- drivers/gpu/drm/vmwgfx/Makefile | 3 +- drivers/gpu/drm/vmwgfx/ttm_memory.c | 99 +-- drivers/gpu/drm/vmwgfx/ttm_memory.h | 6 +- drivers/gpu/drm/vmwgfx/vmwgfx_cmd.c | 7 + drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 48 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 20 +- drivers/gpu/drm/vmwgfx/vmwgfx_mob.c | 12 +- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 4 +- drivers/gpu/drm/vmwgfx/vmwgfx_system_manager.c | 90 ++ drivers/gpu/drm/vmwgfx/vmwgfx_thp.c | 184 ---- drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 58 +- drivers/gpu/host1x/Kconfig | 1 + drivers/gpu/host1x/dev.c | 15 + drivers/hid/hid-apple.c | 2 +- drivers/hid/hid-ids.h | 1 + drivers/hid/hid-input.c | 8 + drivers/hid/hid-magicmouse.c | 95 ++- drivers/hid/hid-uclogic-params.c | 31 +- drivers/hid/hid-vivaldi.c | 34 +- drivers/hid/i2c-hid/i2c-hid-acpi.c | 2 +- drivers/hid/i2c-hid/i2c-hid-core.c | 4 +- drivers/hid/i2c-hid/i2c-hid-of-goodix.c | 2 +- drivers/hid/i2c-hid/i2c-hid-of.c | 10 +- drivers/hid/i2c-hid/i2c-hid.h | 2 +- drivers/hid/uhid.c | 29 +- drivers/hid/wacom_wac.c | 39 +- drivers/hsi/hsi_core.c | 1 + drivers/hwmon/mr75203.c | 2 +- drivers/i2c/busses/i2c-designware-pcidrv.c | 8 +- drivers/i2c/busses/i2c-i801.c | 15 +- drivers/i2c/busses/i2c-mpc.c | 23 +- drivers/iio/adc/ti-adc081c.c | 22 +- drivers/iio/industrialio-trigger.c | 36 +- drivers/infiniband/core/cma.c | 18 +- drivers/infiniband/core/device.c | 3 +- drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 6 +- drivers/infiniband/hw/bnxt_re/qplib_rcfw.h | 1 - drivers/infiniband/hw/cxgb4/qp.c | 1 + drivers/infiniband/hw/hns/hns_roce_main.c | 5 +- drivers/infiniband/hw/qedr/verbs.c | 2 + drivers/infiniband/sw/rxe/rxe_opcode.c | 2 +- drivers/infiniband/ulp/rtrs/rtrs-clt.c | 2 +- drivers/interconnect/qcom/icc-rpm.c | 1 + drivers/iommu/amd/amd_iommu_types.h | 2 - drivers/iommu/amd/init.c | 107 +-- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 2 +- drivers/iommu/io-pgtable-arm-v7s.c | 6 +- drivers/iommu/io-pgtable-arm.c | 9 +- drivers/iommu/iommu.c | 3 +- drivers/iommu/iova.c | 3 +- drivers/irqchip/irq-gic-v3.c | 16 + drivers/leds/leds-lp55xx-common.c | 4 +- drivers/mailbox/mailbox-mpfs.c | 2 +- drivers/mailbox/mtk-cmdq-mailbox.c | 2 +- drivers/md/dm.c | 4 +- drivers/md/md.c | 27 +- drivers/md/md.h | 2 + drivers/md/persistent-data/dm-btree.c | 8 +- drivers/md/persistent-data/dm-space-map-common.c | 5 + drivers/md/raid0.c | 38 +- drivers/md/raid5.c | 41 +- drivers/media/Kconfig | 8 +- drivers/media/cec/core/cec-adap.c | 38 +- drivers/media/cec/core/cec-api.c | 6 + drivers/media/cec/core/cec-core.c | 3 + drivers/media/cec/core/cec-pin.c | 31 +- drivers/media/common/saa7146/saa7146_fops.c | 2 +- .../media/common/videobuf2/videobuf2-dma-contig.c | 8 +- drivers/media/dvb-core/dmxdev.c | 18 +- drivers/media/dvb-frontends/dib8000.c | 4 +- drivers/media/i2c/imx274.c | 5 + drivers/media/i2c/ov8865.c | 16 +- drivers/media/pci/b2c2/flexcop-pci.c | 3 + drivers/media/pci/saa7146/hexium_gemini.c | 7 +- drivers/media/pci/saa7146/hexium_orion.c | 8 +- drivers/media/pci/saa7146/mxb.c | 8 +- drivers/media/platform/aspeed-video.c | 14 +- drivers/media/platform/coda/coda-common.c | 8 +- drivers/media/platform/coda/coda-jpeg.c | 21 +- drivers/media/platform/coda/imx-vdoa.c | 6 +- drivers/media/platform/imx-pxp.c | 4 +- .../media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 2 +- drivers/media/platform/qcom/venus/core.c | 11 +- drivers/media/platform/qcom/venus/pm_helpers.c | 32 +- drivers/media/platform/rcar-vin/rcar-csi2.c | 18 +- drivers/media/platform/rcar-vin/rcar-v4l2.c | 15 +- .../media/platform/rockchip/rkisp1/rkisp1-dev.c | 2 +- drivers/media/radio/si470x/radio-si470x-i2c.c | 3 +- drivers/media/rc/igorplugusb.c | 4 +- drivers/media/rc/mceusb.c | 8 +- drivers/media/rc/redrat3.c | 22 +- drivers/media/tuners/msi001.c | 7 + drivers/media/tuners/si2157.c | 2 +- drivers/media/usb/b2c2/flexcop-usb.c | 10 +- drivers/media/usb/b2c2/flexcop-usb.h | 12 +- drivers/media/usb/cpia2/cpia2_usb.c | 4 +- drivers/media/usb/dvb-usb/dib0700_core.c | 2 - drivers/media/usb/dvb-usb/dw2102.c | 338 +++++--- drivers/media/usb/dvb-usb/m920x.c | 12 +- drivers/media/usb/em28xx/em28xx-cards.c | 18 +- drivers/media/usb/em28xx/em28xx-core.c | 4 +- drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 8 +- drivers/media/usb/s2255/s2255drv.c | 4 +- drivers/media/usb/stk1160/stk1160-core.c | 4 +- drivers/media/usb/uvc/uvcvideo.h | 2 +- drivers/media/v4l2-core/v4l2-ioctl.c | 4 +- drivers/memory/renesas-rpc-if.c | 2 +- drivers/mfd/atmel-flexcom.c | 11 +- drivers/mfd/tps65910.c | 22 +- drivers/misc/eeprom/at25.c | 13 +- drivers/misc/habanalabs/common/firmware_if.c | 17 +- drivers/misc/habanalabs/common/habanalabs.h | 2 + drivers/misc/lattice-ecp3-config.c | 12 +- drivers/misc/lkdtm/Makefile | 2 +- drivers/misc/mei/hbm.c | 20 +- drivers/mmc/core/sdio.c | 4 +- drivers/mmc/host/meson-mx-sdhc-mmc.c | 5 + drivers/mmc/host/meson-mx-sdio.c | 5 + drivers/mmc/host/mtk-sd.c | 64 +- drivers/mmc/host/sdhci-pci-gli.c | 11 + drivers/mmc/host/tmio_mmc_core.c | 15 +- drivers/mtd/hyperbus/rpc-if.c | 8 +- drivers/mtd/mtdcore.c | 4 +- drivers/mtd/mtdpart.c | 2 +- drivers/mtd/nand/raw/davinci_nand.c | 73 +- drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 37 +- drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c | 5 + drivers/mtd/nand/raw/nand_base.c | 67 ++ drivers/net/bonding/bond_main.c | 40 +- drivers/net/can/flexcan.c | 150 ++-- drivers/net/can/rcar/rcar_canfd.c | 5 +- drivers/net/can/softing/softing_cs.c | 2 +- drivers/net/can/softing/softing_fw.c | 11 +- drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c | 6 +- drivers/net/can/xilinx_can.c | 7 +- drivers/net/dsa/hirschmann/hellcreek.c | 87 +- drivers/net/ethernet/broadcom/bnxt/Makefile | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 + drivers/net/ethernet/broadcom/bnxt/bnxt.h | 3 +- drivers/net/ethernet/broadcom/bnxt/bnxt_coredump.c | 372 ++++++++ drivers/net/ethernet/broadcom/bnxt/bnxt_coredump.h | 51 ++ drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 355 +------- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.h | 43 - drivers/net/ethernet/broadcom/bnxt/bnxt_hwrm.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt_hwrm.h | 3 +- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 10 +- drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.c | 3 +- drivers/net/ethernet/cortina/gemini.c | 9 +- drivers/net/ethernet/freescale/fman/mac.c | 21 +- drivers/net/ethernet/freescale/xgmac_mdio.c | 28 +- drivers/net/ethernet/i825xx/sni_82596.c | 3 +- drivers/net/ethernet/intel/igc/igc_main.c | 4 +- drivers/net/ethernet/marvell/octeontx2/af/ptp.c | 2 + drivers/net/ethernet/mediatek/mtk_eth_soc.c | 55 +- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 16 +- drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 36 +- .../net/ethernet/mellanox/mlx5/core/en/tc_tun.c | 5 +- .../ethernet/mellanox/mlx5/core/en/tc_tun_encap.c | 2 + .../net/ethernet/mellanox/mlx5/core/en/xsk/pool.c | 4 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 19 +- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 3 + drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 7 +- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 120 ++- .../net/ethernet/mellanox/mlx5/core/esw/legacy.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c | 6 +- drivers/net/ethernet/mellanox/mlx5/core/main.c | 8 +- .../net/ethernet/mellanox/mlx5/core/sf/dev/dev.c | 5 +- drivers/net/ethernet/mellanox/mlxsw/cmd.h | 12 + drivers/net/ethernet/mellanox/mlxsw/pci.c | 7 +- drivers/net/ethernet/mscc/ocelot.c | 31 +- drivers/net/ethernet/mscc/ocelot_flower.c | 15 +- drivers/net/ethernet/mscc/ocelot_net.c | 6 +- drivers/net/ethernet/renesas/ravb_main.c | 6 +- drivers/net/ethernet/rocker/rocker_ofdpa.c | 3 +- .../ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 7 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 + drivers/net/ethernet/ti/cpsw.c | 6 +- drivers/net/ethernet/ti/cpsw_new.c | 6 +- drivers/net/ethernet/ti/cpsw_priv.c | 2 +- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 135 +-- drivers/net/ipa/ipa_endpoint.c | 7 +- drivers/net/phy/marvell.c | 62 +- drivers/net/phy/mdio_bus.c | 2 +- drivers/net/phy/micrel.c | 36 +- drivers/net/phy/phy-core.c | 2 +- drivers/net/phy/sfp.c | 25 +- drivers/net/ppp/ppp_generic.c | 7 +- drivers/net/usb/mcs7830.c | 12 +- drivers/net/usb/smsc95xx.c | 3 +- drivers/net/wireless/ath/ar5523/ar5523.c | 4 + drivers/net/wireless/ath/ath10k/core.c | 19 +- drivers/net/wireless/ath/ath10k/htt_tx.c | 3 + drivers/net/wireless/ath/ath10k/hw.h | 3 + drivers/net/wireless/ath/ath10k/txrx.c | 2 - drivers/net/wireless/ath/ath11k/ahb.c | 28 +- drivers/net/wireless/ath/ath11k/core.c | 27 +- drivers/net/wireless/ath/ath11k/core.h | 15 +- drivers/net/wireless/ath/ath11k/dp.h | 3 +- drivers/net/wireless/ath/ath11k/dp_tx.c | 2 +- drivers/net/wireless/ath/ath11k/hal.c | 22 + drivers/net/wireless/ath/ath11k/hal.h | 2 + drivers/net/wireless/ath/ath11k/hw.c | 2 - drivers/net/wireless/ath/ath11k/mac.c | 52 +- drivers/net/wireless/ath/ath11k/pci.c | 22 +- drivers/net/wireless/ath/ath11k/qmi.c | 2 +- drivers/net/wireless/ath/ath11k/reg.c | 103 +-- drivers/net/wireless/ath/ath11k/wmi.c | 5 +- drivers/net/wireless/ath/ath9k/hif_usb.c | 7 + drivers/net/wireless/ath/ath9k/htc.h | 2 + drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 13 + drivers/net/wireless/ath/ath9k/wmi.c | 4 + drivers/net/wireless/ath/wcn36xx/dxe.c | 49 +- drivers/net/wireless/ath/wcn36xx/main.c | 34 +- drivers/net/wireless/ath/wcn36xx/smd.c | 10 +- drivers/net/wireless/ath/wcn36xx/txrx.c | 41 +- drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 1 + drivers/net/wireless/intel/iwlwifi/iwl-csr.h | 5 +- drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 17 +- drivers/net/wireless/intel/iwlwifi/iwl-io.c | 2 +- .../net/wireless/intel/iwlwifi/mvm/ftm-initiator.c | 4 +- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 17 + drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 27 + drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 23 +- .../net/wireless/intel/iwlwifi/mvm/time-event.c | 36 +- drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 7 +- drivers/net/wireless/intel/iwlwifi/queue/tx.c | 1 + drivers/net/wireless/marvell/mwifiex/sta_event.c | 8 +- drivers/net/wireless/marvell/mwifiex/usb.c | 3 +- drivers/net/wireless/mediatek/mt76/mt7603/mac.c | 4 + drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 9 +- drivers/net/wireless/mediatek/mt76/mt7615/main.c | 8 +- .../net/wireless/mediatek/mt76/mt7615/pci_init.c | 8 +- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 9 +- drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 9 +- drivers/net/wireless/mediatek/mt76/mt7921/main.c | 6 - drivers/net/wireless/microchip/wilc1000/netdev.c | 1 - drivers/net/wireless/microchip/wilc1000/sdio.c | 2 + drivers/net/wireless/microchip/wilc1000/spi.c | 2 + drivers/net/wireless/realtek/rtw88/main.c | 2 +- drivers/net/wireless/realtek/rtw88/pci.c | 61 +- drivers/net/wireless/realtek/rtw88/pci.h | 2 + drivers/net/wireless/realtek/rtw88/rtw8821c.h | 2 +- drivers/net/wireless/realtek/rtw88/rtw8822b.c | 2 +- drivers/net/wireless/realtek/rtw88/rtw8822c.c | 2 +- drivers/net/wireless/rsi/rsi_91x_main.c | 4 + drivers/net/wireless/rsi/rsi_91x_usb.c | 9 +- drivers/net/wireless/rsi/rsi_usb.h | 2 + drivers/net/wwan/mhi_wwan_mbim.c | 4 +- drivers/nvmem/core.c | 2 + drivers/of/base.c | 11 +- drivers/of/fdt.c | 25 +- drivers/of/unittest.c | 21 +- drivers/parisc/pdc_stable.c | 4 +- drivers/pci/controller/pci-aardvark.c | 4 +- drivers/pci/controller/pci-mvebu.c | 8 + drivers/pci/controller/pci-xgene.c | 2 +- drivers/pci/hotplug/pciehp.h | 3 + drivers/pci/hotplug/pciehp_core.c | 2 +- drivers/pci/hotplug/pciehp_hpc.c | 28 +- drivers/pci/msi.c | 26 +- drivers/pci/pci-bridge-emul.c | 70 +- drivers/pci/quirks.c | 3 + drivers/pcmcia/cs.c | 8 +- drivers/pcmcia/rsrc_nonstatic.c | 6 + drivers/perf/arm-cmn.c | 5 +- drivers/phy/cadence/phy-cadence-sierra.c | 31 +- drivers/phy/mediatek/phy-mtk-mipi-dsi.c | 2 + drivers/phy/mediatek/phy-mtk-tphy.c | 162 ++++ drivers/phy/socionext/phy-uniphier-usb3ss.c | 10 +- drivers/pinctrl/pinctrl-rockchip.c | 2 +- drivers/power/reset/mt6323-poweroff.c | 3 + drivers/ptp/ptp_vclock.c | 10 +- drivers/regulator/da9121-regulator.c | 5 + drivers/regulator/qcom-labibb-regulator.c | 2 +- drivers/regulator/qcom_smd-regulator.c | 100 ++- drivers/remoteproc/imx_rproc.c | 1 + drivers/rpmsg/rpmsg_core.c | 20 +- drivers/rtc/rtc-cmos.c | 3 + drivers/rtc/rtc-pxa.c | 4 + drivers/scsi/lpfc/lpfc.h | 2 +- drivers/scsi/lpfc/lpfc_attr.c | 62 +- drivers/scsi/lpfc/lpfc_els.c | 11 +- drivers/scsi/lpfc/lpfc_hbadisc.c | 8 +- drivers/scsi/lpfc/lpfc_init.c | 8 +- drivers/scsi/lpfc/lpfc_nportdisc.c | 6 + drivers/scsi/lpfc/lpfc_sli.c | 6 - drivers/scsi/mpi3mr/mpi3mr.h | 3 +- drivers/scsi/mpi3mr/mpi3mr_fw.c | 4 +- drivers/scsi/pm8001/pm8001_hwi.c | 4 +- drivers/scsi/scsi.c | 4 +- drivers/scsi/scsi_debugfs.c | 1 + drivers/scsi/scsi_pm.c | 2 +- drivers/scsi/sr.c | 2 +- drivers/scsi/sr_vendor.c | 4 +- drivers/scsi/ufs/tc-dwc-g210-pci.c | 1 - drivers/scsi/ufs/ufs-mediatek.c | 2 +- drivers/scsi/ufs/ufshcd-pci.c | 2 - drivers/scsi/ufs/ufshcd-pltfrm.c | 2 - drivers/scsi/ufs/ufshcd.c | 22 +- drivers/soc/imx/gpcv2.c | 2 +- drivers/soc/mediatek/mtk-scpsys.c | 15 +- drivers/soc/qcom/cpr.c | 2 +- drivers/soc/ti/pruss.c | 2 +- drivers/spi/spi-hisi-kunpeng.c | 15 +- drivers/spi/spi-meson-spifc.c | 1 + drivers/spi/spi-uniphier.c | 11 +- drivers/spi/spi.c | 13 +- drivers/staging/greybus/audio_topology.c | 15 + drivers/staging/media/atomisp/i2c/ov2680.h | 24 - drivers/staging/media/atomisp/pci/atomisp_cmd.c | 82 +- drivers/staging/media/atomisp/pci/atomisp_fops.c | 11 + .../media/atomisp/pci/atomisp_gmin_platform.c | 2 +- drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 188 ++++- drivers/staging/media/atomisp/pci/atomisp_subdev.c | 15 +- drivers/staging/media/atomisp/pci/atomisp_subdev.h | 3 + drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 13 +- drivers/staging/media/atomisp/pci/atomisp_v4l2.h | 3 +- drivers/staging/media/atomisp/pci/sh_css.c | 27 +- drivers/staging/media/atomisp/pci/sh_css_mipi.c | 41 +- drivers/staging/media/atomisp/pci/sh_css_params.c | 8 +- drivers/staging/media/hantro/hantro_drv.c | 3 +- drivers/staging/media/hantro/hantro_h1_jpeg_enc.c | 2 +- drivers/staging/media/hantro/hantro_hw.h | 3 +- .../media/hantro/rockchip_vpu2_hw_jpeg_enc.c | 17 + drivers/staging/media/hantro/rockchip_vpu_hw.c | 5 +- drivers/staging/rtl8192e/rtllib.h | 2 +- drivers/staging/rtl8192e/rtllib_module.c | 16 +- drivers/staging/rtl8192e/rtllib_softmac.c | 6 +- drivers/tee/tee_core.c | 4 +- drivers/thermal/imx8mm_thermal.c | 3 + drivers/thermal/imx_thermal.c | 145 ++-- drivers/thunderbolt/acpi.c | 13 + drivers/tty/mxser.c | 5 +- drivers/tty/serial/8250/8250_bcm7271.c | 11 +- drivers/tty/serial/amba-pl010.c | 3 - drivers/tty/serial/amba-pl011.c | 29 +- drivers/tty/serial/atmel_serial.c | 14 + drivers/tty/serial/imx.c | 7 +- drivers/tty/serial/liteuart.c | 2 +- drivers/tty/serial/serial_core.c | 7 +- drivers/tty/serial/stm32-usart.c | 6 +- drivers/tty/serial/uartlite.c | 2 +- drivers/uio/uio_dmem_genirq.c | 6 +- drivers/usb/core/hub.c | 5 +- drivers/usb/dwc2/gadget.c | 13 +- drivers/usb/dwc2/hcd.c | 7 +- drivers/usb/dwc3/dwc3-meson-g12a.c | 17 +- drivers/usb/dwc3/dwc3-qcom.c | 7 +- drivers/usb/gadget/function/f_fs.c | 4 +- drivers/usb/gadget/function/u_audio.c | 4 +- drivers/usb/host/ehci-brcm.c | 6 +- drivers/usb/host/uhci-platform.c | 3 +- drivers/usb/misc/ftdi-elan.c | 1 + drivers/vdpa/ifcvf/ifcvf_base.c | 41 +- drivers/vdpa/ifcvf/ifcvf_base.h | 9 +- drivers/vdpa/ifcvf/ifcvf_main.c | 24 +- drivers/vdpa/mlx5/net/mlx5_vnet.c | 6 +- drivers/video/backlight/qcom-wled.c | 122 +-- drivers/virtio/virtio_mem.c | 2 +- drivers/virtio/virtio_ring.c | 4 +- drivers/w1/slaves/w1_ds28e04.c | 26 +- drivers/xen/gntdev.c | 6 +- fs/btrfs/backref.c | 21 +- fs/btrfs/ctree.c | 19 +- fs/btrfs/inode.c | 11 + fs/btrfs/qgroup.c | 19 + fs/debugfs/file.c | 2 +- fs/dlm/lock.c | 9 + fs/dlm/lowcomms.c | 44 +- fs/ext4/ext4.h | 1 + fs/ext4/ext4_jbd2.c | 2 + fs/ext4/extents.c | 2 - fs/ext4/fast_commit.c | 18 +- fs/ext4/inode.c | 51 +- fs/ext4/ioctl.c | 2 - fs/ext4/mballoc.c | 48 +- fs/ext4/migrate.c | 23 +- fs/ext4/super.c | 27 +- fs/f2fs/checkpoint.c | 4 +- fs/f2fs/compress.c | 50 +- fs/f2fs/data.c | 7 +- fs/f2fs/f2fs.h | 11 + fs/f2fs/file.c | 10 +- fs/f2fs/gc.c | 8 +- fs/f2fs/inode.c | 5 + fs/f2fs/segment.h | 3 +- fs/f2fs/super.c | 44 + fs/f2fs/sysfs.c | 4 +- fs/fuse/file.c | 2 +- fs/io_uring.c | 1 + fs/jffs2/file.c | 40 +- fs/ksmbd/connection.c | 1 + fs/ksmbd/connection.h | 4 +- fs/ksmbd/ksmbd_netlink.h | 12 +- fs/ksmbd/smb2misc.c | 18 +- fs/ksmbd/smb2ops.c | 16 +- fs/ksmbd/smb2pdu.c | 87 +- fs/ksmbd/smb2pdu.h | 1 + fs/ksmbd/smb_common.h | 1 + fs/ksmbd/transport_ipc.c | 2 + fs/ksmbd/transport_tcp.c | 3 +- fs/ubifs/super.c | 1 - fs/udf/ialloc.c | 2 + include/acpi/acpi_bus.h | 5 +- include/acpi/actypes.h | 10 +- include/asm-generic/bitops/find.h | 5 + include/linux/blk-pm.h | 2 +- include/linux/bpf_verifier.h | 7 + include/linux/hid.h | 2 + include/linux/iio/trigger.h | 2 + include/linux/ipv6.h | 2 + include/linux/mmzone.h | 9 + include/linux/mtd/rawnand.h | 2 + include/linux/of_fdt.h | 2 + include/linux/pm_runtime.h | 3 + include/linux/psi_types.h | 13 +- include/linux/ptp_clock_kernel.h | 12 +- include/linux/skbuff.h | 7 +- include/linux/stmmac.h | 1 + include/media/cec.h | 11 +- include/net/inet_frag.h | 11 +- include/net/ipv6_frag.h | 3 +- include/net/pkt_sched.h | 5 +- include/net/sch_generic.h | 5 + include/net/seg6.h | 21 + include/net/xfrm.h | 7 +- include/sound/hda_codec.h | 8 +- include/trace/events/cgroup.h | 12 +- include/uapi/linux/xfrm.h | 1 + kernel/audit.c | 18 +- kernel/bpf/btf.c | 3 +- kernel/bpf/inode.c | 14 +- kernel/bpf/verifier.c | 28 +- kernel/dma/pool.c | 4 +- kernel/rcu/rcutorture.c | 5 + kernel/rcu/tree_exp.h | 1 + kernel/sched/cpuacct.c | 79 +- kernel/sched/cputime.c | 4 +- kernel/sched/fair.c | 4 +- kernel/sched/psi.c | 45 +- kernel/sched/rt.c | 23 +- kernel/sched/stats.h | 5 +- kernel/time/clocksource.c | 50 +- kernel/trace/bpf_trace.c | 6 +- kernel/trace/trace_kprobe.c | 5 +- kernel/trace/trace_osnoise.c | 20 +- kernel/trace/trace_syscalls.c | 6 +- kernel/tsacct.c | 7 +- lib/kunit/test.c | 18 +- lib/logic_iomem.c | 19 +- lib/mpi/mpi-mod.c | 2 + lib/test_hmm.c | 24 + lib/test_meminit.c | 1 + mm/hmm.c | 5 +- mm/page_alloc.c | 19 +- mm/shmem.c | 37 +- net/ax25/af_ax25.c | 10 +- net/batman-adv/netlink.c | 30 +- net/bluetooth/cmtp/core.c | 4 +- net/bluetooth/hci_core.c | 1 + net/bluetooth/hci_event.c | 14 +- net/bluetooth/hci_request.c | 2 +- net/bluetooth/hci_sysfs.c | 2 + net/bluetooth/l2cap_sock.c | 45 +- net/bluetooth/mgmt.c | 248 +++--- net/bridge/br_netfilter_hooks.c | 7 +- net/core/dev.c | 6 + net/core/devlink.c | 2 - net/core/filter.c | 8 +- net/core/flow_dissector.c | 3 +- net/core/net-sysfs.c | 3 + net/core/net_namespace.c | 4 +- net/core/sock.c | 2 + net/core/sock_map.c | 21 +- net/dsa/switch.c | 4 +- net/ipv4/fib_semantics.c | 47 +- net/ipv4/inet_fragment.c | 8 +- net/ipv4/ip_fragment.c | 3 +- net/ipv4/ip_gre.c | 5 +- net/ipv4/netfilter/ipt_CLUSTERIP.c | 5 +- net/ipv4/tcp_bpf.c | 27 + net/ipv6/icmp.c | 6 +- net/ipv6/ip6_gre.c | 5 +- net/ipv6/seg6.c | 59 ++ net/ipv6/seg6_local.c | 33 +- net/ipv6/udp.c | 3 +- net/mac80211/rx.c | 2 +- net/mptcp/options.c | 10 +- net/mptcp/pm_netlink.c | 18 +- net/netfilter/nft_payload.c | 3 + net/netfilter/nft_set_pipapo.c | 8 + net/netrom/af_netrom.c | 12 +- net/nfc/llcp_sock.c | 5 + net/openvswitch/flow.c | 20 +- net/sched/act_ct.c | 7 + net/sched/cls_api.c | 3 + net/sched/cls_flower.c | 3 +- net/sched/sch_api.c | 2 +- net/sched/sch_generic.c | 1 + net/smc/af_smc.c | 8 +- net/smc/smc_core.c | 29 +- net/smc/smc_core.h | 2 +- net/socket.c | 9 +- net/unix/garbage.c | 14 +- net/unix/scm.c | 6 +- net/xfrm/xfrm_compat.c | 6 +- net/xfrm/xfrm_interface.c | 14 +- net/xfrm/xfrm_output.c | 30 +- net/xfrm/xfrm_policy.c | 24 +- net/xfrm/xfrm_state.c | 23 +- net/xfrm/xfrm_user.c | 41 +- samples/bpf/Makefile | 56 +- samples/bpf/Makefile.target | 11 - samples/bpf/hbm_kern.h | 2 - samples/bpf/lwt_len_hist_kern.c | 7 - samples/bpf/xdp_sample_user.h | 2 + scripts/dtc/dtx_diff | 8 +- scripts/sphinx-pre-install | 3 + security/selinux/hooks.c | 12 +- sound/core/jack.c | 3 + sound/core/misc.c | 2 +- sound/core/oss/pcm_oss.c | 2 +- sound/core/pcm.c | 6 +- sound/core/seq/seq_queue.c | 14 +- sound/hda/hdac_stream.c | 14 +- sound/pci/hda/hda_bind.c | 5 + sound/pci/hda/hda_codec.c | 45 +- sound/pci/hda/hda_controller.c | 1 - sound/pci/hda/hda_local.h | 1 + sound/pci/hda/patch_cs8409-tables.c | 3 + sound/pci/hda/patch_cs8409.c | 9 +- sound/pci/hda/patch_cs8409.h | 1 + sound/soc/codecs/Kconfig | 3 +- sound/soc/codecs/rt5663.c | 12 +- sound/soc/fsl/fsl_asrc.c | 69 +- sound/soc/fsl/fsl_mqs.c | 2 +- sound/soc/fsl/imx-card.c | 32 +- sound/soc/fsl/imx-hdmi.c | 2 + sound/soc/intel/boards/sof_sdw.c | 2 +- sound/soc/intel/catpt/dsp.c | 14 +- sound/soc/intel/skylake/skl-pcm.c | 1 - sound/soc/mediatek/mt8173/mt8173-max98090.c | 3 + sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c | 2 + sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c | 2 + sound/soc/mediatek/mt8173/mt8173-rt5650.c | 2 + sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c | 6 +- .../mt8183/mt8183-mt6358-ts3a227-max98357.c | 7 +- .../mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c | 6 +- sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 2 +- sound/soc/mediatek/mt8195/mt8195-dai-pcm.c | 73 +- sound/soc/mediatek/mt8195/mt8195-reg.h | 1 + sound/soc/samsung/idma.c | 2 + sound/soc/uniphier/Kconfig | 2 - sound/usb/format.c | 2 +- sound/usb/mixer_quirks.c | 2 +- sound/usb/quirks.c | 2 +- tools/bpf/bpftool/Documentation/Makefile | 1 - tools/bpf/bpftool/Documentation/bpftool-btf.rst | 2 +- tools/bpf/bpftool/Documentation/bpftool-cgroup.rst | 2 +- tools/bpf/bpftool/Documentation/bpftool-gen.rst | 2 +- tools/bpf/bpftool/Documentation/bpftool-link.rst | 2 +- tools/bpf/bpftool/Documentation/bpftool-map.rst | 6 +- tools/bpf/bpftool/Documentation/bpftool-prog.rst | 8 +- tools/bpf/bpftool/Documentation/bpftool.rst | 6 +- tools/bpf/bpftool/Makefile | 1 - tools/bpf/bpftool/main.c | 2 + tools/bpf/bpftool/prog.c | 15 +- tools/include/nolibc/nolibc.h | 33 +- tools/lib/bpf/btf.c | 55 +- tools/lib/bpf/btf.h | 2 +- tools/lib/bpf/btf_dump.c | 2 +- tools/lib/bpf/gen_loader.c | 4 +- tools/lib/bpf/libbpf.c | 9 +- tools/lib/bpf/linker.c | 6 +- tools/perf/Makefile.config | 5 +- tools/perf/util/debug.c | 2 +- tools/perf/util/evsel.c | 25 +- tools/perf/util/probe-event.c | 3 + tools/testing/selftests/bpf/btf_helpers.c | 9 +- tools/testing/selftests/bpf/prog_tests/bpf_iter.c | 5 +- .../selftests/bpf/prog_tests/migrate_reuseport.c | 4 +- tools/testing/selftests/bpf/prog_tests/skb_ctx.c | 2 + .../testing/selftests/bpf/prog_tests/tc_redirect.c | 7 + tools/testing/selftests/clone3/clone3.c | 6 + .../selftests/ftrace/test.d/kprobe/profile.tc | 2 +- tools/testing/selftests/kselftest_harness.h | 2 +- .../selftests/powerpc/security/spectre_v2.c | 2 +- tools/testing/selftests/powerpc/signal/.gitignore | 1 + tools/testing/selftests/powerpc/signal/Makefile | 1 + .../selftests/powerpc/signal/sigreturn_kernel.c | 132 +++ tools/testing/selftests/vm/hmm-tests.c | 42 + 896 files changed, 9019 insertions(+), 5115 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 5/846 HID: wacom: Reset expected and received contact counts at the same time
From: Jason Gerecke <[email protected]>
commit 546e41ac994cc185ef3de610ca849a294b5df3ba upstream.
These two values go hand-in-hand and must be valid for the driver to behave correctly. We are currently lazy about updating the values and rely on the "expected" code flow to take care of making sure they're valid at the point they're needed. The "expected" flow changed somewhat with commit f8b6a74719b5 ("HID: wacom: generic: Support multiple tools per report"), however. This led to problems with the DTH-2452 due (in part) to *all* contacts being fully processed -- even those past the expected contact count. Specifically, the received count gets reset to 0 once all expected fingers are processed, but not the expected count. The rest of the contacts in the report are then *also* processed since now the driver thinks we've only processed 0 of N expected contacts.
Later commits such as 7fb0413baa7f (HID: wacom: Use "Confidence" flag to prevent reporting invalid contacts) worked around the DTH-2452 issue by skipping the invalid contacts at the end of the report, but this is not a complete fix. The confidence flag cannot be relied on when a contact is removed (see the following patch), and dealing with that condition re-introduces the DTH-2452 issue unless we also address this contact count laziness. By resetting expected and received counts at the same time we ensure the driver understands that there are 0 more contacts expected in the report. Similarly, we also make sure to reset the received count if for some reason we're out of sync in the pre-report phase.
--- drivers/hid/wacom_wac.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/hid/wacom_wac.c +5 -1
@@ -2692,11 +2692,14 @@ static void wacom_wac_finger_pre_report( hid_data->cc_index >= 0) {struct hid_field *field = report->field[hid_data->cc_index];int value = field->value[hid_data->cc_value_index]; - if (value) +if (value) { hid_data->num_expected = value; + hid_data->num_received =0 ; + } } else { hid_data->num_expected = wacom_wac->features.touch_max; + hid_data->num_received =0 ; } }
@@ -2724,6 +2727,7 @@ static void wacom_wac_finger_report(struinput_sync (input); wacom_wac->hid_data.num_received =0 ; + wacom_wac->hid_data.num_expected =0 ;/* keep touch state for pen event */ wacom_wac->shared->touch_down =wacom_wac_finger_count_touches (wacom_wac);
Greg Kroah-Hartman
maintainerPATCH 15/846 mtd: Fixed breaking list in __mtd_del_partition.
In reply to Greg Kroah-HartmanFrom: Andreas Oetken <[email protected]>
commit 2966daf7d253d9904b337b040dd7a43472858b8a upstream.
Not the child partition should be removed from the partition list but the partition itself. Otherwise the partition list gets broken and any subsequent remove operations leads to a kernel panic.
--- drivers/mtd/mtdpart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/mtdpart.c +1 -1
@@ -312,7 +312,7 @@ static int __mtd_del_partition(struct mtif (err)return err; -list_del (&child->part.node); +list_del (&mtd->part.node);free_partition (mtd);return 0 ;
Greg Kroah-Hartman
maintainerPATCH 20/846 mtd: rawnand: ingenic: JZ4740 needs oob_first read page function
In reply to Greg Kroah-HartmanFrom: Paul Cercueil <[email protected]>
commit 0171480007d64f663aae9226303f1b1e4621229e upstream.
The ECC engine on the JZ4740 SoC requires the ECC data to be read before the page; using the default page reading function does not work. Indeed, the old JZ4740 NAND driver (removed in 5.4) did use the 'OOB first' flag that existed back then.
Use the newly created nand_read_page_hwecc_oob_first() to address this issue.
This issue was not found when the new ingenic-nand driver was developed, most likely because the Device Tree used had the nand-ecc-mode set to "hw_oob_first", which seems to not be supported anymore.
--- drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c +5 -0
@@ -32,6 +32,7 @@ struct jz_soc_info {unsigned long addr_offset;unsigned long cmd_offset;const struct mtd_ooblayout_ops *oob_layout; +bool oob_first; };struct ingenic_nand_cs {
@@ -240,6 +241,9 @@ static int ingenic_nand_attach_chip(struif (chip->bbt_options &NAND_BBT_USE_FLASH ) chip->bbt_options |=NAND_BBT_NO_OOB ; +if (nfc->soc_info->oob_first) + chip->ecc.read_page = nand_read_page_hwecc_oob_first; +/* For legacy reasons we use a different layout on the qi,lb60 board. */ if (of_machine_is_compatible ("qi,lb60" ))mtd_set_ooblayout (mtd, &qi_lb60_ooblayout_ops);
@@ -534,6 +538,7 @@ static const struct jz_soc_info jz4740_s .data_offset = 0x00000000, .cmd_offset = 0x00008000, .addr_offset = 0x00010000, + .oob_first = true, };static const struct jz_soc_info jz4725b_soc_info = {
Greg Kroah-Hartman
maintainerPATCH 23/846 riscv: try to allocate crashkern region from 32bit addressible memory
In reply to Greg Kroah-HartmanFrom: Nick Kossifidis <[email protected]>
commit decf89f86ecd3c3c3de81c562010d5797bea3de1 upstream.
When allocating crash kernel region without explicitly specifying its base address/size, memblock_phys_alloc_range will attempt to allocate memory top to bottom (memblock.bottom_up is false), so the crash kernel region will end up in highmem on 64bit systems. This way swiotlb can't work on the crash kernel, since there won't be any 32bit addressible memory available for the bounce buffers.
Try to allocate 32bit addressible memory if available, for the crash kernel by restricting the top search address to be less than SZ_4G. If that fails fallback to the previous behavior.
I tested this on HiFive Unmatched where the pci-e controller needs swiotlb to work, with this patch it's possible to access the pci-e controller on crash kernel and mount the rootfs from the nvme.
--- arch/riscv/mm/init.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)
arch/riscv/mm/init.c +13 -4
@@ -813,13 +813,22 @@ static void __init reserve_crashkernel(v/* * Current riscv boot protocol requires 2MB alignment for * RV64 and 4MB alignment for RV32 (hugepage size) +* +* Try to alloc from 32bit addressible physical memory so that +* swiotlb can work on the crash kernel. */ crash_base =memblock_phys_alloc_range (crash_size,PMD_SIZE , - search_start, search_end); + search_start, +min (search_end, (unsigned long )SZ_4G ));if (crash_base ==0 ) { -pr_warn ("crashkernel: couldn't allocate %lldKB\n" , - crash_size >>10 ); -return ; +/* Try again without restricting region to 32bit addressible memory */ + crash_base =memblock_phys_alloc_range (crash_size,PMD_SIZE , + search_start, search_end); +if (crash_base ==0 ) { +pr_warn ("crashkernel: couldn't allocate %lldKB\n" , + crash_size >>10 ); +return ; + } } pr_info("crashkernel: reserved 0x%016llx - 0x%016llx (%lld MB)\n",
Greg Kroah-Hartman
maintainerPATCH 6/846 HID: wacom: Ignore the confidence flag when a touch is removed
In reply to Greg Kroah-HartmanFrom: Jason Gerecke <[email protected]>
commit df03e9bd6d4806619b4cdc91a3d7695818a8e2b7 upstream.
AES hardware may internally re-classify a contact that it thought was intentional as a palm. Intentional contacts are reported as "down" with the confidence bit set. When this re-classification occurs, however, the state transitions to "up" with the confidence bit cleared. This kind of transition appears to be legal according to Microsoft docs, but we do not handle it correctly. Because the confidence bit is clear, we don't call wacom_wac_finger_slot and update userspace. This causes hung touches that confuse userspace and interfere with pen arbitration.
This commit adds a special case to ignore the confidence flag if a contact is reported as removed. This ensures we do not leave a hung touch if one of these re-classification events occured. Ideally we'd have some way to also let userspace know that the touch has been re-classified as a palm and needs to be canceled, but that's not possible right now :)
--- drivers/hid/wacom_wac.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-)
drivers/hid/wacom_wac.c +26 -3
@@ -2588,6 +2588,24 @@ static void wacom_wac_finger_slot(struct } } +static bool wacom_wac_slot_is_active (struct input_dev *dev,int key) +{ +struct input_mt *mt = dev->mt; +struct input_mt_slot *s; + +if (!mt) +return false; + +for (s = mt->slots; s != mt->slots + mt->num_slots; s++) { +if (s->key == key && +input_mt_get_value (s,ABS_MT_TRACKING_ID ) >=0 ) { +return true; + } + } + +return false; +} +static void wacom_wac_finger_event (struct hid_device *hdev,struct hid_field *field,struct hid_usage *usage,__s32 value) {
@@ -2638,9 +2656,14 @@ static void wacom_wac_finger_event(struc }if (usage->usage_index +1 == field->report_count) { -if (equivalent_usage == wacom_wac->hid_data.last_slot_field && - wacom_wac->hid_data.confidence) -wacom_wac_finger_slot (wacom_wac, wacom_wac->touch_input); +if (equivalent_usage == wacom_wac->hid_data.last_slot_field) { +bool touch_removed =wacom_wac_slot_is_active (wacom_wac->touch_input, + wacom_wac->hid_data.id) && !wacom_wac->hid_data.tipswitch; + +if (wacom_wac->hid_data.confidence || touch_removed) { +wacom_wac_finger_slot (wacom_wac, wacom_wac->touch_input); + } + } } }
Greg Kroah-Hartman
maintainerPATCH 19/846 mtd: rawnand: Export nand_read_page_hwecc_oob_first()
In reply to Greg Kroah-HartmanFrom: Paul Cercueil <[email protected]>
commit d8466f73010faf71effb21228ae1cbf577dab130 upstream.
Move the function nand_read_page_hwecc_oob_first() (previously nand_davinci_read_page_hwecc_oob_first()) to nand_base.c, and export it as a GPL symbol, so that it can be used by more modules.
--- drivers/mtd/nand/raw/davinci_nand.c | 69 ------------------------------------ drivers/mtd/nand/raw/nand_base.c | 67 ++++++++++++++++++++++++++++++++++ include/linux/mtd/rawnand.h | 2 + 3 files changed, 70 insertions(+), 68 deletions(-)
drivers/mtd/nand/raw/davinci_nand.c +1 -68
@@ -371,73 +371,6 @@ correct:return corrected; } -/** -* nand_davinci_read_page_hwecc_oob_first - Hardware ECC page read with ECC -* data read from OOB area -* @chip: nand chip info structure -* @buf: buffer to store read data -* @oob_required: caller requires OOB data read to chip->oob_poi -* @page: page number to read -* -* Hardware ECC for large page chips, which requires the ECC data to be -* extracted from the OOB before the actual data is read. -*/ -static int nand_davinci_read_page_hwecc_oob_first (struct nand_chip *chip, -uint8_t *buf, -int oob_required,int page) -{ -struct mtd_info *mtd =nand_to_mtd (chip); -int i, eccsize = chip->ecc.size, ret; -int eccbytes = chip->ecc.bytes; -int eccsteps = chip->ecc.steps; -uint8_t *p = buf; -uint8_t *ecc_code = chip->ecc.code_buf; -unsigned int max_bitflips =0 ; - -/* Read the OOB area first */ - ret =nand_read_oob_op (chip, page,0 , chip->oob_poi, mtd->oobsize); -if (ret) -return ret; - -/* Move read cursor to start of page */ - ret =nand_change_read_column_op (chip,0 ,NULL ,0 , false); -if (ret) -return ret; - - ret =mtd_ooblayout_get_eccbytes (mtd, ecc_code, chip->oob_poi,0 , - chip->ecc.total); -if (ret) -return ret; - -for (i =0 ; eccsteps; eccsteps--, i += eccbytes, p += eccsize) { -int stat; - - chip->ecc.hwctl (chip,NAND_ECC_READ ); - - ret =nand_read_data_op (chip, p, eccsize, false, false); -if (ret) -return ret; - - stat = chip->ecc.correct (chip, p, &ecc_code[i],NULL ); -if (stat == -EBADMSG && - (chip->ecc.options &NAND_ECC_GENERIC_ERASED_CHECK )) { -/* check for empty pages with bitflips */ - stat =nand_check_erased_ecc_chunk (p, eccsize, - &ecc_code[i], - eccbytes,NULL ,0 , - chip->ecc.strength); - } - -if (stat <0 ) { - mtd->ecc_stats.failed++; - }else { - mtd->ecc_stats.corrected += stat; - max_bitflips = max_t(unsigned int, max_bitflips, stat); - } - } -return max_bitflips; -} -/*----------------------------------------------------------------------*/ /* An ECC layout for using 4-bit ECC with small-page flash, storing
@@ -647,7 +580,7 @@ static int davinci_nand_attach_chip(stru }else if (chunks ==4 || chunks ==8 ) {mtd_set_ooblayout (mtd,nand_get_large_page_ooblayout ()); - chip->ecc.read_page = nand_davinci_read_page_hwecc_oob_first; + chip->ecc.read_page = nand_read_page_hwecc_oob_first; }else {return -EIO ; }
drivers/mtd/nand/raw/nand_base.c +67 -0
73 lines not on this page · raw message
include/linux/mtd/rawnand.h +2 -0
@@ -1539,6 +1539,8 @@ int nand_read_data_op(struct nand_chip * bool force_8bit, bool check_only);int nand_write_data_op (struct nand_chip *chip,const void *buf,unsigned int len,bool force_8bit); +int nand_read_page_hwecc_oob_first (struct nand_chip *chip,uint8_t *buf, +int oob_required,int page);/* Scan and identify a NAND device */ int nand_scan_with_ids(struct nand_chip *chip, unsigned int max_chips,
Greg Kroah-Hartman
maintainerPATCH 25/846 riscv: use hart id instead of cpu id on machine_kexec
In reply to Greg Kroah-HartmanFrom: Nick Kossifidis <[email protected]>
commit 0e105f1d0037d677dff3c697d22f9551e6c39af8 upstream.
raw_smp_processor_id() doesn't return the hart id as stated in arch/riscv/include/asm/smp.h, use smp_processor_id() instead to get the cpu id, and cpuid_to_hartid_map() to pass the hart id to the next kernel. This fixes kexec on HiFive Unleashed/Unmatched where cpu ids and hart ids don't match (on qemu-virt they match).
--- arch/riscv/kernel/machine_kexec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/riscv/kernel/machine_kexec.c +2 -1
@@ -169,7 +169,8 @@ machine_kexec(struct kimage *image)struct kimage_arch *internal = &image->arch;unsigned long jump_addr = (unsigned long ) image->start;unsigned long first_ind_entry = (unsigned long ) &image->head; -unsigned long this_hart_id =raw_smp_processor_id (); +unsigned long this_cpu_id =smp_processor_id (); +unsigned long this_hart_id =cpuid_to_hartid_map (this_cpu_id);unsigned long fdt_addr = internal->fdt_addr;void *control_code_buffer =page_address (image->control_code_page);riscv_kexec_method kexec_method =NULL ;
Greg Kroah-Hartman
maintainerPATCH 68/846 dma_fence_array: Fix PENDING_ERROR leak in dma_fence_array_signaled()
In reply to Greg Kroah-HartmanFrom: Thomas Hellström <[email protected]>
commit 95d35838880fb040ccb9fe4a48816bd0c8b62df5 upstream.
If a dma_fence_array is reported signaled by a call to dma_fence_is_signaled(), it may leak the PENDING_ERROR status.
Fix this by clearing the PENDING_ERROR status if we return true in dma_fence_array_signaled().
v2:
- Update Cc list, and add R-b.
--- drivers/dma-buf/dma-fence-array.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/dma-buf/dma-fence-array.c +5 -1
@@ -104,7 +104,11 @@ static bool dma_fence_array_signaled(str {struct dma_fence_array *array =to_dma_fence_array (fence); -return atomic_read (&array->num_pending) <=0 ; +if (atomic_read (&array->num_pending) >0 ) +return false; + +dma_fence_array_clear_pending_error (array); +return true; }static void dma_fence_array_release (struct dma_fence *fence)
Greg Kroah-Hartman
maintainerPATCH 28/846 tools/nolibc: x86-64: Fix startup code bug
In reply to Greg Kroah-HartmanFrom: Ammar Faizi <[email protected]>
commit 937ed91c712273131de6d2a02caafd3ee84e0c72 upstream.
Before this patch, the _start function looks like this:
```
0000000000001170 <_start>:
1170: pop %rdi
1171: mov %rsp,%rsi
1174: lea 0x8(%rsi,%rdi,8),%rdx
1179: and $0xfffffffffffffff0,%rsp
117d: sub $0x8,%rsp
1181: call 1000 <main>
1186: movzbq %al,%rdi
118a: mov $0x3c,%rax
1191: syscall
1193: hlt
1194: data16 cs nopw 0x0(%rax,%rax,1)
119f: nop
```Note the "and" to %rsp with $-16, it makes the %rsp be 16-byte aligned, but then there is a "sub" with $0x8 which makes the %rsp no longer 16-byte aligned, then it calls main. That's the bug!
What actually the x86-64 System V ABI mandates is that right before the "call", the %rsp must be 16-byte aligned, not after the "call". So the "sub" with $0x8 here breaks the alignment. Remove it.
An example where this rule matters is when the callee needs to align its stack at 16-byte for aligned move instruction, like movdqa and movaps. If the callee can't align its stack properly, it will result in segmentation fault.
x86-64 System V ABI also mandates the deepest stack frame should be zero. Just to be safe, let's zero the %rbp on startup as the content of %rbp may be unspecified when the program starts. Now it looks like this:
```
0000000000001170 <_start>:
1170: pop %rdi
1171: mov %rsp,%rsi
1174: lea 0x8(%rsi,%rdi,8),%rdx
1179: xor %ebp,%ebp # zero the %rbp
117b: and $0xfffffffffffffff0,%rsp # align the %rsp
117f: call 1000 <main>
1184: movzbq %al,%rdi
1188: mov $0x3c,%rax
118f: syscall
1191: hlt
1192: data16 cs nopw 0x0(%rax,%rax,1)
119d: nopl (%rax)
```[wt: I did this on purpose due to a misunderstanding of the spec, other
archs will thus have to be rechecked, particularly i386]
--- tools/include/nolibc/nolibc.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
tools/include/nolibc/nolibc.h +8 -2
@@ -399,14 +399,20 @@ struct stat { })/* startup code */ +/* +* x86-64 System V ABI mandates: +* 1) %rsp must be 16-byte aligned right before the function call. +* 2) The deepest stack frame should be zero (the %rbp). +* +*/ asm(".section .text\n" ".global _start\n" "_start:\n" "pop %rdi\n" // argc (first arg, %rdi) "mov %rsp, %rsi\n" // argv[] (second arg, %rsi) "lea 8(%rsi,%rdi,8),%rdx\n" // then a NULL then envp (third arg, %rdx) -"and $-16, %rsp\n" // x86 ABI : esp must be 16-byte aligned when -"sub $8, %rsp\n" // entering the callee +"xor %ebp, %ebp\n" // zero the stack frame +"and $-16, %rsp\n" // x86 ABI : esp must be 16-byte aligned before call "call main\n" // main() returns the status code, we'll exit with it. "movzb %al, %rdi\n" // retrieve exit code from 8 lower bits "mov $60, %rax\n" // NR_exit == 60
Greg Kroah-Hartman
maintainerPATCH 35/846 ksmbd: fix guest connection failure with nautilus
In reply to Greg Kroah-HartmanFrom: Namjae Jeon <[email protected]>
commit ac090d9c90b087d6fb714e54b2a6dd1e6c373ed6 upstream.
MS-SMB2 describe session sign like the following. Session.SigningRequired MUST be set to TRUE under the following conditions:
- If the SMB2_NEGOTIATE_SIGNING_REQUIRED bit is set in the SecurityMode field of the client request.
- If the SMB2_SESSION_FLAG_IS_GUEST bit is not set in the SessionFlags field and Session.IsAnonymous is FALSE and either Connection.ShouldSign or global RequireMessageSigning is TRUE.
When trying guest account connection using nautilus, The login failure happened on session setup. ksmbd does not allow this connection when the user is a guest and the connection sign is set. Just do not set session sign instead of error response as described in the specification. And this change improves the guest connection in Nautilus.
--- fs/ksmbd/smb2pdu.c | 64 ++++++++++++++++++++++++----------------------------- 1 file changed, 30 insertions(+), 34 deletions(-)
fs/ksmbd/smb2pdu.c +30 -34
@@ -1457,11 +1457,6 @@ static int ntlm_authenticate(struct ksmb sess->user = user;if (user_guest (sess->user)) { -if (conn->sign) { -ksmbd_debug (SMB ,"Guest login not allowed when signing enabled\n" ); -return -EPERM ; - } - rsp->SessionFlags =SMB2_SESSION_FLAG_IS_GUEST_LE ; }else {struct authenticate_message *authblob;
@@ -1474,38 +1469,39 @@ static int ntlm_authenticate(struct ksmbksmbd_debug (SMB ,"authentication failed\n" );return -EPERM ; } + } -/* -* If session state is SMB2_SESSION_VALID, We can assume -* that it is reauthentication. And the user/password -* has been verified, so return it here. -*/ -if (sess->state ==SMB2_SESSION_VALID ) { -if (conn->binding) - goto binding_session; -return 0 ; - } +/* +* If session state is SMB2_SESSION_VALID, We can assume +* that it is reauthentication. And the user/password +* has been verified, so return it here. +*/ +if (sess->state ==SMB2_SESSION_VALID ) { +if (conn->binding) + goto binding_session; +return 0 ; + } -if ((conn->sign || server_conf.enforced_signing) || - (req->SecurityMode &SMB2_NEGOTIATE_SIGNING_REQUIRED )) - sess->sign = true; - -if (smb3_encryption_negotiated (conn) && - !(req->Flags &SMB2_SESSION_REQ_FLAG_BINDING )) { - rc = conn->ops->generate_encryptionkey (sess); -if (rc) { -ksmbd_debug (SMB , -"SMB3 encryption key generation failed\n" ); -return -EINVAL ; - } - sess->enc = true; - rsp->SessionFlags =SMB2_SESSION_FLAG_ENCRYPT_DATA_LE ; -/* -* signing is disable if encryption is enable -* on this session -*/ - sess->sign = false; +if ((rsp->SessionFlags !=SMB2_SESSION_FLAG_IS_GUEST_LE && + (conn->sign || server_conf.enforced_signing)) || + (req->SecurityMode &SMB2_NEGOTIATE_SIGNING_REQUIRED )) + sess->sign = true; + +if (smb3_encryption_negotiated (conn) && + !(req->Flags &SMB2_SESSION_REQ_FLAG_BINDING )) { + rc = conn->ops->generate_encryptionkey (sess); +if (rc) { +ksmbd_debug (SMB , +"SMB3 encryption key generation failed\n" ); +return -EINVAL ; } + sess->enc = true; + rsp->SessionFlags =SMB2_SESSION_FLAG_ENCRYPT_DATA_LE ; +/* +* signing is disable if encryption is enable +* on this session +*/ + sess->sign = false; } binding_session:
Greg Kroah-Hartman
maintainerPATCH 12/846 nfc: llcp: fix NULL error pointer dereference on sendmsg() after failed bind()
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
commit dded08927ca3c31a5c37f8e7f95fe98770475dd4 upstream.
Syzbot detected a NULL pointer dereference of nfc_llcp_sock->dev pointer (which is a 'struct nfc_dev *') with calls to llcp_sock_sendmsg() after a failed llcp_sock_bind(). The message being sent is a SOCK_DGRAM.
KASAN report:
BUG: KASAN: null-ptr-deref in nfc_alloc_send_skb+0x2d/0xc0 Read of size 4 at addr 00000000000005c8 by task llcp_sock_nfc_a/899 CPU: 5 PID: 899 Comm: llcp_sock_nfc_a Not tainted 5.16.0-rc6-next-20211224-00001-gc6437fbf18b0 #125 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-2 04/01/2014 Call Trace: <TASK> dump_stack_lvl+0x45/0x59 ? nfc_alloc_send_skb+0x2d/0xc0 __kasan_report.cold+0x117/0x11c ? mark_lock+0x480/0x4f0 ? nfc_alloc_send_skb+0x2d/0xc0 kasan_report+0x38/0x50 nfc_alloc_send_skb+0x2d/0xc0 nfc_llcp_send_ui_frame+0x18c/0x2a0 ? nfc_llcp_send_i_frame+0x230/0x230 ? __local_bh_enable_ip+0x86/0xe0 ? llcp_sock_connect+0x470/0x470 ? llcp_sock_connect+0x470/0x470 sock_sendmsg+0x8e/0xa0 ____sys_sendmsg+0x253/0x3f0 ...
The issue was visible only with multiple simultaneous calls to bind() and sendmsg(), which resulted in most of the bind() calls to fail. The bind() was failing on checking if there is available WKS/SDP/SAP (respective bit in 'struct nfc_llcp_local' fields). When there was no available WKS/SDP/SAP, the bind returned error but the sendmsg() to such socket was able to trigger mentioned NULL pointer dereference of nfc_llcp_sock->dev.
The code looks simply racy and currently it protects several paths against race with checks for (!nfc_llcp_sock->local) which is NULL-ified in error paths of bind(). The llcp_sock_sendmsg() did not have such check but called function nfc_llcp_send_ui_frame() had, although not protected with lock_sock().
Therefore the race could look like (same socket is used all the time):
CPU0 CPU1
==== ====
llcp_sock_bind()
- lock_sock()
- success
- release_sock()
- return 0
llcp_sock_sendmsg()
- lock_sock()
- release_sock()
llcp_sock_bind(), same socket
- lock_sock()
- error
- nfc_llcp_send_ui_frame()
- if (!llcp_sock->local)
- llcp_sock->local = NULL
- nfc_put_device(dev)
- dereference llcp_sock->dev
- release_sock()
- return -ERRNO
The nfc_llcp_send_ui_frame() checked llcp_sock->local outside of the lock, which is racy and ineffective check. Instead, its caller llcp_sock_sendmsg(), should perform the check inside lock_sock().
--- net/nfc/llcp_sock.c | 5 +++++ 1 file changed, 5 insertions(+)
net/nfc/llcp_sock.c +5 -0
@@ -789,6 +789,11 @@ static int llcp_sock_sendmsg(struct socklock_sock (sk); +if (!llcp_sock->local) { +release_sock (sk); +return -ENODEV ; + } +if (sk->sk_type ==SOCK_DGRAM ) { DECLARE_SOCKADDR(struct sockaddr_nfc_llcp *, addr, msg->msg_name);
Greg Kroah-Hartman
maintainerPATCH 49/846 media: redrat3: fix control-message timeouts
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit 2adc965c8bfa224e11ecccf9c92fd458c4236428 upstream.
USB control-message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ.
--- drivers/media/rc/redrat3.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
drivers/media/rc/redrat3.c +11 -11
@@ -404,7 +404,7 @@ static int redrat3_send_cmd(int cmd, str udev = rr3->udev; res =usb_control_msg (udev,usb_rcvctrlpipe (udev,0 ), cmd,USB_TYPE_VENDOR |USB_RECIP_DEVICE |USB_DIR_IN , -0x0000 ,0x0000 , data,sizeof (u8),HZ *10 ); +0x0000 ,0x0000 , data,sizeof (u8),10000 );if (res <0 ) { dev_err(rr3->dev, "%s: Error sending rr3 cmd res %d, data %d",
@@ -480,7 +480,7 @@ static u32 redrat3_get_timeout(struct re pipe =usb_rcvctrlpipe (rr3->udev,0 ); ret =usb_control_msg (rr3->udev, pipe,RR3_GET_IR_PARAM ,USB_TYPE_VENDOR |USB_RECIP_DEVICE |USB_DIR_IN , -RR3_IR_IO_SIG_TIMEOUT ,0 , tmp, len,HZ *5 ); +RR3_IR_IO_SIG_TIMEOUT ,0 , tmp, len,5000 );if (ret != len)dev_warn (rr3->dev,"Failed to read timeout from hardware\n" );else {
@@ -510,7 +510,7 @@ static int redrat3_set_timeout(struct rc ret =usb_control_msg (udev,usb_sndctrlpipe (udev,0 ),RR3_SET_IR_PARAM ,USB_TYPE_VENDOR |USB_RECIP_DEVICE |USB_DIR_OUT ,RR3_IR_IO_SIG_TIMEOUT ,0 , timeout,sizeof (*timeout), -HZ *25 ); +25000 );dev_dbg (dev,"set ir parm timeout %d ret 0x%02x\n" ,be32_to_cpu (*timeout), ret);
@@ -542,32 +542,32 @@ static void redrat3_reset(struct redrat3 *val =0x01 ; rc =usb_control_msg (udev, rxpipe,RR3_RESET ,USB_TYPE_VENDOR |USB_RECIP_DEVICE |USB_DIR_IN , -RR3_CPUCS_REG_ADDR ,0 , val, len,HZ *25 ); +RR3_CPUCS_REG_ADDR ,0 , val, len,25000 );dev_dbg (dev,"reset returned 0x%02x\n" , rc); *val = length_fuzz; rc =usb_control_msg (udev, txpipe,RR3_SET_IR_PARAM ,USB_TYPE_VENDOR |USB_RECIP_DEVICE |USB_DIR_OUT , -RR3_IR_IO_LENGTH_FUZZ ,0 , val, len,HZ *25 ); +RR3_IR_IO_LENGTH_FUZZ ,0 , val, len,25000 );dev_dbg (dev,"set ir parm len fuzz %d rc 0x%02x\n" , *val, rc); *val = (65536 - (minimum_pause *2000 )) /256 ; rc =usb_control_msg (udev, txpipe,RR3_SET_IR_PARAM ,USB_TYPE_VENDOR |USB_RECIP_DEVICE |USB_DIR_OUT , -RR3_IR_IO_MIN_PAUSE ,0 , val, len,HZ *25 ); +RR3_IR_IO_MIN_PAUSE ,0 , val, len,25000 );dev_dbg (dev,"set ir parm min pause %d rc 0x%02x\n" , *val, rc); *val = periods_measure_carrier; rc =usb_control_msg (udev, txpipe,RR3_SET_IR_PARAM ,USB_TYPE_VENDOR |USB_RECIP_DEVICE |USB_DIR_OUT , -RR3_IR_IO_PERIODS_MF ,0 , val, len,HZ *25 ); +RR3_IR_IO_PERIODS_MF ,0 , val, len,25000 );dev_dbg (dev,"set ir parm periods measure carrier %d rc 0x%02x" , *val, rc); *val =RR3_DRIVER_MAXLENS ; rc =usb_control_msg (udev, txpipe,RR3_SET_IR_PARAM ,USB_TYPE_VENDOR |USB_RECIP_DEVICE |USB_DIR_OUT , -RR3_IR_IO_MAX_LENGTHS ,0 , val, len,HZ *25 ); +RR3_IR_IO_MAX_LENGTHS ,0 , val, len,25000 );dev_dbg (dev,"set ir parm max lens %d rc 0x%02x\n" , *val, rc);kfree (val);
@@ -585,7 +585,7 @@ static void redrat3_get_firmware_rev(str rc =usb_control_msg (rr3->udev,usb_rcvctrlpipe (rr3->udev,0 ),RR3_FW_VERSION ,USB_TYPE_VENDOR |USB_RECIP_DEVICE |USB_DIR_IN , -0 ,0 , buffer,RR3_FW_VERSION_LEN ,HZ *5 ); +0 ,0 , buffer,RR3_FW_VERSION_LEN ,5000 );if (rc >=0 )dev_info (rr3->dev,"Firmware rev: %s" , buffer);
@@ -825,14 +825,14 @@ static int redrat3_transmit_ir(struct rc pipe =usb_sndbulkpipe (rr3->udev, rr3->ep_out->bEndpointAddress); ret =usb_bulk_msg (rr3->udev, pipe, irdata, - sendbuf_len, &ret_len,10 *HZ ); + sendbuf_len, &ret_len,10000 );dev_dbg (dev,"sent %d bytes, (ret %d)\n" , ret_len, ret);/* now tell the hardware to transmit what we sent it */ pipe =usb_rcvctrlpipe (rr3->udev,0 ); ret =usb_control_msg (rr3->udev, pipe,RR3_TX_SEND_SIGNAL ,USB_TYPE_VENDOR |USB_RECIP_DEVICE |USB_DIR_IN , -0 ,0 , irdata,2 ,HZ *10 ); +0 ,0 , irdata,2 ,10000 );if (ret <0 )dev_err (dev,"Error: control msg send failed, rc %d\n" , ret);
Greg Kroah-Hartman
maintainerPATCH 55/846 iio: adc: ti-adc081c: Partial revert of removal of ACPI IDs
In reply to Greg Kroah-HartmanFrom: Jonathan Cameron <[email protected]>
commit c9791a94384af07592d29504004d2255dbaf8663 upstream.
Unfortuanately a non standards compliant ACPI ID is known to be in the wild on some AAEON boards.
Partly revert the removal of these IDs so that ADC081C will again work + add a comment to that affect for future reference.
Whilst here use generic firmware properties rather than the ACPI specific handling previously found in this driver.
--- drivers/iio/adc/ti-adc081c.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-)
drivers/iio/adc/ti-adc081c.c +17 -5
@@ -19,6 +19,7 @@#include <linux/i2c.h> #include <linux/module.h> #include <linux/mod_devicetable.h> +#include <linux/property.h> #include <linux/iio/iio.h> #include <linux/iio/buffer.h>
@@ -156,13 +157,16 @@ static int adc081c_probe(struct i2c_clie {struct iio_dev *iio;struct adc081c *adc; -struct adcxx1c_model *model; +const struct adcxx1c_model *model;int err;if (!i2c_check_functionality (client->adapter,I2C_FUNC_SMBUS_WORD_DATA ))return -EOPNOTSUPP ; - model = &adcxx1c_models[id->driver_data]; +if (dev_fwnode (&client->dev)) + model =device_get_match_data (&client->dev); +else + model = &adcxx1c_models[id->driver_data]; iio =devm_iio_device_alloc (&client->dev,sizeof (*adc));if (!iio)
@@ -210,10 +214,17 @@ static const struct i2c_device_id adc081 };MODULE_DEVICE_TABLE (i2c, adc081c_id); +static const struct acpi_device_id adc081c_acpi_match[] = { +/* Used on some AAEON boards */ + {"ADC081C" , (kernel_ulong_t)&adcxx1c_models[ADC081C ] }, + { } +}; +MODULE_DEVICE_TABLE (acpi, adc081c_acpi_match); +static const struct of_device_id adc081c_of_match[] = { - { .compatible ="ti,adc081c" }, - { .compatible ="ti,adc101c" }, - { .compatible ="ti,adc121c" }, + { .compatible ="ti,adc081c" , .data = &adcxx1c_models[ADC081C ] }, + { .compatible ="ti,adc101c" , .data = &adcxx1c_models[ADC101C ] }, + { .compatible ="ti,adc121c" , .data = &adcxx1c_models[ADC121C ] }, { } };MODULE_DEVICE_TABLE (of, adc081c_of_match);
@@ -222,6 +233,7 @@ static struct i2c_driver adc081c_driver .driver = { .name = "adc081c", .of_match_table = adc081c_of_match, + .acpi_match_table = adc081c_acpi_match, }, .probe = adc081c_probe, .id_table = adc081c_id,
Greg Kroah-Hartman
maintainerPATCH 56/846 iio: trigger: Fix a scheduling whilst atomic issue seen on tsc2046
In reply to Greg Kroah-HartmanFrom: Jonathan Cameron <[email protected]>
commit 9020ef659885f2622cfb386cc229b6d618362895 upstream.
IIO triggers are software IRQ chips that split an incoming IRQ into separate IRQs routed to all devices using the trigger. When all consumers are done then a trigger callback reenable() is called. There are a few circumstances under which this can happen in atomic context.
1) A single user of the trigger that calls the iio_trigger_done() function from interrupt context.
2) A race between disconnecting the last device from a trigger and the trigger itself sucessfully being disabled.
To avoid a resulting scheduling whilst atomic, close this second corner by using schedule_work() to ensure the reenable is not done in atomic context.
Note that drivers must be careful to manage the interaction of set_state() and reenable() callbacks to ensure appropriate reference counting if they are relying on the same hardware controls.
Deliberately taking this the slow path rather than via a fixes tree because the error has hard to hit and I would like it to soak for a while before hitting a release kernel.
--- drivers/iio/industrialio-trigger.c | 36 +++++++++++++++++++++++++++++++++++- include/linux/iio/trigger.h | 2 ++ 2 files changed, 37 insertions(+), 1 deletion(-)
drivers/iio/industrialio-trigger.c +35 -1
@@ -162,6 +162,39 @@ static struct iio_trigger *iio_trigger_areturn trig; } +static void iio_reenable_work_fn (struct work_struct *work) +{ + struct iio_trigger *trig = container_of(work, struct iio_trigger, + reenable_work); + +/* +* This 'might' occur after the trigger state is set to disabled - +* in that case the driver should skip reenabling. +*/ + trig->ops->reenable (trig); +} + +/* +* In general, reenable callbacks may need to sleep and this path is +* not performance sensitive, so just queue up a work item +* to reneable the trigger for us. +* +* Races that can cause this. +* 1) A handler occurs entirely in interrupt context so the counter +* the final decrement is still in this interrupt. +* 2) The trigger has been removed, but one last interrupt gets through. +* +* For (1) we must call reenable, but not in atomic context. +* For (2) it should be safe to call reenanble, if drivers never blindly +* reenable after state is off. +*/ +static void iio_trigger_notify_done_atomic (struct iio_trigger *trig) +{ +if (atomic_dec_and_test (&trig->use_count) && trig->ops && + trig->ops->reenable) +schedule_work (&trig->reenable_work); +} +void iio_trigger_poll (struct iio_trigger *trig) {int i;
@@ -173,7 +206,7 @@ void iio_trigger_poll(struct iio_triggerif (trig->subirqs[i].enabled)generic_handle_irq (trig->subirq_base + i);else -iio_trigger_notify_done (trig); +iio_trigger_notify_done_atomic (trig); } } }
@@ -535,6 +568,7 @@ struct iio_trigger *viio_trigger_alloc(s trig->dev.type = &iio_trig_type; trig->dev.bus = &iio_bus_type;device_initialize (&trig->dev); +INIT_WORK (&trig->reenable_work, iio_reenable_work_fn);mutex_init (&trig->pool_lock); trig->subirq_base = irq_alloc_descs(-1, 0,
include/linux/iio/trigger.h +2 -0
@@ -55,6 +55,7 @@ struct iio_trigger_ops {* @attached_own_device:[INTERN] if we are using our own device as trigger, * i.e. if we registered a poll function to the same * device as the one providing the trigger. +* @reenable_work: [INTERN] work item used to ensure reenable can sleep. **/ struct iio_trigger {const struct iio_trigger_ops *ops;
@@ -74,6 +75,7 @@ struct iio_trigger {unsigned long pool[BITS_TO_LONGS (CONFIG_IIO_CONSUMERS_PER_TRIGGER )];struct mutex pool_lock;bool attached_own_device; +struct work_struct reenable_work; };
Greg Kroah-Hartman
maintainerPATCH 61/846 cxl/pmem: Fix reference counting for delayed work
In reply to Greg Kroah-HartmanFrom: Dan Williams <[email protected]>
commit 08b9e0ab8af48895337192e683de44ab1e1b7427 upstream.
There is a potential race between queue_work() returning and the queued-work running that could result in put_device() running before get_device(). Introduce the cxl_nvdimm_bridge_state_work() helper that takes the reference unconditionally, but drops it if no new work was queued, to keep the references balanced.
--- drivers/cxl/pmem.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)
drivers/cxl/pmem.c +13 -4
@@ -149,14 +149,24 @@ static void cxl_nvb_update_state(structput_device (&cxl_nvb->dev); } +static void cxl_nvdimm_bridge_state_work (struct cxl_nvdimm_bridge *cxl_nvb) +{ +/* +* Take a reference that the workqueue will drop if new work +* gets queued. +*/ +get_device (&cxl_nvb->dev); +if (!queue_work (cxl_pmem_wq, &cxl_nvb->state_work)) +put_device (&cxl_nvb->dev); +} +static void cxl_nvdimm_bridge_remove (struct device *dev) {struct cxl_nvdimm_bridge *cxl_nvb =to_cxl_nvdimm_bridge (dev);if (cxl_nvb->state ==CXL_NVB_ONLINE ) cxl_nvb->state =CXL_NVB_OFFLINE ; -if (queue_work (cxl_pmem_wq, &cxl_nvb->state_work)) -get_device (&cxl_nvb->dev); +cxl_nvdimm_bridge_state_work (cxl_nvb); }static int cxl_nvdimm_bridge_probe (struct device *dev)
@@ -177,8 +187,7 @@ static int cxl_nvdimm_bridge_probe(struc } cxl_nvb->state =CXL_NVB_ONLINE ; -if (queue_work (cxl_pmem_wq, &cxl_nvb->state_work)) -get_device (&cxl_nvb->dev); +cxl_nvdimm_bridge_state_work (cxl_nvb);return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 47/846 media: s2255: fix control-message timeouts
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit f71d272ad4e354097020a4e6b1dc6e4b59feb50f upstream.
USB control-message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ.
Use the common control-message timeout define for the five-second timeouts.
--- drivers/media/usb/s2255/s2255drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/usb/s2255/s2255drv.c +2 -2
@@ -1882,7 +1882,7 @@ static long s2255_vendor_req(struct s225USB_TYPE_VENDOR |USB_RECIP_DEVICE |USB_DIR_IN , Value, Index, buf, - TransferBufferLength, HZ * 5); + TransferBufferLength, USB_CTRL_SET_TIMEOUT);if (r >=0 )memcpy (TransferBuffer, buf, TransferBufferLength);
@@ -1891,7 +1891,7 @@ static long s2255_vendor_req(struct s225 r =usb_control_msg (dev->udev,usb_sndctrlpipe (dev->udev,0 ), Request,USB_TYPE_VENDOR |USB_RECIP_DEVICE , Value, Index, buf, - TransferBufferLength,HZ *5 ); + TransferBufferLength,USB_CTRL_SET_TIMEOUT ); }kfree (buf);return r;
Greg Kroah-Hartman
maintainerPATCH 62/846 arm64: errata: Fix exec handling in erratum 1418040 workaround
In reply to Greg Kroah-HartmanFrom: D Scott Phillips <[email protected]>
commit 38e0257e0e6f4fef2aa2966b089b56a8b1cfb75c upstream.
The erratum 1418040 workaround enables CNTVCT_EL1 access trapping in EL0 when executing compat threads. The workaround is applied when switching between tasks, but the need for the workaround could also change at an exec(), when a non-compat task execs a compat binary or vice versa. Apply the workaround in arch_setup_new_exec().
This leaves a small window of time between SET_PERSONALITY and arch_setup_new_exec where preemption could occur and confuse the old workaround logic that compares TIF_32BIT between prev and next. Instead, we can just read cntkctl to make sure it's in the state that the next task needs. I measured cntkctl read time to be about the same as a mov from a general-purpose register on N1. Update the workaround logic to examine the current value of cntkctl instead of the previous task's compat state.
--- arch/arm64/kernel/process.c | 39 ++++++++++++++++----------------------- 1 file changed, 16 insertions(+), 23 deletions(-)
arch/arm64/kernel/process.c +16 -23
@@ -439,34 +439,26 @@ static void entry_task_switch(struct tas/* * ARM erratum 1418040 handling, affecting the 32bit view of CNTVCT. -* Assuming the virtual counter is enabled at the beginning of times: -* -* - disable access when switching from a 64bit task to a 32bit task -* - enable access when switching from a 32bit task to a 64bit task +* Ensure access is disabled when switching to a 32bit task, ensure +* access is enabled when switching to a 64bit task. */ -static void erratum_1418040_thread_switch (struct task_struct *prev, -struct task_struct *next) +static void erratum_1418040_thread_switch (struct task_struct *next) { -bool prev32, next32; -u64 val; - -if (!IS_ENABLED (CONFIG_ARM64_ERRATUM_1418040 )) -return ; - - prev32 =is_compat_thread (task_thread_info (prev)); - next32 =is_compat_thread (task_thread_info (next)); - -if (prev32 == next32 || !this_cpu_has_cap (ARM64_WORKAROUND_1418040 )) +if (!IS_ENABLED (CONFIG_ARM64_ERRATUM_1418040 ) || + !this_cpu_has_cap (ARM64_WORKAROUND_1418040 ))return ; - val =read_sysreg (cntkctl_el1); - -if (!next32) - val |=ARCH_TIMER_USR_VCT_ACCESS_EN ; +if (is_compat_thread (task_thread_info (next))) +sysreg_clear_set (cntkctl_el1,ARCH_TIMER_USR_VCT_ACCESS_EN ,0 );else - val &= ~ARCH_TIMER_USR_VCT_ACCESS_EN ; +sysreg_clear_set (cntkctl_el1,0 ,ARCH_TIMER_USR_VCT_ACCESS_EN ); +} -write_sysreg (val, cntkctl_el1); +static void erratum_1418040_new_exec (void ) +{ +preempt_disable (); +erratum_1418040_thread_switch (current); +preempt_enable (); }/*
@@ -501,7 +493,7 @@ __notrace_funcgraph struct task_struct *contextidr_thread_switch (next);entry_task_switch (next);ssbs_thread_switch (next); -erratum_1418040_thread_switch (prev, next); +erratum_1418040_thread_switch (next);ptrauth_thread_switch_user (next);/*
@@ -613,6 +605,7 @@ void arch_setup_new_exec(void) current->mm->context.flags = mmflags;ptrauth_thread_init_user ();mte_thread_init_user (); +erratum_1418040_new_exec ();if (task_spec_ssb_noexec (current)) { arch_prctl_spec_ctrl_set(current, PR_SPEC_STORE_BYPASS,
Greg Kroah-Hartman
maintainerPATCH 59/846 bus: mhi: core: Fix reading wake_capable channel configuration
In reply to Greg Kroah-HartmanFrom: Bhaumik Bhatt <[email protected]>
commit 42c4668f7efe1485dfc382517b412c0c6ab102b8 upstream.
The 'wake-capable' entry in channel configuration is not set when parsing the configuration specified by the controller driver. Add the missing entry to ensure channel is correctly specified as a 'wake-capable' channel.
--- drivers/bus/mhi/core/init.c | 1 + 1 file changed, 1 insertion(+)
drivers/bus/mhi/core/init.c +1 -0
@@ -788,6 +788,7 @@ static int parse_ch_cfg(struct mhi_contr mhi_chan->offload_ch = ch_cfg->offload_channel; mhi_chan->db_cfg.reset_req = ch_cfg->doorbell_mode_switch; mhi_chan->pre_alloc = ch_cfg->auto_queue; + mhi_chan->wake_capable = ch_cfg->wake_capable;/* * If MHI host allocates buffers, then the channel direction
Greg Kroah-Hartman
maintainerPATCH 48/846 media: dib0700: fix undefined behavior in tuner shutdown
In reply to Greg Kroah-HartmanFrom: Michael Kuron <[email protected]>
commit f7b77ebe6d2f49c7747b2d619586d1aa33f9ea91 upstream.
This fixes a problem where closing the tuner would leave it in a state where it would not tune to any channel when reopened. This problem was discovered as part of https://github.com/hselasky/webcamd/issues/16.
Since adap->id is 0 or 1, this bit-shift overflows, which is undefined behavior. The driver still worked in practice as the overflow would in most environments result in 0, which rendered the line a no-op. When running the driver as part of webcamd however, the overflow could lead to 0xff due to optimizations by the compiler, which would, in the end, improperly shut down the tuner.
The bug is a regression introduced in the commit referenced below. The present patch causes identical behavior to before that commit for adap->id equal to 0 or 1. The driver does not contain support for dib0700 devices with more adapters, assuming such even exist.
Tests have been performed with the Xbox One Digital TV Tuner on amd64. Not all dib0700 devices are expected to be affected by the regression; this code path is only taken by those with incorrect endpoint numbers.
--- drivers/media/usb/dvb-usb/dib0700_core.c | 2 -- 1 file changed, 2 deletions(-)
drivers/media/usb/dvb-usb/dib0700_core.c +0 -2
@@ -618,8 +618,6 @@ int dib0700_streaming_ctrl(struct dvb_usdeb_info ("the endpoint number (%i) is not correct, use the adapter id instead" , adap->fe_adap[0 ].stream.props.endpoint);if (onoff) st->channel_state |=1 << (adap->id); -else - st->channel_state |=1 << ~(adap->id); }else {if (onoff) st->channel_state |=1 << (adap->fe_adap[0 ].stream.props.endpoint-2 );
Greg Kroah-Hartman
maintainerPATCH 43/846 media: flexcop-usb: fix control-message timeouts
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit cd1798a387825cc4a51282f5a611ad05bb1ad75f upstream.
USB control-message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ.
Note that the driver was multiplying some of the timeout values with HZ twice resulting in 3000-second timeouts with HZ=1000.
Also note that two of the timeout defines are currently unused.
--- drivers/media/usb/b2c2/flexcop-usb.c | 10 +++++----- drivers/media/usb/b2c2/flexcop-usb.h | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-)
drivers/media/usb/b2c2/flexcop-usb.c +5 -5
@@ -87,7 +87,7 @@ static int flexcop_usb_readwrite_dw(stru0 , fc_usb->data,sizeof (u32), - B2C2_WAIT_FOR_OPERATION_RDW * HZ); + B2C2_WAIT_FOR_OPERATION_RDW);if (ret !=sizeof (u32)) { err("error while %s dword from %d (%d).", read ? "reading" :
@@ -155,7 +155,7 @@ static int flexcop_usb_v8_memory_req(str wIndex, fc_usb->data, buflen, - nWaitTime * HZ); + nWaitTime);if (ret != buflen) ret = -EIO ;
@@ -248,13 +248,13 @@ static int flexcop_usb_i2c_req(struct fl/* DKT 020208 - add this to support special case of DiSEqC */ case USB_FUNC_I2C_CHECKWRITE : pipe =B2C2_USB_CTRL_PIPE_OUT ; - nWaitTime =2 ; + nWaitTime =2000 ; request_type |=USB_DIR_OUT ;break ;case USB_FUNC_I2C_READ :case USB_FUNC_I2C_REPEATREAD : pipe =B2C2_USB_CTRL_PIPE_IN ; - nWaitTime =2 ; + nWaitTime =2000 ; request_type |=USB_DIR_IN ;break ;default :
@@ -281,7 +281,7 @@ static int flexcop_usb_i2c_req(struct fl wIndex, fc_usb->data, buflen, - nWaitTime * HZ); + nWaitTime);if (ret != buflen) ret = -EIO ;
drivers/media/usb/b2c2/flexcop-usb.h +6 -6
@@ -91,13 +91,13 @@ typedef enum {UTILITY_SRAM_TESTVERIFY =0x16 , } flexcop_usb_utility_function_t; -#define B2C2_WAIT_FOR_OPERATION_RW (1*HZ) -#define B2C2_WAIT_FOR_OPERATION_RDW (3*HZ) -#define B2C2_WAIT_FOR_OPERATION_WDW (1*HZ) +#define B2C2_WAIT_FOR_OPERATION_RW 1000 +#define B2C2_WAIT_FOR_OPERATION_RDW 3000 +#define B2C2_WAIT_FOR_OPERATION_WDW 1000 -#define B2C2_WAIT_FOR_OPERATION_V8READ (3*HZ) -#define B2C2_WAIT_FOR_OPERATION_V8WRITE (3*HZ) -#define B2C2_WAIT_FOR_OPERATION_V8FLASH (3*HZ) +#define B2C2_WAIT_FOR_OPERATION_V8READ 3000 +#define B2C2_WAIT_FOR_OPERATION_V8WRITE 3000 +#define B2C2_WAIT_FOR_OPERATION_V8FLASH 3000 typedef enum { V8_MEMORY_PAGE_DVB_CI = 0x20,
Greg Kroah-Hartman
maintainerPATCH 42/846 media: v4l2-ioctl.c: readbuffers depends on V4L2_CAP_READWRITE
In reply to Greg Kroah-HartmanFrom: Hans Verkuil <[email protected]>
commit cd9d9377ed235b294a492a094e1666178a5e78fd upstream.
If V4L2_CAP_READWRITE is not set, then readbuffers must be set to 0, otherwise v4l2-compliance will complain.
A note on the Fixes tag below: this patch does not really fix that commit, but it can be applied from that commit onwards. For older code there is no guarantee that device_caps is set, so even though this patch would apply, it will not work reliably.
--- drivers/media/v4l2-core/v4l2-ioctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/media/v4l2-core/v4l2-ioctl.c +3 -1
@@ -2088,6 +2088,7 @@ static int v4l_prepare_buf(const structstatic int v4l_g_parm (const struct v4l2_ioctl_ops *ops,struct file *file,void *fh,void *arg) { +struct video_device *vfd =video_devdata (file);struct v4l2_streamparm *p = arg;v4l2_std_id std;int ret =check_fmt (file, p->type);
@@ -2099,7 +2100,8 @@ static int v4l_g_parm(const struct v4l2_if (p->type !=V4L2_BUF_TYPE_VIDEO_CAPTURE && p->type !=V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE )return -EINVAL ; - p->parm.capture.readbuffers =2 ; +if (vfd->device_caps &V4L2_CAP_READWRITE ) + p->parm.capture.readbuffers =2 ; ret = ops->vidioc_g_std (file, fh, &std);if (ret ==0 )v4l2_video_std_frame_period (std, &p->parm.capture.timeperframe);
Greg Kroah-Hartman
maintainerPATCH 69/846 PCI: Add function 1 DMA alias quirk for Marvell 88SE9125 SATA controller
In reply to Greg Kroah-HartmanFrom: Yifeng Li <[email protected]>
commit e445375882883f69018aa669b67cbb37ec873406 upstream.
Like other SATA controller chips in the Marvell 88SE91xx series, the Marvell 88SE9125 has the same DMA requester ID hardware bug that prevents it from working under IOMMU. Add it to the list of devices that need the quirk.
Without this patch, device initialization fails with DMA errors:
ata8: softreset failed (1st FIS failed)
DMAR: DRHD: handling fault status reg 2
DMAR: [DMA Write NO_PASID] Request device [03:00.1] fault addr 0xfffc0000 [fault reason 0x02] Present bit in context entry is clear
DMAR: DRHD: handling fault status reg 2
DMAR: [DMA Read NO_PASID] Request device [03:00.1] fault addr 0xfffc0000 [fault reason 0x02] Present bit in context entry is clear
After applying the patch, the controller can be successfully initialized:
ata8: SATA link up 1.5 Gbps (SStatus 113 SControl 330)
ata8.00: ATAPI: PIONEER BD-RW BDR-207M, 1.21, max UDMA/100
ata8.00: configured for UDMA/100
scsi 7:0:0:0: CD-ROM PIONEER BD-RW BDR-207M 1.21 PQ: 0 ANSI: 5
--- drivers/pci/quirks.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/pci/quirks.c +3 -0
@@ -4103,6 +4103,9 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_M quirk_dma_func1_alias);DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_MARVELL_EXT ,0x9123 , quirk_dma_func1_alias); +/* https://bugzilla.kernel.org/show_bug.cgi?id=42679#c136 */ +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_MARVELL_EXT ,0x9125 , + quirk_dma_func1_alias);DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_MARVELL_EXT ,0x9128 , quirk_dma_func1_alias);/* https://bugzilla.kernel.org/show_bug.cgi?id=42679#c14 */
Greg Kroah-Hartman
maintainerPATCH 70/846 mm_zone: add function to check if managed dma zone exists
In reply to Greg Kroah-HartmanFrom: Baoquan He <[email protected]>
commit 62b3107073646e0946bd97ff926832bafb846d17 upstream.
Patch series "Handle warning of allocation failure on DMA zone w/o managed pages", v4.
**Problem observed:
On x86_64, when crash is triggered and entering into kdump kernel, page allocation failure can always be seen.
---------------------------------
DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
swapper/0: page allocation failure: order:5, mode:0xcc1(GFP_KERNEL|GFP_DMA), nodemask=(null),cpuset=/,mems_allowed=0
CPU: 0 PID: 1 Comm: swapper/0 Call Trace: dump_stack+0x7f/0xa1 warn_alloc.cold+0x72/0xd6 ...... __alloc_pages+0x24d/0x2c0 ...... dma_atomic_pool_init+0xdb/0x176 do_one_initcall+0x67/0x320 ? rcu_read_lock_sched_held+0x3f/0x80 kernel_init_freeable+0x290/0x2dc ? rest_init+0x24f/0x24f kernel_init+0xa/0x111 ret_from_fork+0x22/0x30 Mem-Info: ------------------------------------
***Root cause:
In the current kernel, it assumes that DMA zone must have managed pages and try to request pages if CONFIG_ZONE_DMA is enabled. While this is not always true. E.g in kdump kernel of x86_64, only low 1M is presented and locked down at very early stage of boot, so that this low 1M won't be added into buddy allocator to become managed pages of DMA zone. This exception will always cause page allocation failure if page is requested from DMA zone.
***Investigation:
This failure happens since below commit merged into linus's tree.
1a6a9044b967 x86/setup: Remove CONFIG_X86_RESERVE_LOW and reservelow= options 23721c8e92f7 x86/crash: Remove crash_reserve_low_1M()
f1d4d47c5851 x86/setup: Always reserve the first 1M of RAM
7c321eb2b843 x86/kdump: Remove the backup region handling
6f599d84231f x86/kdump: Always reserve the low 1M when the crashkernel option is specified
Before them, on x86_64, the low 640K area will be reused by kdump kernel. So in kdump kernel, the content of low 640K area is copied into a backup region for dumping before jumping into kdump. Then except of those firmware reserved region in [0, 640K], the left area will be added into buddy allocator to become available managed pages of DMA zone.
However, after above commits applied, in kdump kernel of x86_64, the low 1M is reserved by memblock, but not released to buddy allocator. So any later page allocation requested from DMA zone will fail.
At the beginning, if crashkernel is reserved, the low 1M need be locked down because AMD SME encrypts memory making the old backup region mechanims impossible when switching into kdump kernel.
Later, it was also observed that there are BIOSes corrupting memory under 1M. To solve this, in commit f1d4d47c5851, the entire region of low 1M is always reserved after the real mode trampoline is allocated.
Besides, recently, Intel engineer mentioned their TDX (Trusted domain extensions) which is under development in kernel also needs to lock down the low 1M. So we can't simply revert above commits to fix the page allocation failure from DMA zone as someone suggested.
***Solution:
Currently, only DMA atomic pool and dma-kmalloc will initialize and request page allocation with GFP_DMA during bootup.
So only initializ DMA atomic pool when DMA zone has available managed pages, otherwise just skip the initialization.
For dma-kmalloc(), for the time being, let's mute the warning of allocation failure if requesting pages from DMA zone while no manged pages. Meanwhile, change code to use dma_alloc_xx/dma_map_xx API to replace kmalloc(GFP_DMA), or do not use GFP_DMA when calling kmalloc() if not necessary. Christoph is posting patches to fix those under drivers/scsi/. Finally, we can remove the need of dma-kmalloc() as people suggested.
This patch (of 3):
In some places of the current kernel, it assumes that dma zone must have managed pages if CONFIG_ZONE_DMA is enabled. While this is not always true. E.g in kdump kernel of x86_64, only low 1M is presented and locked down at very early stage of boot, so that there's no managed pages at all in DMA zone. This exception will always cause page allocation failure if page is requested from DMA zone.
Here add function has_managed_dma() and the relevant helper functions to check if there's DMA zone with managed pages. It will be used in later patches.
--- include/linux/mmzone.h | 9 +++++++++ mm/page_alloc.c | 15 +++++++++++++++ 2 files changed, 24 insertions(+)
include/linux/mmzone.h +9 -0
@@ -1031,6 +1031,15 @@ static inline int is_highmem_idx(enum zo#endif } +#ifdef CONFIG_ZONE_DMA +bool has_managed_dma (void ); +#else +static inline bool has_managed_dma (void ) +{ +return false; +} +#endif +/** * is_highmem - helper function to quickly check if a struct zone is a * highmem zone or not. This is an attempt to keep references
mm/page_alloc.c +15 -0
@@ -9449,3 +9449,18 @@ bool take_page_off_buddy(struct page *pa return ret; }#endif + +#ifdef CONFIG_ZONE_DMA +bool has_managed_dma (void ) +{ +struct pglist_data *pgdat; + +for_each_online_pgdat (pgdat) { +struct zone *zone = &pgdat->node_zones[ZONE_DMA ]; + +if (managed_zone (zone)) +return true; + } +return false; +} +#endif /* CONFIG_ZONE_DMA */
Greg Kroah-Hartman
maintainerPATCH 89/846 drm/vc4: hdmi: Set a default HSM rate
In reply to Greg Kroah-HartmanFrom: Maxime Ripard <[email protected]>
[ Upstream commit 3e85b81591609bb794bb00cd619b20965b5b38cd ]
When the firmware doesn't setup the HSM rate (such as when booting without an HDMI cable plugged in), its rate is 0 and thus any register access results in a CPU stall, even though HSM is enabled.
Let's enforce a minimum rate at boot to avoid this issue.
--- drivers/gpu/drm/vc4/vc4_hdmi.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
drivers/gpu/drm/vc4/vc4_hdmi.c +14 -0
@@ -94,6 +94,7 @@# define VC4_HD_M_SW_RST BIT(2)# define VC4_HD_M_ENABLE BIT(0) +#define HSM_MIN_CLOCK_FREQ 120000000#define CEC_CLOCK_FREQ 40000#define HDMI_14_MAX_TMDS_CLK (340 * 1000 * 1000)
@@ -2161,6 +2162,19 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data) vc4_hdmi->disable_4kp60 = true; } +/* +* If we boot without any cable connected to the HDMI connector, +* the firmware will skip the HSM initialization and leave it +* with a rate of 0, resulting in a bus lockup when we're +* accessing the registers even if it's enabled. +* +* Let's put a sensible default at runtime_resume so that we +* don't end up in this situation. +*/ + ret =clk_set_min_rate (vc4_hdmi->hsm_clock,HSM_MIN_CLOCK_FREQ ); +if (ret) + goto err_put_ddc; +if (vc4_hdmi->variant->reset) vc4_hdmi->variant->reset (vc4_hdmi);
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 90/846 drm/vc4: hdmi: Move the HSM clock enable to runtime_pm
In reply to Greg Kroah-HartmanFrom: Maxime Ripard <[email protected]>
[ Upstream commit c86b41214362e8e715e1343e16d5d6af0562db05 ]
In order to access the HDMI controller, we need to make sure the HSM clock is enabled. If we were to access it with the clock disabled, the CPU would completely hang, resulting in an hard crash.
Since we have different code path that would require it, let's move that clock enable / disable to runtime_pm that will take care of the reference counting for us.
Since we also want to change the HSM clock rate and it's only valid while the clock is disabled, we need to move the clk_set_min_rate() call on the HSM clock above pm_runtime_get_and_sync().
--- drivers/gpu/drm/vc4/vc4_hdmi.c | 70 +++++++++++++++++++++------------- 1 file changed, 44 insertions(+), 26 deletions(-)
drivers/gpu/drm/vc4/vc4_hdmi.c +44 -26
@@ -628,7 +628,6 @@ static void vc4_hdmi_encoder_post_crtc_powerdown(struct drm_encoder *encoder, vc4_hdmi->variant->phy_disable (vc4_hdmi);clk_disable_unprepare (vc4_hdmi->pixel_bvb_clock); -clk_disable_unprepare (vc4_hdmi->hsm_clock);clk_disable_unprepare (vc4_hdmi->pixel_clock); ret =pm_runtime_put (&vc4_hdmi->pdev->dev);
@@ -894,28 +893,10 @@ static void vc4_hdmi_encoder_pre_crtc_configure(struct drm_encoder *encoder,conn_state_to_vc4_hdmi_conn_state (conn_state);struct drm_display_mode *mode = &encoder->crtc->state->adjusted_mode;struct vc4_hdmi *vc4_hdmi =encoder_to_vc4_hdmi (encoder); -unsigned long bvb_rate, pixel_rate, hsm_rate; +unsigned long pixel_rate = vc4_conn_state->pixel_rate; +unsigned long bvb_rate, hsm_rate;int ret; - ret =pm_runtime_resume_and_get (&vc4_hdmi->pdev->dev); -if (ret <0 ) { -DRM_ERROR ("Failed to retain power domain: %d\n" , ret); -return ; - } - - pixel_rate = vc4_conn_state->pixel_rate; - ret =clk_set_rate (vc4_hdmi->pixel_clock, pixel_rate); -if (ret) { -DRM_ERROR ("Failed to set pixel clock rate: %d\n" , ret); -return ; - } - - ret =clk_prepare_enable (vc4_hdmi->pixel_clock); -if (ret) { -DRM_ERROR ("Failed to turn on pixel clock: %d\n" , ret); -return ; - } -/* * As stated in RPi's vc4 firmware "HDMI state machine (HSM) clock must * be faster than pixel clock, infinitesimally faster, tested in
@@ -939,10 +920,21 @@ static void vc4_hdmi_encoder_pre_crtc_configure(struct drm_encoder *encoder,return ; } - ret =clk_prepare_enable (vc4_hdmi->hsm_clock); + ret =pm_runtime_resume_and_get (&vc4_hdmi->pdev->dev); +if (ret <0 ) { +DRM_ERROR ("Failed to retain power domain: %d\n" , ret); +return ; + } + + ret =clk_set_rate (vc4_hdmi->pixel_clock, pixel_rate);if (ret) { -DRM_ERROR ("Failed to turn on HSM clock: %d\n" , ret); -clk_disable_unprepare (vc4_hdmi->pixel_clock); +DRM_ERROR ("Failed to set pixel clock rate: %d\n" , ret); +return ; + } + + ret =clk_prepare_enable (vc4_hdmi->pixel_clock); +if (ret) { +DRM_ERROR ("Failed to turn on pixel clock: %d\n" , ret);return ; }
@@ -958,7 +950,6 @@ static void vc4_hdmi_encoder_pre_crtc_configure(struct drm_encoder *encoder, ret =clk_set_min_rate (vc4_hdmi->pixel_bvb_clock, bvb_rate);if (ret) {DRM_ERROR ("Failed to set pixel bvb clock rate: %d\n" , ret); -clk_disable_unprepare (vc4_hdmi->hsm_clock);clk_disable_unprepare (vc4_hdmi->pixel_clock);return ; }
@@ -966,7 +957,6 @@ static void vc4_hdmi_encoder_pre_crtc_configure(struct drm_encoder *encoder, ret =clk_prepare_enable (vc4_hdmi->pixel_bvb_clock);if (ret) {DRM_ERROR ("Failed to turn on pixel bvb clock: %d\n" , ret); -clk_disable_unprepare (vc4_hdmi->hsm_clock);clk_disable_unprepare (vc4_hdmi->pixel_clock);return ; }
@@ -2099,6 +2089,27 @@ static int vc5_hdmi_init_resources(struct vc4_hdmi *vc4_hdmi)return 0 ; } +static int __maybe_unused vc4_hdmi_runtime_suspend (struct device *dev) +{ +struct vc4_hdmi *vc4_hdmi =dev_get_drvdata (dev); + +clk_disable_unprepare (vc4_hdmi->hsm_clock); + +return 0 ; +} + +static int vc4_hdmi_runtime_resume (struct device *dev) +{ +struct vc4_hdmi *vc4_hdmi =dev_get_drvdata (dev); +int ret; + + ret =clk_prepare_enable (vc4_hdmi->hsm_clock); +if (ret) +return ret; + +return 0 ; +} +static int vc4_hdmi_bind (struct device *dev,struct device *master,void *data) {const struct vc4_hdmi_variant *variant =of_device_get_match_data (dev);
@@ -2366,11 +2377,18 @@ static const struct of_device_id vc4_hdmi_dt_match[] = { {} }; +static const struct dev_pm_ops vc4_hdmi_pm_ops = { +SET_RUNTIME_PM_OPS (vc4_hdmi_runtime_suspend, + vc4_hdmi_runtime_resume, +NULL ) +}; +struct platform_driver vc4_hdmi_driver = { .probe = vc4_hdmi_dev_probe, .remove = vc4_hdmi_dev_remove, .driver = { .name ="vc4_hdmi" , .of_match_table = vc4_hdmi_dt_match, + .pm = &vc4_hdmi_pm_ops, }, };
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 67/846 virtio/virtio_mem: handle a possible NULL as a memcpy parameter
In reply to Greg Kroah-HartmanFrom: Peng Hao <[email protected]>
commit cf4a4493ff70874f8af26d75d4346c591c298e89 upstream.
There is a check for vm->sbm.sb_states before, and it should check it here as well.
--- drivers/virtio/virtio_mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/virtio/virtio_mem.c +1 -1
@@ -577,7 +577,7 @@ static int virtio_mem_sbm_sb_states_prepreturn -ENOMEM ;mutex_lock (&vm->hotplug_mutex); -if (new_bitmap) +if (vm->sbm.sb_states)memcpy (new_bitmap, vm->sbm.sb_states, old_pages *PAGE_SIZE ); old_bitmap = vm->sbm.sb_states;
Greg Kroah-Hartman
maintainerPATCH 99/846 wcn36xx: Fix DMA channel enable/disable cycle
In reply to Greg Kroah-HartmanFrom: Bryan O'Donoghue <[email protected]>
[ Upstream commit 89dcb1da611d9b3ff0728502d58372fdaae9ebff ]
Right now we have a broken sequence where we enable DMA channel interrupts which can be left enabled and never disabled if we hit an error path.
Worse still when we unload the driver, the DMA channel interrupt bits are left intact. About the only saving grace here is that we do remember to disable the wcnss interrupt when unload the driver.
--- drivers/net/wireless/ath/wcn36xx/dxe.c | 38 ++++++++++++++++++-------- 1 file changed, 27 insertions(+), 11 deletions(-)
drivers/net/wireless/ath/wcn36xx/dxe.c +27 -11
@@ -272,6 +272,21 @@ static int wcn36xx_dxe_enable_ch_int(struct wcn36xx *wcn, u16 wcn_ch)return 0 ; } +static void wcn36xx_dxe_disable_ch_int (struct wcn36xx *wcn,u16 wcn_ch) +{ +int reg_data =0 ; + +wcn36xx_dxe_read_register (wcn, +WCN36XX_DXE_INT_MASK_REG , + ®_data); + + reg_data &= ~wcn_ch; + +wcn36xx_dxe_write_register (wcn, +WCN36XX_DXE_INT_MASK_REG , + (int )reg_data); +} +static int wcn36xx_dxe_fill_skb (struct device *dev,struct wcn36xx_dxe_ctl *ctl,gfp_t gfp)
@@ -869,7 +884,6 @@ int wcn36xx_dxe_init(struct wcn36xx *wcn) WCN36XX_DXE_WQ_TX_L);wcn36xx_dxe_read_register (wcn,WCN36XX_DXE_REG_CH_EN , ®_data); -wcn36xx_dxe_enable_ch_int (wcn,WCN36XX_INT_MASK_CHAN_TX_L );/***************************************/ /* Init descriptors for TX HIGH channel */
@@ -893,9 +907,6 @@ int wcn36xx_dxe_init(struct wcn36xx *wcn)wcn36xx_dxe_read_register (wcn,WCN36XX_DXE_REG_CH_EN , ®_data); -/* Enable channel interrupts */ -wcn36xx_dxe_enable_ch_int (wcn,WCN36XX_INT_MASK_CHAN_TX_H ); -/***************************************/ /* Init descriptors for RX LOW channel */ /***************************************/
@@ -905,7 +916,6 @@ int wcn36xx_dxe_init(struct wcn36xx *wcn) goto out_err_rxl_ch; } -/* For RX we need to preallocated buffers */ wcn36xx_dxe_ch_alloc_skb (wcn, &wcn->dxe_rx_l_ch);
@@ -928,9 +938,6 @@ int wcn36xx_dxe_init(struct wcn36xx *wcn)WCN36XX_DXE_REG_CTL_RX_L , WCN36XX_DXE_CH_DEFAULT_CTL_RX_L); -/* Enable channel interrupts */ -wcn36xx_dxe_enable_ch_int (wcn,WCN36XX_INT_MASK_CHAN_RX_L ); -/***************************************/ /* Init descriptors for RX HIGH channel */ /***************************************/
@@ -962,15 +969,18 @@ int wcn36xx_dxe_init(struct wcn36xx *wcn)WCN36XX_DXE_REG_CTL_RX_H , WCN36XX_DXE_CH_DEFAULT_CTL_RX_H); -/* Enable channel interrupts */ -wcn36xx_dxe_enable_ch_int (wcn,WCN36XX_INT_MASK_CHAN_RX_H ); - ret =wcn36xx_dxe_request_irqs (wcn);if (ret <0 ) goto out_err_irq;timer_setup (&wcn->tx_ack_timer, wcn36xx_dxe_tx_timer,0 ); +/* Enable channel interrupts */ +wcn36xx_dxe_enable_ch_int (wcn,WCN36XX_INT_MASK_CHAN_TX_L ); +wcn36xx_dxe_enable_ch_int (wcn,WCN36XX_INT_MASK_CHAN_TX_H ); +wcn36xx_dxe_enable_ch_int (wcn,WCN36XX_INT_MASK_CHAN_RX_L ); +wcn36xx_dxe_enable_ch_int (wcn,WCN36XX_INT_MASK_CHAN_RX_H ); +return 0 ; out_err_irq:
@@ -987,6 +997,12 @@ out_err_txh_ch:void wcn36xx_dxe_deinit (struct wcn36xx *wcn) { +/* Disable channel interrupts */ +wcn36xx_dxe_disable_ch_int (wcn,WCN36XX_INT_MASK_CHAN_RX_H ); +wcn36xx_dxe_disable_ch_int (wcn,WCN36XX_INT_MASK_CHAN_RX_L ); +wcn36xx_dxe_disable_ch_int (wcn,WCN36XX_INT_MASK_CHAN_TX_H ); +wcn36xx_dxe_disable_ch_int (wcn,WCN36XX_INT_MASK_CHAN_TX_L ); +free_irq (wcn->tx_irq, wcn);free_irq (wcn->rx_irq, wcn);del_timer (&wcn->tx_ack_timer);
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 105/846 bpftool: Fix memory leak in prog_dump()
In reply to Greg Kroah-HartmanFrom: Quentin Monnet <[email protected]>
[ Upstream commit ebbd7f64a3fbe9e0f235e39fc244ee9735e2a52a ]
Following the extraction of prog_dump() from do_dump(), the struct btf allocated in prog_dump() is no longer freed on error; the struct bpf_prog_linfo is not freed at all. Make sure we release them before exiting the function.
--- tools/bpf/bpftool/prog.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
tools/bpf/bpftool/prog.c +9 -6
@@ -629,8 +629,8 @@ prog_dump(struct bpf_prog_info *info, enum dump_mode mode,char func_sig[1024 ];unsigned char *buf;__u32 member_len; +int fd, err =-1 ;ssize_t n; -int fd;if (mode ==DUMP_JITED ) {if (info->jited_prog_len ==0 || !info->jited_prog_insns) {
@@ -669,7 +669,7 @@ prog_dump(struct bpf_prog_info *info, enum dump_mode mode,if (fd <0 ) {p_err ("can't open file %s: %s" , filepath,strerror (errno)); -return -1 ; + goto exit_free; } n =write (fd, buf, member_len);
@@ -677,7 +677,7 @@ prog_dump(struct bpf_prog_info *info, enum dump_mode mode,if (n != (ssize_t )member_len) {p_err ("error writing output file: %s" , n <0 ?strerror (errno) :"short write" ); -return -1 ; + goto exit_free; }if (json_output)
@@ -691,7 +691,7 @@ prog_dump(struct bpf_prog_info *info, enum dump_mode mode, info->netns_ino, &disasm_opt);if (!name) -return -1 ; + goto exit_free; }if (info->nr_jited_func_lens && info->jited_func_lens) {
@@ -786,9 +786,12 @@ prog_dump(struct bpf_prog_info *info, enum dump_mode mode,kernel_syms_destroy (&dd); } -btf__free (btf); + err =0 ; -return 0 ; +exit_free: +btf__free (btf); +bpf_prog_linfo__free (prog_linfo); +return err; }static int do_dump (int argc,char **argv)
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 106/846 mtd: hyperbus: rpc-if: Check return value of rpcif_sw_init()
In reply to Greg Kroah-HartmanFrom: Lad Prabhakar <[email protected]>
[ Upstream commit 981387ed06b96908223a607f5fba6efa42728fc2 ]
rpcif_sw_init() can fail so make sure we check the return value of it and on error exit rpcif_hb_probe() callback with error code.
--- drivers/mtd/hyperbus/rpc-if.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/mtd/hyperbus/rpc-if.c +3 -1
@@ -124,7 +124,9 @@ static int rpcif_hb_probe(struct platform_device *pdev)if (!hyperbus)return -ENOMEM ; -rpcif_sw_init (&hyperbus->rpc, pdev->dev.parent); + error =rpcif_sw_init (&hyperbus->rpc, pdev->dev.parent); +if (error) +return error;platform_set_drvdata (pdev, hyperbus);
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 109/846 media: atomisp: fix punit_ddr_dvfs_enable() argument for mrfld_power up case
In reply to Greg Kroah-HartmanFrom: Tsuchiya Yuto <[email protected]>
[ Upstream commit 5bfbf65fcca7325e4d89d289b3c286e11220e386 ]
When comparing with intel-aero atomisp [1], it looks like punit_ddr_dvfs_enable() should take false as an argument on mrfld_power up case.
Code from the intel-aero kernel [1]:
int atomisp_mrfld_power_down(struct atomisp_device *isp)
{
[...]
/*WA:Enable DVFS*/
if (IS_CHT)
punit_ddr_dvfs_enable(true);
int atomisp_mrfld_power_up(struct atomisp_device *isp)
{
[...]
/*WA for PUNIT, if DVFS enabled, ISP timeout observed*/
if (IS_CHT)
punit_ddr_dvfs_enable(false);This patch fixes the inverted argument as per the intel-aero code, as well as its comment. While here, fix space issues for comments in atomisp_mrfld_power().
Note that it does not seem to be possible to unify the up/down cases for punit_ddr_dvfs_enable(), i.e., we can't do something like the following:
if (IS_CHT) punit_ddr_dvfs_enable(!enable);
because according to the intel-aero code [1], the DVFS is disabled before "writing 0x0 to ISPSSPM0 bit[1:0]" and the DVFS is enabled after "writing 0x3 to ISPSSPM0 bit[1:0]".
--- drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/media/atomisp/pci/atomisp_v4l2.c +4 -4
@@ -711,15 +711,15 @@ static int atomisp_mrfld_power(struct atomisp_device *isp, bool enable)dev_dbg (isp->dev,"IUNIT power-%s.\n" , enable ?"on" :"off" ); -/*WA:Enable DVFS*/ +/* WA for P-Unit, if DVFS enabled, ISP timeout observed */ if (IS_CHT && enable) -punit_ddr_dvfs_enable (true); +punit_ddr_dvfs_enable (false);/* * FIXME:WA for ECS28A, with this sleep, CTS * android.hardware.camera2.cts.CameraDeviceTest#testCameraDeviceAbort * PASS, no impact on other platforms -*/ +*/ if (IS_BYT && enable)msleep (10 );
@@ -727,7 +727,7 @@ static int atomisp_mrfld_power(struct atomisp_device *isp, bool enable)iosf_mbi_modify (BT_MBI_UNIT_PMC ,MBI_REG_READ ,MRFLD_ISPSSPM0 , val,MRFLD_ISPSSPM0_ISPSSC_MASK ); -/*WA:Enable DVFS*/ +/* WA:Enable DVFS */ if (IS_CHT && !enable)punit_ddr_dvfs_enable (true);
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 82/846 drm/rockchip: dsi: Hold pm-runtime across bind/unbind
In reply to Greg Kroah-HartmanFrom: Brian Norris <[email protected]>
commit 514db871922f103886ad4d221cf406b4fcc5e74a upstream.
In commit 43c2de1002d2 ("drm/rockchip: dsi: move all lane config except LCDC mux to bind()"), we moved most HW configuration to bind(), but we didn't move the runtime PM management. Therefore, depending on initial boot state, runtime-PM workqueue delays, and other timing factors, we may disable our power domain in between the hardware configuration (bind()) and when we enable the display. This can cause us to lose hardware state and fail to configure our display. For example:
dw-mipi-dsi-rockchip ff968000.mipi: failed to write command FIFO panel-innolux-p079zca ff960000.mipi.0: failed to write command 0
or:
dw-mipi-dsi-rockchip ff968000.mipi: failed to write command FIFO panel-kingdisplay-kd097d04 ff960000.mipi.0: failed write init cmds: -110
We should match the runtime PM to the lifetime of the bind()/unbind() cycle.
Tested on Acer Chrometab 10 (RK3399 Gru-Scarlet), with panel drivers built either as modules or built-in.
Side notes: it seems one is more likely to see this problem when the panel driver is built into the kernel. I've also seen this problem bisect down to commits that simply changed Kconfig dependencies, because it changed the order in which driver init functions were compiled into the kernel, and therefore the ordering and timing of built-in device probe.
--- drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 37 ++++++++++++------------ 1 file changed, 19 insertions(+), 18 deletions(-)
drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c +19 -18
@@ -773,10 +773,6 @@ static void dw_mipi_dsi_encoder_enable(sif (mux <0 )return ; -pm_runtime_get_sync (dsi->dev); -if (dsi->slave) -pm_runtime_get_sync (dsi->slave->dev); -/* * For the RK3399, the clk of grf must be enabled before writing grf * register. And for RK3288 or other soc, this grf_clk must be NULL,
@@ -795,20 +791,10 @@ static void dw_mipi_dsi_encoder_enable(sclk_disable_unprepare (dsi->grf_clk); } -static void dw_mipi_dsi_encoder_disable (struct drm_encoder *encoder) -{ -struct dw_mipi_dsi_rockchip *dsi =to_dsi (encoder); - -if (dsi->slave) -pm_runtime_put (dsi->slave->dev); -pm_runtime_put (dsi->dev); -} -static const struct drm_encoder_helper_funcs dw_mipi_dsi_encoder_helper_funcs = { .atomic_check = dw_mipi_dsi_encoder_atomic_check, .enable = dw_mipi_dsi_encoder_enable, - .disable = dw_mipi_dsi_encoder_disable, }; static int rockchip_dsi_drm_create_encoder(struct dw_mipi_dsi_rockchip *dsi,
@@ -938,10 +924,14 @@ static int dw_mipi_dsi_rockchip_bind(strput_device (second); } +pm_runtime_get_sync (dsi->dev); +if (dsi->slave) +pm_runtime_get_sync (dsi->slave->dev); + ret =clk_prepare_enable (dsi->pllref_clk);if (ret) {DRM_DEV_ERROR (dev,"Failed to enable pllref_clk: %d\n" , ret); -return ret; + goto out_pm_runtime; }/*
@@ -953,7 +943,7 @@ static int dw_mipi_dsi_rockchip_bind(str ret =clk_prepare_enable (dsi->grf_clk);if (ret) {DRM_DEV_ERROR (dsi->dev,"Failed to enable grf_clk: %d\n" , ret); -return ret; + goto out_pm_runtime; }dw_mipi_dsi_rockchip_config (dsi);
@@ -965,16 +955,23 @@ static int dw_mipi_dsi_rockchip_bind(str ret =rockchip_dsi_drm_create_encoder (dsi, drm_dev);if (ret) {DRM_DEV_ERROR (dev,"Failed to create drm encoder\n" ); -return ret; + goto out_pm_runtime; } ret =dw_mipi_dsi_bind (dsi->dmd, &dsi->encoder);if (ret) {DRM_DEV_ERROR (dev,"Failed to bind: %d\n" , ret); -return ret; + goto out_pm_runtime; }return 0 ; + +out_pm_runtime: +pm_runtime_put (dsi->dev); +if (dsi->slave) +pm_runtime_put (dsi->slave->dev); + +return ret; } static void dw_mipi_dsi_rockchip_unbind(struct device *dev,
@@ -989,6 +986,10 @@ static void dw_mipi_dsi_rockchip_unbind(dw_mipi_dsi_unbind (dsi->dmd);clk_disable_unprepare (dsi->pllref_clk); + +pm_runtime_put (dsi->dev); +if (dsi->slave) +pm_runtime_put (dsi->slave->dev); }static const struct component_ops dw_mipi_dsi_rockchip_ops = {
Greg Kroah-Hartman
maintainerPATCH 58/846 bus: mhi: pci_generic: Graceful shutdown on freeze
In reply to Greg Kroah-HartmanFrom: Loic Poulain <[email protected]>
commit f77097ec8c0141a4b5cf3722a246be0cb5677e29 upstream.
There is no reason for shutting down MHI ungracefully on freeze, this causes the MHI host stack & device stack to not be aligned anymore since the proper MHI reset sequence is not performed for ungraceful shutdown.
--- drivers/bus/mhi/pci_generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bus/mhi/pci_generic.c +1 -1
@@ -1018,7 +1018,7 @@ static int __maybe_unused mhi_pci_freeze* context. */ if (test_and_clear_bit (MHI_PCI_DEV_STARTED , &mhi_pdev->status)) { -mhi_power_down (mhi_cntrl, false); +mhi_power_down (mhi_cntrl, true);mhi_unprepare_after_power_down (mhi_cntrl); }
Greg Kroah-Hartman
maintainerPATCH 85/846 Bluetooth: virtio_bt: fix memory leak in virtbt_rx_handle()
In reply to Greg Kroah-HartmanFrom: Soenke Huster <[email protected]>
[ Upstream commit 1d0688421449718c6c5f46e458a378c9b530ba18 ]
On the reception of packets with an invalid packet type, the memory of the allocated socket buffers is never freed. Add a default case that frees these to avoid a memory leak.
--- drivers/bluetooth/virtio_bt.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/bluetooth/virtio_bt.c +3 -0
@@ -202,6 +202,9 @@ static void virtbt_rx_handle(struct virtio_bluetooth *vbt, struct sk_buff *skb)hci_skb_pkt_type (skb) = pkt_type;hci_recv_frame (vbt->hdev, skb);break ; +default : +kfree_skb (skb); +break ; } }
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 86/846 Bluetooth: cmtp: fix possible panic when cmtp_init_sockets() fails
In reply to Greg Kroah-HartmanFrom: Wang Hai <[email protected]>
[ Upstream commit 2a7ca7459d905febf519163bd9e3eed894de6bb7 ]
I got a kernel BUG report when doing fault injection test:
------------[ cut here ]------------ kernel BUG at lib/list_debug.c:45! ... RIP: 0010:__list_del_entry_valid.cold+0x12/0x4d ... Call Trace: proto_unregister+0x83/0x220 cmtp_cleanup_sockets+0x37/0x40 [cmtp] cmtp_exit+0xe/0x1f [cmtp] do_syscall_64+0x35/0xb0 entry_SYSCALL_64_after_hwframe+0x44/0xae
If cmtp_init_sockets() in cmtp_init() fails, cmtp_init() still returns success. This will cause a kernel bug when accessing uncreated ctmp related data when the module exits.
--- net/bluetooth/cmtp/core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
net/bluetooth/cmtp/core.c +1 -3
@@ -501,9 +501,7 @@ static int __init cmtp_init(void) {BT_INFO ("CMTP (CAPI Emulation) ver %s" ,VERSION ); -cmtp_init_sockets (); - -return 0 ; +return cmtp_init_sockets (); } static void __exit cmtp_exit(void)
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 77/846 drm/bridge: display-connector: fix an uninitialized pointer in probe()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit 189723fbe9aca18d6f7d638c59a40288030932b5 ]
The "label" pointer is used for debug output. The code assumes that it is either NULL or valid, but it is never set to NULL. It is either valid or uninitialized.
--- drivers/gpu/drm/bridge/display-connector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/bridge/display-connector.c +1 -1
@@ -107,7 +107,7 @@ static int display_connector_probe(struct platform_device *pdev) {struct display_connector *conn;unsigned int type; -const char *label; +const char *label =NULL ;int ret; conn =devm_kzalloc (&pdev->dev,sizeof (*conn),GFP_KERNEL );
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 96/846 wcn36xx: Indicate beacon not connection loss on MISSED_BEACON_IND
In reply to Greg Kroah-HartmanFrom: Bryan O'Donoghue <[email protected]>
[ Upstream commit 588b45c88ae130fe373a8c50edaf54735c3f4fe3 ]
Firmware can trigger a missed beacon indication, this is not the same as a lost signal.
Flag to Linux the missed beacon and let the WiFi stack decide for itself if the link is up or down by sending its own probe to determine this.
We should only be signalling the link is lost when the firmware indicates
--- drivers/net/wireless/ath/wcn36xx/smd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/wcn36xx/smd.c +2 -2
@@ -2679,7 +2679,7 @@ static int wcn36xx_smd_missed_beacon_ind(struct wcn36xx *wcn,wcn36xx_dbg (WCN36XX_DBG_HAL ,"beacon missed bss_index %d\n" , tmp->bss_index); vif =wcn36xx_priv_to_vif (tmp); -ieee80211_connection_loss (vif); +ieee80211_beacon_loss (vif); }return 0 ; }
@@ -2694,7 +2694,7 @@ static int wcn36xx_smd_missed_beacon_ind(struct wcn36xx *wcn,wcn36xx_dbg (WCN36XX_DBG_HAL ,"beacon missed bss_index %d\n" , rsp->bss_index); vif =wcn36xx_priv_to_vif (tmp); -ieee80211_connection_loss (vif); +ieee80211_beacon_loss (vif);return 0 ; } }
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 97/846 drm/vc4: hdmi: Enable the scrambler on reconnection
In reply to Greg Kroah-HartmanFrom: Maxime Ripard <[email protected]>
[ Upstream commit b7551457c5d0b3505b0be247d47919c1ee30506d ]
If we have a state already and disconnect/reconnect the display, the SCDC messages won't be sent again since we didn't go through a disable / enable cycle.
In order to fix this, let's call the vc4_hdmi_enable_scrambling function in the detect callback if there is a mode and it needs the scrambler to be enabled.
--- drivers/gpu/drm/vc4/vc4_hdmi.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/vc4/vc4_hdmi.c +3 -0
@@ -162,6 +162,8 @@ static void vc4_hdmi_cec_update_clk_div(struct vc4_hdmi *vc4_hdmi)static void vc4_hdmi_cec_update_clk_div (struct vc4_hdmi *vc4_hdmi) {}#endif +static void vc4_hdmi_enable_scrambling (struct drm_encoder *encoder); +static enum drm_connector_status vc4_hdmi_connector_detect (struct drm_connector *connector,bool force) {
@@ -190,6 +192,7 @@ vc4_hdmi_connector_detect(struct drm_connector *connector, bool force) } } +vc4_hdmi_enable_scrambling (&vc4_hdmi->encoder.base.base);pm_runtime_put (&vc4_hdmi->pdev->dev);return connector_status_connected; }
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 54/846 mei: hbm: fix client dma reply status
In reply to Greg Kroah-HartmanFrom: Alexander Usyskin <[email protected]>
commit 6b0b80ac103b2a40c72a47c301745fd1f4ef4697 upstream.
Don't blindly copy status value received from the firmware into internal client status field,
It may be positive and ERR_PTR(ret) will translate it into an invalid address and the caller will crash.
Put the error code into the client status on failure.
--- drivers/misc/mei/hbm.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-)
drivers/misc/mei/hbm.c +14 -6
@@ -672,10 +672,14 @@ static void mei_hbm_cl_dma_map_res(strucif (!cl)return ; -dev_dbg (dev->dev,"cl dma map result = %d\n" , res->status); - cl->status = res->status; -if (!cl->status) +if (res->status) { +dev_err (dev->dev,"cl dma map failed %d\n" , res->status); + cl->status = -EFAULT ; + }else { +dev_dbg (dev->dev,"cl dma map succeeded\n" ); cl->dma_mapped =1 ; + cl->status =0 ; + }wake_up (&cl->wait); }
@@ -698,10 +702,14 @@ static void mei_hbm_cl_dma_unmap_res(strif (!cl)return ; -dev_dbg (dev->dev,"cl dma unmap result = %d\n" , res->status); - cl->status = res->status; -if (!cl->status) +if (res->status) { +dev_err (dev->dev,"cl dma unmap failed %d\n" , res->status); + cl->status = -EFAULT ; + }else { +dev_dbg (dev->dev,"cl dma unmap succeeded\n" ); cl->dma_mapped =0 ; + cl->status =0 ; + }wake_up (&cl->wait); }
Greg Kroah-Hartman
maintainerPATCH 101/846 wcn36xx: Put DXE block into reset before freeing memory
In reply to Greg Kroah-HartmanFrom: Bryan O'Donoghue <[email protected]>
[ Upstream commit ed04ea76e69e7194f7489cebe23a32a68f39218d ]
When deiniting the DXE hardware we should reset the block to ensure there is no spurious DMA write transaction from the downstream WCNSS to upstream MSM at a skbuff address we will have released.
--- drivers/net/wireless/ath/wcn36xx/dxe.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/wireless/ath/wcn36xx/dxe.c +6 -0
@@ -997,6 +997,8 @@ out_err_txh_ch:void wcn36xx_dxe_deinit (struct wcn36xx *wcn) { +int reg_data =0 ; +/* Disable channel interrupts */ wcn36xx_dxe_disable_ch_int (wcn,WCN36XX_INT_MASK_CHAN_RX_H );wcn36xx_dxe_disable_ch_int (wcn,WCN36XX_INT_MASK_CHAN_RX_L );
@@ -1012,6 +1014,10 @@ void wcn36xx_dxe_deinit(struct wcn36xx *wcn) wcn->tx_ack_skb =NULL ; } +/* Put the DXE block into reset before freeing memory */ + reg_data =WCN36XX_DXE_REG_RESET ; +wcn36xx_dxe_write_register (wcn,WCN36XX_DXE_REG_CSR_RESET , reg_data); +wcn36xx_dxe_ch_free_skbs (wcn, &wcn->dxe_rx_l_ch);wcn36xx_dxe_ch_free_skbs (wcn, &wcn->dxe_rx_h_ch);
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 80/846 drm/panel: innolux-p079zca: Delete panel on attach() failure
In reply to Greg Kroah-HartmanFrom: Brian Norris <[email protected]>
[ Upstream commit 32a267e9c057e1636e7afdd20599aa5741a73079 ]
If we fail to attach (e.g., because 1 of 2 dual-DSI controllers aren't ready), we leave a dangling drm_panel reference to freed memory. Clean that up on failure.
This problem exists since the driver's introduction, but is especially relevant after refactored for dual-DSI variants.
--- drivers/gpu/drm/panel/panel-innolux-p079zca.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/gpu/drm/panel/panel-innolux-p079zca.c +9 -1
@@ -484,6 +484,7 @@ static void innolux_panel_del(struct innolux_panel *innolux)static int innolux_panel_probe (struct mipi_dsi_device *dsi) {const struct panel_desc *desc; +struct innolux_panel *innolux;int err; desc =of_device_get_match_data (&dsi->dev);
@@ -495,7 +496,14 @@ static int innolux_panel_probe(struct mipi_dsi_device *dsi)if (err <0 )return err; -return mipi_dsi_attach (dsi); + err =mipi_dsi_attach (dsi); +if (err <0 ) { + innolux =mipi_dsi_get_drvdata (dsi); +innolux_panel_del (innolux); +return err; + } + +return 0 ; }static int innolux_panel_remove (struct mipi_dsi_device *dsi)
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 79/846 drm/panel: kingdisplay-kd097d04: Delete panel on attach() failure
In reply to Greg Kroah-HartmanFrom: Brian Norris <[email protected]>
[ Upstream commit 5f31dbeae8a88f31c3eb4eb526ab4807c40da241 ]
If we fail to attach (e.g., because 1 of 2 dual-DSI controllers aren't ready), we leave a dangling drm_panel reference to freed memory. Clean that up on failure.
--- drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c +7 -1
@@ -406,7 +406,13 @@ static int kingdisplay_panel_probe(struct mipi_dsi_device *dsi)if (err <0 )return err; -return mipi_dsi_attach (dsi); + err =mipi_dsi_attach (dsi); +if (err <0 ) { +kingdisplay_panel_del (kingdisplay); +return err; + } + +return 0 ; }static int kingdisplay_panel_remove (struct mipi_dsi_device *dsi)
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 108/846 media: atomisp: add missing media_device_cleanup() in atomisp_unregister_entities()
In reply to Greg Kroah-HartmanFrom: Tsuchiya Yuto <[email protected]>
[ Upstream commit ce3015b7212e96db426d0c36f80fd159c91155d1 ]
After the commit 9832e155f1ed ("[media] media-device: split media initialization and registration"), calling media_device_cleanup() is needed it seems. However, currently it is missing for the module unload path.
Note that for the probe failure path, it is already added in atomisp_register_entities().
This patch adds the missing call of media_device_cleanup() in atomisp_unregister_entities().
--- drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 1 + 1 file changed, 1 insertion(+)
drivers/staging/media/atomisp/pci/atomisp_v4l2.c +1 -0
@@ -1182,6 +1182,7 @@ static void atomisp_unregister_entities(struct atomisp_device *isp)v4l2_device_unregister (&isp->v4l2_dev);media_device_unregister (&isp->media_dev); +media_device_cleanup (&isp->media_dev); }static int atomisp_register_entities (struct atomisp_device *isp)
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 121/846 arm64: dts: amlogic: Fix SPI NOR flash node name for ODROID N2/N2+
In reply to Greg Kroah-HartmanFrom: Alexander Stein <[email protected]>
[ Upstream commit 95d35256b564aca33fb661eac77dc94bfcffc8df ]
Fix the schema warning: "spi-flash@0: $nodename:0: 'spi-flash@0' does
not match '^flash(@.*)?$'" from jedec,spi-nor.yaml
--- arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi +1 -1
@@ -607,7 +607,7 @@ pinctrl-0 = <&nor_pins>; pinctrl-names = "default"; - mx25u64: spi-flash@0 { + mx25u64: flash@0 { #address-cells = <1>; #size-cells = <1>; compatible = "mxicy,mx25u6435f", "jedec,spi-nor";
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 11/846 f2fs: avoid EINVAL by SBI_NEED_FSCK when pinning a file
In reply to Greg Kroah-HartmanFrom: Jaegeuk Kim <[email protected]>
commit 19bdba5265624ba6b9d9dd936a0c6ccc167cfe80 upstream.
Android OTA failed due to SBI_NEED_FSCK flag when pinning the file. Let's avoid it since we can do in-place-updates.
--- fs/f2fs/data.c | 7 +++++-- fs/f2fs/file.c | 10 +++++----- 2 files changed, 10 insertions(+), 7 deletions(-)
fs/f2fs/data.c +5 -2
@@ -2564,6 +2564,11 @@ bool f2fs_should_update_outplace(struct {struct f2fs_sb_info *sbi =F2FS_I_SB (inode); +/* The below cases were checked when setting it. */ +if (f2fs_is_pinned_file (inode)) +return false; +if (fio &&is_sbi_flag_set (sbi,SBI_NEED_FSCK )) +return true;if (f2fs_lfs_mode (sbi))return true;if (S_ISDIR (inode->i_mode))
@@ -2572,8 +2577,6 @@ bool f2fs_should_update_outplace(structreturn true;if (f2fs_is_atomic_file (inode))return true; -if (is_sbi_flag_set (sbi,SBI_NEED_FSCK )) -return true;/* swap file is migrating in aligned write mode */ if (is_inode_flag_set (inode,FI_ALIGNED_WRITE ))
fs/f2fs/file.c +5 -5
@@ -3143,17 +3143,17 @@ static int f2fs_ioc_set_pin_file(structinode_lock (inode); -if (f2fs_should_update_outplace (inode,NULL )) { - ret = -EINVAL ; - goto out; - } -if (!pin) {clear_inode_flag (inode,FI_PIN_FILE );f2fs_i_gc_failures_write (inode,0 ); goto done; } +if (f2fs_should_update_outplace (inode,NULL )) { + ret = -EINVAL ; + goto out; + } +if (f2fs_pin_file_control (inode, false)) { ret = -EAGAIN ; goto out;
Greg Kroah-Hartman
maintainerPATCH 122/846 arm64: dts: meson-gxbb-wetek: fix HDMI in early boot
In reply to Greg Kroah-HartmanFrom: Christian Hewitt <[email protected]>
[ Upstream commit 8182a35868db5f053111d5d9d4da8fcb3f99259d ]
Mark the VDDIO_AO18 regulator always-on and set hdmi-supply for the hdmi_tx node to ensure HDMI is powered in the early stages of boot.
--- arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi +2 -0
@@ -64,6 +64,7 @@ regulator-name = "VDDIO_AO18"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; + regulator-always-on; }; vcc_3v3: regulator-vcc_3v3 {
@@ -161,6 +162,7 @@ status = "okay"; pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>; pinctrl-names = "default"; + hdmi-supply = <&vddio_ao18>; }; &hdmi_tx_tmds_port {
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 132/846 fs: dlm: fix build with CONFIG_IPV6 disabled
In reply to Greg Kroah-HartmanFrom: Alexander Aring <[email protected]>
[ Upstream commit 1b9beda83e27a0c2cd75d1cb743c297c7b36c844 ]
This patch will surround the AF_INET6 case in sk_error_report() of dlm with a #if IS_ENABLED(CONFIG_IPV6). The field sk->sk_v6_daddr is not defined when CONFIG_IPV6 is disabled. If CONFIG_IPV6 is disabled, the socket creation with AF_INET6 should already fail because a runtime check if AF_INET6 is registered. However if there is the possibility that AF_INET6 is set as sk_family the sk_error_report() callback will print then an invalid family type error.
--- fs/dlm/lowcomms.c | 2 ++ 1 file changed, 2 insertions(+)
fs/dlm/lowcomms.c +2 -0
@@ -612,6 +612,7 @@ static void lowcomms_error_report(struct sock *sk)ntohs (inet->inet_dport), sk->sk_err, sk->sk_err_soft);break ; +#if IS_ENABLED (CONFIG_IPV6 )case AF_INET6 :printk_ratelimited (KERN_ERR "dlm: node %d: socket error " "sending to node %d at %pI6c, "
@@ -620,6 +621,7 @@ static void lowcomms_error_report(struct sock *sk)ntohs (inet->inet_dport), sk->sk_err, sk->sk_err_soft);break ; +#endif default :printk_ratelimited (KERN_ERR "dlm: node %d: socket error " "invalid socket family %d set, "
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 84/846 drm/rockchip: dsi: Reconfigure hardware on resume()
In reply to Greg Kroah-HartmanFrom: Brian Norris <[email protected]>
commit e584cdc1549932f87a2707b56bc588cfac5d89e0 upstream.
Since commit 43c2de1002d2 ("drm/rockchip: dsi: move all lane config except LCDC mux to bind()"), we perform most HW configuration in the bind() function. This configuration may be lost on suspend/resume, so we need to call it again. That may lead to errors like this after system suspend/resume:
dw-mipi-dsi-rockchip ff968000.mipi: failed to write command FIFO panel-kingdisplay-kd097d04 ff960000.mipi.0: failed write init cmds: -110
Tested on Acer Chromebook Tab 10 (RK3399 Gru-Scarlet).
Note that early mailing list versions of this driver borrowed Rockchip's downstream/BSP solution, to do HW configuration in mode_set() (which *is* called at the appropriate pre-enable() times), but that was discarded along the way. I've avoided that still, because mode_set() documentation doesn't suggest this kind of purpose as far as I can tell.
--- drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 37 ++++++++++++++++++++++++ 1 file changed, 37 insertions(+)
drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c +37 -0
@@ -268,6 +268,8 @@ struct dw_mipi_dsi_rockchip {struct dw_mipi_dsi *dmd;const struct rockchip_dw_dsi_chip_data *cdata;struct dw_mipi_dsi_plat_data pdata; + +bool dsi_bound; };struct dphy_pll_parameter_map {
@@ -964,6 +966,8 @@ static int dw_mipi_dsi_rockchip_bind(str goto out_pll_clk; } + dsi->dsi_bound = true; +return 0 ; out_pll_clk:
@@ -985,6 +989,8 @@ static void dw_mipi_dsi_rockchip_unbind(if (dsi->is_slave)return ; + dsi->dsi_bound = false; +dw_mipi_dsi_unbind (dsi->dmd);clk_disable_unprepare (dsi->pllref_clk);
@@ -1279,6 +1285,36 @@ static const struct phy_ops dw_mipi_dsi_ .exit = dw_mipi_dsi_dphy_exit, }; +static int __maybe_unused dw_mipi_dsi_rockchip_resume (struct device *dev) +{ +struct dw_mipi_dsi_rockchip *dsi =dev_get_drvdata (dev); +int ret; + +/* +* Re-configure DSI state, if we were previously initialized. We need +* to do this before rockchip_drm_drv tries to re-enable() any panels. +*/ +if (dsi->dsi_bound) { + ret =clk_prepare_enable (dsi->grf_clk); +if (ret) { +DRM_DEV_ERROR (dsi->dev,"Failed to enable grf_clk: %d\n" , ret); +return ret; + } + +dw_mipi_dsi_rockchip_config (dsi); +if (dsi->slave) +dw_mipi_dsi_rockchip_config (dsi->slave); + +clk_disable_unprepare (dsi->grf_clk); + } + +return 0 ; +} + +static const struct dev_pm_ops dw_mipi_dsi_rockchip_pm_ops = { +SET_LATE_SYSTEM_SLEEP_PM_OPS (NULL , dw_mipi_dsi_rockchip_resume) +}; +static int dw_mipi_dsi_rockchip_probe (struct platform_device *pdev) {struct device *dev = &pdev->dev;
@@ -1592,6 +1628,7 @@ struct platform_driver dw_mipi_dsi_rockc .remove = dw_mipi_dsi_rockchip_remove, .driver = { .of_match_table = dw_mipi_dsi_rockchip_dt_ids, + .pm = &dw_mipi_dsi_rockchip_pm_ops, .name = "dw-mipi-dsi-rockchip", }, };
Greg Kroah-Hartman
maintainerPATCH 136/846 media: dmxdev: fix UAF when dvb_register_device() fails
In reply to Greg Kroah-HartmanFrom: Wang Hai <[email protected]>
[ Upstream commit ab599eb11882f834951c436cc080c3455ba32b9b ]
I got a use-after-free report:
dvbdev: dvb_register_device: failed to create device dvb1.dvr0 (-12)
...
==================================================================
BUG: KASAN: use-after-free in dvb_dmxdev_release+0xce/0x2f0 ... Call Trace: dump_stack_lvl+0x6c/0x8b print_address_description.constprop.0+0x48/0x70 kasan_report.cold+0x82/0xdb __asan_load4+0x6b/0x90 dvb_dmxdev_release+0xce/0x2f0 ... Allocated by task 7666: kasan_save_stack+0x23/0x50 __kasan_kmalloc+0x83/0xa0 kmem_cache_alloc_trace+0x22e/0x470 dvb_register_device+0x12f/0x980 dvb_dmxdev_init+0x1f3/0x230 ... Freed by task 7666: kasan_save_stack+0x23/0x50 kasan_set_track+0x20/0x30 kasan_set_free_info+0x24/0x40 __kasan_slab_free+0xf2/0x130 kfree+0xd1/0x5c0 dvb_register_device.cold+0x1ac/0x1fa dvb_dmxdev_init+0x1f3/0x230
...
When dvb_register_device() in dvb_dmxdev_init() fails, dvb_dmxdev_init() does not return a failure, and the memory pointed to by dvbdev or dvr_dvbdev is invalid at this point. If they are used subsequently, it will result in UFA or null-ptr-deref.
If dvb_register_device() in dvb_dmxdev_init() fails, fix the bug by making dvb_dmxdev_init() return an error as well.
--- drivers/media/dvb-core/dmxdev.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-)
drivers/media/dvb-core/dmxdev.c +15 -3
@@ -1413,7 +1413,7 @@ static const struct dvb_device dvbdev_dvr = { };int dvb_dmxdev_init (struct dmxdev *dmxdev,struct dvb_adapter *dvb_adapter) { -int i; +int i, ret;if (dmxdev->demux->open (dmxdev->demux) <0 )return -EUSERS ;
@@ -1432,14 +1432,26 @@ int dvb_dmxdev_init(struct dmxdev *dmxdev, struct dvb_adapter *dvb_adapter) DMXDEV_STATE_FREE); } -dvb_register_device (dvb_adapter, &dmxdev->dvbdev, &dvbdev_demux, dmxdev, + ret =dvb_register_device (dvb_adapter, &dmxdev->dvbdev, &dvbdev_demux, dmxdev,DVB_DEVICE_DEMUX , dmxdev->filternum); -dvb_register_device (dvb_adapter, &dmxdev->dvr_dvbdev, &dvbdev_dvr, +if (ret <0 ) + goto err_register_dvbdev; + + ret =dvb_register_device (dvb_adapter, &dmxdev->dvr_dvbdev, &dvbdev_dvr, dmxdev,DVB_DEVICE_DVR , dmxdev->filternum); +if (ret <0 ) + goto err_register_dvr_dvbdev;dvb_ringbuffer_init (&dmxdev->dvr_buffer,NULL ,8192 );return 0 ; + +err_register_dvr_dvbdev: +dvb_unregister_device (dmxdev->dvbdev); +err_register_dvbdev: +vfree (dmxdev->filter); + dmxdev->filter =NULL ; +return ret; }EXPORT_SYMBOL (dvb_dmxdev_init);
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 113/846 media: atomisp: fix ifdefs in sh_css.c
In reply to Greg Kroah-HartmanFrom: Tsuchiya Yuto <[email protected]>
[ Upstream commit 5a1b2725558f8a3b4cbf0504f53cffae8e163034 ]
## if (pipe->stream->config.mode == IA_CSS_INPUT_MODE_TPG) { case
The intel-aero atomisp has #if defined(IS_ISP_2400_SYSTEM) [1]. It is to be defined in the following two places [2]:
- css/hive_isp_css_common/system_global.h
- css/css_2401_csi2p_system/system_global.h
and the former file is to be included on ISP2400 devices, too. So, it is to be defined for both ISP2400 and ISP2401 devices.
Because the upstreamed atomisp driver now supports only ISP2400 and ISP2401, just remove the ISP version test again. This matches the other upstream commits like 3c0538fbad9f ("media: atomisp: get rid of most checks for ISP2401 version").
While here, moved the comment for define GP_ISEL_TPG_MODE to the appropriate place.
[1] https://github.com/intel-aero/linux-kernel/blob/a1b673258feb915268377275130c5c5df0eafc82/drivers/media/pci/atomisp/css/sh_css.c#L552-L558
[2] https://github.com/intel-aero/linux-kernel/search?q=IS_ISP_2400_SYSTEM
## isys_stream_descr->polling_mode case
This does not exist on the intel-aero atomisp. This is because it is based on css version irci_stable_candrpv_0415_20150521_0458.
On the other hand, the upstreamed atomisp is based on the following css version depending on the ISP version using ifdefs:
- ISP2400: irci_stable_candrpv_0415_20150521_0458
- ISP2401: irci_master_20150911_0724
The isys_stream_descr->polling_mode usage was added on updating css version to irci_master_20150701_0213 [3].
So, it is not a ISP version specific thing, but css version specific thing. Because the upstreamed atomisp driver uses irci_master_20150911_0724 for ISP2401, re-add the ISP version check for now.
I say "for now" because ISP2401 should eventually use the same css version with ISP2400 (i.e., irci_stable_candrpv_0415_20150521_0458)
[3] https://raw.githubusercontent.com/intel/ProductionKernelQuilts/cht-m1stable-2016_ww31/uefi/cht-m1stable/patches/cam-0439-atomisp2-css2401-and-2401_legacy-irci_master_2015070.patch
("atomisp2: css2401 and 2401_legacy-irci_master_20150701_0213")
Link to Intel's Android kernel patch.
## coord = &me->config.internal_frame_origin_bqs_on_sctbl; case
it was added on commit 4f744a573db3 ("media: atomisp: make sh_css_sp_init_pipeline() ISP version independent") for ISP2401. Because the upstreamed atomisp for the ISP2401 part is based on irci_master_20150911_0724, hence the difference.
Because the upstreamed atomisp driver uses irci_master_20150911_0724 for ISP2401, revert the test back to if (IS_ISP2401).
--- drivers/staging/media/atomisp/pci/sh_css.c | 27 +++++++++------------- 1 file changed, 11 insertions(+), 16 deletions(-)
drivers/staging/media/atomisp/pci/sh_css.c +11 -16
@@ -522,6 +522,7 @@ ia_css_stream_input_format_bits_per_pixel(struct ia_css_stream *stream)return bpp; } +/* TODO: move define to proper file in tools */ #define GP_ISEL_TPG_MODE 0x90058#if !defined(ISP2401 )
@@ -573,12 +574,8 @@ sh_css_config_input_network(struct ia_css_stream *stream) vblank_cycles = vblank_lines * (width + hblank_cycles);sh_css_sp_configure_sync_gen (width, height, hblank_cycles, vblank_cycles); -if (!IS_ISP2401 ) { -if (pipe->stream->config.mode ==IA_CSS_INPUT_MODE_TPG ) { -/* TODO: move define to proper file in tools */ -ia_css_device_store_uint32 (GP_ISEL_TPG_MODE ,0 ); - } - } +if (pipe->stream->config.mode ==IA_CSS_INPUT_MODE_TPG ) +ia_css_device_store_uint32 (GP_ISEL_TPG_MODE ,0 ); }ia_css_debug_dtrace (IA_CSS_DEBUG_TRACE_PRIVATE ,"sh_css_config_input_network() leave:\n" );
@@ -1009,16 +1006,14 @@ static bool sh_css_translate_stream_cfg_to_isys_stream_descr(* ia_css_isys_stream_capture_indication() instead of * ia_css_pipeline_sp_wait_for_isys_stream_N() as isp processing of * capture takes longer than getting an ISYS frame -* -* Only 2401 relevant ?? */ -#if 0 // FIXME: NOT USED on Yocto Aero - isys_stream_descr->polling_mode - = early_polling ?INPUT_SYSTEM_POLL_ON_CAPTURE_REQUEST - :INPUT_SYSTEM_POLL_ON_WAIT_FOR_FRAME ; -ia_css_debug_dtrace (IA_CSS_DEBUG_TRACE_PRIVATE , -"sh_css_translate_stream_cfg_to_isys_stream_descr() leave:\n" ); -#endif +if (IS_ISP2401 ) { + isys_stream_descr->polling_mode + = early_polling ?INPUT_SYSTEM_POLL_ON_CAPTURE_REQUEST + :INPUT_SYSTEM_POLL_ON_WAIT_FOR_FRAME ; +ia_css_debug_dtrace (IA_CSS_DEBUG_TRACE_PRIVATE , +"sh_css_translate_stream_cfg_to_isys_stream_descr() leave:\n" ); + }return rc; }
@@ -1433,7 +1428,7 @@ static void start_pipe(assert (me);/* all callers are in this file and call with non null argument */ -if (!IS_ISP2401 ) { +if (IS_ISP2401 ) { coord = &me->config.internal_frame_origin_bqs_on_sctbl; params = me->stream->isp_params_configs; }
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 138/846 crypto: qce - fix uaf on qce_aead_register_one
In reply to Greg Kroah-HartmanFrom: Chengfeng Ye <[email protected]>
[ Upstream commit 4a9dbd021970ffe1b92521328377b699acba7c52 ]
Pointer alg points to sub field of tmpl, it
is dereferenced after tmpl is freed. Fix
this by accessing alg before free tmpl.
--- drivers/crypto/qce/aead.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/qce/aead.c +1 -1
@@ -802,8 +802,8 @@ static int qce_aead_register_one(const struct qce_aead_def *def, struct qce_devi ret =crypto_register_aead (alg);if (ret) { -kfree (tmpl);dev_err (qce->dev,"%s registration failed\n" , alg->base.cra_name); +kfree (tmpl);return ret; }
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 139/846 crypto: qce - fix uaf on qce_ahash_register_one
In reply to Greg Kroah-HartmanFrom: Chengfeng Ye <[email protected]>
[ Upstream commit b4cb4d31631912842eb7dce02b4350cbb7562d5e ]
Pointer base points to sub field of tmpl, it
is dereferenced after tmpl is freed. Fix
this by accessing base before free tmpl.
--- drivers/crypto/qce/sha.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/qce/sha.c +1 -1
@@ -498,8 +498,8 @@ static int qce_ahash_register_one(const struct qce_ahash_def *def, ret =crypto_register_ahash (alg);if (ret) { -kfree (tmpl);dev_err (qce->dev,"%s registration failed\n" , base->cra_name); +kfree (tmpl);return ret; }
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 141/846 arm64: dts: qcom: sc7280: Fix incorrect clock name
In reply to Greg Kroah-HartmanFrom: Prasad Malisetty <[email protected]>
[ Upstream commit fa09b2248714c64644576d8064e9bd292a504a0e ]
Replace pcie_1_pipe-clk clock name with pcie_1_pipe_clk To match with dt binding.
--- arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sc7280.dtsi +1 -1
@@ -429,7 +429,7 @@ <&rpmhcc RPMH_CXO_CLK_A>, <&sleep_clk>, <0>, <0>, <0>, <0>, <0>, <0>; clock-names = "bi_tcxo", "bi_tcxo_ao", "sleep_clk", - "pcie_0_pipe_clk", "pcie_1_pipe-clk", + "pcie_0_pipe_clk", "pcie_1_pipe_clk", "ufs_phy_rx_symbol_0_clk", "ufs_phy_rx_symbol_1_clk", "ufs_phy_tx_symbol_0_clk", "usb3_phy_wrapper_gcc_usb30_pipe_clk";
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 144/846 cpufreq: qcom-hw: Fix probable nested interrupt handling
In reply to Greg Kroah-HartmanFrom: Vladimir Zapolskiy <[email protected]>
[ Upstream commit e0e27c3d4e20dab861566f1c348ae44e4b498630 ]
Re-enabling an interrupt from its own interrupt handler may cause an interrupt storm, if there is a pending interrupt and because its handling is disabled due to already done entrance into the handler above in the stack.
Also, apparently it is improper to lock a mutex in an interrupt contex.
--- drivers/cpufreq/qcom-cpufreq-hw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/cpufreq/qcom-cpufreq-hw.c +2 -2
@@ -343,9 +343,9 @@ static irqreturn_t qcom_lmh_dcvs_handle_irq(int irq, void *data)/* Disable interrupt and enable polling */ disable_irq_nosync (c_data->throttle_irq); -qcom_lmh_dcvs_notify (c_data); +schedule_delayed_work (&c_data->throttle_work,0 ); -return 0 ; +return IRQ_HANDLED ; }static const struct qcom_cpufreq_soc_data qcom_soc_data = {
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 128/846 ath11k: clear the keys properly via DISABLE_KEY
In reply to Greg Kroah-HartmanFrom: Karthikeyan Kathirvel <[email protected]>
[ Upstream commit 436a4e88659842a7cf634d7cc088c8f2cc94ebf5 ]
DISABLE_KEY sets the key_len to 0, firmware will not delete the keys if key_len is 0. Changing from security mode to open mode will cause mcast to be still encrypted without vdev restart.
Set the proper key_len for DISABLE_KEY cmd to clear the keys in firmware.
Tested-on: IPQ6018 hw1.0 AHB WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1
--- drivers/net/wireless/ath/ath11k/mac.c | 4 +--- drivers/net/wireless/ath/ath11k/wmi.c | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/ath11k/mac.c +1 -3
@@ -2655,9 +2655,7 @@ static int ath11k_install_key(struct ath11k_vif *arvif,return 0 ;if (cmd ==DISABLE_KEY ) { -/* TODO: Check if FW expects value other than NONE for del */ -/* arg.key_cipher = WMI_CIPHER_NONE; */ - arg.key_len =0 ; + arg.key_cipher =WMI_CIPHER_NONE ; arg.key_data =NULL ; goto install; }
drivers/net/wireless/ath/ath11k/wmi.c +2 -1
@@ -1671,7 +1671,8 @@ int ath11k_wmi_vdev_install_key(struct ath11k *ar, tlv = (struct wmi_tlv *)(skb->data +sizeof (*cmd)); tlv->header =FIELD_PREP (WMI_TLV_TAG ,WMI_TAG_ARRAY_BYTE ) |FIELD_PREP (WMI_TLV_LEN , key_len_aligned); -memcpy (tlv->value, (u8 *)arg->key_data, key_len_aligned); +if (arg->key_data) +memcpy (tlv->value, (u8 *)arg->key_data, key_len_aligned); ret =ath11k_wmi_cmd_send (wmi, skb,WMI_VDEV_INSTALL_KEY_CMDID );if (ret) {
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 142/846 mtd: hyperbus: rpc-if: fix bug in rpcif_hb_remove
In reply to Greg Kroah-HartmanFrom: George G. Davis <[email protected]>
[ Upstream commit baaf965f94308301d2dc554d72a87d7432cd5ce6 ]
The following KASAN BUG is observed when testing the rpc-if driver on rcar-gen3:
root@rcar-gen3:~# modprobe -r rpc-if [ 101.930146] ================================================================== [ 101.937408] BUG: KASAN: slab-out-of-bounds in __lock_acquire+0x518/0x25d0 [ 101.944240] Read of size 8 at addr ffff0004c5be2750 by task modprobe/664 [ 101.950959] [ 101.952466] CPU: 2 PID: 664 Comm: modprobe Not tainted 5.14.0-rc1-00342-g1a1464d7aa31 #1 [ 101.960578] Hardware name: Renesas H3ULCB board based on r8a77951 (DT) [ 101.967120] Call trace: [ 101.969580] dump_backtrace+0x0/0x2c0 [ 101.973275] show_stack+0x1c/0x30 [ 101.976616] dump_stack_lvl+0x9c/0xd8 [ 101.980301] print_address_description.constprop.0+0x74/0x2b8 [ 101.986071] kasan_report+0x1f4/0x26c [ 101.989757] __asan_load8+0x98/0xd4 [ 101.993266] __lock_acquire+0x518/0x25d0 [ 101.997215] lock_acquire.part.0+0x18c/0x360 [ 102.001506] lock_acquire+0x74/0x90 [ 102.005013] _raw_spin_lock_irq+0x98/0x130 [ 102.009131] __pm_runtime_disable+0x30/0x210 [ 102.013427] rpcif_hb_remove+0x5c/0x70 [rpc_if] [ 102.018001] platform_remove+0x40/0x80 [ 102.021771] __device_release_driver+0x234/0x350 [ 102.026412] driver_detach+0x158/0x20c [ 102.030179] bus_remove_driver+0xa0/0x140 [ 102.034212] driver_unregister+0x48/0x80 [ 102.038153] platform_driver_unregister+0x18/0x24 [ 102.042879] rpcif_platform_driver_exit+0x1c/0x34 [rpc_if] [ 102.048400] __arm64_sys_delete_module+0x210/0x310 [ 102.053212] invoke_syscall+0x60/0x190 [ 102.056986] el0_svc_common+0x12c/0x144 [ 102.060844] do_el0_svc+0x88/0xac [ 102.064181] el0_svc+0x24/0x3c [ 102.067257] el0t_64_sync_handler+0x1a8/0x1b0 [ 102.071634] el0t_64_sync+0x198/0x19c [ 102.075315] [ 102.076815] Allocated by task 628: [ 102.080781] [ 102.082280] Last potentially related work creation: [ 102.087524] [ 102.089022] The buggy address belongs to the object at ffff0004c5be2000 [ 102.089022] which belongs to the cache kmalloc-2k of size 2048 [ 102.101555] The buggy address is located 1872 bytes inside of [ 102.101555] 2048-byte region [ffff0004c5be2000, ffff0004c5be2800) [ 102.113486] The buggy address belongs to the page: [ 102.118409] [ 102.119908] Memory state around the buggy address: [ 102.124711] ffff0004c5be2600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 102.131947] ffff0004c5be2680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 102.139181] >ffff0004c5be2700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 102.146412] ^ [ 102.152257] ffff0004c5be2780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 102.159491] ffff0004c5be2800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 102.166723] ==================================================================
The above bug is caused by use of the wrong pointer in the rpcif_disable_rpm() call. Fix the bug by using the correct pointer.
--- drivers/mtd/hyperbus/rpc-if.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/hyperbus/rpc-if.c +2 -2
@@ -152,9 +152,9 @@ static int rpcif_hb_remove(struct platform_device *pdev) {struct rpcif_hyperbus *hyperbus =platform_get_drvdata (pdev);int error =hyperbus_unregister_device (&hyperbus->hbdev); -struct rpcif *rpc =dev_get_drvdata (pdev->dev.parent); -rpcif_disable_rpm (rpc); +rpcif_disable_rpm (&hyperbus->rpc); +return error; }
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 143/846 cpufreq: qcom-cpufreq-hw: Update offline CPUs per-cpu thermal pressure
In reply to Greg Kroah-HartmanFrom: Lukasz Luba <[email protected]>
[ Upstream commit 93d9e6f93e1586fcc97498c764be2e8c8401f4bd ]
The thermal pressure signal gives information to the scheduler about reduced CPU capacity due to thermal. It is based on a value stored in a per-cpu 'thermal_pressure' variable. The online CPUs will get the new value there, while the offline won't. Unfortunately, when the CPU is back online, the value read from per-cpu variable might be wrong (stale data). This might affect the scheduler decisions, since it sees the CPU capacity differently than what is actually available.
Fix it by making sure that all online+offline CPUs would get the proper value in their per-cpu variable when there is throttling or throttling is removed.
--- drivers/cpufreq/qcom-cpufreq-hw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/cpufreq/qcom-cpufreq-hw.c +2 -1
@@ -304,7 +304,8 @@ static void qcom_lmh_dcvs_notify(struct qcom_cpufreq_data *data)if (capacity > max_capacity) capacity = max_capacity; -arch_set_thermal_pressure (policy->cpus, max_capacity - capacity); +arch_set_thermal_pressure (policy->related_cpus, + max_capacity - capacity);/* * In the unlikely case policy is unregistered do not enable
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 145/846 ARM: dts: stm32: fix dtbs_check warning on ili9341 dts binding on stm32f429 disco
In reply to Greg Kroah-HartmanFrom: Dillon Min <[email protected]>
[ Upstream commit b046049e59dca5e5830dc75ed16acf7657a95161 ]
Since the compatible string defined from ilitek,ili9341.yaml is "st,sf-tc240t-9370-t", "ilitek,ili9341"
so, append "ilitek,ili9341" to avoid the below dtbs_check warning.
arch/arm/boot/dts/stm32f429-disco.dt.yaml: display@1: compatible:
['st,sf-tc240t-9370-t'] is too short
--- arch/arm/boot/dts/stm32f429-disco.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/stm32f429-disco.dts +1 -1
@@ -192,7 +192,7 @@ display: display@1{ /* Connect panel-ilitek-9341 to ltdc */ - compatible = "st,sf-tc240t-9370-t"; + compatible = "st,sf-tc240t-9370-t", "ilitek,ili9341"; reg = <1>; spi-3wire; spi-max-frequency = <10000000>;
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 119/846 media: aspeed: Update signal status immediately to ensure sane hw state
In reply to Greg Kroah-HartmanFrom: Jammy Huang <[email protected]>
[ Upstream commit af6d1bde395cac174ee71adcd3fa43f6435c7206 ]
If res-chg, VE_INTERRUPT_MODE_DETECT_WD irq will be raised. But v4l2_input_status won't be updated to no-signal immediately until aspeed_video_get_resolution() in aspeed_video_resolution_work().
During the period of time, aspeed_video_start_frame() could be called because it doesn't know signal becomes unstable now. If it goes with aspeed_video_init_regs() of aspeed_video_irq_res_change() simultaneously, it will mess up hw state.
To fix this problem, v4l2_input_status is updated to no-signal immediately for VE_INTERRUPT_MODE_DETECT_WD irq.
--- drivers/media/platform/aspeed-video.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/media/platform/aspeed-video.c +3 -3
@@ -556,6 +556,8 @@ static void aspeed_video_irq_res_change(struct aspeed_video *video, ulong delay)set_bit (VIDEO_RES_CHANGE , &video->flags);clear_bit (VIDEO_FRAME_INPRG , &video->flags); + video->v4l2_input_status =V4L2_IN_ST_NO_SIGNAL ; +aspeed_video_off (video);aspeed_video_bufs_done (video,VB2_BUF_STATE_ERROR );
@@ -1337,7 +1339,6 @@ static void aspeed_video_resolution_work(struct work_struct *work)struct delayed_work *dwork =to_delayed_work (work); struct aspeed_video *video = container_of(dwork, struct aspeed_video, res_work); -u32 input_status = video->v4l2_input_status;aspeed_video_on (video);
@@ -1350,8 +1351,7 @@ static void aspeed_video_resolution_work(struct work_struct *work)aspeed_video_get_resolution (video);if (video->detected_timings.width != video->active_timings.width || - video->detected_timings.height != video->active_timings.height || - input_status != video->v4l2_input_status) { + video->detected_timings.height != video->active_timings.height) {static const struct v4l2_event ev = { .type =V4L2_EVENT_SOURCE_CHANGE , .u.src_change.changes =V4L2_EVENT_SRC_CH_RESOLUTION ,
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 110/846 media: atomisp: fix inverted logic in buffers_needed()
In reply to Greg Kroah-HartmanFrom: Tsuchiya Yuto <[email protected]>
[ Upstream commit e1921cd14640f0f4d1fad5eb8e448c58a536415d ]
When config.mode is IA_CSS_INPUT_MODE_BUFFERED_SENSOR, it rather needs buffers. Fix it by inverting the return value.
--- drivers/staging/media/atomisp/pci/sh_css_mipi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/media/atomisp/pci/sh_css_mipi.c +4 -4
@@ -374,17 +374,17 @@ static bool buffers_needed(struct ia_css_pipe *pipe) {if (!IS_ISP2401 ) {if (pipe->stream->config.mode ==IA_CSS_INPUT_MODE_BUFFERED_SENSOR ) -return false; -else return true; +else +return false; }if (pipe->stream->config.mode ==IA_CSS_INPUT_MODE_BUFFERED_SENSOR || pipe->stream->config.mode ==IA_CSS_INPUT_MODE_TPG || pipe->stream->config.mode ==IA_CSS_INPUT_MODE_PRBS ) -return false; +return true; -return true; +return false; }int
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 161/846 media: i2c: Re-order runtime pm initialisation
In reply to Greg Kroah-HartmanFrom: Daniel Scally <[email protected]>
[ Upstream commit d2484fbf780762f6f9cc3abb7a07ee42dca2eaa3 ]
The kerneldoc for pm_runtime_set_suspended() says:
"It is not valid to call this function for devices with runtime PM enabled"
To satisfy that requirement, re-order the calls so that pm_runtime_enable() is the last one.
--- drivers/media/i2c/ov8865.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/ov8865.c +1 -1
@@ -2899,8 +2899,8 @@ static int ov8865_probe(struct i2c_clien/* Runtime PM */ -pm_runtime_enable (sensor->dev);pm_runtime_set_suspended (sensor->dev); +pm_runtime_enable (sensor->dev);/* V4L2 subdev register */
Greg Kroah-Hartman
maintainerPATCH 162/846 media: i2c: ov8865: Fix lockdep error
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
[ Upstream commit 6e1c9bc9ae96e57bcd8807174f2c0f44f9ef7938 ]
ov8865_state_init() calls ov8865_state_mipi_configure() which uses __v4l2_ctrl_s_ctrl[_int64](). This means that sensor->mutex (which is also sensor->ctrls.handler.lock) must be locked before calling ov8865_state_init().
Note ov8865_state_mipi_configure() is also used in other places where the lock is already held so it cannot be changed itself.
This fixes the following lockdep kernel WARN:
[ 13.233421] WARNING: CPU: 0 PID: 8 at drivers/media/v4l2-core/v4l2-ctrls-api.c:833 __v4l2_ctrl_s_ctrl+0x4d/0x60 [videodev] ... [ 13.234063] Call Trace: [ 13.234074] ov8865_state_configure+0x98b/0xc00 [ov8865] [ 13.234095] ov8865_probe+0x4b1/0x54c [ov8865] [ 13.234117] i2c_device_probe+0x13c/0x2d0
--- drivers/media/i2c/ov8865.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/media/i2c/ov8865.c +2 -0
@@ -2893,7 +2893,9 @@ static int ov8865_probe(struct i2c_clienif (ret) goto error_mutex; +mutex_lock (&sensor->mutex); ret =ov8865_state_init (sensor); +mutex_unlock (&sensor->mutex);if (ret) goto error_ctrls;
Greg Kroah-Hartman
maintainerPATCH 163/846 media: rcar-csi2: Correct the selection of hsfreqrange
In reply to Greg Kroah-HartmanFrom: Suresh Udipi <[email protected]>
[ Upstream commit cee44d4fbacbbdfe62697ec94e76c6e4f726c5df ]
hsfreqrange should be chosen based on the calculated mbps which is closer to the default bit rate and within the range as per table[1]. But current calculation always selects first value which is greater than or equal to the calculated mbps which may lead to chosing a wrong range in some cases.
For example for 360 mbps for H3/M3N
Existing logic selects
Calculated value 360Mbps : Default 400Mbps Range [368.125 -433.125 mbps]
This hsfreqrange is out of range.
The logic is changed to get the default value which is closest to the calculated value [1]
Calculated value 360Mbps : Default 350Mbps Range [320.625 -380.625 mpbs]
[1] specs r19uh0105ej0200-r-car-3rd-generation.pdf [Table 25.9]
Please note that According to Renesas in Table 25.9 the range for 220 default value is corrected as below
|Range (Mbps) | Default Bit rate (Mbps) |
-----------------------------------------------
| 197.125-244.125 | 220 |
-----------------------------------------------
--- drivers/media/platform/rcar-vin/rcar-csi2.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/media/platform/rcar-vin/rcar-csi2.c +8 -1
@@ -445,16 +445,23 @@ static int rcsi2_wait_phy_start(struct rcar_csi2 *priv,static int rcsi2_set_phypll (struct rcar_csi2 *priv,unsigned int mbps) {const struct rcsi2_mbps_reg *hsfreq; +const struct rcsi2_mbps_reg *hsfreq_prev =NULL ; -for (hsfreq = priv->info->hsfreqrange; hsfreq->mbps !=0 ; hsfreq++) +for (hsfreq = priv->info->hsfreqrange; hsfreq->mbps !=0 ; hsfreq++) {if (hsfreq->mbps >= mbps)break ; + hsfreq_prev = hsfreq; + }if (!hsfreq->mbps) {dev_err (priv->dev,"Unsupported PHY speed (%u Mbps)" , mbps);return -ERANGE ; } +if (hsfreq_prev && + ((mbps - hsfreq_prev->mbps) <= (hsfreq->mbps - mbps))) + hsfreq = hsfreq_prev; +rcsi2_write (priv,PHYPLL_REG ,PHYPLL_HSFREQRANGE (hsfreq->reg));return 0 ;
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 170/846 media: venus: core: Fix a potential NULL pointer dereference in an error handling path
In reply to Greg Kroah-HartmanFrom: Christophe JAILLET <[email protected]>
[ Upstream commit e4debea9be7d5db52bc6a565a4c02c3c6560d093 ]
The normal path of the function makes the assumption that 'pm_ops->core_power' may be NULL.
We should make the same assumption in the error handling path or a NULL pointer dereference may occur.
Add the missing test before calling 'pm_ops->core_power'
--- drivers/media/platform/qcom/venus/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/media/platform/qcom/venus/core.c +2 -1
@@ -472,7 +472,8 @@ static __maybe_unused int venus_runtime_suspend(struct device *dev) err_video_path:icc_set_bw (core->cpucfg_path,kbps_to_icc (1000 ),0 ); err_cpucfg_path: - pm_ops->core_power (core,POWER_ON ); +if (pm_ops->core_power) + pm_ops->core_power (core,POWER_ON );return ret; }
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 193/846 mtd: core: provide unique name for nvmem device
In reply to Greg Kroah-HartmanFrom: Michael Walle <[email protected]>
[ Upstream commit c048b60d39e109c201d31ed5ad3a4f939064d6c4 ]
If there is more than one mtd device which supports OTP, there will be a kernel warning about duplicated sysfs entries and the probing will fail. This is because the nvmem device name is not unique. Make it unique by prepending the name of the mtd. E.g. before the name was "user-otp", now it will be "mtd0-user-otp".
For reference the kernel splash is:
[ 4.665531] sysfs: cannot create duplicate filename '/bus/nvmem/devices/user-otp' [ 4.673056] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.15.0-next-20211101+ #1296 [ 4.680565] Hardware name: Kontron SMARC-sAL28 (Single PHY) on SMARC Eval 2.0 carrier (DT) [ 4.688856] Call trace: [ 4.691303] dump_backtrace+0x0/0x1bc [ 4.694984] show_stack+0x24/0x30 [ 4.698306] dump_stack_lvl+0x68/0x84 [ 4.701980] dump_stack+0x18/0x34 [ 4.705302] sysfs_warn_dup+0x70/0x90 [ 4.708973] sysfs_do_create_link_sd+0x144/0x150 [ 4.713603] sysfs_create_link+0x2c/0x50 [ 4.717535] bus_add_device+0x74/0x120 [ 4.721293] device_add+0x330/0x890 [ 4.724791] device_register+0x2c/0x40 [ 4.728550] nvmem_register+0x240/0x9f0 [ 4.732398] mtd_otp_nvmem_register+0xb0/0x10c [ 4.736854] mtd_device_parse_register+0x28c/0x2b4 [ 4.741659] spi_nor_probe+0x20c/0x2e0 [ 4.745418] spi_mem_probe+0x78/0xbc [ 4.749001] spi_probe+0x90/0xf0 [ 4.752237] really_probe.part.0+0xa4/0x320 .. [ 4.873936] mtd mtd1: Failed to register OTP NVMEM device [ 4.894468] spi-nor: probe of spi0.0 failed with error -17
--- drivers/mtd/mtdcore.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/mtdcore.c +2 -2
@@ -825,8 +825,7 @@ static struct nvmem_device *mtd_otp_nvmem_register(struct mtd_info *mtd,/* OTP nvmem will be registered on the physical device */ config.dev = mtd->dev.parent; -/* just reuse the compatible as name */ - config.name = compatible; + config.name =kasprintf (GFP_KERNEL ,"%s-%s" ,dev_name (&mtd->dev), compatible); config.id =NVMEM_DEVID_NONE ; config.owner =THIS_MODULE ; config.type =NVMEM_TYPE_OTP ;
@@ -842,6 +841,7 @@ static struct nvmem_device *mtd_otp_nvmem_register(struct mtd_info *mtd, nvmem =NULL ;of_node_put (np); +kfree (config.name);return nvmem; }
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 195/846 staging: rtl8192e: return error code from rtllib_softmac_init()
In reply to Greg Kroah-HartmanFrom: Yang Yingliang <[email protected]>
[ Upstream commit 68bf78ff59a0891eb1239948e94ce10f73a9dd30 ]
If it fails to allocate 'dot11d_info', rtllib_softmac_init() should return error code. And remove unneccessary error message.
--- drivers/staging/rtl8192e/rtllib.h | 2 +- drivers/staging/rtl8192e/rtllib_softmac.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-)
drivers/staging/rtl8192e/rtllib.h +1 -1
@@ -1980,7 +1980,7 @@ void SendDisassociation(struct rtllib_device *ieee, bool deauth, u16 asRsn);void rtllib_softmac_xmit (struct rtllib_txb *txb,struct rtllib_device *ieee);void rtllib_start_ibss (struct rtllib_device *ieee); -void rtllib_softmac_init (struct rtllib_device *ieee); +int rtllib_softmac_init (struct rtllib_device *ieee);void rtllib_softmac_free (struct rtllib_device *ieee);void rtllib_disassociate (struct rtllib_device *ieee);void rtllib_stop_scan (struct rtllib_device *ieee);
drivers/staging/rtl8192e/rtllib_softmac.c +4 -2
@@ -2952,7 +2952,7 @@ void rtllib_start_protocol(struct rtllib_device *ieee) } } -void rtllib_softmac_init (struct rtllib_device *ieee) +int rtllib_softmac_init (struct rtllib_device *ieee) {int i;
@@ -2963,7 +2963,8 @@ void rtllib_softmac_init(struct rtllib_device *ieee) ieee->seq_ctrl[i] =0 ; ieee->dot11d_info =kzalloc (sizeof (struct rt_dot11d_info ),GFP_ATOMIC );if (!ieee->dot11d_info) -netdev_err (ieee->dev,"Can't alloc memory for DOT11D\n" ); +return -ENOMEM ; + ieee->LinkDetectInfo.SlotIndex =0 ; ieee->LinkDetectInfo.SlotNum =2 ; ieee->LinkDetectInfo.NumRecvBcnInPeriod =0 ;
@@ -3029,6 +3030,7 @@ void rtllib_softmac_init(struct rtllib_device *ieee)tasklet_setup (&ieee->ps_task, rtllib_sta_ps); +return 0 ; }void rtllib_softmac_free (struct rtllib_device *ieee)
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 194/846 floppy: Fix hang in watchdog when disk is ejected
In reply to Greg Kroah-HartmanFrom: Tasos Sahanidis <[email protected]>
[ Upstream commit fb48febce7e30baed94dd791e19521abd2c3fd83 ]
When the watchdog detects a disk change, it calls cancel_activity(), which in turn tries to cancel the fd_timer delayed work.
In the above scenario, fd_timer_fn is set to fd_watchdog(), meaning it is trying to cancel its own work.
This results in a hang as cancel_delayed_work_sync() is waiting for the watchdog (itself) to return, which never happens.
This can be reproduced relatively consistently by attempting to read a broken floppy, and ejecting it while IO is being attempted and retried.
To resolve this, this patch calls cancel_delayed_work() instead, which cancels the work without waiting for the watchdog to return and finish.
Before this regression was introduced, the code in this section used del_timer(), and not del_timer_sync() to delete the watchdog timer.
--- drivers/block/floppy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/floppy.c +1 -1
@@ -1014,7 +1014,7 @@ static DECLARE_DELAYED_WORK(fd_timer, fd_timer_workfn);static void cancel_activity (void ) { do_floppy =NULL ; -cancel_delayed_work_sync (&fd_timer); +cancel_delayed_work (&fd_timer);cancel_work_sync (&floppy_work); }
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 196/846 staging: rtl8192e: rtllib_module: fix error handle case in alloc_rtllib()
In reply to Greg Kroah-HartmanFrom: Yang Yingliang <[email protected]>
[ Upstream commit e730cd57ac2dfe94bca0f14a3be8e1b21de41a9c ]
Some variables are leaked in the error handling in alloc_rtllib(), free the variables in the error path.
--- drivers/staging/rtl8192e/rtllib_module.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)
drivers/staging/rtl8192e/rtllib_module.c +12 -4
@@ -88,7 +88,7 @@ struct net_device *alloc_rtllib(int sizeof_priv) err =rtllib_networks_allocate (ieee);if (err) {pr_err ("Unable to allocate beacon storage: %d\n" , err); - goto failed; + goto free_netdev; }rtllib_networks_initialize (ieee);
@@ -121,11 +121,13 @@ struct net_device *alloc_rtllib(int sizeof_priv) ieee->hwsec_active =0 ;memset (ieee->swcamtable,0 ,sizeof (struct sw_cam_table ) *32 ); -rtllib_softmac_init (ieee); + err =rtllib_softmac_init (ieee); +if (err) + goto free_crypt_info; ieee->pHTInfo =kzalloc (sizeof (struct rt_hi_throughput ),GFP_KERNEL );if (!ieee->pHTInfo) -return NULL ; + goto free_softmac;HTUpdateDefaultSetting (ieee);HTInitializeHTInfo (ieee);
@@ -141,8 +143,14 @@ struct net_device *alloc_rtllib(int sizeof_priv)return dev; - failed: +free_softmac: +rtllib_softmac_free (ieee); +free_crypt_info: +lib80211_crypt_info_free (&ieee->crypt_info); +rtllib_networks_free (ieee); +free_netdev:free_netdev (dev); +return NULL ; }EXPORT_SYMBOL (alloc_rtllib);
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 206/846 samples/bpf: Install libbpf headers when building
In reply to Greg Kroah-HartmanFrom: Quentin Monnet <[email protected]>
[ Upstream commit 3f7a3318a7c60947e27be372950840a5eab976d0 ]
API headers from libbpf should not be accessed directly from the source directory. Instead, they should be exported with "make install_headers". Make sure that samples/bpf/Makefile installs the headers properly when building.
The object compiled from and exported by libbpf are now placed into a subdirectory of sample/bpf/ instead of remaining in tools/lib/bpf/. We attempt to remove this directory on "make clean". However, the "clean" target re-enters the samples/bpf/ directory from the root of the repository ("$(MAKE) -C ../../ M=$(CURDIR) clean"), in such a way that $(srctree) and $(src) are not defined, making it impossible to use $(LIBBPF_OUTPUT) and $(LIBBPF_DESTDIR) in the recipe. So we only attempt to clean $(CURDIR)/libbpf, which is the default value.
Add a dependency on libbpf's headers for the $(TRACE_HELPERS).
We also change the output directory for bpftool, to place the generated objects under samples/bpf/bpftool/ instead of building in bpftool's directory directly. Doing so, we make sure bpftool reuses the libbpf library previously compiled and installed.
--- samples/bpf/Makefile | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-)
samples/bpf/Makefile +30 -10
@@ -59,7 +59,11 @@ tprogs-y += xdp_redirect tprogs-y += xdp_monitor # Libbpf dependencies -LIBBPF = $(TOOLS_PATH)/lib/bpf/libbpf.a +LIBBPF_SRC = $(TOOLS_PATH)/lib/bpf +LIBBPF_OUTPUT = $(abspath $(BPF_SAMPLES_PATH))/libbpf +LIBBPF_DESTDIR = $(LIBBPF_OUTPUT) +LIBBPF_INCLUDE = $(LIBBPF_DESTDIR)/include +LIBBPF = $(LIBBPF_OUTPUT)/libbpf.a CGROUP_HELPERS := ../../tools/testing/selftests/bpf/cgroup_helpers.o TRACE_HELPERS := ../../tools/testing/selftests/bpf/trace_helpers.o
@@ -198,7 +202,7 @@ TPROGS_CFLAGS += -Wstrict-prototypes TPROGS_CFLAGS += -I$(objtree)/usr/include TPROGS_CFLAGS += -I$(srctree)/tools/testing/selftests/bpf/ -TPROGS_CFLAGS += -I$(srctree)/tools/lib/ +TPROGS_CFLAGS += -I$(LIBBPF_INCLUDE) TPROGS_CFLAGS += -I$(srctree)/tools/include TPROGS_CFLAGS += -I$(srctree)/tools/perf TPROGS_CFLAGS += -DHAVE_ATTR_TEST=0
@@ -268,16 +272,27 @@ all: clean: $(MAKE) -C ../../ M=$(CURDIR) clean @find $(CURDIR) -type f -name '*~' -delete + @$(RM) -r $(CURDIR)/libbpf $(CURDIR)/bpftool -$(LIBBPF): FORCE +$(LIBBPF): FORCE | $(LIBBPF_OUTPUT) # Fix up variables inherited from Kbuild that tools/ build system won't like - $(MAKE) -C $(dir $@) RM='rm -rf' EXTRA_CFLAGS="$(TPROGS_CFLAGS)" \ - LDFLAGS=$(TPROGS_LDFLAGS) srctree=$(BPF_SAMPLES_PATH)/../../ O= + $(MAKE) -C $(LIBBPF_SRC) RM='rm -rf' EXTRA_CFLAGS="$(TPROGS_CFLAGS)" \ + LDFLAGS=$(TPROGS_LDFLAGS) srctree=$(BPF_SAMPLES_PATH)/../../ \ + O= OUTPUT=$(LIBBPF_OUTPUT)/ DESTDIR=$(LIBBPF_DESTDIR) prefix= \ + $@ install_headers BPFTOOLDIR := $(TOOLS_PATH)/bpf/bpftool -BPFTOOL := $(BPFTOOLDIR)/bpftool -$(BPFTOOL): $(wildcard $(BPFTOOLDIR)/*.[ch] $(BPFTOOLDIR)/Makefile) - $(MAKE) -C $(BPFTOOLDIR) srctree=$(BPF_SAMPLES_PATH)/../../ +BPFTOOL_OUTPUT := $(abspath $(BPF_SAMPLES_PATH))/bpftool +BPFTOOL := $(BPFTOOL_OUTPUT)/bpftool +$(BPFTOOL): $(LIBBPF) $(wildcard $(BPFTOOLDIR)/*.[ch] $(BPFTOOLDIR)/Makefile) | $(BPFTOOL_OUTPUT) + $(MAKE) -C $(BPFTOOLDIR) srctree=$(BPF_SAMPLES_PATH)/../../ \ + OUTPUT=$(BPFTOOL_OUTPUT)/ \ + LIBBPF_OUTPUT=$(LIBBPF_OUTPUT)/ \ + LIBBPF_DESTDIR=$(LIBBPF_DESTDIR)/ + +$(LIBBPF_OUTPUT) $(BPFTOOL_OUTPUT): + $(call msg,MKDIR,$@) + $(Q)mkdir -p $@ $(obj)/syscall_nrs.h: $(obj)/syscall_nrs.s FORCE $(call filechk,offsets,__SYSCALL_NRS_H__)
@@ -309,6 +324,11 @@ verify_target_bpf: verify_cmds $(BPF_SAMPLES_PATH)/*.c: verify_target_bpf $(LIBBPF) $(src)/*.c: verify_target_bpf $(LIBBPF) +libbpf_hdrs: $(LIBBPF) +$(obj)/$(TRACE_HELPERS): | libbpf_hdrs + +.PHONY: libbpf_hdrs + $(obj)/xdp_redirect_cpu_user.o: $(obj)/xdp_redirect_cpu.skel.h $(obj)/xdp_redirect_map_multi_user.o: $(obj)/xdp_redirect_map_multi.skel.h $(obj)/xdp_redirect_map_user.o: $(obj)/xdp_redirect_map.skel.h
@@ -366,7 +386,7 @@ $(obj)/%.bpf.o: $(src)/%.bpf.c $(obj)/vmlinux.h $(src)/xdp_sample.bpf.h $(src)/x $(Q)$(CLANG) -g -O2 -target bpf -D__TARGET_ARCH_$(SRCARCH) \ -Wno-compare-distinct-pointer-types -I$(srctree)/include \ -I$(srctree)/samples/bpf -I$(srctree)/tools/include \ - -I$(srctree)/tools/lib $(CLANG_SYS_INCLUDES) \ + -I$(LIBBPF_INCLUDE) $(CLANG_SYS_INCLUDES) \ -c $(filter %.bpf.c,$^) -o $@ LINKED_SKELS := xdp_redirect_cpu.skel.h xdp_redirect_map_multi.skel.h \
@@ -403,7 +423,7 @@ $(obj)/%.o: $(src)/%.c @echo " CLANG-bpf " $@ $(Q)$(CLANG) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(BPF_EXTRA_CFLAGS) \ -I$(obj) -I$(srctree)/tools/testing/selftests/bpf/ \ - -I$(srctree)/tools/lib/ \ + -I$(LIBBPF_INCLUDE) \ -D__KERNEL__ -D__BPF_TRACING__ -Wno-unused-value -Wno-pointer-sign \ -D__TARGET_ARCH_$(SRCARCH) -Wno-compare-distinct-pointer-types \ -Wno-gnu-variable-sized-type-not-at-end \
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 207/846 samples/bpf: Clean up samples/bpf build failes
In reply to Greg Kroah-HartmanFrom: Andrii Nakryiko <[email protected]>
[ Upstream commit 527024f7aeb683ce7ef49b07ef7ce9ecf015288d ]
Remove xdp_samples_user.o rule redefinition which generates Makefile warning and instead override TPROGS_CFLAGS. This seems to work fine when building inside selftests/bpf.
That was one big head-scratcher before I found that generic Makefile.target hid this surprising specialization for for xdp_samples_user.o.
Main change is to use actual locally installed libbpf headers.
Also drop printk macro re-definition (not even used!).
--- samples/bpf/Makefile | 13 ++++++++++++- samples/bpf/Makefile.target | 11 ----------- samples/bpf/hbm_kern.h | 2 -- samples/bpf/lwt_len_hist_kern.c | 7 ------- 4 files changed, 12 insertions(+), 21 deletions(-)
samples/bpf/Makefile +12 -1
@@ -325,7 +325,7 @@ $(BPF_SAMPLES_PATH)/*.c: verify_target_bpf $(LIBBPF) $(src)/*.c: verify_target_bpf $(LIBBPF) libbpf_hdrs: $(LIBBPF) -$(obj)/$(TRACE_HELPERS): | libbpf_hdrs +$(obj)/$(TRACE_HELPERS) $(obj)/$(CGROUP_HELPERS) $(obj)/$(XDP_SAMPLE): | libbpf_hdrs .PHONY: libbpf_hdrs
@@ -340,6 +340,17 @@ $(obj)/hbm_out_kern.o: $(src)/hbm.h $(src)/hbm_kern.h $(obj)/hbm.o: $(src)/hbm.h $(obj)/hbm_edt_kern.o: $(src)/hbm.h $(src)/hbm_kern.h +# Override includes for xdp_sample_user.o because $(srctree)/usr/include in +# TPROGS_CFLAGS causes conflicts +XDP_SAMPLE_CFLAGS += -Wall -O2 -lm \ + -I$(src)/../../tools/include \ + -I$(src)/../../tools/include/uapi \ + -I$(LIBBPF_INCLUDE) \ + -I$(src)/../../tools/testing/selftests/bpf + +$(obj)/$(XDP_SAMPLE): TPROGS_CFLAGS = $(XDP_SAMPLE_CFLAGS) +$(obj)/$(XDP_SAMPLE): $(src)/xdp_sample_user.h $(src)/xdp_sample_shared.h + -include $(BPF_SAMPLES_PATH)/Makefile.target VMLINUX_BTF_PATHS ?= $(abspath $(if $(O),$(O)/vmlinux)) \
samples/bpf/Makefile.target +0 -11
@@ -73,14 +73,3 @@ quiet_cmd_tprog-cobjs = CC $@ cmd_tprog-cobjs = $(CC) $(tprogc_flags) -c -o $@ $< $(tprog-cobjs): $(obj)/%.o: $(src)/%.c FORCE $(call if_changed_dep,tprog-cobjs) - -# Override includes for xdp_sample_user.o because $(srctree)/usr/include in -# TPROGS_CFLAGS causes conflicts -XDP_SAMPLE_CFLAGS += -Wall -O2 -lm \ - -I./tools/include \ - -I./tools/include/uapi \ - -I./tools/lib \ - -I./tools/testing/selftests/bpf -$(obj)/xdp_sample_user.o: $(src)/xdp_sample_user.c \ - $(src)/xdp_sample_user.h $(src)/xdp_sample_shared.h - $(CC) $(XDP_SAMPLE_CFLAGS) -c -o $@ $<
samples/bpf/hbm_kern.h +0 -2
@@ -9,8 +9,6 @@* Include file for sample Host Bandwidth Manager (HBM) BPF programs */ #define KBUILD_MODNAME "foo" -#include <stddef.h> -#include <stdbool.h> #include <uapi/linux/bpf.h> #include <uapi/linux/if_ether.h> #include <uapi/linux/if_packet.h>
samples/bpf/lwt_len_hist_kern.c +0 -7
@@ -16,13 +16,6 @@#include <uapi/linux/in.h> #include <bpf/bpf_helpers.h> -# define printk (fmt, ...) \ - ({ \ - char ____fmt[] = fmt; \ - bpf_trace_printk(____fmt, sizeof(____fmt), \ - ##__VA_ARGS__); \ - }) -struct bpf_elf_map {__u32 type;__u32 size_key;
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 184/846 drm/radeon/radeon_kms: Fix a NULL pointer dereference in radeon_driver_open_kms()
In reply to Greg Kroah-HartmanFrom: Zhou Qingyang <[email protected]>
[ Upstream commit ab50cb9df8896b39aae65c537a30de2c79c19735 ]
In radeon_driver_open_kms(), radeon_vm_bo_add() is assigned to vm->ib_bo_va and passes and used in radeon_vm_bo_set_addr(). In radeon_vm_bo_set_addr(), there is a dereference of vm->ib_bo_va, which could lead to a NULL pointer dereference on failure of radeon_vm_bo_add().
Fix this bug by adding a check of vm->ib_bo_va.
This bug was found by a static analyzer. The analysis employs differential checking to identify inconsistent security operations (e.g., checks or kfrees) between two code paths and confirms that the inconsistent operations are not recovered in the current function or the callers, so they constitute bugs.
Note that, as a bug found by static analysis, it can be a false positive or hard to trigger. Multiple researchers have cross-reviewed the bug.
Builds with CONFIG_DRM_RADEON=m show no new warnings, and our static analyzer no longer warns about this code.
--- drivers/gpu/drm/radeon/radeon_kms.c | 36 ++++++++++++++++------------- 1 file changed, 20 insertions(+), 16 deletions(-)
drivers/gpu/drm/radeon/radeon_kms.c +20 -16
@@ -648,6 +648,8 @@ void radeon_driver_lastclose_kms(struct drm_device *dev)int radeon_driver_open_kms (struct drm_device *dev,struct drm_file *file_priv) {struct radeon_device *rdev = dev->dev_private; +struct radeon_fpriv *fpriv; +struct radeon_vm *vm;int r; file_priv->driver_priv =NULL ;
@@ -660,8 +662,6 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)/* new gpu have virtual address space support */ if (rdev->family >=CHIP_CAYMAN ) { -struct radeon_fpriv *fpriv; -struct radeon_vm *vm; fpriv =kzalloc (sizeof (*fpriv),GFP_KERNEL );if (unlikely (!fpriv)) {
@@ -672,35 +672,39 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)if (rdev->accel_working) { vm = &fpriv->vm; r =radeon_vm_init (rdev, vm); -if (r) { -kfree (fpriv); - goto out_suspend; - } +if (r) + goto out_fpriv; r =radeon_bo_reserve (rdev->ring_tmp_bo.bo, false); -if (r) { -radeon_vm_fini (rdev, vm); -kfree (fpriv); - goto out_suspend; - } +if (r) + goto out_vm_fini;/* map the ib pool buffer read only into * virtual address space */ vm->ib_bo_va =radeon_vm_bo_add (rdev, vm, rdev->ring_tmp_bo.bo); +if (!vm->ib_bo_va) { + r = -ENOMEM ; + goto out_vm_fini; + } + r =radeon_vm_bo_set_addr (rdev, vm->ib_bo_va,RADEON_VA_IB_OFFSET ,RADEON_VM_PAGE_READABLE |RADEON_VM_PAGE_SNOOPED ); -if (r) { -radeon_vm_fini (rdev, vm); -kfree (fpriv); - goto out_suspend; - } +if (r) + goto out_vm_fini; } file_priv->driver_priv = fpriv; } +if (!r) + goto out_suspend; + +out_vm_fini: +radeon_vm_fini (rdev, vm); +out_fpriv: +kfree (fpriv); out_suspend:pm_runtime_mark_last_busy (dev->dev);pm_runtime_put_autosuspend (dev->dev);
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 187/846 arm64: dts: ti: k3-am642: Fix the L2 cache sets
In reply to Greg Kroah-HartmanFrom: Nishanth Menon <[email protected]>
[ Upstream commit a27a93bf70045be54b594fa8482959ffb84166d7 ]
A53's L2 cache[1] on AM642[2] is 256KB. A53's L2 is fixed line length of 64 bytes and 16-way set-associative cache structure.
256KB of L2 / 64 (line length) = 4096 ways
4096 ways / 16 = 256 sets
Fix the l2 cache-sets.
[1] https://developer.arm.com/documentation/ddi0500/j/Level-2-Memory-System/About-the-L2-memory-system?lang=en
[2] https://www.ti.com/lit/pdf/spruim2
--- arch/arm64/boot/dts/ti/k3-am642.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/ti/k3-am642.dtsi +1 -1
@@ -60,6 +60,6 @@ cache-level = <2>; cache-size = <0x40000>; cache-line-size = <64>; - cache-sets = <512>; + cache-sets = <256>; }; };
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 186/846 crypto: caam - save caam memory to support crypto engine retry mechanism.
In reply to Greg Kroah-HartmanFrom: Gaurav Jain <[email protected]>
[ Upstream commit 087e1d715bccf25dc0e83294576e416b0386ba20 ]
When caam queue is full (-ENOSPC), caam frees descriptor memory. crypto-engine checks if retry support is true and h/w queue is full(-ENOSPC), then requeue the crypto request.
During processing the requested descriptor again, caam gives below error. (caam_jr 30902000.jr: 40000006: DECO: desc idx 0: Invalid KEY Command).
This patch adds a check to return when caam input ring is full and retry support is true. so descriptor memory is not freed and requeued request can be processed again.
--- drivers/crypto/caam/caamalg.c | 6 ++++++ drivers/crypto/caam/caamhash.c | 3 +++ drivers/crypto/caam/caampkc.c | 3 +++ 3 files changed, 12 insertions(+)
drivers/crypto/caam/caamalg.c +6 -0
@@ -1533,6 +1533,9 @@ static int aead_do_one_req(struct crypto_engine *engine, void *areq) ret =caam_jr_enqueue (ctx->jrdev, desc, aead_crypt_done, req); +if (ret == -ENOSPC && engine->retry_support) +return ret; +if (ret != -EINPROGRESS ) {aead_unmap (ctx->jrdev, rctx->edesc, req);kfree (rctx->edesc);
@@ -1762,6 +1765,9 @@ static int skcipher_do_one_req(struct crypto_engine *engine, void *areq) ret =caam_jr_enqueue (ctx->jrdev, desc, skcipher_crypt_done, req); +if (ret == -ENOSPC && engine->retry_support) +return ret; +if (ret != -EINPROGRESS ) {skcipher_unmap (ctx->jrdev, rctx->edesc, req);kfree (rctx->edesc);
drivers/crypto/caam/caamhash.c +3 -0
@@ -765,6 +765,9 @@ static int ahash_do_one_req(struct crypto_engine *engine, void *areq) ret =caam_jr_enqueue (jrdev, desc, state->ahash_op_done, req); +if (ret == -ENOSPC && engine->retry_support) +return ret; +if (ret != -EINPROGRESS ) {ahash_unmap (jrdev, state->edesc, req,0 );kfree (state->edesc);
drivers/crypto/caam/caampkc.c +3 -0
@@ -380,6 +380,9 @@ static int akcipher_do_one_req(struct crypto_engine *engine, void *areq) ret =caam_jr_enqueue (jrdev, desc, req_ctx->akcipher_op_done, req); +if (ret == -ENOSPC && engine->retry_support) +return ret; +if (ret != -EINPROGRESS ) {rsa_pub_unmap (jrdev, req_ctx->edesc, req);rsa_io_unmap (jrdev, req_ctx->edesc, req);
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 231/846 crypto: stm32/cryp - fix CTR counter carry
In reply to Greg Kroah-HartmanFrom: Nicolas Toromanoff <[email protected]>
[ Upstream commit 41c76690b0990efacd15d35cfb4e77318cd80ebb ]
STM32 CRYP hardware doesn't manage CTR counter bigger than max U32, as a workaround, at each block the current IV is saved, if the saved IV lower u32 is 0xFFFFFFFF, the full IV is manually incremented, and set in hardware.
--- drivers/crypto/stm32/stm32-cryp.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-)
drivers/crypto/stm32/stm32-cryp.c +13 -14
@@ -163,7 +163,7 @@ struct stm32_cryp {struct scatter_walk in_walk;struct scatter_walk out_walk; -u32 last_ctr[4 ]; +__be32 last_ctr[4 ];u32 gcm_ctr; };
@@ -1217,27 +1217,26 @@ static void stm32_cryp_check_ctr_counter(struct stm32_cryp *cryp) {u32 cr; -if (unlikely (cryp->last_ctr[3 ] ==0xFFFFFFFF )) { - cryp->last_ctr[3 ] =0 ; - cryp->last_ctr[2 ]++; -if (!cryp->last_ctr[2 ]) { - cryp->last_ctr[1 ]++; -if (!cryp->last_ctr[1 ]) - cryp->last_ctr[0 ]++; - } +if (unlikely (cryp->last_ctr[3 ] ==cpu_to_be32 (0xFFFFFFFF ))) { +/* +* In this case, we need to increment manually the ctr counter, +* as HW doesn't handle the U32 carry. +*/ +crypto_inc ((u8 *)cryp->last_ctr,sizeof (cryp->last_ctr)); cr =stm32_cryp_read (cryp,CRYP_CR );stm32_cryp_write (cryp,CRYP_CR , cr & ~CR_CRYPEN ); -stm32_cryp_hw_write_iv (cryp, (__be32 *)cryp->last_ctr); +stm32_cryp_hw_write_iv (cryp, cryp->last_ctr);stm32_cryp_write (cryp,CRYP_CR , cr); } - cryp->last_ctr[0 ] =stm32_cryp_read (cryp,CRYP_IV0LR ); - cryp->last_ctr[1 ] =stm32_cryp_read (cryp,CRYP_IV0RR ); - cryp->last_ctr[2 ] =stm32_cryp_read (cryp,CRYP_IV1LR ); - cryp->last_ctr[3 ] =stm32_cryp_read (cryp,CRYP_IV1RR ); +/* The IV registers are BE */ + cryp->last_ctr[0 ] =cpu_to_be32 (stm32_cryp_read (cryp,CRYP_IV0LR )); + cryp->last_ctr[1 ] =cpu_to_be32 (stm32_cryp_read (cryp,CRYP_IV0RR )); + cryp->last_ctr[2 ] =cpu_to_be32 (stm32_cryp_read (cryp,CRYP_IV1LR )); + cryp->last_ctr[3 ] =cpu_to_be32 (stm32_cryp_read (cryp,CRYP_IV1RR )); }static bool stm32_cryp_irq_read_data (struct stm32_cryp *cryp)
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 236/846 crypto: stm32/cryp - fix bugs and crash in tests
In reply to Greg Kroah-HartmanFrom: Nicolas Toromanoff <[email protected]>
[ Upstream commit 4b898d5cfa4d9a0ad5bc82cb5eafdc092394c6a9 ]
Extra crypto manager auto test were crashing or failling due to 2 reasons:
- block in a dead loop (dues to issues in cipher end process management)
- crash due to read/write unmapped memory (this crash was also reported when using openssl afalg engine)
Rework interrupt management, interrupts are masked as soon as they are no more used: if input buffer is fully consumed, "Input FIFO not full" interrupt is masked and if output buffer is full, "Output FIFO not empty" interrupt is masked.
And crypto request finish when input *and* outpout buffer are fully read/write.
About the crash due to unmapped memory, using scatterwalk_copychunks() that will map and copy each block fix the issue.
Using this api and copying full block will also fix unaligned data access, avoid early copy of in/out buffer, and make useless the extra alignment constraint.
--- drivers/crypto/stm32/stm32-cryp.c | 790 +++++++++--------------------- 1 file changed, 243 insertions(+), 547 deletions(-)
drivers/crypto/stm32/stm32-cryp.c +243 -547
@@ -37,7 +37,6 @@/* Mode mask = bits [15..0] */ #define FLG_MODE_MASK GENMASK(15, 0)/* Bit [31..16] status */ -#define FLG_CCM_PADDED_WA BIT(16)/* Registers */ #define CRYP_CR 0x00000000
@@ -105,8 +104,6 @@/* Misc */ #define AES_BLOCK_32 (AES_BLOCK_SIZE / sizeof(u32))#define GCM_CTR_INIT 2 -#define _walked_in (cryp->in_walk.offset - cryp->in_sg->offset) -#define _walked_out (cryp->out_walk.offset - cryp->out_sg->offset)#define CRYP_AUTOSUSPEND_DELAY 50struct stm32_cryp_caps {
@@ -144,21 +141,11 @@ struct stm32_cryp {size_t authsize;size_t hw_blocksize; -size_t total_in; -size_t total_in_save; -size_t total_out; -size_t total_out_save; +size_t payload_in; +size_t header_in; +size_t payload_out; -struct scatterlist *in_sg;struct scatterlist *out_sg; -struct scatterlist *out_sg_save; - -struct scatterlist in_sgl; -struct scatterlist out_sgl; -bool sgs_copied; - -int in_sg_len; -int out_sg_len;struct scatter_walk in_walk;struct scatter_walk out_walk;
@@ -262,6 +249,7 @@ static inline int stm32_cryp_wait_output(struct stm32_cryp *cryp) }static int stm32_cryp_read_auth_tag (struct stm32_cryp *cryp); +static void stm32_cryp_finish_req (struct stm32_cryp *cryp,int err);static struct stm32_cryp *stm32_cryp_find_dev (struct stm32_cryp_ctx *ctx) {
@@ -283,103 +271,6 @@ static struct stm32_cryp *stm32_cryp_find_dev(struct stm32_cryp_ctx *ctx)return cryp; } -static int stm32_cryp_check_aligned (struct scatterlist *sg,size_t total, -size_t align) -{ -int len =0 ; - -if (!total) -return 0 ; - -if (!IS_ALIGNED (total, align)) -return -EINVAL ; - -while (sg) { -if (!IS_ALIGNED (sg->offset,sizeof (u32))) -return -EINVAL ; - -if (!IS_ALIGNED (sg->length, align)) -return -EINVAL ; - - len += sg->length; - sg =sg_next (sg); - } - -if (len != total) -return -EINVAL ; - -return 0 ; -} - -static int stm32_cryp_check_io_aligned (struct stm32_cryp *cryp) -{ -int ret; - - ret =stm32_cryp_check_aligned (cryp->in_sg, cryp->total_in, - cryp->hw_blocksize); -if (ret) -return ret; - - ret =stm32_cryp_check_aligned (cryp->out_sg, cryp->total_out, - cryp->hw_blocksize); - -return ret; -} - -static void sg_copy_buf (void *buf,struct scatterlist *sg, -unsigned int start,unsigned int nbytes,int out) -{ -struct scatter_walk walk; - -if (!nbytes) -return ; - -scatterwalk_start (&walk, sg); -scatterwalk_advance (&walk, start); -scatterwalk_copychunks (buf, &walk, nbytes, out); -scatterwalk_done (&walk, out,0 ); -} - -static int stm32_cryp_copy_sgs (struct stm32_cryp *cryp) -{ -void *buf_in, *buf_out; -int pages, total_in, total_out; - -if (!stm32_cryp_check_io_aligned (cryp)) { - cryp->sgs_copied =0 ; -return 0 ; - } - - total_in =ALIGN (cryp->total_in, cryp->hw_blocksize); - pages = total_in ?get_order (total_in) :1 ; - buf_in = (void *)__get_free_pages (GFP_ATOMIC , pages); - - total_out =ALIGN (cryp->total_out, cryp->hw_blocksize); - pages = total_out ?get_order (total_out) :1 ; - buf_out = (void *)__get_free_pages (GFP_ATOMIC , pages); - -if (!buf_in || !buf_out) { -dev_err (cryp->dev,"Can't allocate pages when unaligned\n" ); - cryp->sgs_copied =0 ; -return -EFAULT ; - } - -sg_copy_buf (buf_in, cryp->in_sg,0 , cryp->total_in,0 ); - -sg_init_one (&cryp->in_sgl, buf_in, total_in); - cryp->in_sg = &cryp->in_sgl; - cryp->in_sg_len =1 ; - -sg_init_one (&cryp->out_sgl, buf_out, total_out); - cryp->out_sg_save = cryp->out_sg; - cryp->out_sg = &cryp->out_sgl; - cryp->out_sg_len =1 ; - - cryp->sgs_copied =1 ; - -return 0 ; -} -static void stm32_cryp_hw_write_iv (struct stm32_cryp *cryp,__be32 *iv) {if (!iv)
@@ -481,16 +372,99 @@ static int stm32_cryp_gcm_init(struct stm32_cryp *cryp, u32 cfg)/* Wait for end of processing */ ret =stm32_cryp_wait_enable (cryp); -if (ret) +if (ret) {dev_err (cryp->dev,"Timeout (gcm init)\n" ); +return ret; + } -return ret; +/* Prepare next phase */ +if (cryp->areq->assoclen) { + cfg |=CR_PH_HEADER ; +stm32_cryp_write (cryp,CRYP_CR , cfg); + }else if (stm32_cryp_get_input_text_len (cryp)) { + cfg |=CR_PH_PAYLOAD ; +stm32_cryp_write (cryp,CRYP_CR , cfg); + } + +return 0 ; +} + +static void stm32_crypt_gcmccm_end_header (struct stm32_cryp *cryp) +{ +u32 cfg; +int err; + +/* Check if whole header written */ +if (!cryp->header_in) { +/* Wait for completion */ + err =stm32_cryp_wait_busy (cryp); +if (err) { +dev_err (cryp->dev,"Timeout (gcm/ccm header)\n" ); +stm32_cryp_write (cryp,CRYP_IMSCR ,0 ); +stm32_cryp_finish_req (cryp, err); +return ; + } + +if (stm32_cryp_get_input_text_len (cryp)) { +/* Phase 3 : payload */ + cfg =stm32_cryp_read (cryp,CRYP_CR ); + cfg &= ~CR_CRYPEN ; +stm32_cryp_write (cryp,CRYP_CR , cfg); + + cfg &= ~CR_PH_MASK ; + cfg |=CR_PH_PAYLOAD |CR_CRYPEN ; +stm32_cryp_write (cryp,CRYP_CR , cfg); + }else { +/* +* Phase 4 : tag. +* Nothing to read, nothing to write, caller have to +* end request +*/ + } + } +} + +static void stm32_cryp_write_ccm_first_header (struct stm32_cryp *cryp) +{ +unsigned int i; +size_t written; +size_t len; +u32 alen = cryp->areq->assoclen; +u32 block[AES_BLOCK_32 ] = {0 }; +u8 *b8 = (u8 *)block; + +if (alen <=65280 ) { +/* Write first u32 of B1 */ + b8[0 ] = (alen >>8 ) &0xFF ; + b8[1 ] = alen &0xFF ; + len =2 ; + }else { +/* Build the two first u32 of B1 */ + b8[0 ] =0xFF ; + b8[1 ] =0xFE ; + b8[2 ] = (alen &0xFF000000 ) >>24 ; + b8[3 ] = (alen &0x00FF0000 ) >>16 ; + b8[4 ] = (alen &0x0000FF00 ) >>8 ; + b8[5 ] = alen &0x000000FF ; + len =6 ; + } + + written =min_t (size_t,AES_BLOCK_SIZE - len, alen); + +scatterwalk_copychunks ((char *)block + len, &cryp->in_walk, written,0 ); +for (i =0 ; i <AES_BLOCK_32 ; i++) +stm32_cryp_write (cryp,CRYP_DIN , block[i]); + + cryp->header_in -= written; + +stm32_crypt_gcmccm_end_header (cryp); }static int stm32_cryp_ccm_init (struct stm32_cryp *cryp,u32 cfg) {int ret; -u8 iv[AES_BLOCK_SIZE ], b0[AES_BLOCK_SIZE ]; +u32 iv_32[AES_BLOCK_32 ], b0_32[AES_BLOCK_32 ]; +u8 *iv = (u8 *)iv_32, *b0 = (u8 *)b0_32;__be32 *bd;u32 *d;unsigned int i, textlen;
@@ -531,17 +505,30 @@ static int stm32_cryp_ccm_init(struct stm32_cryp *cryp, u32 cfg)/* Wait for end of processing */ ret =stm32_cryp_wait_enable (cryp); -if (ret) +if (ret) {dev_err (cryp->dev,"Timeout (ccm init)\n" ); +return ret; + } -return ret; +/* Prepare next phase */ +if (cryp->areq->assoclen) { + cfg |=CR_PH_HEADER |CR_CRYPEN ; +stm32_cryp_write (cryp,CRYP_CR , cfg); + +/* Write first (special) block (may move to next phase [payload]) */ +stm32_cryp_write_ccm_first_header (cryp); + }else if (stm32_cryp_get_input_text_len (cryp)) { + cfg |=CR_PH_PAYLOAD ; +stm32_cryp_write (cryp,CRYP_CR , cfg); + } + +return 0 ; }static int stm32_cryp_hw_init (struct stm32_cryp *cryp) {int ret;u32 cfg, hw_mode; -pm_runtime_resume_and_get (cryp->dev);/* Disable interrupt */
@@ -605,16 +592,6 @@ static int stm32_cryp_hw_init(struct stm32_cryp *cryp)if (ret)return ret; -/* Phase 2 : header (authenticated data) */ -if (cryp->areq->assoclen) { - cfg |=CR_PH_HEADER ; - }else if (stm32_cryp_get_input_text_len (cryp)) { - cfg |=CR_PH_PAYLOAD ; -stm32_cryp_write (cryp,CRYP_CR , cfg); - }else { - cfg |=CR_PH_INIT ; - } -break ;case CR_DES_CBC :
@@ -633,8 +610,6 @@ static int stm32_cryp_hw_init(struct stm32_cryp *cryp)stm32_cryp_write (cryp,CRYP_CR , cfg); - cryp->flags &= ~FLG_CCM_PADDED_WA ; -return 0 ; }
@@ -647,25 +622,6 @@ static void stm32_cryp_finish_req(struct stm32_cryp *cryp, int err)if (!err && (!(is_gcm (cryp) ||is_ccm (cryp) ||is_ecb (cryp))))stm32_cryp_get_iv (cryp); -if (cryp->sgs_copied) { -void *buf_in, *buf_out; -int pages, len; - - buf_in =sg_virt (&cryp->in_sgl); - buf_out =sg_virt (&cryp->out_sgl); - -sg_copy_buf (buf_out, cryp->out_sg_save,0 , - cryp->total_out_save,1 ); - - len =ALIGN (cryp->total_in_save, cryp->hw_blocksize); - pages = len ?get_order (len) :1 ; -free_pages ((unsigned long )buf_in, pages); - - len =ALIGN (cryp->total_out_save, cryp->hw_blocksize); - pages = len ?get_order (len) :1 ; -free_pages ((unsigned long )buf_out, pages); - } -pm_runtime_mark_last_busy (cryp->dev);pm_runtime_put_autosuspend (cryp->dev);
@@ -1029,6 +985,7 @@ static int stm32_cryp_prepare_req(struct skcipher_request *req,struct stm32_cryp_ctx *ctx;struct stm32_cryp *cryp;struct stm32_cryp_reqctx *rctx; +struct scatterlist *in_sg;int ret;if (!req && !areq)
@@ -1054,76 +1011,55 @@ static int stm32_cryp_prepare_req(struct skcipher_request *req,if (req) { cryp->req = req; cryp->areq =NULL ; - cryp->total_in = req->cryptlen; - cryp->total_out = cryp->total_in; + cryp->header_in =0 ; + cryp->payload_in = req->cryptlen; + cryp->payload_out = req->cryptlen; + cryp->authsize =0 ; }else {/* * Length of input and output data: * Encryption case: -* INPUT = AssocData || PlainText +* INPUT = AssocData || PlainText * <- assoclen -> <- cryptlen -> -* <------- total_in -----------> * -* OUTPUT = AssocData || CipherText || AuthTag -* <- assoclen -> <- cryptlen -> <- authsize -> -* <---------------- total_out -----------------> +* OUTPUT = AssocData || CipherText || AuthTag +* <- assoclen -> <-- cryptlen --> <- authsize -> * * Decryption case: -* INPUT = AssocData || CipherText || AuthTag -* <- assoclen -> <--------- cryptlen ---------> -* <- authsize -> -* <---------------- total_in ------------------> +* INPUT = AssocData || CipherTex || AuthTag +* <- assoclen ---> <---------- cryptlen ----------> * -* OUTPUT = AssocData || PlainText -* <- assoclen -> <- crypten - authsize -> -* <---------- total_out -----------------> +* OUTPUT = AssocData || PlainText +* <- assoclen -> <- cryptlen - authsize -> */ cryp->areq = areq; cryp->req =NULL ; cryp->authsize =crypto_aead_authsize (crypto_aead_reqtfm (areq)); - cryp->total_in = areq->assoclen + areq->cryptlen; -if (is_encrypt (cryp)) -/* Append auth tag to output */ - cryp->total_out = cryp->total_in + cryp->authsize; -else -/* No auth tag in output */ - cryp->total_out = cryp->total_in - cryp->authsize; +if (is_encrypt (cryp)) { + cryp->payload_in = areq->cryptlen; + cryp->header_in = areq->assoclen; + cryp->payload_out = areq->cryptlen; + }else { + cryp->payload_in = areq->cryptlen - cryp->authsize; + cryp->header_in = areq->assoclen; + cryp->payload_out = cryp->payload_in; + } } - cryp->total_in_save = cryp->total_in; - cryp->total_out_save = cryp->total_out; + in_sg = req ? req->src : areq->src; +scatterwalk_start (&cryp->in_walk, in_sg); - cryp->in_sg = req ? req->src : areq->src; cryp->out_sg = req ? req->dst : areq->dst; - cryp->out_sg_save = cryp->out_sg; - - cryp->in_sg_len =sg_nents_for_len (cryp->in_sg, cryp->total_in); -if (cryp->in_sg_len <0 ) { -dev_err (cryp->dev,"Cannot get in_sg_len\n" ); - ret = cryp->in_sg_len; -return ret; - } - - cryp->out_sg_len =sg_nents_for_len (cryp->out_sg, cryp->total_out); -if (cryp->out_sg_len <0 ) { -dev_err (cryp->dev,"Cannot get out_sg_len\n" ); - ret = cryp->out_sg_len; -return ret; - } - - ret =stm32_cryp_copy_sgs (cryp); -if (ret) -return ret; - -scatterwalk_start (&cryp->in_walk, cryp->in_sg);scatterwalk_start (&cryp->out_walk, cryp->out_sg);if (is_gcm (cryp) ||is_ccm (cryp)) {/* In output, jump after assoc data */ -scatterwalk_advance (&cryp->out_walk, cryp->areq->assoclen); - cryp->total_out -= cryp->areq->assoclen; +scatterwalk_copychunks (NULL , &cryp->out_walk, cryp->areq->assoclen,2 ); } +if (is_ctr (cryp)) +memset (cryp->last_ctr,0 ,sizeof (cryp->last_ctr)); + ret =stm32_cryp_hw_init (cryp);return ret; }
@@ -1171,8 +1107,7 @@ static int stm32_cryp_aead_one_req(struct crypto_engine *engine, void *areq)if (!cryp)return -ENODEV ; -if (unlikely (!cryp->areq->assoclen && - !stm32_cryp_get_input_text_len (cryp))) { +if (unlikely (!cryp->payload_in && !cryp->header_in)) {/* No input data to process: get tag and finish */ stm32_cryp_finish_req (cryp,0 );return 0 ;
@@ -1181,43 +1116,10 @@ static int stm32_cryp_aead_one_req(struct crypto_engine *engine, void *areq)return stm32_cryp_cpu_start (cryp); } -static u32 *stm32_cryp_next_out (struct stm32_cryp *cryp,u32 *dst, -unsigned int n) -{ -scatterwalk_advance (&cryp->out_walk, n); - -if (unlikely (cryp->out_sg->length == _walked_out)) { - cryp->out_sg =sg_next (cryp->out_sg); -if (cryp->out_sg) { -scatterwalk_start (&cryp->out_walk, cryp->out_sg); -return (sg_virt (cryp->out_sg) + _walked_out); - } - } - -return (u32 *)((u8 *)dst + n); -} - -static u32 *stm32_cryp_next_in (struct stm32_cryp *cryp,u32 *src, -unsigned int n) -{ -scatterwalk_advance (&cryp->in_walk, n); - -if (unlikely (cryp->in_sg->length == _walked_in)) { - cryp->in_sg =sg_next (cryp->in_sg); -if (cryp->in_sg) { -scatterwalk_start (&cryp->in_walk, cryp->in_sg); -return (sg_virt (cryp->in_sg) + _walked_in); - } - } - -return (u32 *)((u8 *)src + n); -} -static int stm32_cryp_read_auth_tag (struct stm32_cryp *cryp) { -u32 cfg, size_bit, *dst, d32; -u8 *d8; -unsigned int i, j; +u32 cfg, size_bit; +unsigned int i;int ret =0 ;/* Update Config */
@@ -1240,7 +1142,7 @@ static int stm32_cryp_read_auth_tag(struct stm32_cryp *cryp)stm32_cryp_write (cryp,CRYP_DIN , size_bit); size_bit =is_encrypt (cryp) ? cryp->areq->cryptlen : - cryp->areq->cryptlen -AES_BLOCK_SIZE ; + cryp->areq->cryptlen - cryp->authsize; size_bit *=8 ;if (cryp->caps->swap_final) size_bit = (__force u32 )cpu_to_be32 (size_bit);
@@ -1249,11 +1151,9 @@ static int stm32_cryp_read_auth_tag(struct stm32_cryp *cryp)stm32_cryp_write (cryp,CRYP_DIN , size_bit); }else {/* CCM: write CTR0 */ -u8 iv[AES_BLOCK_SIZE ]; -u32 *iv32 = (u32 *)iv; -__be32 *biv; - - biv = (void *)iv; +u32 iv32[AES_BLOCK_32 ]; +u8 *iv = (u8 *)iv32; +__be32 *biv = (__be32 *)iv32;memcpy (iv, cryp->areq->iv,AES_BLOCK_SIZE );memset (iv +AES_BLOCK_SIZE -1 - iv[0 ],0 , iv[0 ] +1 );
@@ -1275,39 +1175,18 @@ static int stm32_cryp_read_auth_tag(struct stm32_cryp *cryp) }if (is_encrypt (cryp)) { +u32 out_tag[AES_BLOCK_32 ]; +/* Get and write tag */ - dst =sg_virt (cryp->out_sg) + _walked_out; +for (i =0 ; i <AES_BLOCK_32 ; i++) + out_tag[i] =stm32_cryp_read (cryp,CRYP_DOUT ); -for (i =0 ; i <AES_BLOCK_32 ; i++) { -if (cryp->total_out >=sizeof (u32)) { -/* Read a full u32 */ - *dst =stm32_cryp_read (cryp,CRYP_DOUT ); - - dst =stm32_cryp_next_out (cryp, dst, -sizeof (u32)); - cryp->total_out -=sizeof (u32); - }else if (!cryp->total_out) { -/* Empty fifo out (data from input padding) */ -stm32_cryp_read (cryp,CRYP_DOUT ); - }else { -/* Read less than an u32 */ - d32 =stm32_cryp_read (cryp,CRYP_DOUT ); - d8 = (u8 *)&d32; - -for (j =0 ; j < cryp->total_out; j++) { - *((u8 *)dst) = *(d8++); - dst =stm32_cryp_next_out (cryp, dst,1 ); - } - cryp->total_out =0 ; - } - } +scatterwalk_copychunks (out_tag, &cryp->out_walk, cryp->authsize,1 ); }else {/* Get and check tag */ u32 in_tag[AES_BLOCK_32 ], out_tag[AES_BLOCK_32 ]; -scatterwalk_map_and_copy (in_tag, cryp->in_sg, - cryp->total_in_save - cryp->authsize, - cryp->authsize,0 ); +scatterwalk_copychunks (in_tag, &cryp->in_walk, cryp->authsize,0 );for (i =0 ; i <AES_BLOCK_32 ; i++) out_tag[i] =stm32_cryp_read (cryp,CRYP_DOUT );
@@ -1349,92 +1228,37 @@ static void stm32_cryp_check_ctr_counter(struct stm32_cryp *cryp) cryp->last_ctr[3 ] =cpu_to_be32 (stm32_cryp_read (cryp,CRYP_IV1RR )); } -static bool stm32_cryp_irq_read_data (struct stm32_cryp *cryp) +static void stm32_cryp_irq_read_data (struct stm32_cryp *cryp) { -unsigned int i, j; -u32 d32, *dst; -u8 *d8; -size_t tag_size; - -/* Do no read tag now (if any) */ -if (is_encrypt (cryp) && (is_gcm (cryp) ||is_ccm (cryp))) - tag_size = cryp->authsize; -else - tag_size =0 ; - - dst =sg_virt (cryp->out_sg) + _walked_out; - -for (i =0 ; i < cryp->hw_blocksize /sizeof (u32); i++) { -if (likely (cryp->total_out - tag_size >=sizeof (u32))) { -/* Read a full u32 */ - *dst =stm32_cryp_read (cryp,CRYP_DOUT ); +unsigned int i; +u32 block[AES_BLOCK_32 ]; - dst =stm32_cryp_next_out (cryp, dst,sizeof (u32)); - cryp->total_out -=sizeof (u32); - }else if (cryp->total_out == tag_size) { -/* Empty fifo out (data from input padding) */ - d32 =stm32_cryp_read (cryp,CRYP_DOUT ); - }else { -/* Read less than an u32 */ - d32 =stm32_cryp_read (cryp,CRYP_DOUT ); - d8 = (u8 *)&d32; - -for (j =0 ; j < cryp->total_out - tag_size; j++) { - *((u8 *)dst) = *(d8++); - dst =stm32_cryp_next_out (cryp, dst,1 ); - } - cryp->total_out = tag_size; - } - } +for (i =0 ; i < cryp->hw_blocksize /sizeof (u32); i++) + block[i] =stm32_cryp_read (cryp,CRYP_DOUT ); -return !(cryp->total_out - tag_size) || !cryp->total_in; +scatterwalk_copychunks (block, &cryp->out_walk,min_t (size_t, cryp->hw_blocksize, + cryp->payload_out),1 ); + cryp->payload_out -=min_t (size_t, cryp->hw_blocksize, + cryp->payload_out); }static void stm32_cryp_irq_write_block (struct stm32_cryp *cryp) { -unsigned int i, j; -u32 *src; -u8 d8[4 ]; -size_t tag_size; - -/* Do no write tag (if any) */ -if (is_decrypt (cryp) && (is_gcm (cryp) ||is_ccm (cryp))) - tag_size = cryp->authsize; -else - tag_size =0 ; - - src =sg_virt (cryp->in_sg) + _walked_in; +unsigned int i; +u32 block[AES_BLOCK_32 ] = {0 }; -for (i =0 ; i < cryp->hw_blocksize /sizeof (u32); i++) { -if (likely (cryp->total_in - tag_size >=sizeof (u32))) { -/* Write a full u32 */ -stm32_cryp_write (cryp,CRYP_DIN , *src); +scatterwalk_copychunks (block, &cryp->in_walk,min_t (size_t, cryp->hw_blocksize, + cryp->payload_in),0 ); +for (i =0 ; i < cryp->hw_blocksize /sizeof (u32); i++) +stm32_cryp_write (cryp,CRYP_DIN , block[i]); - src =stm32_cryp_next_in (cryp, src,sizeof (u32)); - cryp->total_in -=sizeof (u32); - }else if (cryp->total_in == tag_size) { -/* Write padding data */ -stm32_cryp_write (cryp,CRYP_DIN ,0 ); - }else { -/* Write less than an u32 */ -memset (d8,0 ,sizeof (u32)); -for (j =0 ; j < cryp->total_in - tag_size; j++) { - d8[j] = *((u8 *)src); - src =stm32_cryp_next_in (cryp, src,1 ); - } - -stm32_cryp_write (cryp,CRYP_DIN , *(u32 *)d8); - cryp->total_in = tag_size; - } - } + cryp->payload_in -=min_t (size_t, cryp->hw_blocksize, cryp->payload_in); }static void stm32_cryp_irq_write_gcm_padded_data (struct stm32_cryp *cryp) {int err; -u32 cfg, tmp[AES_BLOCK_32 ]; -size_t total_in_ori = cryp->total_in; -struct scatterlist *out_sg_ori = cryp->out_sg; +u32 cfg, block[AES_BLOCK_32 ] = {0 };unsigned int i;/* 'Special workaround' procedure described in the datasheet */
@@ -1459,18 +1283,25 @@ static void stm32_cryp_irq_write_gcm_padded_data(struct stm32_cryp *cryp)/* b) pad and write the last block */ stm32_cryp_irq_write_block (cryp); - cryp->total_in = total_in_ori; +/* wait end of process */ err =stm32_cryp_wait_output (cryp);if (err) { -dev_err (cryp->dev,"Timeout (write gcm header)\n" ); +dev_err (cryp->dev,"Timeout (write gcm last data)\n" );return stm32_cryp_finish_req (cryp, err); }/* c) get and store encrypted data */ -stm32_cryp_irq_read_data (cryp); -scatterwalk_map_and_copy (tmp, out_sg_ori, - cryp->total_in_save - total_in_ori, - total_in_ori,0 ); +/* +* Same code as stm32_cryp_irq_read_data(), but we want to store +* block value +*/ +for (i =0 ; i < cryp->hw_blocksize /sizeof (u32); i++) + block[i] =stm32_cryp_read (cryp,CRYP_DOUT ); + +scatterwalk_copychunks (block, &cryp->out_walk,min_t (size_t, cryp->hw_blocksize, + cryp->payload_out),1 ); + cryp->payload_out -=min_t (size_t, cryp->hw_blocksize, + cryp->payload_out);/* d) change mode back to AES GCM */ cfg &= ~CR_ALGO_MASK ;
@@ -1483,19 +1314,13 @@ static void stm32_cryp_irq_write_gcm_padded_data(struct stm32_cryp *cryp)stm32_cryp_write (cryp,CRYP_CR , cfg);/* f) write padded data */ -for (i =0 ; i <AES_BLOCK_32 ; i++) { -if (cryp->total_in) -stm32_cryp_write (cryp,CRYP_DIN , tmp[i]); -else -stm32_cryp_write (cryp,CRYP_DIN ,0 ); - - cryp->total_in -=min_t (size_t,sizeof (u32), cryp->total_in); - } +for (i =0 ; i <AES_BLOCK_32 ; i++) +stm32_cryp_write (cryp,CRYP_DIN , block[i]);/* g) Empty fifo out */ err =stm32_cryp_wait_output (cryp);if (err) { -dev_err (cryp->dev,"Timeout (write gcm header)\n" ); +dev_err (cryp->dev,"Timeout (write gcm padded data)\n" );return stm32_cryp_finish_req (cryp, err); }
@@ -1508,16 +1333,14 @@ static void stm32_cryp_irq_write_gcm_padded_data(struct stm32_cryp *cryp)static void stm32_cryp_irq_set_npblb (struct stm32_cryp *cryp) { -u32 cfg, payload_bytes; +u32 cfg;/* disable ip, set NPBLB and reneable ip */ cfg =stm32_cryp_read (cryp,CRYP_CR ); cfg &= ~CR_CRYPEN ;stm32_cryp_write (cryp,CRYP_CR , cfg); - payload_bytes =is_decrypt (cryp) ? cryp->total_in - cryp->authsize : - cryp->total_in; - cfg |= (cryp->hw_blocksize - payload_bytes) <<CR_NBPBL_SHIFT ; + cfg |= (cryp->hw_blocksize - cryp->payload_in) <<CR_NBPBL_SHIFT ; cfg |=CR_CRYPEN ;stm32_cryp_write (cryp,CRYP_CR , cfg); }
@@ -1526,13 +1349,11 @@ static void stm32_cryp_irq_write_ccm_padded_data(struct stm32_cryp *cryp) {int err =0 ;u32 cfg, iv1tmp; -u32 cstmp1[AES_BLOCK_32 ], cstmp2[AES_BLOCK_32 ], tmp[AES_BLOCK_32 ]; -size_t last_total_out, total_in_ori = cryp->total_in; -struct scatterlist *out_sg_ori = cryp->out_sg; +u32 cstmp1[AES_BLOCK_32 ], cstmp2[AES_BLOCK_32 ]; +u32 block[AES_BLOCK_32 ] = {0 };unsigned int i;/* 'Special workaround' procedure described in the datasheet */ - cryp->flags |=FLG_CCM_PADDED_WA ;/* a) disable ip */ stm32_cryp_write (cryp,CRYP_IMSCR ,0 );
@@ -1562,7 +1383,7 @@ static void stm32_cryp_irq_write_ccm_padded_data(struct stm32_cryp *cryp)/* b) pad and write the last block */ stm32_cryp_irq_write_block (cryp); - cryp->total_in = total_in_ori; +/* wait end of process */ err =stm32_cryp_wait_output (cryp);if (err) {dev_err (cryp->dev,"Timeout (wite ccm padded data)\n" );
@@ -1570,13 +1391,16 @@ static void stm32_cryp_irq_write_ccm_padded_data(struct stm32_cryp *cryp) }/* c) get and store decrypted data */ - last_total_out = cryp->total_out; -stm32_cryp_irq_read_data (cryp); +/* +* Same code as stm32_cryp_irq_read_data(), but we want to store +* block value +*/ +for (i =0 ; i < cryp->hw_blocksize /sizeof (u32); i++) + block[i] =stm32_cryp_read (cryp,CRYP_DOUT ); -memset (tmp,0 ,sizeof (tmp)); -scatterwalk_map_and_copy (tmp, out_sg_ori, - cryp->total_out_save - last_total_out, - last_total_out,0 ); +scatterwalk_copychunks (block, &cryp->out_walk,min_t (size_t, cryp->hw_blocksize, + cryp->payload_out),1 ); + cryp->payload_out -=min_t (size_t, cryp->hw_blocksize, cryp->payload_out);/* d) Load again CRYP_CSGCMCCMxR */ for (i =0 ; i <ARRAY_SIZE (cstmp2); i++)
@@ -1593,10 +1417,10 @@ static void stm32_cryp_irq_write_ccm_padded_data(struct stm32_cryp *cryp)stm32_cryp_write (cryp,CRYP_CR , cfg);/* g) XOR and write padded data */ -for (i =0 ; i <ARRAY_SIZE (tmp); i++) { - tmp[i] ^= cstmp1[i]; - tmp[i] ^= cstmp2[i]; -stm32_cryp_write (cryp,CRYP_DIN , tmp[i]); +for (i =0 ; i <ARRAY_SIZE (block); i++) { + block[i] ^= cstmp1[i]; + block[i] ^= cstmp2[i]; +stm32_cryp_write (cryp,CRYP_DIN , block[i]); }/* h) wait for completion */
@@ -1610,30 +1434,34 @@ static void stm32_cryp_irq_write_ccm_padded_data(struct stm32_cryp *cryp)static void stm32_cryp_irq_write_data (struct stm32_cryp *cryp) { -if (unlikely (!cryp->total_in)) { +if (unlikely (!cryp->payload_in)) {dev_warn (cryp->dev,"No more data to process\n" );return ; } -if (unlikely (cryp->total_in <AES_BLOCK_SIZE && +if (unlikely (cryp->payload_in <AES_BLOCK_SIZE && (stm32_cryp_get_hw_mode (cryp) ==CR_AES_GCM ) &&is_encrypt (cryp))) {/* Padding for AES GCM encryption */ -if (cryp->caps->padding_wa) +if (cryp->caps->padding_wa) {/* Special case 1 */ -return stm32_cryp_irq_write_gcm_padded_data (cryp); +stm32_cryp_irq_write_gcm_padded_data (cryp); +return ; + }/* Setting padding bytes (NBBLB) */ stm32_cryp_irq_set_npblb (cryp); } -if (unlikely ((cryp->total_in - cryp->authsize <AES_BLOCK_SIZE ) && +if (unlikely ((cryp->payload_in <AES_BLOCK_SIZE ) && (stm32_cryp_get_hw_mode (cryp) ==CR_AES_CCM ) &&is_decrypt (cryp))) {/* Padding for AES CCM decryption */ -if (cryp->caps->padding_wa) +if (cryp->caps->padding_wa) {/* Special case 2 */ -return stm32_cryp_irq_write_ccm_padded_data (cryp); +stm32_cryp_irq_write_ccm_padded_data (cryp); +return ; + }/* Setting padding bytes (NBBLB) */ stm32_cryp_irq_set_npblb (cryp);
@@ -1645,192 +1473,60 @@ static void stm32_cryp_irq_write_data(struct stm32_cryp *cryp)stm32_cryp_irq_write_block (cryp); } -static void stm32_cryp_irq_write_gcm_header (struct stm32_cryp *cryp) +static void stm32_cryp_irq_write_gcmccm_header (struct stm32_cryp *cryp) { -int err; -unsigned int i, j; -u32 cfg, *src; - - src =sg_virt (cryp->in_sg) + _walked_in; - -for (i =0 ; i <AES_BLOCK_32 ; i++) { -stm32_cryp_write (cryp,CRYP_DIN , *src); - - src =stm32_cryp_next_in (cryp, src,sizeof (u32)); - cryp->total_in -=min_t (size_t,sizeof (u32), cryp->total_in); - -/* Check if whole header written */ -if ((cryp->total_in_save - cryp->total_in) == - cryp->areq->assoclen) { -/* Write padding if needed */ -for (j = i +1 ; j <AES_BLOCK_32 ; j++) -stm32_cryp_write (cryp,CRYP_DIN ,0 ); - -/* Wait for completion */ - err =stm32_cryp_wait_busy (cryp); -if (err) { -dev_err (cryp->dev,"Timeout (gcm header)\n" ); -return stm32_cryp_finish_req (cryp, err); - } - -if (stm32_cryp_get_input_text_len (cryp)) { -/* Phase 3 : payload */ - cfg =stm32_cryp_read (cryp,CRYP_CR ); - cfg &= ~CR_CRYPEN ; -stm32_cryp_write (cryp,CRYP_CR , cfg); - - cfg &= ~CR_PH_MASK ; - cfg |=CR_PH_PAYLOAD ; - cfg |=CR_CRYPEN ; -stm32_cryp_write (cryp,CRYP_CR , cfg); - }else { -/* Phase 4 : tag */ -stm32_cryp_write (cryp,CRYP_IMSCR ,0 ); -stm32_cryp_finish_req (cryp,0 ); - } - -break ; - } - -if (!cryp->total_in) -break ; - } -} +unsigned int i; +u32 block[AES_BLOCK_32 ] = {0 }; +size_t written; -static void stm32_cryp_irq_write_ccm_header (struct stm32_cryp *cryp) -{ -int err; -unsigned int i =0 , j, k; -u32 alen, cfg, *src; -u8 d8[4 ]; - - src =sg_virt (cryp->in_sg) + _walked_in; - alen = cryp->areq->assoclen; - -if (!_walked_in) { -if (cryp->areq->assoclen <=65280 ) { -/* Write first u32 of B1 */ - d8[0 ] = (alen >>8 ) &0xFF ; - d8[1 ] = alen &0xFF ; - d8[2 ] = *((u8 *)src); - src =stm32_cryp_next_in (cryp, src,1 ); - d8[3 ] = *((u8 *)src); - src =stm32_cryp_next_in (cryp, src,1 ); - -stm32_cryp_write (cryp,CRYP_DIN , *(u32 *)d8); - i++; - - cryp->total_in -=min_t (size_t,2 , cryp->total_in); - }else { -/* Build the two first u32 of B1 */ - d8[0 ] =0xFF ; - d8[1 ] =0xFE ; - d8[2 ] = alen &0xFF000000 ; - d8[3 ] = alen &0x00FF0000 ; - -stm32_cryp_write (cryp,CRYP_DIN , *(u32 *)d8); - i++; - - d8[0 ] = alen &0x0000FF00 ; - d8[1 ] = alen &0x000000FF ; - d8[2 ] = *((u8 *)src); - src =stm32_cryp_next_in (cryp, src,1 ); - d8[3 ] = *((u8 *)src); - src =stm32_cryp_next_in (cryp, src,1 ); - -stm32_cryp_write (cryp,CRYP_DIN , *(u32 *)d8); - i++; - - cryp->total_in -=min_t (size_t,2 , cryp->total_in); - } - } + written =min_t (size_t,AES_BLOCK_SIZE , cryp->header_in); -/* Write next u32 */ -for (; i <AES_BLOCK_32 ; i++) { -/* Build an u32 */ -memset (d8,0 ,sizeof (u32)); -for (k =0 ; k <sizeof (u32); k++) { - d8[k] = *((u8 *)src); - src =stm32_cryp_next_in (cryp, src,1 ); - - cryp->total_in -=min_t (size_t,1 , cryp->total_in); -if ((cryp->total_in_save - cryp->total_in) == alen) -break ; - } +scatterwalk_copychunks (block, &cryp->in_walk, written,0 ); +for (i =0 ; i <AES_BLOCK_32 ; i++) +stm32_cryp_write (cryp,CRYP_DIN , block[i]); -stm32_cryp_write (cryp,CRYP_DIN , *(u32 *)d8); - -if ((cryp->total_in_save - cryp->total_in) == alen) { -/* Write padding if needed */ -for (j = i +1 ; j <AES_BLOCK_32 ; j++) -stm32_cryp_write (cryp,CRYP_DIN ,0 ); - -/* Wait for completion */ - err =stm32_cryp_wait_busy (cryp); -if (err) { -dev_err (cryp->dev,"Timeout (ccm header)\n" ); -return stm32_cryp_finish_req (cryp, err); - } - -if (stm32_cryp_get_input_text_len (cryp)) { -/* Phase 3 : payload */ - cfg =stm32_cryp_read (cryp,CRYP_CR ); - cfg &= ~CR_CRYPEN ; -stm32_cryp_write (cryp,CRYP_CR , cfg); - - cfg &= ~CR_PH_MASK ; - cfg |=CR_PH_PAYLOAD ; - cfg |=CR_CRYPEN ; -stm32_cryp_write (cryp,CRYP_CR , cfg); - }else { -/* Phase 4 : tag */ -stm32_cryp_write (cryp,CRYP_IMSCR ,0 ); -stm32_cryp_finish_req (cryp,0 ); - } + cryp->header_in -= written; -break ; - } - } +stm32_crypt_gcmccm_end_header (cryp); }static irqreturn_t stm32_cryp_irq_thread (int irq,void *arg) {struct stm32_cryp *cryp = arg;u32 ph; +u32 it_mask =stm32_cryp_read (cryp,CRYP_IMSCR );if (cryp->irq_status &MISR_OUT )/* Output FIFO IRQ: read data */ -if (unlikely (stm32_cryp_irq_read_data (cryp))) { -/* All bytes processed, finish */ -stm32_cryp_write (cryp,CRYP_IMSCR ,0 ); -stm32_cryp_finish_req (cryp,0 ); -return IRQ_HANDLED ; - } +stm32_cryp_irq_read_data (cryp);if (cryp->irq_status &MISR_IN ) { -if (is_gcm (cryp)) { - ph =stm32_cryp_read (cryp,CRYP_CR ) &CR_PH_MASK ; -if (unlikely (ph ==CR_PH_HEADER )) -/* Write Header */ -stm32_cryp_irq_write_gcm_header (cryp); -else -/* Input FIFO IRQ: write data */ -stm32_cryp_irq_write_data (cryp); - cryp->gcm_ctr++; - }else if (is_ccm (cryp)) { +if (is_gcm (cryp) ||is_ccm (cryp)) { ph =stm32_cryp_read (cryp,CRYP_CR ) &CR_PH_MASK ;if (unlikely (ph ==CR_PH_HEADER ))/* Write Header */ -stm32_cryp_irq_write_ccm_header (cryp); +stm32_cryp_irq_write_gcmccm_header (cryp);else /* Input FIFO IRQ: write data */ stm32_cryp_irq_write_data (cryp); +if (is_gcm (cryp)) + cryp->gcm_ctr++; }else {/* Input FIFO IRQ: write data */ stm32_cryp_irq_write_data (cryp); } } +/* Mask useless interrupts */ +if (!cryp->payload_in && !cryp->header_in) + it_mask &= ~IMSCR_IN ; +if (!cryp->payload_out) + it_mask &= ~IMSCR_OUT ; +stm32_cryp_write (cryp,CRYP_IMSCR , it_mask); + +if (!cryp->payload_in && !cryp->header_in && !cryp->payload_out) +stm32_cryp_finish_req (cryp,0 ); +return IRQ_HANDLED ; }
@@ -1851,7 +1547,7 @@ static struct skcipher_alg crypto_algs[] = { .base.cra_flags = CRYPTO_ALG_ASYNC, .base.cra_blocksize = AES_BLOCK_SIZE, .base.cra_ctxsize = sizeof(struct stm32_cryp_ctx), - .base.cra_alignmask = 0xf, + .base.cra_alignmask = 0, .base.cra_module = THIS_MODULE, .init = stm32_cryp_init_tfm,
@@ -1868,7 +1564,7 @@ static struct skcipher_alg crypto_algs[] = { .base.cra_flags = CRYPTO_ALG_ASYNC, .base.cra_blocksize = AES_BLOCK_SIZE, .base.cra_ctxsize = sizeof(struct stm32_cryp_ctx), - .base.cra_alignmask = 0xf, + .base.cra_alignmask = 0, .base.cra_module = THIS_MODULE, .init = stm32_cryp_init_tfm,
@@ -1886,7 +1582,7 @@ static struct skcipher_alg crypto_algs[] = { .base.cra_flags = CRYPTO_ALG_ASYNC, .base.cra_blocksize = 1, .base.cra_ctxsize = sizeof(struct stm32_cryp_ctx), - .base.cra_alignmask = 0xf, + .base.cra_alignmask = 0, .base.cra_module = THIS_MODULE, .init = stm32_cryp_init_tfm,
@@ -1904,7 +1600,7 @@ static struct skcipher_alg crypto_algs[] = { .base.cra_flags = CRYPTO_ALG_ASYNC, .base.cra_blocksize = DES_BLOCK_SIZE, .base.cra_ctxsize = sizeof(struct stm32_cryp_ctx), - .base.cra_alignmask = 0xf, + .base.cra_alignmask = 0, .base.cra_module = THIS_MODULE, .init = stm32_cryp_init_tfm,
@@ -1921,7 +1617,7 @@ static struct skcipher_alg crypto_algs[] = { .base.cra_flags = CRYPTO_ALG_ASYNC, .base.cra_blocksize = DES_BLOCK_SIZE, .base.cra_ctxsize = sizeof(struct stm32_cryp_ctx), - .base.cra_alignmask = 0xf, + .base.cra_alignmask = 0, .base.cra_module = THIS_MODULE, .init = stm32_cryp_init_tfm,
@@ -1939,7 +1635,7 @@ static struct skcipher_alg crypto_algs[] = { .base.cra_flags = CRYPTO_ALG_ASYNC, .base.cra_blocksize = DES_BLOCK_SIZE, .base.cra_ctxsize = sizeof(struct stm32_cryp_ctx), - .base.cra_alignmask = 0xf, + .base.cra_alignmask = 0, .base.cra_module = THIS_MODULE, .init = stm32_cryp_init_tfm,
@@ -1956,7 +1652,7 @@ static struct skcipher_alg crypto_algs[] = { .base.cra_flags = CRYPTO_ALG_ASYNC, .base.cra_blocksize = DES_BLOCK_SIZE, .base.cra_ctxsize = sizeof(struct stm32_cryp_ctx), - .base.cra_alignmask = 0xf, + .base.cra_alignmask = 0, .base.cra_module = THIS_MODULE, .init = stm32_cryp_init_tfm,
@@ -1986,7 +1682,7 @@ static struct aead_alg aead_algs[] = { .cra_flags = CRYPTO_ALG_ASYNC, .cra_blocksize = 1, .cra_ctxsize = sizeof(struct stm32_cryp_ctx), - .cra_alignmask = 0xf, + .cra_alignmask = 0, .cra_module = THIS_MODULE, }, },
@@ -2006,7 +1702,7 @@ static struct aead_alg aead_algs[] = { .cra_flags = CRYPTO_ALG_ASYNC, .cra_blocksize = 1, .cra_ctxsize = sizeof(struct stm32_cryp_ctx), - .cra_alignmask = 0xf, + .cra_alignmask = 0, .cra_module = THIS_MODULE, }, },
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 237/846 crypto: stm32 - Revert broken pm_runtime_resume_and_get changes
In reply to Greg Kroah-HartmanFrom: Herbert Xu <[email protected]>
[ Upstream commit 3d6b661330a7954d8136df98160d525eb04dcd6a ]
We should not call pm_runtime_resume_and_get where the reference count is expected to be incremented unconditionally. This patch reverts these calls to the original unconditional get_sync call.
--- drivers/crypto/stm32/stm32-cryp.c | 3 ++- drivers/crypto/stm32/stm32-hash.c | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-)
drivers/crypto/stm32/stm32-cryp.c +2 -1
@@ -529,7 +529,8 @@ static int stm32_cryp_hw_init(struct stm32_cryp *cryp) {int ret;u32 cfg, hw_mode; -pm_runtime_resume_and_get (cryp->dev); + +pm_runtime_get_sync (cryp->dev);/* Disable interrupt */ stm32_cryp_write (cryp,CRYP_IMSCR ,0 );
drivers/crypto/stm32/stm32-hash.c +3 -3
@@ -813,7 +813,7 @@ static void stm32_hash_finish_req(struct ahash_request *req, int err)static int stm32_hash_hw_init (struct stm32_hash_dev *hdev,struct stm32_hash_request_ctx *rctx) { -pm_runtime_resume_and_get (hdev->dev); +pm_runtime_get_sync (hdev->dev);if (!(HASH_FLAGS_INIT & hdev->flags)) {stm32_hash_write (hdev,HASH_CR ,HASH_CR_INIT );
@@ -962,7 +962,7 @@ static int stm32_hash_export(struct ahash_request *req, void *out)u32 *preg;unsigned int i; -pm_runtime_resume_and_get (hdev->dev); +pm_runtime_get_sync (hdev->dev);while ((stm32_hash_read (hdev,HASH_SR ) &HASH_SR_BUSY ))cpu_relax ();
@@ -1000,7 +1000,7 @@ static int stm32_hash_import(struct ahash_request *req, const void *in) preg = rctx->hw_context; -pm_runtime_resume_and_get (hdev->dev); +pm_runtime_get_sync (hdev->dev);stm32_hash_write (hdev,HASH_IMR , *preg++);stm32_hash_write (hdev,HASH_STR , *preg++);
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 219/846 drm/amd/display: Fix bug in debugfs crc_win_update entry
In reply to Greg Kroah-HartmanFrom: Wayne Lin <[email protected]>
[ Upstream commit 4bef85d4c9491415b7931407b07f24841c1e0390 ]
[Why]crc_rd_wrk shouldn't be null in crc_win_update_set(). Current programming logic is inconsistent in crc_win_update_set().
[How]
Initially, return if crc_rd_wrk is NULL. Later on, we can use member of crc_rd_wrk safely.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +4 -1
@@ -2908,10 +2908,13 @@ static int crc_win_update_set(void *data, u64 val)struct amdgpu_device *adev =drm_to_adev (new_crtc->dev);struct crc_rd_work *crc_rd_wrk = adev->dm.crc_rd_wrk; +if (!crc_rd_wrk) +return 0 ; +if (val) {spin_lock_irq (&adev_to_drm (adev)->event_lock);spin_lock_irq (&crc_rd_wrk->crc_rd_work_lock); -if (crc_rd_wrk && crc_rd_wrk->crtc) { +if (crc_rd_wrk->crtc) { old_crtc = crc_rd_wrk->crtc; old_acrtc =to_amdgpu_crtc (old_crtc); }
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 243/846 media: dw2102: Fix use after free
In reply to Greg Kroah-HartmanFrom: Anton Vasilyev <[email protected]>
[ Upstream commit 589a9f0eb799f77de2c09583bf5bad221fa5d685 ]
dvb_usb_device_init stores parts of properties at d->props and d->desc and uses it on dvb_usb_device_exit. Free of properties on module probe leads to use after free.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204597
The patch makes properties static instead of allocated on heap to prevent memleak and use after free.
Also fixes s421_properties.devices initialization to have 2 element instead of 6 copied from p7500_properties.
--- drivers/media/usb/dvb-usb/dw2102.c | 338 ++++++++++++++++++----------- 1 file changed, 215 insertions(+), 123 deletions(-)
drivers/media/usb/dvb-usb/dw2102.c +215 -123
@@ -2150,46 +2150,153 @@ static struct dvb_usb_device_properties s6x0_properties = { } }; -static const struct dvb_usb_device_description d1100 = { -"Prof 1100 USB " , - {&dw2102_table[PROF_1100 ],NULL }, - {NULL }, -}; +static struct dvb_usb_device_properties p1100_properties = { + .caps =DVB_USB_IS_AN_I2C_ADAPTER , + .usb_ctrl =DEVICE_SPECIFIC , + .size_of_priv =sizeof (struct dw2102_state ), + .firmware =P1100_FIRMWARE , + .no_reconnect =1 , -static const struct dvb_usb_device_description d660 = { -"TeVii S660 USB" , - {&dw2102_table[TEVII_S660 ],NULL }, - {NULL }, -}; + .i2c_algo = &s6x0_i2c_algo, + .rc.core = { + .rc_interval =150 , + .rc_codes =RC_MAP_TBS_NEC , + .module_name ="dw2102" , + .allowed_protos =RC_PROTO_BIT_NEC , + .rc_query = prof_rc_query, + }, -static const struct dvb_usb_device_description d480_1 = { -"TeVii S480.1 USB" , - {&dw2102_table[TEVII_S480_1 ],NULL }, - {NULL }, + .generic_bulk_ctrl_endpoint =0x81 , + .num_adapters =1 , + .download_firmware = dw2102_load_firmware, + .read_mac_address = s6x0_read_mac_address, + .adapter = { + { + .num_frontends =1 , + .fe = {{ + .frontend_attach = stv0288_frontend_attach, + .stream = { + .type =USB_BULK , + .count =8 , + .endpoint =0x82 , + .u = { + .bulk = { + .buffersize =4096 , + } + } + }, + } }, + } + }, + .num_device_descs =1 , + .devices = { + {"Prof 1100 USB " , + {&dw2102_table[PROF_1100 ],NULL }, + {NULL }, + }, + } }; -static const struct dvb_usb_device_description d480_2 = { -"TeVii S480.2 USB" , - {&dw2102_table[TEVII_S480_2 ],NULL }, - {NULL }, -}; +static struct dvb_usb_device_properties s660_properties = { + .caps =DVB_USB_IS_AN_I2C_ADAPTER , + .usb_ctrl =DEVICE_SPECIFIC , + .size_of_priv =sizeof (struct dw2102_state ), + .firmware =S660_FIRMWARE , + .no_reconnect =1 , -static const struct dvb_usb_device_description d7500 = { -"Prof 7500 USB DVB-S2" , - {&dw2102_table[PROF_7500 ],NULL }, - {NULL }, -}; + .i2c_algo = &s6x0_i2c_algo, + .rc.core = { + .rc_interval =150 , + .rc_codes =RC_MAP_TEVII_NEC , + .module_name ="dw2102" , + .allowed_protos =RC_PROTO_BIT_NEC , + .rc_query = dw2102_rc_query, + }, -static const struct dvb_usb_device_description d421 = { -"TeVii S421 PCI" , - {&dw2102_table[TEVII_S421 ],NULL }, - {NULL }, + .generic_bulk_ctrl_endpoint =0x81 , + .num_adapters =1 , + .download_firmware = dw2102_load_firmware, + .read_mac_address = s6x0_read_mac_address, + .adapter = { + { + .num_frontends =1 , + .fe = {{ + .frontend_attach = ds3000_frontend_attach, + .stream = { + .type =USB_BULK , + .count =8 , + .endpoint =0x82 , + .u = { + .bulk = { + .buffersize =4096 , + } + } + }, + } }, + } + }, + .num_device_descs =3 , + .devices = { + {"TeVii S660 USB" , + {&dw2102_table[TEVII_S660 ],NULL }, + {NULL }, + }, + {"TeVii S480.1 USB" , + {&dw2102_table[TEVII_S480_1 ],NULL }, + {NULL }, + }, + {"TeVii S480.2 USB" , + {&dw2102_table[TEVII_S480_2 ],NULL }, + {NULL }, + }, + } }; -static const struct dvb_usb_device_description d632 = { -"TeVii S632 USB" , - {&dw2102_table[TEVII_S632 ],NULL }, - {NULL }, +static struct dvb_usb_device_properties p7500_properties = { + .caps =DVB_USB_IS_AN_I2C_ADAPTER , + .usb_ctrl =DEVICE_SPECIFIC , + .size_of_priv =sizeof (struct dw2102_state ), + .firmware =P7500_FIRMWARE , + .no_reconnect =1 , + + .i2c_algo = &s6x0_i2c_algo, + .rc.core = { + .rc_interval =150 , + .rc_codes =RC_MAP_TBS_NEC , + .module_name ="dw2102" , + .allowed_protos =RC_PROTO_BIT_NEC , + .rc_query = prof_rc_query, + }, + + .generic_bulk_ctrl_endpoint =0x81 , + .num_adapters =1 , + .download_firmware = dw2102_load_firmware, + .read_mac_address = s6x0_read_mac_address, + .adapter = { + { + .num_frontends =1 , + .fe = {{ + .frontend_attach = prof_7500_frontend_attach, + .stream = { + .type =USB_BULK , + .count =8 , + .endpoint =0x82 , + .u = { + .bulk = { + .buffersize =4096 , + } + } + }, + } }, + } + }, + .num_device_descs =1 , + .devices = { + {"Prof 7500 USB DVB-S2" , + {&dw2102_table[PROF_7500 ],NULL }, + {NULL }, + }, + } };static struct dvb_usb_device_properties su3000_properties = {
@@ -2273,6 +2380,59 @@ static struct dvb_usb_device_properties su3000_properties = { } }; +static struct dvb_usb_device_properties s421_properties = { + .caps =DVB_USB_IS_AN_I2C_ADAPTER , + .usb_ctrl =DEVICE_SPECIFIC , + .size_of_priv =sizeof (struct dw2102_state ), + .power_ctrl = su3000_power_ctrl, + .num_adapters =1 , + .identify_state = su3000_identify_state, + .i2c_algo = &su3000_i2c_algo, + + .rc.core = { + .rc_interval =150 , + .rc_codes =RC_MAP_SU3000 , + .module_name ="dw2102" , + .allowed_protos =RC_PROTO_BIT_RC5 , + .rc_query = su3000_rc_query, + }, + + .read_mac_address = su3000_read_mac_address, + + .generic_bulk_ctrl_endpoint =0x01 , + + .adapter = { + { + .num_frontends =1 , + .fe = {{ + .streaming_ctrl = su3000_streaming_ctrl, + .frontend_attach = m88rs2000_frontend_attach, + .stream = { + .type =USB_BULK , + .count =8 , + .endpoint =0x82 , + .u = { + .bulk = { + .buffersize =4096 , + } + } + } + } }, + } + }, + .num_device_descs =2 , + .devices = { + {"TeVii S421 PCI" , + { &dw2102_table[TEVII_S421 ],NULL }, + {NULL }, + }, + {"TeVii S632 USB" , + { &dw2102_table[TEVII_S632 ],NULL }, + {NULL }, + }, + } +}; +static struct dvb_usb_device_properties t220_properties = { .caps =DVB_USB_IS_AN_I2C_ADAPTER , .usb_ctrl =DEVICE_SPECIFIC ,
@@ -2390,101 +2550,33 @@ static struct dvb_usb_device_properties tt_s2_4600_properties = {static int dw2102_probe (struct usb_interface *intf,const struct usb_device_id *id) { -int retval = -ENOMEM ; -struct dvb_usb_device_properties *p1100; -struct dvb_usb_device_properties *s660; -struct dvb_usb_device_properties *p7500; -struct dvb_usb_device_properties *s421; - - p1100 =kmemdup (&s6x0_properties, -sizeof (struct dvb_usb_device_properties ),GFP_KERNEL ); -if (!p1100) - goto err0; - -/* copy default structure */ -/* fill only different fields */ - p1100->firmware =P1100_FIRMWARE ; - p1100->devices[0 ] = d1100; - p1100->rc.core.rc_query = prof_rc_query; - p1100->rc.core.rc_codes =RC_MAP_TBS_NEC ; - p1100->adapter->fe[0 ].frontend_attach = stv0288_frontend_attach; - - s660 =kmemdup (&s6x0_properties, -sizeof (struct dvb_usb_device_properties ),GFP_KERNEL ); -if (!s660) - goto err1; - - s660->firmware =S660_FIRMWARE ; - s660->num_device_descs =3 ; - s660->devices[0 ] = d660; - s660->devices[1 ] = d480_1; - s660->devices[2 ] = d480_2; - s660->adapter->fe[0 ].frontend_attach = ds3000_frontend_attach; - - p7500 =kmemdup (&s6x0_properties, -sizeof (struct dvb_usb_device_properties ),GFP_KERNEL ); -if (!p7500) - goto err2; - - p7500->firmware =P7500_FIRMWARE ; - p7500->devices[0 ] = d7500; - p7500->rc.core.rc_query = prof_rc_query; - p7500->rc.core.rc_codes =RC_MAP_TBS_NEC ; - p7500->adapter->fe[0 ].frontend_attach = prof_7500_frontend_attach; - - - s421 =kmemdup (&su3000_properties, -sizeof (struct dvb_usb_device_properties ),GFP_KERNEL ); -if (!s421) - goto err3; - - s421->num_device_descs =2 ; - s421->devices[0 ] = d421; - s421->devices[1 ] = d632; - s421->adapter->fe[0 ].frontend_attach = m88rs2000_frontend_attach; - -if (0 ==dvb_usb_device_init (intf, &dw2102_properties, -THIS_MODULE ,NULL , adapter_nr) || -0 ==dvb_usb_device_init (intf, &dw2104_properties, -THIS_MODULE ,NULL , adapter_nr) || -0 ==dvb_usb_device_init (intf, &dw3101_properties, -THIS_MODULE ,NULL , adapter_nr) || -0 ==dvb_usb_device_init (intf, &s6x0_properties, -THIS_MODULE ,NULL , adapter_nr) || -0 ==dvb_usb_device_init (intf, p1100, -THIS_MODULE ,NULL , adapter_nr) || -0 ==dvb_usb_device_init (intf, s660, -THIS_MODULE ,NULL , adapter_nr) || -0 ==dvb_usb_device_init (intf, p7500, -THIS_MODULE ,NULL , adapter_nr) || -0 ==dvb_usb_device_init (intf, s421, -THIS_MODULE ,NULL , adapter_nr) || -0 ==dvb_usb_device_init (intf, &su3000_properties, -THIS_MODULE ,NULL , adapter_nr) || -0 ==dvb_usb_device_init (intf, &t220_properties, -THIS_MODULE ,NULL , adapter_nr) || -0 ==dvb_usb_device_init (intf, &tt_s2_4600_properties, -THIS_MODULE ,NULL , adapter_nr)) { - -/* clean up copied properties */ -kfree (s421); -kfree (p7500); -kfree (s660); -kfree (p1100); +if (!(dvb_usb_device_init (intf, &dw2102_properties, +THIS_MODULE ,NULL , adapter_nr) && +dvb_usb_device_init (intf, &dw2104_properties, +THIS_MODULE ,NULL , adapter_nr) && +dvb_usb_device_init (intf, &dw3101_properties, +THIS_MODULE ,NULL , adapter_nr) && +dvb_usb_device_init (intf, &s6x0_properties, +THIS_MODULE ,NULL , adapter_nr) && +dvb_usb_device_init (intf, &p1100_properties, +THIS_MODULE ,NULL , adapter_nr) && +dvb_usb_device_init (intf, &s660_properties, +THIS_MODULE ,NULL , adapter_nr) && +dvb_usb_device_init (intf, &p7500_properties, +THIS_MODULE ,NULL , adapter_nr) && +dvb_usb_device_init (intf, &s421_properties, +THIS_MODULE ,NULL , adapter_nr) && +dvb_usb_device_init (intf, &su3000_properties, +THIS_MODULE ,NULL , adapter_nr) && +dvb_usb_device_init (intf, &t220_properties, +THIS_MODULE ,NULL , adapter_nr) && +dvb_usb_device_init (intf, &tt_s2_4600_properties, +THIS_MODULE ,NULL , adapter_nr))) {return 0 ; } - retval = -ENODEV ; -kfree (s421); -err3: -kfree (p7500); -err2: -kfree (s660); -err1: -kfree (p1100); -err0: -return retval; +return -ENODEV ; }static void dw2102_disconnect (struct usb_interface *intf)
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 247/846 net: dsa: hellcreek: Fix insertion of static FDB entries
In reply to Greg Kroah-HartmanFrom: Kurt Kanzenbach <[email protected]>
[ Upstream commit 4db4c3ea56978086ca367a355e440de17d534827 ]
The insertion of static FDB entries ignores the pass_blocked bit. That bit is evaluated with regards to STP. Add the missing functionality.
--- drivers/net/dsa/hirschmann/hellcreek.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/net/dsa/hirschmann/hellcreek.c +5 -2
@@ -710,8 +710,9 @@ static int __hellcreek_fdb_add(struct hellcreek *hellcreek,u16 meta =0 ;dev_dbg (hellcreek->dev,"Add static FDB entry: MAC=%pM, MASK=0x%02x, " -"OBT=%d, REPRIO_EN=%d, PRIO=%d\n" , entry->mac, entry->portmask, - entry->is_obt, entry->reprio_en, entry->reprio_tc); +"OBT=%d, PASS_BLOCKED=%d, REPRIO_EN=%d, PRIO=%d\n" , entry->mac, + entry->portmask, entry->is_obt, entry->pass_blocked, + entry->reprio_en, entry->reprio_tc);/* Add mac address */ hellcreek_write (hellcreek, entry->mac[1 ] | (entry->mac[0 ] <<8 ),HR_FDBWDH );
@@ -722,6 +723,8 @@ static int __hellcreek_fdb_add(struct hellcreek *hellcreek, meta |= entry->portmask <<HR_FDBWRM0_PORTMASK_SHIFT ;if (entry->is_obt) meta |=HR_FDBWRM0_OBT ; +if (entry->pass_blocked) + meta |=HR_FDBWRM0_PASS_BLOCKED ;if (entry->reprio_en) { meta |=HR_FDBWRM0_REPRIO_EN ; meta |= entry->reprio_tc <<HR_FDBWRM0_REPRIO_TC_SHIFT ;
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 257/846 drm/tegra: vic: Fix DMA API misuse
In reply to Greg Kroah-HartmanFrom: Robin Murphy <[email protected]>
[ Upstream commit 5566174cb10a5167d59b0793871cab7990b149b8 ]
Upon failure, dma_alloc_coherent() returns NULL. If that does happen, passing some uninitialised stack contents to dma_mapping_error() - which belongs to a different API in the first place - has precious little chance of detecting it.
Also include the correct header, because the fragile transitive inclusion currently providing it is going to break soon.
--- drivers/gpu/drm/tegra/vic.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/gpu/drm/tegra/vic.c +3 -4
@@ -5,6 +5,7 @@#include <linux/clk.h> #include <linux/delay.h> +#include <linux/dma-mapping.h> #include <linux/host1x.h> #include <linux/iommu.h> #include <linux/module.h>
@@ -232,10 +233,8 @@ static int vic_load_firmware(struct vic *vic)if (!client->group) { virt =dma_alloc_coherent (vic->dev, size, &iova,GFP_KERNEL ); - - err =dma_mapping_error (vic->dev, iova); -if (err <0 ) -return err; +if (!virt) +return -ENOMEM ; }else { virt =tegra_drm_alloc (tegra, size, &iova); }
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 427/846 of: fdt: Aggregate the processing of "linux,usable-memory-range"
In reply to Greg Kroah-HartmanFrom: Zhen Lei <[email protected]>
[ Upstream commit 8347b41748c3019157312fbe7f8a6792ae396eb7 ]
Currently, we parse the "linux,usable-memory-range" property in early_init_dt_scan_chosen(), to obtain the specified memory range of the crash kernel. We then reserve the required memory after early_init_dt_scan_memory() has identified all available physical memory. Because the two pieces of code are separated far, the readability and maintainability are reduced. So bring them together.
(change the prototype of early_init_dt_check_for_usable_mem_range(), in order to use it outside)
To: [email protected]
To: [email protected]
--- drivers/of/fdt.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-)
drivers/of/fdt.c +13 -6
@@ -969,18 +969,22 @@ static void __init early_init_dt_check_for_elfcorehdr(unsigned long node) elfcorehdr_addr, elfcorehdr_size); } -static phys_addr_t cap_mem_addr; -static phys_addr_t cap_mem_size; +static unsigned long chosen_node_offset = -FDT_ERR_NOTFOUND ;/** * early_init_dt_check_for_usable_mem_range - Decode usable memory range * location from flat tree -* @node: reference to node containing usable memory range location ('chosen') */ -static void __init early_init_dt_check_for_usable_mem_range (unsigned long node) +static void __init early_init_dt_check_for_usable_mem_range (void ) {const __be32 *prop;int len; +phys_addr_t cap_mem_addr; +phys_addr_t cap_mem_size; +unsigned long node = chosen_node_offset; + +if ((long )node <0 ) +return ;pr_debug ("Looking for usable-memory-range property... " );
@@ -993,6 +997,8 @@ static void __init early_init_dt_check_for_usable_mem_range(unsigned long node)pr_debug ("cap_mem_start=%pa cap_mem_size=%pa\n" , &cap_mem_addr, &cap_mem_size); + +memblock_cap_memory_range (cap_mem_addr, cap_mem_size); }#ifdef CONFIG_SERIAL_EARLYCON
@@ -1141,9 +1147,10 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname, (strcmp(uname, "chosen") != 0 && strcmp(uname, "chosen@0") != 0))return 0 ; + chosen_node_offset = node; +early_init_dt_check_for_initrd (node);early_init_dt_check_for_elfcorehdr (node); -early_init_dt_check_for_usable_mem_range (node);/* Retrieve command line */ p =of_get_flat_dt_prop (node,"bootargs" , &l);
@@ -1279,7 +1286,7 @@ void __init early_init_dt_scan_nodes(void)of_scan_flat_dt (early_init_dt_scan_memory,NULL );/* Handle linux,usable-memory-range property */ -memblock_cap_memory_range (cap_mem_addr, cap_mem_size); +early_init_dt_check_for_usable_mem_range (); }bool __init early_init_dt_scan (void *params)
Signature · 9 lines
2.34.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Greg Kroah-Hartman
maintainerPATCH 428/846 efi: apply memblock cap after memblock_add()
In reply to Greg Kroah-HartmanFrom: Pingfan Liu <[email protected]>
[ Upstream commit b398123bff3bcbc1facb0f29bf6e7b9f1bc55931 ]
On arm64, during kdump kernel saves vmcore, it runs into the following bug:
...
[ 15.148919] usercopy: Kernel memory exposure attempt detected from SLUB object 'kmem_cache_node' (offset 0, size 4096)! [ 15.159707] ------------[ cut here ]------------ [ 15.164311] kernel BUG at mm/usercopy.c:99! [ 15.168482] Internal error: Oops - BUG: 0 [#1] SMP [ 15.173261] Modules linked in: xfs libcrc32c crct10dif_ce ghash_ce sha2_ce sha256_arm64 sha1_ce sbsa_gwdt ast i2c_algo_bit drm_vram_helper drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops cec drm_ttm_helper ttm drm nvme nvme_core xgene_hwmon i2c_designware_platform i2c_designware_core dm_mirror dm_region_hash dm_log dm_mod overlay squashfs zstd_decompress loop [ 15.206186] CPU: 0 PID: 542 Comm: cp Not tainted 5.16.0-rc4 #1 [ 15.212006] Hardware name: GIGABYTE R272-P30-JG/MP32-AR0-JG, BIOS F12 (SCP: 1.5.20210426) 05/13/2021 [ 15.221125] pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 15.228073] pc : usercopy_abort+0x9c/0xa0 [ 15.232074] lr : usercopy_abort+0x9c/0xa0 [ 15.236070] sp : ffff8000121abba0 [ 15.239371] x29: ffff8000121abbb0 x28: 0000000000003000 x27: 0000000000000000 [ 15.246494] x26: 0000000080000400 x25: 0000ffff885c7000 x24: 0000000000000000 [ 15.253617] x23: 000007ff80400000 x22: ffff07ff80401000 x21: 0000000000000001 [ 15.260739] x20: 0000000000001000 x19: ffff07ff80400000 x18: ffffffffffffffff [ 15.267861] x17: 656a626f2042554c x16: 53206d6f72662064 x15: 6574636574656420 [ 15.274983] x14: 74706d6574746120 x13: 2129363930342065 x12: 7a6973202c302074 [ 15.282105] x11: ffffc8b041d1b148 x10: 00000000ffff8000 x9 : ffffc8b04012812c [ 15.289228] x8 : 00000000ffff7fff x7 : ffffc8b041d1b148 x6 : 0000000000000000 [ 15.296349] x5 : 0000000000000000 x4 : 0000000000007fff x3 : 0000000000000000 [ 15.303471] x2 : 0000000000000000 x1 : ffff07ff8c064800 x0 : 000000000000006b [ 15.310593] Call trace: [ 15.313027] usercopy_abort+0x9c/0xa0 [ 15.316677] __check_heap_object+0xd4/0xf0 [ 15.320762] __check_object_size.part.0+0x160/0x1e0 [ 15.325628] __check_object_size+0x2c/0x40 [ 15.329711] copy_oldmem_page+0x7c/0x140 [ 15.333623] read_from_oldmem.part.0+0xfc/0x1c0 [ 15.338142] __read_vmcore.constprop.0+0x23c/0x350 [ 15.342920] read_vmcore+0x28/0x34 [ 15.346309] proc_reg_read+0xb4/0xf0 [ 15.349871] vfs_read+0xb8/0x1f0 [ 15.353088] ksys_read+0x74/0x100 [ 15.356390] __arm64_sys_read+0x28/0x34
...
This bug introduced by commit b261dba2fdb2 ("arm64: kdump: Remove custom linux,usable-memory-range handling"), which moves memblock_cap_memory_range() to fdt, but it breaches the rules that memblock_cap_memory_range() should come after memblock_add() etc as said in commit e888fa7bb882 ("memblock: Check memory add/cap ordering").
As a consequence, the virtual address set up by copy_oldmem_page() does not bail out from the test of virt_addr_valid() in check_heap_object(), and finally hits the BUG_ON().
Since memblock allocator has no idea about when the memblock is fully populated, while efi_init() is aware, so tackling this issue by calling the interface early_init_dt_check_for_usable_mem_range() exposed by of/fdt.
To: [email protected]
To: [email protected]
--- drivers/firmware/efi/efi-init.c | 5 +++++ drivers/of/fdt.c | 2 +- include/linux/of_fdt.h | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-)
drivers/firmware/efi/efi-init.c +5 -0
@@ -235,6 +235,11 @@ void __init efi_init(void) }reserve_regions (); +/* +* For memblock manipulation, the cap should come after the memblock_add(). +* And now, memblock is fully populated, it is time to do capping. +*/ +early_init_dt_check_for_usable_mem_range ();efi_esrt_init ();efi_mokvar_table_init ();
drivers/of/fdt.c +1 -1
@@ -975,7 +975,7 @@ static unsigned long chosen_node_offset = -FDT_ERR_NOTFOUND;* early_init_dt_check_for_usable_mem_range - Decode usable memory range * location from flat tree */ -static void __init early_init_dt_check_for_usable_mem_range (void ) +void __init early_init_dt_check_for_usable_mem_range (void ) {const __be32 *prop;int len;
include/linux/of_fdt.h +2 -0
@@ -62,6 +62,7 @@ extern int early_init_dt_scan_chosen(unsigned long node, const char *uname, int depth, void *data);extern int early_init_dt_scan_memory (unsigned long node,const char *uname,int depth,void *data); +extern void early_init_dt_check_for_usable_mem_range (void );extern int early_init_dt_scan_chosen_stdout (void );extern void early_init_fdt_scan_reserved_mem (void );extern void early_init_fdt_reserve_self (void );
@@ -87,6 +88,7 @@ extern void unflatten_and_copy_device_tree(void);extern void early_init_devtree (void *);extern void early_get_first_memblock_info (void *,phys_addr_t *);#else /* CONFIG_OF_EARLY_FLATTREE */ +static inline void early_init_dt_check_for_usable_mem_range (void ) {}static inline int early_init_dt_scan_chosen_stdout (void ) {return -ENODEV ; }static inline void early_init_fdt_scan_reserved_mem (void ) {}static inline void early_init_fdt_reserve_self (void ) {}
Signature · 9 lines
2.34.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Greg Kroah-Hartman
maintainerPATCH 225/846 drm/msm/dsi: fix initialization in the bonded DSI case
In reply to Greg Kroah-HartmanFrom: Dmitry Baryshkov <[email protected]>
[ Upstream commit 92cb1bedde9dba78d802fe2510949743a2581aed ]
Commit 739b4e7756d3 ("drm/msm/dsi: Fix an error code in msm_dsi_modeset_init()") changed msm_dsi_modeset_init() to return an error code in case msm_dsi_manager_validate_current_config() returns false. However this is not an error case, but a slave DSI of the bonded DSI link. In this case msm_dsi_modeset_init() should return 0, but just skip connector and bridge initialization.
To reduce possible confusion, drop the msm_dsi_manager_validate_current_config() function, and specif 'bonded && !master' condition directly in the msm_dsi_modeset_init().
--- drivers/gpu/drm/msm/dsi/dsi.c | 10 +++++++--- drivers/gpu/drm/msm/dsi/dsi.h | 1 - drivers/gpu/drm/msm/dsi/dsi_manager.c | 17 ----------------- 3 files changed, 7 insertions(+), 21 deletions(-)
drivers/gpu/drm/msm/dsi/dsi.c +7 -3
@@ -215,9 +215,13 @@ int msm_dsi_modeset_init(struct msm_dsi *msm_dsi, struct drm_device *dev, goto fail; } -if (!msm_dsi_manager_validate_current_config (msm_dsi->id)) { - ret = -EINVAL ; - goto fail; +if (msm_dsi_is_bonded_dsi (msm_dsi) && + !msm_dsi_is_master_dsi (msm_dsi)) { +/* +* Do not return an eror here, +* Just skip creating encoder/connector for the slave-DSI. +*/ +return 0 ; } msm_dsi->encoder = encoder;
drivers/gpu/drm/msm/dsi/dsi.h +0 -1
@@ -82,7 +82,6 @@ int msm_dsi_manager_cmd_xfer(int id, const struct mipi_dsi_msg *msg);bool msm_dsi_manager_cmd_xfer_trigger (int id,u32 dma_base,u32 len);int msm_dsi_manager_register (struct msm_dsi *msm_dsi);void msm_dsi_manager_unregister (struct msm_dsi *msm_dsi); -bool msm_dsi_manager_validate_current_config (u8 id);void msm_dsi_manager_tpg_enable (void );/* msm dsi */
drivers/gpu/drm/msm/dsi/dsi_manager.c +0 -17
@@ -647,23 +647,6 @@ fail:return ERR_PTR (ret); } -bool msm_dsi_manager_validate_current_config (u8 id) -{ -bool is_bonded_dsi =IS_BONDED_DSI (); - -/* -* For bonded DSI, we only have one drm panel. For this -* use case, we register only one bridge/connector. -* Skip bridge/connector initialisation if it is -* slave-DSI for bonded DSI configuration. -*/ -if (is_bonded_dsi && !IS_MASTER_DSI_LINK (id)) { -DBG ("Skip bridge registration for slave DSI->id: %d\n" , id); -return false; - } -return true; -} -/* initialize bridge */ struct drm_bridge *msm_dsi_manager_bridge_init (u8 id) {
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 226/846 mwifiex: Fix possible ABBA deadlock
In reply to Greg Kroah-HartmanFrom: Brian Norris <[email protected]>
[ Upstream commit 1b8bb8919ef81bfc8873d223b9361f1685f2106d ]
Quoting Jia-Ju Bai <[email protected]>:
mwifiex_dequeue_tx_packet()
spin_lock_bh(&priv->wmm.ra_list_spinlock); --> Line 1432 (Lock A)
mwifiex_send_addba()
spin_lock_bh(&priv->sta_list_spinlock); --> Line 608 (Lock B) mwifiex_process_sta_tx_pause()
spin_lock_bh(&priv->sta_list_spinlock); --> Line 398 (Lock B)
mwifiex_update_ralist_tx_pause()
spin_lock_bh(&priv->wmm.ra_list_spinlock); --> Line 941 (Lock A)Similar report for mwifiex_process_uap_tx_pause().
While the locking expectations in this driver are a bit unclear, the Fixed commit only intended to protect the sta_ptr, so we can drop the lock as soon as we're done with it.
IIUC, this deadlock cannot actually happen, because command event processing (which calls mwifiex_process_sta_tx_pause()) is sequentialized with TX packet processing (e.g., mwifiex_dequeue_tx_packet()) via the main loop (mwifiex_main_process()). But it's good not to leave this potential issue lurking.
--- drivers/net/wireless/marvell/mwifiex/sta_event.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/net/wireless/marvell/mwifiex/sta_event.c +6 -2
@@ -365,10 +365,12 @@ static void mwifiex_process_uap_tx_pause(struct mwifiex_private *priv, sta_ptr =mwifiex_get_sta_entry (priv, tp->peermac);if (sta_ptr && sta_ptr->tx_pause != tp->tx_pause) { sta_ptr->tx_pause = tp->tx_pause; +spin_unlock_bh (&priv->sta_list_spinlock);mwifiex_update_ralist_tx_pause (priv, tp->peermac, tp->tx_pause); + }else { +spin_unlock_bh (&priv->sta_list_spinlock); } -spin_unlock_bh (&priv->sta_list_spinlock); } }
@@ -400,11 +402,13 @@ static void mwifiex_process_sta_tx_pause(struct mwifiex_private *priv, sta_ptr =mwifiex_get_sta_entry (priv, tp->peermac);if (sta_ptr && sta_ptr->tx_pause != tp->tx_pause) { sta_ptr->tx_pause = tp->tx_pause; +spin_unlock_bh (&priv->sta_list_spinlock);mwifiex_update_ralist_tx_pause (priv, tp->peermac, tp->tx_pause); + }else { +spin_unlock_bh (&priv->sta_list_spinlock); } -spin_unlock_bh (&priv->sta_list_spinlock); } } }
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 217/846 Bluetooth: MGMT: Use hci_dev_test_and_{set,clear}_flag
In reply to Greg Kroah-HartmanFrom: Luiz Augusto von Dentz <[email protected]>
[ Upstream commit 6f59f991b4e735323f099ac6490e725ae8c750a5 ]
This make use of hci_dev_test_and_{set,clear}_flag instead of doing 2 operations in a row.
--- net/bluetooth/mgmt.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
net/bluetooth/mgmt.c +7 -7
@@ -3919,10 +3919,10 @@ static int set_zero_key_func(struct sock *sk, struct hci_dev *hdev,#endif if (hdev &&use_ll_privacy (hdev) && !hdev_is_powered (hdev)) { -bool changed =hci_dev_test_flag (hdev,HCI_ENABLE_LL_PRIVACY ); - -hci_dev_clear_flag (hdev,HCI_ENABLE_LL_PRIVACY ); +bool changed; + changed =hci_dev_test_and_clear_flag (hdev, +HCI_ENABLE_LL_PRIVACY );if (changed)exp_ll_privacy_feature_changed (false, hdev, sk); }
@@ -4017,15 +4017,15 @@ static int set_rpa_resolution_func(struct sock *sk, struct hci_dev *hdev, val = !!cp->param[0 ];if (val) { - changed = !hci_dev_test_flag (hdev,HCI_ENABLE_LL_PRIVACY ); -hci_dev_set_flag (hdev,HCI_ENABLE_LL_PRIVACY ); + changed = !hci_dev_test_and_set_flag (hdev, +HCI_ENABLE_LL_PRIVACY );hci_dev_clear_flag (hdev,HCI_ADVERTISING );/* Enable LL privacy + supported settings changed */ flags =BIT (0 ) |BIT (1 ); }else { - changed =hci_dev_test_flag (hdev,HCI_ENABLE_LL_PRIVACY ); -hci_dev_clear_flag (hdev,HCI_ENABLE_LL_PRIVACY ); + changed =hci_dev_test_and_clear_flag (hdev, +HCI_ENABLE_LL_PRIVACY );/* Disable LL privacy + supported settings changed */ flags =BIT (1 );
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 263/846 arm64: dts: marvell: cn9130: add GPIO and SPI aliases
In reply to Greg Kroah-HartmanFrom: Robert Marko <[email protected]>
[ Upstream commit effd42600b987c1e95f946b14fefc1c7639e7439 ]
CN9130 has one CP115 built in, which like the CP110 has 2 GPIO and 2 SPI controllers built-in.
However, unlike the Armada 7k and 8k the SoC DTSI doesn't add the required aliases as both the Orion SPI driver and MVEBU GPIO drivers require the aliases to be present.
So add the required aliases for GPIO and SPI controllers.
--- arch/arm64/boot/dts/marvell/cn9130.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm64/boot/dts/marvell/cn9130.dtsi +7 -0
@@ -11,6 +11,13 @@ model = "Marvell Armada CN9130 SoC"; compatible = "marvell,cn9130", "marvell,armada-ap807-quad", "marvell,armada-ap807"; + + aliases { + gpio1 = &cp0_gpio1; + gpio2 = &cp0_gpio2; + spi1 = &cp0_spi0; + spi2 = &cp0_spi1; + }; }; /*
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 264/846 arm64: dts: marvell: cn9130: enable CP0 GPIO controllers
In reply to Greg Kroah-HartmanFrom: Robert Marko <[email protected]>
[ Upstream commit 0734f8311ce72c9041e5142769eff2083889c172 ]
CN9130 has a built-in CP115 which has 2 GPIO controllers, but unlike in Armada 7k and 8k both are left disabled by the SoC DTSI.
This first of all makes no sense as they are always present due to being SoC built-in and its an issue as boards like CN9130-CRB use the CPO GPIO2 pins for regulators and SD card support without enabling them first.
So, enable both of them like Armada 7k and 8k do.
--- arch/arm64/boot/dts/marvell/cn9130.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm64/boot/dts/marvell/cn9130.dtsi +8 -0
@@ -42,3 +42,11 @@ #undef CP11X_PCIE0_BASE #undef CP11X_PCIE1_BASE #undef CP11X_PCIE2_BASE + +&cp0_gpio1 { + status = "okay"; +}; + +&cp0_gpio2 { + status = "okay"; +};
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 265/846 ARM: dts: armada-38x: Add generic compatible to UART nodes
In reply to Greg Kroah-HartmanFrom: Marek Behún <[email protected]>
[ Upstream commit 62480772263ab6b52e758f2346c70a526abd1d28 ]
Add generic compatible string "ns16550a" to serial port nodes of Armada 38x.
This makes it possible to use earlycon.
--- arch/arm/boot/dts/armada-38x.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/armada-38x.dtsi +2 -2
@@ -168,7 +168,7 @@ }; uart0: serial@12000 { - compatible = "marvell,armada-38x-uart"; + compatible = "marvell,armada-38x-uart", "ns16550a"; reg = <0x12000 0x100>; reg-shift = <2>; interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
@@ -178,7 +178,7 @@ }; uart1: serial@12100 { - compatible = "marvell,armada-38x-uart"; + compatible = "marvell,armada-38x-uart", "ns16550a"; reg = <0x12100 0x100>; reg-shift = <2>; interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 266/846 mt76: mt7921: drop offload_flags overwritten
In reply to Greg Kroah-HartmanFrom: Sean Wang <[email protected]>
[ Upstream commit 2363b6a646b65a207345b9a9024dff0eff3fec44 ]
offload_flags have to be dropped for mt7921 because mt76.omac_idx 0 would always run as station mode that would cause Tx encapsulation setting is not applied to mac80211.
Also, drop IEEE80211_OFFLOAD_ENCAP_4ADDR too because it is not really being supported.
--- drivers/net/wireless/mediatek/mt76/mt7921/main.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7921/main.c +0 -6
@@ -285,12 +285,6 @@ static int mt7921_add_interface(struct ieee80211_hw *hw, mtxq->wcid = &mvif->sta.wcid; } -if (vif->type !=NL80211_IFTYPE_AP && - (!mvif->mt76.omac_idx || mvif->mt76.omac_idx >3 )) - vif->offload_flags =0 ; - - vif->offload_flags |=IEEE80211_OFFLOAD_ENCAP_4ADDR ; - out:mt7921_mutex_release (dev);
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 255/846 gpu: host1x: select CONFIG_DMA_SHARED_BUFFER
In reply to Greg Kroah-HartmanFrom: Arnd Bergmann <[email protected]>
[ Upstream commit 6c7a388b62366f0de9936db3c1921d7f4e0011bc ]
Linking fails when dma-buf is disabled:
ld.lld: error: undefined symbol: dma_fence_release
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
referenced by
fence.c
gpu/host1x/fence.o:(host1x_syncpt_fence_enable_signaling) in archivedrivers/built-in.a
referenced byfence.c
gpu/host1x/fence.o:(host1x_fence_signal) in archivedrivers/built-in.a
referenced byfence.c
gpu/host1x/fence.o:(do_fence_timeout) in archivedrivers/built-in.a
--- drivers/gpu/host1x/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/host1x/Kconfig +1 -0
@@ -2,6 +2,7 @@ config TEGRA_HOST1X tristate "NVIDIA Tegra host1x driver" depends on ARCH_TEGRA || (ARM && COMPILE_TEST) + select DMA_SHARED_BUFFER select IOMMU_IOVA help Driver for the NVIDIA Tegra host1x hardware.
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 274/846 mmc: meson-mx-sdhc: add IRQ check
In reply to Greg Kroah-HartmanFrom: Sergey Shtylyov <[email protected]>
[ Upstream commit 77bed755e0f06135faccdd3948863703f9a6e640 ]
The driver neglects to check the result of platform_get_irq()'s call and blithely passes the negative error codes to devm_request_threaded_irq() (which takes *unsigned* IRQ #), causing it to fail with -EINVAL, overriding an original error code. Stop calling devm_request_threaded_irq() with the invalid IRQ #s.
--- drivers/mmc/host/meson-mx-sdhc-mmc.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/mmc/host/meson-mx-sdhc-mmc.c +5 -0
@@ -854,6 +854,11 @@ static int meson_mx_sdhc_probe(struct platform_device *pdev) goto err_disable_pclk; irq =platform_get_irq (pdev,0 ); +if (irq <0 ) { + ret = irq; + goto err_disable_pclk; + } + ret =devm_request_threaded_irq (dev, irq, meson_mx_sdhc_irq, meson_mx_sdhc_irq_thread,IRQF_ONESHOT ,NULL , host);
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 279/846 um: rename set_signals() to um_set_signals()
In reply to Greg Kroah-HartmanFrom: Johannes Berg <[email protected]>
[ Upstream commit bbe33504d4a7fdab9011211e55e262c869b3f6cc ]
Rename set_signals() as there's at least one driver that uses the same name and can now be built on UM due to PCI support, and thus we can get symbol conflicts.
Also rename set_signals_trace() to be consistent.
--- arch/um/include/asm/irqflags.h | 4 ++-- arch/um/include/shared/longjmp.h | 2 +- arch/um/include/shared/os.h | 4 ++-- arch/um/kernel/ksyms.c | 2 +- arch/um/os-Linux/sigio.c | 6 +++--- arch/um/os-Linux/signal.c | 8 ++++---- 6 files changed, 13 insertions(+), 13 deletions(-)
arch/um/include/asm/irqflags.h +2 -2
@@ -3,7 +3,7 @@#define __UM_IRQFLAGS_Hextern int signals_enabled; -int set_signals (int enable); +int um_set_signals (int enable);void block_signals (void );void unblock_signals (void );
@@ -16,7 +16,7 @@ static inline unsigned long arch_local_save_flags(void)#define arch_local_irq_restore arch_local_irq_restorestatic inline void arch_local_irq_restore (unsigned long flags) { -set_signals (flags); +um_set_signals (flags); }#define arch_local_irq_enable arch_local_irq_enable
arch/um/include/shared/longjmp.h +1 -1
@@ -18,7 +18,7 @@ extern void longjmp(jmp_buf, int); enable = *(volatile int *)&signals_enabled; \ n =setjmp (*buf); \if (n !=0 ) \ -set_signals_trace (enable); \ +um_set_signals_trace (enable); \ n; })#endif
arch/um/include/shared/os.h +2 -2
@@ -238,8 +238,8 @@ extern void send_sigio_to_self(void);extern int change_sig (int signal,int on);extern void block_signals (void );extern void unblock_signals (void ); -extern int set_signals (int enable); -extern int set_signals_trace (int enable); +extern int um_set_signals (int enable); +extern int um_set_signals_trace (int enable);extern int os_is_signal_stack (void );extern void deliver_alarm (void );extern void register_pm_wake_signal (void );
arch/um/kernel/ksyms.c +1 -1
@@ -6,7 +6,7 @@#include <linux/module.h> #include <os.h> -EXPORT_SYMBOL (set_signals); +EXPORT_SYMBOL (um_set_signals);EXPORT_SYMBOL (signals_enabled);EXPORT_SYMBOL (os_stat_fd);
arch/um/os-Linux/sigio.c +3 -3
@@ -132,7 +132,7 @@ static void update_thread(void)int n;char c; - flags =set_signals_trace (0 ); + flags =um_set_signals_trace (0 );CATCH_EINTR (n =write (sigio_private[0 ], &c,sizeof (c)));if (n !=sizeof (c)) { printk(UM_KERN_ERR "update_thread : write failed, err = %d\n",
@@ -147,7 +147,7 @@ static void update_thread(void) goto fail; } -set_signals_trace (flags); +um_set_signals_trace (flags);return ; fail:/* Critical section start */
@@ -161,7 +161,7 @@ static void update_thread(void)close (write_sigio_fds[0 ]);close (write_sigio_fds[1 ]);/* Critical section end */ -set_signals_trace (flags); +um_set_signals_trace (flags); }int __add_sigio_fd (int fd)
arch/um/os-Linux/signal.c +4 -4
@@ -94,7 +94,7 @@ void sig_handler(int sig, struct siginfo *si, mcontext_t *mc)sig_handler_common (sig, si, mc); -set_signals_trace (enabled); +um_set_signals_trace (enabled); }static void timer_real_alarm_handler (mcontext_t *mc)
@@ -126,7 +126,7 @@ void timer_alarm_handler(int sig, struct siginfo *unused_si, mcontext_t *mc) signals_active &= ~SIGALRM_MASK ; -set_signals_trace (enabled); +um_set_signals_trace (enabled); }void deliver_alarm (void ) {
@@ -348,7 +348,7 @@ void unblock_signals(void) } } -int set_signals (int enable) +int um_set_signals (int enable) {int ret;if (signals_enabled == enable)
@@ -362,7 +362,7 @@ int set_signals(int enable)return ret; } -int set_signals_trace (int enable) +int um_set_signals_trace (int enable) {int ret;if (signals_enabled == enable)
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 281/846 lib/logic_iomem: Fix 32-bit build
In reply to Greg Kroah-HartmanFrom: Johannes Berg <[email protected]>
[ Upstream commit 4e84139e14af5ea60772cc4f33d7059aec76e0eb ]
On a 32-bit build, the (unsigned long long) casts throw warnings (or errors) due to being to a different integer size. Cast to uintptr_t first (with the __force for sparse) and then further to get the consistent print on 32 and 64-bit.
--- lib/logic_iomem.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
lib/logic_iomem.c +7 -6
@@ -79,7 +79,7 @@ static void __iomem *real_ioremap(phys_addr_t offset, size_t size)static void real_iounmap (void __iomem *addr) {WARN (1 ,"invalid iounmap for addr 0x%llx\n" , - (unsigned long long __force )addr); + (unsigned long long )(uintptr_t __force )addr); }#endif /* CONFIG_LOGIC_IOMEM_FALLBACK */
@@ -173,7 +173,7 @@ EXPORT_SYMBOL(iounmap); static u##sz real_raw_read ## op(const volatile void __iomem *addr) \ { \ WARN(1, "Invalid read" #op " at address %llx\n", \ - (unsigned long long __force)addr); \ + (unsigned long long)(uintptr_t __force)addr); \ return (u ## sz)~0ULL; \ } \ \
@@ -181,7 +181,8 @@ static void real_raw_write ## op(u ## sz val, \ volatile void __iomem *addr) \ { \ WARN(1, "Invalid writeq" #op " of 0x%llx at address %llx\n", \ - (unsigned long long )val, (unsigned long long __force )addr);\ + (unsigned long long)val, \ + (unsigned long long)(uintptr_t __force)addr);\ } \MAKE_FALLBACK (b,8 );
@@ -194,14 +195,14 @@ MAKE_FALLBACK(q, 64);static void real_memset_io (volatile void __iomem *addr,int value,size_t size) {WARN (1 ,"Invalid memset_io at address 0x%llx\n" , - (unsigned long long __force )addr); + (unsigned long long )(uintptr_t __force )addr); }static void real_memcpy_fromio (void *buffer,const volatile void __iomem *addr,size_t size) {WARN (1 ,"Invalid memcpy_fromio at address 0x%llx\n" , - (unsigned long long __force )addr); + (unsigned long long )(uintptr_t __force )addr);memset (buffer,0xff , size); }
@@ -210,7 +211,7 @@ static void real_memcpy_toio(volatile void __iomem *addr, const void *buffer, size_t size) {WARN (1 ,"Invalid memcpy_toio at address 0x%llx\n" , - (unsigned long long __force )addr); + (unsigned long long )(uintptr_t __force )addr); }#endif /* CONFIG_LOGIC_IOMEM_FALLBACK */
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 290/846 backlight: qcom-wled: Use cpu_to_le16 macro to perform conversion
In reply to Greg Kroah-HartmanFrom: Marijn Suijten <[email protected]>
[ Upstream commit 0a139358548968b2ff308257b4fbeec7badcc3e1 ]
The kernel already provides appropriate primitives to perform endianness conversion which should be used in favour of manual bit-wrangling.
--- drivers/video/backlight/qcom-wled.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-)
drivers/video/backlight/qcom-wled.c +11 -12
@@ -231,14 +231,14 @@ struct wled {static int wled3_set_brightness (struct wled *wled,u16 brightness) {int rc, i; -u8 v[2 ]; +__le16 v; - v[0 ] = brightness &0xff ; - v[1 ] = (brightness >>8 ) &0xf ; + v =cpu_to_le16 (brightness &WLED3_SINK_REG_BRIGHT_MAX );for (i =0 ; i < wled->cfg.num_strings; ++i) { rc =regmap_bulk_write (wled->regmap, wled->ctrl_addr + -WLED3_SINK_REG_BRIGHT (i), v,2 ); +WLED3_SINK_REG_BRIGHT (i), + &v,sizeof (v));if (rc <0 )return rc; }
@@ -250,18 +250,18 @@ static int wled4_set_brightness(struct wled *wled, u16 brightness) {int rc, i;u16 low_limit = wled->max_brightness *4 /1000 ; -u8 v[2 ]; +__le16 v;/* WLED4's lower limit of operation is 0.4% */ if (brightness >0 && brightness < low_limit) brightness = low_limit; - v[0 ] = brightness &0xff ; - v[1 ] = (brightness >>8 ) &0xf ; + v =cpu_to_le16 (brightness &WLED3_SINK_REG_BRIGHT_MAX );for (i =0 ; i < wled->cfg.num_strings; ++i) { rc =regmap_bulk_write (wled->regmap, wled->sink_addr + -WLED4_SINK_REG_BRIGHT (i), v,2 ); +WLED4_SINK_REG_BRIGHT (i), + &v,sizeof (v));if (rc <0 )return rc; }
@@ -273,21 +273,20 @@ static int wled5_set_brightness(struct wled *wled, u16 brightness) {int rc, offset;u16 low_limit = wled->max_brightness *1 /1000 ; -u8 v[2 ]; +__le16 v;/* WLED5's lower limit is 0.1% */ if (brightness < low_limit) brightness = low_limit; - v[0 ] = brightness &0xff ; - v[1 ] = (brightness >>8 ) &0x7f ; + v =cpu_to_le16 (brightness &WLED5_SINK_REG_BRIGHT_MAX_15B ); offset = (wled->cfg.mod_sel ==MOD_A ) ?WLED5_SINK_REG_MOD_A_BRIGHTNESS_LSB :WLED5_SINK_REG_MOD_B_BRIGHTNESS_LSB ; rc =regmap_bulk_write (wled->regmap, wled->sink_addr + offset, - v,2 ); + &v,sizeof (v));return rc; }
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 299/846 io_uring: remove double poll on poll update
In reply to Greg Kroah-HartmanFrom: Pavel Begunkov <[email protected]>
[ Upstream commit e840b4baf3cfb37e2ead4f649a45bb78178677ff ]
Before updating a poll request we should remove it from poll queues, including the double poll entry.
--- fs/io_uring.c | 1 + 1 file changed, 1 insertion(+)
fs/io_uring.c +1 -0
@@ -5925,6 +5925,7 @@ static int io_poll_update(struct io_kiocb *req, unsigned int issue_flags)* update those. For multishot, if we're racing with completion, just * let completion re-add it. */ +io_poll_remove_double (preq); completing = !__io_poll_remove_one (preq, &preq->poll, false);if (completing && (preq->poll.events &EPOLLONESHOT )) { ret = -EALREADY ;
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 300/846 serial: 8250_bcm7271: Propagate error codes from brcmuart_probe()
In reply to Greg Kroah-HartmanFrom: Lad Prabhakar <[email protected]>
[ Upstream commit c195438f1e84de8fa46b4f5264d12379bee6e9a1 ]
In case of failures brcmuart_probe() always returned -ENODEV, this isn't correct for example platform_get_irq_byname() may return -EPROBE_DEFER to handle such cases propagate error codes in brcmuart_probe() in case of failures.
--- drivers/tty/serial/8250/8250_bcm7271.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
drivers/tty/serial/8250/8250_bcm7271.c +8 -3
@@ -1076,14 +1076,18 @@ static int brcmuart_probe(struct platform_device *pdev) priv->rx_bufs =dma_alloc_coherent (dev, priv->rx_size, &priv->rx_addr,GFP_KERNEL ); -if (!priv->rx_bufs) +if (!priv->rx_bufs) { + ret = -EINVAL ; goto err; + } priv->tx_size =UART_XMIT_SIZE ; priv->tx_buf =dma_alloc_coherent (dev, priv->tx_size, &priv->tx_addr,GFP_KERNEL ); -if (!priv->tx_buf) +if (!priv->tx_buf) { + ret = -EINVAL ; goto err; + } } ret =serial8250_register_8250_port (&up);
@@ -1097,6 +1101,7 @@ static int brcmuart_probe(struct platform_device *pdev)if (priv->dma_enabled) { dma_irq =platform_get_irq_byname (pdev,"dma" );if (dma_irq <0 ) { + ret = dma_irq;dev_err (dev,"no IRQ resource info\n" ); goto err1; }
@@ -1116,7 +1121,7 @@ err1: err:brcmuart_free_bufs (dev, priv);brcmuart_arbitration (priv,0 ); -return -ENODEV ; +return ret; }static int brcmuart_remove (struct platform_device *pdev)
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 301/846 ACPI: scan: Create platform device for BCM4752 and LNV4752 ACPI nodes
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
[ Upstream commit f85196bdd5a50da74670250564740fc852b3c239 ]
BCM4752 and LNV4752 ACPI nodes describe a Broadcom 4752 GPS module attached to an UART of the system.
The GPS modules talk a custom protocol which only works with a closed- source Android gpsd daemon which knows this protocol.
The ACPI nodes also describe GPIOs to turn the GPS on/off these are handled by the net/rfkill/rfkill-gpio.c code. This handling predates the addition of enumeration of ACPI instantiated serdevs to the kernel and was broken by that addition, because the ACPI scan code now no longer instantiates platform_device-s for these nodes.
Rename the i2c_multi_instantiate_ids HID list to ignore_serial_bus_ids and add the BCM4752 and LNV4752 HIDs, so that rfkill-gpio gets a platform_device to bind to again; and so that a tty cdev for gpsd gets created for these.
--- drivers/acpi/scan.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
drivers/acpi/scan.c +10 -3
@@ -1690,6 +1690,7 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device) {struct list_head resource_list;bool is_serial_bus_slave = false; +static const struct acpi_device_id ignore_serial_bus_ids[] = {/* * These devices have multiple I2cSerialBus resources and an i2c-client * must be instantiated for each, each with its own i2c_device_id.
@@ -1698,11 +1699,18 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device)* drivers/platform/x86/i2c-multi-instantiate.c driver, which knows * which i2c_device_id to use for each resource. */ -static const struct acpi_device_id i2c_multi_instantiate_ids[] = { {"BSG1160", }, {"BSG2150", }, {"INT33FE", }, {"INT3515", }, + /* + * HIDs of device with an UartSerialBusV2 resource for which userspace + * expects a regular tty cdev to be created (instead of the in kernel + * serdev) and which have a kernel driver which expects a platform_dev + * such as the rfkill-gpio driver. + */ + {"BCM4752", }, + {"LNV4752", }, {} };
@@ -1716,8 +1724,7 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device) fwnode_property_present(&device->fwnode, "baud")))return true; -/* Instantiate a pdev for the i2c-multi-instantiate drv to bind to */ -if (!acpi_match_device_ids (device, i2c_multi_instantiate_ids)) +if (!acpi_match_device_ids (device, ignore_serial_bus_ids))return false;INIT_LIST_HEAD (&resource_list);
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 302/846 pcmcia: rsrc_nonstatic: Fix a NULL pointer dereference in __nonstatic_find_io_region()
In reply to Greg Kroah-HartmanFrom: Zhou Qingyang <[email protected]>
[ Upstream commit ca0fe0d7c35c97528bdf621fdca75f13157c27af ]
In __nonstatic_find_io_region(), pcmcia_make_resource() is assigned to res and used in pci_bus_alloc_resource(). There is a dereference of res in pci_bus_alloc_resource(), which could lead to a NULL pointer dereference on failure of pcmcia_make_resource().
Fix this bug by adding a check of res.
This bug was found by a static analyzer. The analysis employs differential checking to identify inconsistent security operations (e.g., checks or kfrees) between two code paths and confirms that the inconsistent operations are not recovered in the current function or the callers, so they constitute bugs.
Note that, as a bug found by static analysis, it can be a false positive or hard to trigger. Multiple researchers have cross-reviewed the bug.
Builds with CONFIG_PCCARD_NONSTATIC=y show no new warnings, and our static analyzer no longer warns about this code.
--- drivers/pcmcia/rsrc_nonstatic.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/pcmcia/rsrc_nonstatic.c +3 -0
@@ -690,6 +690,9 @@ static struct resource *__nonstatic_find_io_region(struct pcmcia_socket *s,unsigned long min = base;int ret; +if (!res) +return NULL ; + data.mask = align -1 ; data.offset = base & data.mask; data.map = &s_data->io_db;
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 303/846 pcmcia: rsrc_nonstatic: Fix a NULL pointer dereference in nonstatic_find_mem_region()
In reply to Greg Kroah-HartmanFrom: Zhou Qingyang <[email protected]>
[ Upstream commit 977d2e7c63c3d04d07ba340b39987742e3241554 ]
In nonstatic_find_mem_region(), pcmcia_make_resource() is assigned to res and used in pci_bus_alloc_resource(). There a dereference of res in pci_bus_alloc_resource(), which could lead to a NULL pointer dereference on failure of pcmcia_make_resource().
Fix this bug by adding a check of res.
This bug was found by a static analyzer. The analysis employs differential checking to identify inconsistent security operations (e.g., checks or kfrees) between two code paths and confirms that the inconsistent operations are not recovered in the current function or the callers, so they constitute bugs.
Note that, as a bug found by static analysis, it can be a false positive or hard to trigger. Multiple researchers have cross-reviewed the bug.
Builds with CONFIG_PCCARD_NONSTATIC=y show no new warnings, and our static analyzer no longer warns about this code.
--- drivers/pcmcia/rsrc_nonstatic.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/pcmcia/rsrc_nonstatic.c +3 -0
@@ -812,6 +812,9 @@ static struct resource *nonstatic_find_mem_region(u_long base, u_long num,unsigned long min, max;int ret, i, j; +if (!res) +return NULL ; + low = low || !(s->features &SS_CAP_PAGE_REGS ); data.mask = align -1 ;
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 306/846 net: ethernet: mtk_eth_soc: fix return values and refactor MDIO ops
In reply to Greg Kroah-HartmanFrom: Daniel Golle <[email protected]>
[ Upstream commit eda80b249df7bbc7b3dd13907343a3e59bfc57fd ]
Instead of returning -1 (-EPERM) when MDIO bus is stuck busy while writing or 0xffff if it happens while reading, return the appropriate -ETIMEDOUT. Also fix return type to int instead of u32. Refactor functions to use bitfield helpers instead of having various masking and shifting constants in the code, which also results in the register definitions in the header file being more obviously related to what is stated in the MediaTek's Reference Manual.
--- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 53 ++++++++++++--------- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 16 +++++-- 2 files changed, 41 insertions(+), 28 deletions(-)
drivers/net/ethernet/mediatek/mtk_eth_soc.c +30 -23
@@ -91,46 +91,53 @@ static int mtk_mdio_busy_wait(struct mtk_eth *eth) }dev_err (eth->dev,"mdio: MDIO timeout\n" ); -return -1 ; +return -ETIMEDOUT ; } -static u32 _mtk_mdio_write (struct mtk_eth *eth,u32 phy_addr, -u32 phy_register,u32 write_data) +static int _mtk_mdio_write (struct mtk_eth *eth,u32 phy_addr,u32 phy_reg, +u32 write_data) { -if (mtk_mdio_busy_wait (eth)) -return -1 ; +int ret; - write_data &=0xffff ; + ret =mtk_mdio_busy_wait (eth); +if (ret <0 ) +return ret; -mtk_w32 (eth,PHY_IAC_ACCESS |PHY_IAC_START |PHY_IAC_WRITE | - (phy_register <<PHY_IAC_REG_SHIFT ) | - (phy_addr <<PHY_IAC_ADDR_SHIFT ) | write_data, +mtk_w32 (eth,PHY_IAC_ACCESS | +PHY_IAC_START_C22 | +PHY_IAC_CMD_WRITE | +PHY_IAC_REG (phy_reg) | +PHY_IAC_ADDR (phy_addr) | +PHY_IAC_DATA (write_data),MTK_PHY_IAC ); -if (mtk_mdio_busy_wait (eth)) -return -1 ; + ret =mtk_mdio_busy_wait (eth); +if (ret <0 ) +return ret;return 0 ; } -static u32 _mtk_mdio_read (struct mtk_eth *eth,int phy_addr,int phy_reg) +static int _mtk_mdio_read (struct mtk_eth *eth,u32 phy_addr,u32 phy_reg) { -u32 d; +int ret; -if (mtk_mdio_busy_wait (eth)) -return 0xffff ; + ret =mtk_mdio_busy_wait (eth); +if (ret <0 ) +return ret; -mtk_w32 (eth,PHY_IAC_ACCESS |PHY_IAC_START |PHY_IAC_READ | - (phy_reg <<PHY_IAC_REG_SHIFT ) | - (phy_addr <<PHY_IAC_ADDR_SHIFT ), +mtk_w32 (eth,PHY_IAC_ACCESS | +PHY_IAC_START_C22 | +PHY_IAC_CMD_C22_READ | +PHY_IAC_REG (phy_reg) | +PHY_IAC_ADDR (phy_addr),MTK_PHY_IAC ); -if (mtk_mdio_busy_wait (eth)) -return 0xffff ; - - d =mtk_r32 (eth,MTK_PHY_IAC ) &0xffff ; + ret =mtk_mdio_busy_wait (eth); +if (ret <0 ) +return ret; -return d; +return mtk_r32 (eth,MTK_PHY_IAC ) &PHY_IAC_DATA_MASK ; } static int mtk_mdio_write(struct mii_bus *bus, int phy_addr,
drivers/net/ethernet/mediatek/mtk_eth_soc.h +11 -5
@@ -341,11 +341,17 @@/* PHY Indirect Access Control registers */ #define MTK_PHY_IAC 0x10004#define PHY_IAC_ACCESS BIT(31) -#define PHY_IAC_READ BIT(19) -#define PHY_IAC_WRITE BIT(18) -#define PHY_IAC_START BIT(16) -#define PHY_IAC_ADDR_SHIFT 20 -#define PHY_IAC_REG_SHIFT 25 +#define PHY_IAC_REG_MASK GENMASK(29, 25) +#define PHY_IAC_REG (x) FIELD_PREP(PHY_IAC_REG_MASK, (x)) +#define PHY_IAC_ADDR_MASK GENMASK(24, 20) +#define PHY_IAC_ADDR (x) FIELD_PREP(PHY_IAC_ADDR_MASK, (x)) +#define PHY_IAC_CMD_MASK GENMASK(19, 18) +#define PHY_IAC_CMD_WRITE FIELD_PREP(PHY_IAC_CMD_MASK, 1) +#define PHY_IAC_CMD_C22_READ FIELD_PREP(PHY_IAC_CMD_MASK, 2) +#define PHY_IAC_START_MASK GENMASK(17, 16) +#define PHY_IAC_START_C22 FIELD_PREP(PHY_IAC_START_MASK, 1) +#define PHY_IAC_DATA_MASK GENMASK(15, 0) +#define PHY_IAC_DATA (x) FIELD_PREP(PHY_IAC_DATA_MASK, (x))#define PHY_IAC_TIMEOUT HZ#define MTK_MAC_MISC 0x1000c
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 308/846 netfilter: ipt_CLUSTERIP: fix refcount leak in clusterip_tg_check()
In reply to Greg Kroah-HartmanFrom: Xin Xiong <[email protected]>
[ Upstream commit d94a69cb2cfa77294921aae9afcfb866e723a2da ]
The issue takes place in one error path of clusterip_tg_check(). When memcmp() returns nonzero, the function simply returns the error code, forgetting to decrease the reference count of a clusterip_config object, which is bumped earlier by clusterip_config_find_get(). This may incur reference count leak.
Fix this issue by decrementing the refcount of the object in specific error path.
--- net/ipv4/netfilter/ipt_CLUSTERIP.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
net/ipv4/netfilter/ipt_CLUSTERIP.c +4 -1
@@ -520,8 +520,11 @@ static int clusterip_tg_check(const struct xt_tgchk_param *par)if (IS_ERR (config))return PTR_ERR (config); } - }else if (memcmp (&config->clustermac, &cipinfo->clustermac,ETH_ALEN )) + }else if (memcmp (&config->clustermac, &cipinfo->clustermac,ETH_ALEN )) { +clusterip_config_entry_put (config); +clusterip_config_put (config);return -EINVAL ; + } ret =nf_ct_netns_get (par->net, par->family);if (ret <0 ) {
Signature · 1 line
2.34.1