Linux 5.15.217
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.15.217 kernel.
All users of the 5.15 kernel series must upgrade.
The updated 5.15.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.15.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm64/boot/dts/nvidia/tegra194.dtsi | 2 arch/openrisc/include/asm/processor.h | 2 arch/openrisc/kernel/signal.c | 5 arch/powerpc/platforms/pseries/lparcfg.c | 2 arch/powerpc/platforms/pseries/pci.c | 2 arch/x86/kernel/cpu/resctrl/rdtgroup.c | 12 crypto/ccm.c | 2 drivers/char/tpm/tpm_tis_core.c | 38 drivers/crypto/qce/core.c | 2 drivers/dma-buf/dma-resv.c | 10 drivers/dma-buf/udmabuf.c | 21 drivers/dma/dw-edma/dw-edma-core.c | 90 - drivers/dma/dw-edma/dw-edma-core.h | 33 drivers/dma/dw-edma/dw-edma-pcie.c | 83 drivers/dma/dw-edma/dw-edma-v0-core.c | 38 drivers/dma/dw-edma/dw-edma-v0-core.h | 4 drivers/dma/dw-edma/dw-edma-v0-debugfs.c | 18 drivers/dma/dw-edma/dw-edma-v0-debugfs.h | 8 drivers/fpga/dfl-afu-main.c | 3 drivers/gpio/gpio-mvebu.c | 4 drivers/gpio/gpio-pxa.c | 4 drivers/gpio/gpio-rockchip.c | 4 drivers/gpio/gpio-tegra.c | 18 drivers/gpio/gpio-vf610.c | 4 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 21 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 17 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 11 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 26 drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 2 drivers/gpu/drm/amd/pm/amdgpu_pm.c | 14 drivers/gpu/drm/drm_connector.c | 12 drivers/gpu/drm/drm_dp_mst_topology.c | 32 drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 2 drivers/gpu/drm/i915/display/intel_hdcp.c | 12 drivers/gpu/drm/i915/display/intel_vrr.c | 4 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 4 drivers/gpu/drm/i915/i915_vma.c | 2 drivers/gpu/drm/lima/lima_gem.c | 2 drivers/gpu/drm/msm/msm_gem_submit.c | 2 drivers/gpu/drm/nouveau/nouveau_fence.c | 2 drivers/gpu/drm/qxl/qxl_release.c | 2 drivers/gpu/drm/radeon/radeon_kms.c | 1 drivers/gpu/drm/radeon/radeon_vm.c | 2 drivers/gpu/drm/tegra/fb.c | 8 drivers/gpu/drm/ttm/ttm_bo.c | 4 drivers/gpu/drm/ttm/ttm_execbuf_util.c | 4 drivers/gpu/drm/vc4/vc4_gem.c | 2 drivers/gpu/drm/vgem/vgem_fence.c | 2 drivers/gpu/drm/virtio/virtgpu_drv.h | 1 drivers/gpu/drm/virtio/virtgpu_gem.c | 28 drivers/gpu/drm/virtio/virtgpu_plane.c | 10 drivers/gpu/drm/virtio/virtgpu_vq.c | 9 drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c | 4 drivers/i2c/busses/i2c-bcm-iproc.c | 11 drivers/i2c/busses/i2c-davinci.c | 4 drivers/i2c/busses/i2c-imx.c | 135 + drivers/input/joystick/iforce/iforce-packets.c | 11 drivers/input/joystick/iforce/iforce-usb.c | 3 drivers/input/joystick/psxpad-spi.c | 1 drivers/input/keyboard/atkbd.c | 8 drivers/input/misc/ims-pcu.c | 5 drivers/input/mouse/focaltech.c | 2 drivers/input/rmi4/rmi_f54.c | 43 drivers/input/rmi4/rmi_f55.c | 4 drivers/input/touchscreen/mms114.c | 21 drivers/input/touchscreen/sur40.c | 23 drivers/iommu/amd/iommu.c | 3 drivers/md/dm-integrity.c | 4 drivers/md/dm-verity-target.c | 12 drivers/md/dm-verity.h | 2 drivers/media/i2c/imx219.c | 47 drivers/media/platform/aspeed-video.c | 1 drivers/media/platform/marvell-ccic/cafe-driver.c | 1 drivers/media/platform/mtk-vcodec/mtk_vcodec_fw_scp.c | 5 drivers/media/v4l2-core/v4l2-async.c | 8 drivers/media/v4l2-core/v4l2-fwnode.c | 6 drivers/mmc/host/omap_hsmmc.c | 2 drivers/mmc/host/sdhci.c | 16 drivers/mmc/host/sdhci.h | 2 drivers/mmc/host/vub300.c | 36 drivers/mtd/maps/vmu-flash.c | 8 drivers/mtd/spi-nor/swp.c | 30 drivers/net/can/usb/Kconfig | 15 drivers/net/can/usb/Makefile | 2 drivers/net/can/usb/esd_usb.c | 1173 ++++++++++++++ drivers/net/can/usb/esd_usb2.c | 1170 ------------- drivers/net/can/usb/gs_usb.c | 2 drivers/net/ethernet/aquantia/atlantic/aq_ring.c | 25 drivers/net/ethernet/aquantia/atlantic/aq_ring.h | 1 drivers/net/ethernet/aquantia/atlantic/aq_vec.c | 2 drivers/net/ethernet/intel/ice/ice_ethtool.c | 10 drivers/net/ethernet/intel/ice/ice_main.c | 10 drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 48 drivers/net/ethernet/intel/igc/igc_main.c | 1 drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 14 drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 1 drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c | 18 drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 14 drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c | 8 drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 92 + drivers/net/ethernet/microsoft/mana/mana_en.c | 13 drivers/net/ethernet/ti/am65-cpsw-nuss.c | 2 drivers/net/ipa/ipa_smp2p.c | 30 drivers/net/thunderbolt.c | 8 drivers/net/wan/ixp4xx_hss.c | 4 drivers/net/wireless/ath/ath6kl/txrx.c | 2 drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 16 drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h | 6 drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 45 drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 6 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 8 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h | 1 drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 3 drivers/net/wireless/marvell/libertas_tf/main.c | 2 drivers/pinctrl/bcm/pinctrl-bcm2835.c | 4 drivers/pinctrl/cirrus/pinctrl-lochnagar.c | 2 drivers/pinctrl/core.c | 15 drivers/pinctrl/intel/pinctrl-cherryview.c | 4 drivers/pinctrl/intel/pinctrl-intel.c | 4 drivers/pinctrl/intel/pinctrl-lynxpoint.c | 4 drivers/pinctrl/mediatek/pinctrl-moore.c | 4 drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 4 drivers/pinctrl/mediatek/pinctrl-paris.c | 4 drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 4 drivers/pinctrl/pinctrl-as3722.c | 4 drivers/pinctrl/pinctrl-axp209.c | 2 drivers/pinctrl/pinctrl-ingenic.c | 11 drivers/pinctrl/pinctrl-ocelot.c | 4 drivers/pinctrl/pinctrl-rk805.c | 4 drivers/pinctrl/pinctrl-st.c | 4 drivers/pinctrl/renesas/gpio.c | 4 drivers/pinctrl/stm32/pinctrl-stm32.c | 4 drivers/pinctrl/sunxi/pinctrl-sunxi.c | 4 drivers/pinctrl/vt8500/pinctrl-wmt.c | 4 drivers/remoteproc/qcom_common.c | 31 drivers/remoteproc/qcom_common.h | 5 drivers/remoteproc/qcom_q6v5_pas.c | 20 drivers/s390/cio/vfio_ccw_cp.c | 17 drivers/s390/net/qeth_core_main.c | 3 drivers/s390/net/qeth_l3_main.c | 5 drivers/scsi/lpfc/lpfc_init.c | 3 drivers/scsi/scsi_debug.c | 27 drivers/scsi/sd.h | 27 drivers/scsi/sd_zbc.c | 126 + drivers/thunderbolt/domain.c | 36 drivers/thunderbolt/icm.c | 5 drivers/thunderbolt/nhi.c | 6 drivers/thunderbolt/nvm.c | 4 drivers/thunderbolt/property.c | 38 drivers/thunderbolt/switch.c | 20 drivers/thunderbolt/tb.c | 58 drivers/thunderbolt/tb.h | 2 drivers/thunderbolt/xdomain.c | 94 - drivers/tty/serial/8250/8250_mid.c | 6 drivers/tty/serial/max310x.c | 20 drivers/tty/serial/sc16is7xx.c | 192 +- drivers/usb/gadget/function/f_tcm.c | 192 +- drivers/usb/gadget/function/tcm.h | 13 drivers/vdpa/vdpa_user/iova_domain.c | 91 - drivers/vdpa/vdpa_user/iova_domain.h | 13 drivers/vdpa/vdpa_user/vduse_dev.c | 16 drivers/video/fbdev/core/bitblit.c | 122 - drivers/video/fbdev/core/fbcon.c | 413 ++-- drivers/video/fbdev/core/fbcon.h | 6 drivers/video/fbdev/core/fbcon_ccw.c | 146 - drivers/video/fbdev/core/fbcon_cw.c | 146 - drivers/video/fbdev/core/fbcon_rotate.c | 44 drivers/video/fbdev/core/fbcon_rotate.h | 6 drivers/video/fbdev/core/fbcon_ud.c | 162 - drivers/video/fbdev/core/softcursor.c | 18 drivers/video/fbdev/core/tileblit.c | 28 fs/9p/vfs_inode.c | 9 fs/binfmt_elf.c | 4 fs/binfmt_elf_fdpic.c | 4 fs/binfmt_misc.c | 14 fs/ceph/acl.c | 6 fs/ceph/addr.c | 20 fs/ceph/cache.c | 2 fs/ceph/caps.c | 53 fs/ceph/dir.c | 20 fs/ceph/export.c | 10 fs/ceph/file.c | 42 fs/ceph/inode.c | 14 fs/ceph/ioctl.c | 8 fs/ceph/mds_client.c | 11 fs/ceph/mds_client.h | 2 fs/ceph/mdsmap.c | 2 fs/ceph/metric.c | 5 fs/ceph/snap.c | 2 fs/ceph/super.c | 22 fs/ceph/super.h | 14 fs/ceph/xattr.c | 12 fs/cifs/smb2ops.c | 4 fs/crypto/policy.c | 2 fs/exec.c | 6 fs/f2fs/data.c | 2 fs/ksmbd/auth.c | 4 fs/ksmbd/connection.c | 23 fs/ksmbd/connection.h | 5 fs/ksmbd/oplock.c | 8 fs/ksmbd/smb2pdu.c | 102 - fs/ksmbd/smb2pdu.h | 9 fs/ksmbd/smb_common.c | 43 fs/ksmbd/smb_common.h | 9 fs/namei.c | 43 fs/ntfs3/fsntfs.c | 20 fs/ntfs3/index.c | 44 fs/ntfs3/ntfs_fs.h | 2 fs/overlayfs/copy_up.c | 14 fs/super.c | 19 fs/xfs/libxfs/xfs_sb.c | 4 fs/xfs/xfs_dquot.c | 3 include/drm/drm_connector.h | 6 include/drm/drm_displayid.h | 2 include/linux/audit.h | 18 include/linux/bootconfig.h | 3 include/linux/bpf_lsm.h | 4 include/linux/ceph/ceph_debug.h | 38 include/linux/dma-resv.h | 2 include/linux/dma/edma.h | 50 include/linux/firmware.h | 3 include/linux/fs.h | 33 include/linux/ip.h | 21 include/linux/jiffies.h | 13 include/linux/lsm_hooks.h | 1 include/linux/mmc/sdio_ids.h | 2 include/linux/namei.h | 1 include/linux/pinctrl/consumer.h | 13 include/linux/thunderbolt.h | 3 include/media/v4l2-async.h | 8 include/net/dst.h | 24 include/net/inet6_hashtables.h | 2 include/net/inet_hashtables.h | 2 include/net/ip.h | 11 include/net/ip_tunnels.h | 3 include/net/ip_vs.h | 7 include/net/lwtunnel.h | 8 include/net/netfilter/nf_queue.h | 1 include/net/route.h | 5 include/uapi/linux/ip_vs.h | 6 init/main.c | 39 kernel/audit.c | 2 kernel/audit.h | 32 kernel/audit_fsnotify.c | 39 kernel/audit_tree.c | 2 kernel/audit_watch.c | 42 kernel/auditfilter.c | 17 kernel/auditsc.c | 6 kernel/bpf/bpf_inode_storage.c | 10 kernel/fork.c | 21 kernel/locking/spinlock_rt.c | 27 kernel/sched/psi.c | 6 kernel/taskstats.c | 67 kernel/trace/ftrace.c | 21 kernel/trace/ring_buffer.c | 23 lib/bootconfig.c | 65 lib/compat_audit.c | 12 mm/madvise.c | 3 mm/memory_hotplug.c | 15 mm/mincore.c | 3 mm/pagewalk.c | 8 mm/ptdump.c | 7 net/bluetooth/hci_event.c | 2 net/ceph/cls_lock_client.c | 21 net/ceph/decode.c | 18 net/ceph/osdmap.c | 9 net/core/dst.c | 8 net/core/pktgen.c | 43 net/core/sock.c | 6 net/ipv4/icmp.c | 24 net/ipv4/igmp.c | 2 net/ipv4/ip_fragment.c | 2 net/ipv4/ip_output.c | 4 net/ipv4/ip_tunnel_core.c | 35 net/ipv4/ip_vti.c | 4 net/ipv4/ipip.c | 41 net/ipv4/netfilter.c | 4 net/ipv4/route.c | 10 net/ipv4/tcp_fastopen.c | 4 net/ipv4/tcp_ipv4.c | 8 net/ipv4/tcp_metrics.c | 8 net/ipv4/xfrm4_output.c | 2 net/ipv6/ip6_tunnel.c | 40 net/ipv6/sit.c | 38 net/ipv6/tcp_ipv6.c | 10 net/mptcp/options.c | 8 net/mptcp/pm_netlink.c | 4 net/mptcp/protocol.c | 119 - net/mptcp/protocol.h | 29 net/mptcp/sockopt.c | 24 net/mptcp/subflow.c | 17 net/netfilter/ipset/ip_set_core.c | 19 net/netfilter/ipset/ip_set_list_set.c | 7 net/netfilter/ipvs/ip_vs_conn.c | 4 net/netfilter/ipvs/ip_vs_core.c | 6 net/netfilter/ipvs/ip_vs_ctl.c | 4 net/netfilter/ipvs/ip_vs_dh.c | 4 net/netfilter/ipvs/ip_vs_lblc.c | 2 net/netfilter/ipvs/ip_vs_lblcr.c | 8 net/netfilter/nf_conntrack_sip.c | 10 net/netfilter/nf_flow_table_core.c | 7 net/netfilter/nf_queue.c | 14 net/netfilter/nf_tables_offload.c | 2 net/netfilter/nfnetlink_queue.c | 3 net/netfilter/nft_set_pipapo.c | 254 +-- net/netfilter/nft_set_pipapo.h | 8 net/openvswitch/conntrack.c | 39 net/packet/af_packet.c | 7 net/rxrpc/call_accept.c | 27 net/sched/act_ct.c | 41 net/sched/sch_api.c | 24 net/sched/sch_cake.c | 2 net/sched/sch_taprio.c | 12 net/sctp/protocol.c | 20 net/sctp/sysctl.c | 9 net/smc/af_smc.c | 3 net/smc/smc_rx.c | 12 net/smc/smc_tx.c | 17 net/tipc/socket.c | 6 net/x25/af_x25.c | 4 net/x25/x25_timer.c | 25 net/xfrm/espintcp.c | 32 security/apparmor/include/net.h | 6 security/apparmor/lsm.c | 38 security/bpf/hooks.c | 3 security/security.c | 530 +++--- security/selinux/hooks.c | 91 - security/selinux/include/objsec.h | 5 security/selinux/netlabel.c | 23 security/selinux/ss/policydb.c | 31 security/selinux/ss/services.c | 4 security/smack/smack.h | 5 security/smack/smack_lsm.c | 66 security/smack/smack_netfilter.c | 8 sound/core/seq/seq_timer.c | 13 sound/hda/hdac_regmap.c | 4 sound/pci/hda/patch_conexant.c | 3 sound/soc/codecs/cs4265.c | 4 sound/soc/codecs/lpass-wsa-macro.c | 8 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 12 sound/soc/mediatek/mt8192/mt8192-afe-pcm.c | 118 - sound/soc/xilinx/xlnx_formatter_pcm.c | 10 345 files changed, 5736 insertions(+), 3943 deletions(-)
Aaron Ma (1):
ice: wait for reset completion in ice_resume()
Abdun Nihaal (1):
scsi: lpfc: Fix memory leak in lpfc_sli4_driver_resource_setup()
Alan Borzeszkowski (1):
thunderbolt: Update property.c function documentation
Aldo Ariel Panzardo (1):
net/sched: serialize qdisc_rtab_list against concurrent get/put
Alexey Velichayshiy (1):
netfilter: nf_tables_offload: suppress WARN_ON_ONCE for ENOMEM in abort path
Ali Ahmet Memis (1):
openrisc: signal: do not restore privileged SR bits on sigreturn
Amir Goldstein (2):
fsnotify: opt-in for permission events at file open time
fs: don't block write during exec on pre-content watched files
Andy Shevchenko (2):
serial: 8250_mid: Remove unneeded test for ->setup() presence
libceph: Amend checking to fix make W=1 build breakage
AngeloGioacchino Del Regno (3):
ASoC: mediatek: mt8192-afe-pcm: Convert to devm_pm_runtime_enable()
ASoC: mediatek: mt8192-afe-pcm: Simplify with dev_err_probe()
ASoC: mediatek: Use common mtk_afe_pcm_platform with common probe cb
Ashutosh Desai (3):
drm/dp/mst: fix buffer overflows in sideband chunk accumulation drm/dp/mst: fix OOB reads in remote DPCD/I2C sideband reply parsers drm/dp/mst: fix OOB reads on 2-byte fields in sideband reply parsers
Bart Van Assche (2):
scsi: sd: sd_zbc: Improve source code documentation
scsi: sd: sd_zbc: Introduce struct zoned_disk_info
Bartosz Golaszewski (1):
treewide: rename pinctrl_gpio_direction_output_new()
Baul Lee (1):
net/x25: fix use-after-free of the socket by its timers
Breno Leitao (3):
9p: skip nlink update in cacheless mode to fix WARN_ON
bootconfig: move xbc_snprint_cmdline() to lib/bootconfig.c
bootconfig: fix NULL-pointer arithmetic in xbc_snprint_cmdline()
Bryam Vargas (7):
selinux: require every boolean value to be defined
selinux: reject a class permission count below its inherited common
selinux: do not cancel a policy conversion that never started
Input: synaptics-rmi4 - bound the F54 report size to the allocated buffer
Input: mms114 - reject an oversized device packet size
net/sched: sch_taprio: Replace direct dequeue call with peek and qdisc_dequeue_peeked drm/virtio: bound EDID block reads to the response buffer
Candice Li (1):
drm/amdgpu: validate GEM_CREATE domain combinations
Casey Schaufler (1):
lsm: infrastructure management of the sock security
Cen Zhang (1):
usb: gadget: f_tcm: synchronize delayed set_alt with teardown
Chao Yu (1):
f2fs: fix UAF issue in f2fs_merge_page_bio()
ChenXiaoSong (2):
smb/server: fix minimum SMB1 PDU size
smb/server: fix minimum SMB2 PDU size
Chengfeng Ye (1):
net: pktgen: fix proc entry use-after-free
Chenguang Zhao (1):
mptcp: decrement subflows counter on failed passive join
Christian Brauner (3):
super: fix emergency thaw deadlock on frozen block devices
binfmt_misc: restore write access when removing an entry
binfmt_misc: use exe_file_deny_write_access() for the interpreter clone
Christian König (1):
dma-buf/drivers: make reserving a shared slot mandatory v4
Christoph Hellwig (1):
xfs: check v5 superblock features early
Christophe JAILLET (1):
thunderbolt: Remove usage of the deprecated ida_simple_xx() API
Cássio Gabriel (2):
ASoC: mediatek: mt8183: Check runtime resume during probe
ASoC: mediatek: mt8192: Check runtime resume during probe
Damien Le Moal (3):
scsi: sd: sd_zbc: Use logical blocks as unit when querying zones
scsi: sd: sd_zbc: Return early in sd_zbc_check_zoned_characteristics()
scsi: scsi_debug: Rename zone type constants
Daming Li (1):
net: smc: fix splice entry lifetime imbalance in smc_rx_splice
Daniel Hodges (1):
wifi: ath6kl: fix use-after-free in aggr_reset_state()
David Carlier (2):
media: aspeed: fix missing of_reserved_mem_device_release() on probe failure
igc: remove napi_synchronize() in igc_down()
David Plowman (1):
media: i2c: imx219: Correct the minimum vblanking value
David Rosca (4):
drm/amdgpu: Reject UVD message with invalid number of h265 refs drm/amdgpu: Reject UVD message with dimensions above 4096 drm/amdgpu: Implement insert_end for VCE 3 drm/amdgpu: Fix UVD decode image min size calculation
Dawei Feng (2):
octeontx2-pf: fix SQB pointer leak on init failure
ice: fix memory leak in ice_lbtest_prepare_rings()
Dawid Osuchowski (1):
ice: fix VF interrupts cleanup
Dawid Wróbel (1):
ASoC: codecs: lpass-wsa-macro: Fix enum kcontrol accesses
Deepanshu Kartikey (1):
drm/virtio: use uninterruptible resv lock for plane updates
Dexuan Cui (1):
net: mana: Validate the packet length reported by the NIC
Dmitry Osipenko (2):
drm/virtio: Return proper error codes instead of -1 drm/virtio: Unlock reservations on dma_resv_reserve_fences() error
Dmitry Torokhov (9):
Input: synaptics-rmi4 - fix F55 transmitter electrode count typo
Input: synaptics-rmi4 - zero report size on F54 work error
Input: synaptics-rmi4 - block s_input when F54 queue is busy
Input: synaptics-rmi4 - propagate F54 worker errors to V4L2 queue
Input: sur40 - fix input device registration ordering
Input: sur40 - fix V4L error path cleanup
Input: mms114 - fix touch indexing for MMS134S and MMS136
firmware_loader: introduce __free() cleanup hanler
Input: ims-pcu - fix firmware leak in async update
Easwar Hariharan (2):
jiffies: Define secs_to_jiffies()
jiffies: Cast to unsigned long in secs_to_jiffies() conversion
Eric Dumazet (6):
tcp: convert to dev_net_rcu()
net: dst: annotate data-races around dst->input
net: dst: annotate data-races around dst->output
net: dst: add four helpers to annotate data-races around dst->dev
ipv4: adopt dst_dev, skb_dst_dev and skb_dst_dev_net[_rcu]
af_packet: Don't send zero-byte data in tpacket_snd().
Eric Farman (1):
s390/vfio_ccw: Fix out of bounds check on CCW array
Eugenio Pérez (2):
vduse: remove unused vaddr parameter of vduse_domain_free_coherent
vduse: take out allocations from vduse_dev_alloc_coherent
Fan Wu (2):
can: esd_usb: kill anchored URBs before freeing netdevs
wifi: brcmfmac: drain bus_reset work on device removal
Florian Fuchs (1):
mtd: maps: vmu-flash: fix fault in unaligned fixup
Florian Westphal (10):
netfilter: nft_set_pipapo: use GFP_KERNEL for insertions
netfilter: nft_set_pipapo: move prove_locking helper around
netfilter: nf_conntrack_sip: remove net variable shadowing
netfilter: nft_set_pipapo: make pipapo_clone helper return NULL
netfilter: nft_set_pipapo: prepare walk function for on-demand clone
netfilter: nft_set_pipapo: merge deactivate helper into caller
netfilter: nft_set_pipapo: prepare pipapo_get helper for on-demand clone
netfilter: nft_set_pipapo: move cloning of match info to insert/removal path
netfilter: nft_set_pipapo: don't leak bad clone into future transaction
netfilter: ipset: fix list type element drift bug
Frank Jungclaus (1):
can/esd_usb2: Rename esd_usb2.c to esd_usb.c
Frank Li (3):
dmaengine: dw-edma: Remove unused irq field in struct dw_edma_chip
dmaengine: dw-edma: Detach the private data and chip info structures
dmaengine: dw-edma: Add spinlock to protect DONE_INT_MASK and ABORT_INT_MASK
Fredric Cover (1):
smb: client: use kvzalloc() for megabyte buffer in simple fallocate
Fullway Wang (1):
media: mtk-vcodec: potential null pointer deference in SCP
Geetha sowjanya (1):
octeontx2-af: Fix APR entry mapping based on APR_LMT_CFG
George Wilson (2):
powerpc/pseries: pci - logic bug powerpc/pseries: lparcfg - fix kbuf[] underflow
Gokul Sivakumar (1):
wifi: brcmfmac: fix 43752 SDIO FWVID incorrectly labelled as Cypress (CYW)
Greg Kroah-Hartman (1):
Linux 5.15.217
Gregory Price (1):
mm/vmstat: fold stranded per-cpu node stats when a node comes online
Guangguan Wang (1):
net/smc: rdma write inline if qp has sufficient inline space
Guangshuo Li (3):
drm/radeon: fix autosuspend cleanup during teardown
mmc: vub300: fix use-after-free on probe failure
media: marvell-cam: fix missing pci_disable_device() on remove
Haibo Chen (1):
mmc: sdhci: make tuning_err a signed int
Haoxiang Li (3):
i2c: davinci: Unregister cpufreq notifier on probe failure
net: ixp4xx_hss: fix duplicate HDLC netdev allocation
net: ipa: fix SMEM state handle leaks in SMP2P init
Haoze Xie (1):
netfilter: nf_queue: pin bridge device while NFQUEUE holds fake dst
Herbert Xu (1):
crypto: ccm - Set rfc4309 maxauthsize from child
Hidayath Khan (1):
s390/qeth: validate user buffer length in SNMP and ARP query ioctls
Hugo Villeneuve (4):
serial: max310x: replace bare use of 'unsigned' with 'unsigned int' (checkpatch)
serial: sc16is7xx: remove obsolete out_thread label
serial: sc16is7xx: fix regression with GPIO configuration
serial: sc16is7xx: implement gpio get_direction() callback
Hyunjung Ko (1):
net/sched: act_ct: fix sk_buff leak when the header checks reject a packet
Ibrahim Hashimov (2):
ksmbd: fix integer overflow in set_file_allocation_info()
scsi: scsi_debug: Fix REPORT ZONES alloc_len underflow OOB write
Ilpo Järvinen (1):
serial: sc16is7xx: Fill in rs485_supported
Jai Luthra (1):
media: i2c: imx219: Rename VTS to FRM_LENGTH
James Montgomery (1):
ksmbd: defer destroy_previous_session() until after NTLM authentication
Jani Nikula (4):
drm/displayid: fix Tiled Display Topology ID size drm/i915/vrr: require valid min/max vfreq for VRR drm/i915/hdcp: check streams[] bounds before overflow drm/i915/hdcp: require monotonically increasing seq_num_v
Jann Horn (1):
bpf,fork: wipe ->bpf_storage before bailouts that access it
Jarkko Sakkinen (1):
tpm: tpm_tis_spi: Use wait_woken() in wait_for_tmp_stat()
Jason Gunthorpe (1):
udmabuf: Do not create malformed scatterlists
Jason Wang (1):
VDUSE: avoid leaking information to userspace
Jeff Layton (1):
audit: widen ino fields to u64
Jiacheng Yu (1):
fbcon: Use correct type for vc_resize() return value
Jiangshan Yi (1):
serial: 8250_mid: Fix NULL function pointer dereference on DNV/ICX-D/SNR platforms
Jiasheng Jiang (1):
media: mediatek: vcodec: Fix a resource leak related to the scp device in FW initialization
Johan Hovold (2):
mmc: vub300: fix use-after-free on disconnect
mmc: vub300: rename probe error labels
Jon Hunter (1):
arm64: tegra: Add EL2 virtual timer interrupt for Tegra194
Jonas Gorski (1):
i2c: iproc: reset bus after timeout if START_BUSY is stuck
Josh Poimboeuf (1):
ftrace: Fix off-by-one fentry site disable in ftrace_free_mem()
Junrui Luo (1):
octeontx2-af: cn10k: restrict VF LMTLINE sharing to its own PF
Jérémy Jean (1):
netfilter: flowtable: publish GC-visible tuple last
Kefu Chai (1):
libceph: tolerate addrvecs with multiple entries of the same type
Konstantin Komarov (1):
fs/ntfs3: Undo critial modificatins to keep directory consistency
Laurent Pinchart (1):
media: i2c: imx219: Drop IMX219_VTS_* macros
Li Daming (1):
rxrpc: serialize kernel accept preallocation with socket teardown
Li Xiasong (1):
tipc: restrict socket queue dumps in enqueue tracepoints
LiangCheng Wang (1):
wifi: brcmfmac: set F2 blocksize to 256 for BCM43752
Liem (1):
i2c: imx: Fix slave registration race and error handling
Linmao Li (1):
Input: psxpad-spi - set driver data before use
Liu Jian (1):
net: Add helper function to parse netlink msg of ip_tunnel_encap
Long Li (1):
xfs: fix ilock leak on error in xfs_dq_get_next_id
Lorenzo Stoakes (ARM) (1):
mm/ptdump: always stabilise against page table freeing using init_mm
Maoyi Xie (4):
net: thunderbolt: Fix frags[] overflow by bounding frame_count
net: ipip: require CAP_NET_ADMIN in the device netns for changelink
net: ip6_tunnel: require CAP_NET_ADMIN in the device netns for changelink
wifi: libertas_tf: fix use-after-free in lbtf_free_adapter()
Marc Kleine-Budde (1):
can: gs_usb: gs_usb_receive_bulk_callback(): resubmit URB on skb allocation failure
Matt Bobrowski (1):
bpf: Reject BPF_MAP_TYPE_INODE_STORAGE creation if BPF LSM is uninitialized
Matthieu Baerts (NGI0) (1):
mptcp: options: reset DSS fields in case of unexpected size
Max Kellermann (2):
ceph: avoid fs reclaim while using current->journal_info
ceph: fix hanging __ceph_get_caps() with stale mds_wanted
Michael Bommarito (2):
ntfs3: validate split-point offset in indx_insert_into_buffer
thunderbolt: Prevent XDomain delayed work use-after-free on disconnect
Michael Walle (1):
mtd: spi-nor: Fix spi_nor_try_unlock_all()
Mika Westerberg (3):
thunderbolt: Keep XDomain reference during the lifetime of a service
thunderbolt: Remove service debugfs entries during unregister
thunderbolt: Remove XDomain from the bus without holding tb->lock
Mikhail Gavrilov (1):
dma-buf/udmabuf: skip redundant cpu sync to fix cacheline EEXIST warning
Mikulas Patocka (2):
dm-integrity: don't increment hash_offset twice
dm-verity: make error counter atomic
Miquel Raynal (1):
mtd: spi-nor: swp: Improve locking user experience
Mirela Rabulea (1):
media: v4l2-fwnode: Fix subdev owner overwritten in v4l2_async_register_subdev_sensor()
Mukesh Ojha (2):
remoteproc: qcom: replace kstrdup with kstrndup
remoteproc: qcom: fix sparse warnings
Myeonghun Pak (1):
mmc: sdhci: unmap the bounce buffer before device release
Namjae Jeon (4):
ksmbd: rename smb2_get_msg to smb_get_msg
ksmbd: validate minimum PDU size for transform requests
ksmbd: conn lock to serialize smb2 negotiate
ksmbd: reject repeated SMB2 NEGOTIATE requests
NeilBrown (1):
VFS/audit: introduce kern_path_parent() for audit
Norbert Szetei (1):
ALSA: seq: close a re-opened queue timer in the destructor
Oleg Nesterov (1):
taskstats: fill_stats_for_tgid: use for_each_thread()
Ondrej Mosnacek (1):
lsm: use default hook return value in call_int_hook()
Pablo Neira Ayuso (1):
netfilter: nf_conntrack_sip: validate skb_dst() before accessing it
Paolo Abeni (2):
mptcp: cleanup MPJ subflow list handling
mptcp: fix subflow accounting on close
Pavel Skripkin (1):
fs/ntfs3: Make ntfs_update_mftmirr return void
Pavitra Jha (2):
libceph: fix multiple unsafe decodes in decode_locker()
libceph: fix two unsafe bare decodes in decode_lockers()
Pedro Falcato (1):
mm: do file ownership checks with the proper mount idmap
Pengpeng Hou (1):
Input: iforce - validate input packet lengths
Peter Seiderer (1):
net: pktgen: fix code style (WARNING: Block comments)
Peter Ujfalusi (1):
ASoC: cs4265: sort the register default table
Petr Machata (1):
mlxsw: spectrum: On port enslavement to a LAG, join upper's bridges
Raphael Zimmer (1):
libceph: Avoid using invalid osd indices from primary_temp
Rasmus Villemoes (1):
bootconfig: do not put quotes on cmdline items unless necessary
Reinette Chatre (1):
fs/resctrl: Fix double-add of pseudo-locked region's RMID to free list
Ricardo Robaina (2):
audit: use 'unsigned int' instead of 'unsigned'
audit: fix recursive locking deadlock in audit_dupe_exe()
Richard Davies (1):
Input: focaltech - fix array out-of-bounds in focaltech_process_rel_packet
Robert Mader (1):
udmabuf: Ensure to perform cache synchronisation in begin_cpu_udmabuf()
Rosen Penev (1):
ASoC: xilinx: formatter_pcm: pass aud_drv_data to irq handlers
Runyu Xiao (3):
octeontx2-pf: clear stale mailbox IRQ state before request_irq()
octeontx2-vf: clear stale mailbox IRQ state before request_irq()
gpio: tegra: do not call pinctrl for GPIO direction
Sabrina Dubroca (1):
espintcp: use sk_msg_free_partial to fix partial send
Sakari Ailus (2):
media: imx219: Fix maximum frame length in lines
media: v4l: async: Set owner for async sub-devices
Sebastian Alba Vives (1):
fpga: dfl-afu: validate DMA mapping length in afu_dma_map_region()
Sheng Zhao (1):
vduse: Use fixed 4KB bounce pages for non-4KB page size
Siddharth Vadapalli (1):
net: ethernet: ti: am65-cpsw-nuss: Fix port_id extraction from SRC TAG
Souvik Banerjee (1):
ovl: use linked upper dentry in copy-up tmpfile
Stefan Eichenberger (1):
i2c: imx: separate atomic, dma and non-dma use case
Steven Rostedt (1):
ring-buffer: Remove jump to out label in ring_buffer_swap_cpu()
Subbaraya Sundeep (1):
octeontx2: Annotate mmio regions as __iomem
Tang Bin (1):
ASoC: mediatek: mt8192-afe-pcm: Simplify probe() with local dev variable
Tapio Reijonen (1):
serial: max310x: implement gpio_chip::get_direction()
Tejun Heo (1):
sched/psi: Shut down rtpoll_timer in psi_cgroup_free()
Tengda Wu (2):
ftrace: Add global mutex to serialize trace_parser access
ring-buffer: Use current_context for safe per-CPU buffer swap
Thomas Gleixner (1):
locking/rt: Fix the incorrect RCU protection in rt_spin_unlock()
Thomas Zimmermann (2):
fbcon: Rename struct fbcon_ops to struct fbcon_par drm/tegra: fbdev: Remove offset into framebuffer memory
Thorsten Blum (1):
crypto: qce - fix error path in devm_qce_register_algs
Timur Kristóf (1):
drm/amdgpu: Fix amdgpu_bo_move() when old_mem and new_mem are both GTT
Tomasz Moń (1):
sc16is7xx: Properly resume TX after stop
Tristan Madani (1):
selinux: avoid sk_socket dereference in selinux_sctp_bind_connect()
Vincent Jardin (1):
i2c: imx: fix locked bus on SMBus block-read of 0 (atomic)
Vladimir Oltean (1):
net/sched: taprio: avoid calling child->ops->dequeue(child) twice
Wasim Nazir (1):
remoteproc: qcom: Fix leak when custom dump_segments addition fails
Wei Fang (1):
net: packet: fix wrong transport_header when sending VLAN-tagged frame
Weinan Liu (1):
iommu/amd: Don't split flush for amd_iommu_domain_flush_all()
Wentao Liang (1):
mlxsw: fix refcount leak in mlxsw_sp_port_lag_join()
Wolfram Sang (1):
i2c: bcm-iproc: remove printout on handled timeouts
Xiang Mei (2):
net/smc: reject CHID-0 ACCEPT that matches an empty ism_dev slot
libceph: bound pg_{temp,upmap,upmap_items} length to CEPH_PG_MAX_SIZE
Xiang Mei (Microsoft) (1):
netfilter: ipset: fix refcount race between list:set GC and swap
Xin Long (4):
net: add a couple of helpers for iph tot_len
openvswitch: use skb_ip_totlen in conntrack
net: sched: use skb_ip_totlen and iph_totlen
openvswitch: move key and ovs_cb update out of handle_fragments
Xiubo Li (3):
libceph: add doutc and *_client debug macros support
ceph: rename _to_client() to _to_fs_client()
ceph: print cluster fsid and client global_id in all debug logs
Xu Rao (1):
ALSA: hda: Fix cached processing coefficient verbs
Yang Wang (1):
drm/amd/pm: fix torn gpu metrics reads
Yangyu Chen (1):
net: atlantic: free stranded TX buffers on ring deinit
Yiming Zhu (1):
ceph: fix MDS random selection readiness predicate
Yiyang Chen (1):
taskstats: retain dead thread stats in TGID queries
Yizhou Zhao (1):
ipvs: separate destination availability state
Yogesh Lal (1):
remoteproc: qcom: pas: Adjust the phys addr wrt the mem region
Zack Rusin (1):
drm/vmwgfx: Reserve fence slots on buffer objects in cotables
Zhan Xusheng (2):
fscrypt: use the mount idmap for the owner check in fscrypt_ioctl_set_policy()
mmc: omap_hsmmc: fix busy_timeout overflow in ns conversion on 32-bit
Zhang Heng (1):
ALSA: hda: conexant: Remove mic bias threshold override
Zhefu Zhang (1):
Input: atkbd - skip deactivate for Xiaomi Book Pro 14's internal keyboard
Zhiling Zou (1):
sctp: avoid auth_enable sysctl UAF during netns teardown
Zihan Xi (1):
net/sched: act_ct: preserve tc_skb_cb across defragmentation
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 15 -SUBLEVEL = 216 +SUBLEVEL = 217 EXTRAVERSION = NAME = Trick or Treat
arch/arm64/boot/dts/nvidia/tegra194.dtsi +2 -0
@@ -2586,6 +2586,8 @@ timer { <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, <GIC_PPI 10 + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 15 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; interrupt-parent = <&gic>; always-on;
arch/openrisc/include/asm/processor.h +2 -0
@@ -26,6 +26,8 @@ | SPR_SR_DCE | SPR_SR_SM)#define USER_SR (SPR_SR_DME | SPR_SR_IME | SPR_SR_ICE \ | SPR_SR_DCE | SPR_SR_IEE | SPR_SR_TEE) +/* SR bits user space may change via sigreturn, the rest stay kernel owned */ +#define SPR_SR_USER_MASK (SPR_SR_F | SPR_SR_CY | SPR_SR_OV)/* * User space process size. This is hardcoded into a few places,
arch/openrisc/kernel/signal.c +3 -2
@@ -39,6 +39,7 @@ struct rt_sigframe {static int restore_sigcontext (struct pt_regs *regs,struct sigcontext __user *sc) { +unsigned long old_sr = regs->sr;int err =0 ;/* Always make any pending restarted system calls return -EINTR */
@@ -53,8 +54,8 @@ static int restore_sigcontext(struct pt_regs *regs, err |=__copy_from_user (®s->pc, &sc->regs.pc,sizeof (unsigned long )); err |=__copy_from_user (®s->sr, &sc->regs.sr,sizeof (unsigned long )); -/* make sure the SM-bit is cleared so user-mode cannot fool us */ - regs->sr &= ~SPR_SR_SM ; +/* keep the privileged SR bits kernel owned, restore only user flags */ + regs->sr = (old_sr & ~SPR_SR_USER_MASK ) | (regs->sr &SPR_SR_USER_MASK ); regs->orig_gpr11 =-1 ;/* Avoid syscall restart checks */
arch/powerpc/platforms/pseries/lparcfg.c +1 -1
@@ -641,7 +641,7 @@ static ssize_t lparcfg_write(struct file *file, const char __user * buf,if (!firmware_has_feature (FW_FEATURE_SPLPAR ))return -EINVAL ; -if (count >sizeof (kbuf)) +if (count ==0 || count >sizeof (kbuf))return -EINVAL ;if (copy_from_user (kbuf, buf, count))
arch/powerpc/platforms/pseries/pci.c +1 -1
@@ -160,7 +160,7 @@ static int pseries_pci_sriov_enable(struct pci_dev *pdev, u16 num_vfs)/* First integer stores max config */ max_config_vfs =of_read_number (&max_vfs[0 ],1 ); -if (max_config_vfs < num_vfs && num_vfs >MAX_VFS_FOR_MAP_PE ) { +if (max_config_vfs < num_vfs || num_vfs >MAX_VFS_FOR_MAP_PE ) { dev_err(&pdev->dev, "Num VFs %x > %x Configurable VFs\n", num_vfs, (num_vfs > MAX_VFS_FOR_MAP_PE) ?
arch/x86/kernel/cpu/resctrl/rdtgroup.c +7 -5
@@ -2439,10 +2439,6 @@ static void rmdir_all_sub(void)if (rdtgrp == &rdtgroup_default)continue ; -if (rdtgrp->mode ==RDT_MODE_PSEUDO_LOCKSETUP || - rdtgrp->mode ==RDT_MODE_PSEUDO_LOCKED ) -rdtgroup_pseudo_lock_remove (rdtgrp); -/* * Give any CPUs back to the default group. We cannot copy * cpu_online_mask because a CPU might have executed the
@@ -2451,7 +2447,13 @@ static void rmdir_all_sub(void)cpumask_or (&rdtgroup_default.cpu_mask, &rdtgroup_default.cpu_mask, &rdtgrp->cpu_mask); -free_rmid (rdtgrp->mon.rmid); +if (rdtgrp->mode ==RDT_MODE_PSEUDO_LOCKSETUP || + rdtgrp->mode ==RDT_MODE_PSEUDO_LOCKED ) { +rdtgroup_pseudo_lock_remove (rdtgrp); + }else { +/* Pseudo-locked group's RMID is freed during setup. */ +free_rmid (rdtgrp->mon.rmid); + }kernfs_remove (rdtgrp->kn);list_del (&rdtgrp->rdtgroup_list);
crypto/ccm.c +1 -1
@@ -753,7 +753,7 @@ static int crypto_rfc4309_create(struct crypto_template *tmpl, inst->alg.ivsize =8 ; inst->alg.chunksize =crypto_aead_alg_chunksize (alg); - inst->alg.maxauthsize =16 ; + inst->alg.maxauthsize =crypto_aead_alg_maxauthsize (alg); inst->alg.base.cra_ctxsize =sizeof (struct crypto_rfc4309_ctx );
drivers/char/tpm/tpm_tis_core.c +24 -14
@@ -49,10 +49,11 @@ static int wait_for_tpm_stat(struct tpm_chip *chip, u8 mask, bool check_cancel) {struct tpm_tis_data *priv =dev_get_drvdata (&chip->dev); +DEFINE_WAIT_FUNC (wait, woken_wake_function);unsigned long stop; -long rc;u8 status;bool canceled = false; +int ret;/* check current status */ status = chip->ops->status (chip);
@@ -62,23 +63,32 @@ static int wait_for_tpm_stat(struct tpm_chip *chip, u8 mask, stop = jiffies + timeout;if (chip->flags &TPM_CHIP_FLAG_IRQ ) { + ret = -ETIME ; +add_wait_queue (queue, &wait); again: +if (wait_for_tpm_stat_cond (chip, mask, check_cancel, + &canceled)) { + ret = canceled ? -ECANCELED :0 ; + goto out; + } + timeout = stop - jiffies;if ((long )timeout <=0 ) -return -ETIME ; - rc =wait_event_interruptible_timeout (*queue, -wait_for_tpm_stat_cond (chip, mask, check_cancel, - &canceled), - timeout); -if (rc >0 ) { -if (canceled) -return -ECANCELED ; -return 0 ; - } -if (rc == -ERESTARTSYS &&freezing (current)) { -clear_thread_flag (TIF_SIGPENDING ); - goto again; + goto out; + +if (signal_pending (current)) { +if (freezing (current)) { +clear_thread_flag (TIF_SIGPENDING ); + goto again; + } + goto out; } + +wait_woken (&wait,TASK_INTERRUPTIBLE , timeout); + goto again; +out: +remove_wait_queue (queue, &wait); +return ret; } else { do { usleep_range(priv->timeout_min,
drivers/crypto/qce/core.c +1 -1
@@ -55,7 +55,7 @@ static int qce_register_algs(struct qce_device *qce) ret = ops->register_algs (qce);if (ret) {for (j = i -1 ; j >=0 ; j--) - ops->unregister_algs (qce); + qce_ops[j]->unregister_algs (qce);return ret; } }
drivers/dma-buf/dma-resv.c +5 -5
@@ -131,7 +131,7 @@ void dma_resv_fini(struct dma_resv *obj)EXPORT_SYMBOL (dma_resv_fini);/** -* dma_resv_reserve_shared - Reserve space to add shared fences to +* dma_resv_reserve_fences - Reserve space to add shared fences to * a dma_resv. * @obj: reservation object * @num_fences: number of fences we want to add
@@ -142,7 +142,7 @@ EXPORT_SYMBOL(dma_resv_fini);* RETURNS * Zero for success, or -errno */ -int dma_resv_reserve_shared (struct dma_resv *obj,unsigned int num_fences) +int dma_resv_reserve_fences (struct dma_resv *obj,unsigned int num_fences) {struct dma_resv_list *old, *new;unsigned int i, j, k, max;
@@ -205,7 +205,7 @@ int dma_resv_reserve_shared(struct dma_resv *obj, unsigned int num_fences)return 0 ; } -EXPORT_SYMBOL (dma_resv_reserve_shared); +EXPORT_SYMBOL (dma_resv_reserve_fences);#ifdef CONFIG_DEBUG_MUTEXES /**
@@ -213,7 +213,7 @@ EXPORT_SYMBOL(dma_resv_reserve_shared);* @obj: the dma_resv object to reset * * Reset the number of pre-reserved shared slots to test that drivers do -* correct slot allocation using dma_resv_reserve_shared(). See also +* correct slot allocation using dma_resv_reserve_fences(). See also * &dma_resv_list.shared_max. */ void dma_resv_reset_shared_max (struct dma_resv *obj)
@@ -235,7 +235,7 @@ EXPORT_SYMBOL(dma_resv_reset_shared_max);* @fence: the shared fence to add * * Add a fence to a shared slot, obj->lock must be held, and -* dma_resv_reserve_shared() has been called. +* dma_resv_reserve_fences() has been called. */ void dma_resv_add_shared_fence (struct dma_resv *obj,struct dma_fence *fence) {
drivers/dma-buf/udmabuf.c +12 -9
@@ -72,14 +72,16 @@ static struct sg_table *get_sg_table(struct device *dev, struct dma_buf *buf,0 , ubuf->pagecount <<PAGE_SHIFT , GFP_KERNEL);if (ret <0 ) - goto err; - ret =dma_map_sgtable (dev, sg, direction,0 ); + goto err_alloc; + + ret =dma_map_sgtable (dev, sg, direction,DMA_ATTR_SKIP_CPU_SYNC );if (ret <0 ) - goto err; + goto err_map;return sg; -err: +err_map:sg_free_table (sg); +err_alloc:kfree (sg);return ERR_PTR (ret); }
@@ -87,7 +89,7 @@ static struct sg_table *get_sg_table(struct device *dev, struct dma_buf *buf,static void put_sg_table (struct device *dev,struct sg_table *sg,enum dma_data_direction direction) { -dma_unmap_sgtable (dev, sg, direction,0 ); +dma_unmap_sgtable (dev, sg, direction,DMA_ATTR_SKIP_CPU_SYNC );sg_free_table (sg);kfree (sg); }
@@ -125,21 +127,22 @@ static int begin_cpu_udmabuf(struct dma_buf *buf, {struct udmabuf *ubuf = buf->priv;struct device *dev = ubuf->device->this_device; -int ret =0 ;if (!ubuf->sg) { ubuf->sg =get_sg_table (dev, buf, direction);if (IS_ERR (ubuf->sg)) { +int ret; + ret =PTR_ERR (ubuf->sg); ubuf->sg =NULL ; +return ret; }else { ubuf->sg_dir = direction; } - }else { -dma_sync_sgtable_for_cpu (dev, ubuf->sg, direction); } -return ret; +dma_sync_sgtable_for_cpu (dev, ubuf->sg, direction); +return 0 ; } static int end_cpu_udmabuf(struct dma_buf *buf,
drivers/dma/dw-edma/dw-edma-core.c +49 -41
224 lines not on this page · raw message
drivers/dma/dw-edma/dw-edma-core.h +4 -29
@@ -15,20 +15,12 @@#include "../virt-dma.h" #define EDMA_LL_SZ 24 -#define EDMA_MAX_WR_CH 8 -#define EDMA_MAX_RD_CH 8enum dw_edma_dir {EDMA_DIR_WRITE =0 ,EDMA_DIR_READ }; -enum dw_edma_map_format { -EDMA_MF_EDMA_LEGACY =0x0 , -EDMA_MF_EDMA_UNROLL =0x1 , -EDMA_MF_HDMA_COMPAT =0x5 -}; -enum dw_edma_request {EDMA_REQ_NONE =0 ,EDMA_REQ_STOP ,
@@ -57,12 +49,6 @@ struct dw_edma_burst {u32 sz; }; -struct dw_edma_region { -phys_addr_t paddr; -void __iomem *vaddr; -size_t sz; -}; -struct dw_edma_chunk {struct list_head list;struct dw_edma_chan *chan;
@@ -87,7 +73,7 @@ struct dw_edma_desc {struct dw_edma_chan {struct virt_dma_chan vc; -struct dw_edma_chip *chip; +struct dw_edma *dw;int id;enum dw_edma_dir dir;
@@ -109,10 +95,6 @@ struct dw_edma_irq {struct dw_edma *dw; }; -struct dw_edma_core_ops { -int (*irq_vector)(struct device *dev,unsigned int nr); -}; -struct dw_edma {char name[20 ];
@@ -122,21 +104,14 @@ struct dw_edma {struct dma_device rd_edma;u16 rd_ch_cnt; -struct dw_edma_region rg_region;/* Registers */ -struct dw_edma_region ll_region_wr[EDMA_MAX_WR_CH ]; -struct dw_edma_region ll_region_rd[EDMA_MAX_RD_CH ]; -struct dw_edma_region dt_region_wr[EDMA_MAX_WR_CH ]; -struct dw_edma_region dt_region_rd[EDMA_MAX_RD_CH ]; -struct dw_edma_irq *irq;int nr_irqs; -enum dw_edma_map_format mf; -struct dw_edma_chan *chan; -const struct dw_edma_core_ops *ops; -raw_spinlock_t lock;/* Only for legacy */ +raw_spinlock_t lock;/* Protect v0 shared registers */ + +struct dw_edma_chip *chip;#ifdef CONFIG_DEBUG_FS struct dentry *debugfs;#endif /* CONFIG_DEBUG_FS */
drivers/dma/dw-edma/dw-edma-pcie.c +34 -49
144 lines not on this page · raw message
drivers/dma/dw-edma/dw-edma-v0-core.c +22 -16
@@ -25,7 +25,7 @@ enum dw_edma_control {static inline struct dw_edma_v0_regs __iomem *__dw_regs (struct dw_edma *dw) { -return dw->rg_region.vaddr; +return dw->chip->rg_region.vaddr; }#define SET_32 (dw, name, value) \
@@ -96,7 +96,7 @@ static inline struct dw_edma_v0_regs __iomem *__dw_regs(struct dw_edma *dw)static inline struct dw_edma_v0_ch_regs __iomem *__dw_ch_regs (struct dw_edma *dw,enum dw_edma_dir dir,u16 ch) { -if (dw->mf ==EDMA_MF_EDMA_LEGACY ) +if (dw->chip->mf ==EDMA_MF_EDMA_LEGACY )return &(__dw_regs (dw)->type.legacy.ch);if (dir ==EDMA_DIR_WRITE )
@@ -108,7 +108,7 @@ __dw_ch_regs(struct dw_edma *dw, enum dw_edma_dir dir, u16 ch)static inline void writel_ch (struct dw_edma *dw,enum dw_edma_dir dir,u16 ch,u32 value,void __iomem *addr) { -if (dw->mf ==EDMA_MF_EDMA_LEGACY ) { +if (dw->chip->mf ==EDMA_MF_EDMA_LEGACY ) {u32 viewport_sel;unsigned long flags;
@@ -133,7 +133,7 @@ static inline u32 readl_ch(struct dw_edma *dw, enum dw_edma_dir dir, u16 ch, {u32 value; -if (dw->mf ==EDMA_MF_EDMA_LEGACY ) { +if (dw->chip->mf ==EDMA_MF_EDMA_LEGACY ) {u32 viewport_sel;unsigned long flags;
@@ -169,7 +169,7 @@ static inline u32 readl_ch(struct dw_edma *dw, enum dw_edma_dir dir, u16 ch,static inline void writeq_ch (struct dw_edma *dw,enum dw_edma_dir dir,u16 ch,u64 value,void __iomem *addr) { -if (dw->mf ==EDMA_MF_EDMA_LEGACY ) { +if (dw->chip->mf ==EDMA_MF_EDMA_LEGACY ) {u32 viewport_sel;unsigned long flags;
@@ -194,7 +194,7 @@ static inline u64 readq_ch(struct dw_edma *dw, enum dw_edma_dir dir, u16 ch, {u64 value; -if (dw->mf ==EDMA_MF_EDMA_LEGACY ) { +if (dw->chip->mf ==EDMA_MF_EDMA_LEGACY ) {u32 viewport_sel;unsigned long flags;
@@ -256,7 +256,7 @@ u16 dw_edma_v0_core_ch_count(struct dw_edma *dw, enum dw_edma_dir dir)enum dma_status dw_edma_v0_core_ch_status (struct dw_edma_chan *chan) { -struct dw_edma *dw = chan->chip->dw; +struct dw_edma *dw = chan->dw;u32 tmp; tmp = FIELD_GET(EDMA_V0_CH_STATUS_MASK,
@@ -272,7 +272,7 @@ enum dma_status dw_edma_v0_core_ch_status(struct dw_edma_chan *chan)void dw_edma_v0_core_clear_done_int (struct dw_edma_chan *chan) { -struct dw_edma *dw = chan->chip->dw; +struct dw_edma *dw = chan->dw;SET_RW_32 (dw, chan->dir, int_clear,FIELD_PREP (EDMA_V0_DONE_INT_MASK ,BIT (chan->id)));
@@ -280,7 +280,7 @@ void dw_edma_v0_core_clear_done_int(struct dw_edma_chan *chan)void dw_edma_v0_core_clear_abort_int (struct dw_edma_chan *chan) { -struct dw_edma *dw = chan->chip->dw; +struct dw_edma *dw = chan->dw;SET_RW_32 (dw, chan->dir, int_clear,FIELD_PREP (EDMA_V0_ABORT_INT_MASK ,BIT (chan->id)));
@@ -357,7 +357,8 @@ static void dw_edma_v0_core_write_chunk(struct dw_edma_chunk *chunk)void dw_edma_v0_core_start (struct dw_edma_chunk *chunk,bool first) {struct dw_edma_chan *chan = chunk->chan; -struct dw_edma *dw = chan->chip->dw; +struct dw_edma *dw = chan->dw; +unsigned long flags;u32 tmp;dw_edma_v0_core_write_chunk (chunk);
@@ -365,7 +366,7 @@ void dw_edma_v0_core_start(struct dw_edma_chunk *chunk, bool first)if (first) {/* Enable engine */ SET_RW_32 (dw, chan->dir, engine_en,BIT (0 )); -if (dw->mf ==EDMA_MF_HDMA_COMPAT ) { +if (dw->chip->mf ==EDMA_MF_HDMA_COMPAT ) {switch (chan->id) {case 0 : SET_RW_COMPAT(dw, chan->dir, ch0_pwr_en,
@@ -402,6 +403,8 @@ void dw_edma_v0_core_start(struct dw_edma_chunk *chunk, bool first) } }/* Interrupt unmask - done, abort */ +raw_spin_lock_irqsave (&dw->lock, flags); + tmp =GET_RW_32 (dw, chan->dir, int_mask); tmp &= ~FIELD_PREP (EDMA_V0_DONE_INT_MASK ,BIT (chan->id)); tmp &= ~FIELD_PREP (EDMA_V0_ABORT_INT_MASK ,BIT (chan->id));
@@ -410,6 +413,9 @@ void dw_edma_v0_core_start(struct dw_edma_chunk *chunk, bool first) tmp =GET_RW_32 (dw, chan->dir, linked_list_err_en); tmp |=FIELD_PREP (EDMA_V0_LINKED_LIST_ERR_MASK ,BIT (chan->id));SET_RW_32 (dw, chan->dir, linked_list_err_en, tmp); + +raw_spin_unlock_irqrestore (&dw->lock, flags); +/* Channel control */ SET_CH_32 (dw, chan->dir, chan->id, ch_control1, (DW_EDMA_V0_CCS |DW_EDMA_V0_LLE ));
@@ -434,7 +440,7 @@ void dw_edma_v0_core_start(struct dw_edma_chunk *chunk, bool first)int dw_edma_v0_core_device_config (struct dw_edma_chan *chan) { -struct dw_edma *dw = chan->chip->dw; +struct dw_edma *dw = chan->dw;u32 tmp =0 ;/* MSI done addr - low, high */
@@ -504,12 +510,12 @@ int dw_edma_v0_core_device_config(struct dw_edma_chan *chan) }/* eDMA debugfs callbacks */ -void dw_edma_v0_core_debugfs_on (struct dw_edma_chip *chip) +void dw_edma_v0_core_debugfs_on (struct dw_edma *dw) { -dw_edma_v0_debugfs_on (chip); +dw_edma_v0_debugfs_on (dw); } -void dw_edma_v0_core_debugfs_off (struct dw_edma_chip *chip) +void dw_edma_v0_core_debugfs_off (struct dw_edma *dw) { -dw_edma_v0_debugfs_off (chip); +dw_edma_v0_debugfs_off (dw); }
drivers/dma/dw-edma/dw-edma-v0-core.h +2 -2
@@ -22,7 +22,7 @@ u32 dw_edma_v0_core_status_abort_int(struct dw_edma *chan, enum dw_edma_dir dir)void dw_edma_v0_core_start (struct dw_edma_chunk *chunk,bool first);int dw_edma_v0_core_device_config (struct dw_edma_chan *chan);/* eDMA debug fs callbacks */ -void dw_edma_v0_core_debugfs_on (struct dw_edma_chip *chip); -void dw_edma_v0_core_debugfs_off (struct dw_edma_chip *chip); +void dw_edma_v0_core_debugfs_on (struct dw_edma *dw); +void dw_edma_v0_core_debugfs_off (struct dw_edma *dw);#endif /* _DW_EDMA_V0_CORE_H */
drivers/dma/dw-edma/dw-edma-v0-debugfs.c +9 -9
@@ -54,7 +54,7 @@ struct debugfs_entries {static int dw_edma_debugfs_u32_get (void *data,u64 *val) {void __iomem *reg = (void __force __iomem *)data; -if (dw->mf ==EDMA_MF_EDMA_LEGACY && +if (dw->chip->mf ==EDMA_MF_EDMA_LEGACY && reg >= (void __iomem *)®s->type.legacy.ch) {void __iomem *ptr = ®s->type.legacy.ch;u32 viewport_sel =0 ;
@@ -173,7 +173,7 @@ static void dw_edma_debugfs_regs_wr(struct dentry *dir) nr_entries =ARRAY_SIZE (debugfs_regs);dw_edma_debugfs_create_x32 (debugfs_regs, nr_entries, regs_dir); -if (dw->mf ==EDMA_MF_HDMA_COMPAT ) { +if (dw->chip->mf ==EDMA_MF_HDMA_COMPAT ) { nr_entries =ARRAY_SIZE (debugfs_unroll_regs);dw_edma_debugfs_create_x32 (debugfs_unroll_regs, nr_entries, regs_dir);
@@ -242,7 +242,7 @@ static void dw_edma_debugfs_regs_rd(struct dentry *dir) nr_entries =ARRAY_SIZE (debugfs_regs);dw_edma_debugfs_create_x32 (debugfs_regs, nr_entries, regs_dir); -if (dw->mf ==EDMA_MF_HDMA_COMPAT ) { +if (dw->chip->mf ==EDMA_MF_HDMA_COMPAT ) { nr_entries =ARRAY_SIZE (debugfs_unroll_regs);dw_edma_debugfs_create_x32 (debugfs_unroll_regs, nr_entries, regs_dir);
@@ -282,13 +282,13 @@ static void dw_edma_debugfs_regs(void)dw_edma_debugfs_regs_rd (regs_dir); } -void dw_edma_v0_debugfs_on (struct dw_edma_chip *chip) +void dw_edma_v0_debugfs_on (struct dw_edma *_dw) { - dw = chip->dw; + dw = _dw;if (!dw)return ; - regs = dw->rg_region.vaddr; + regs = dw->chip->rg_region.vaddr;if (!regs)return ;
@@ -296,16 +296,16 @@ void dw_edma_v0_debugfs_on(struct dw_edma_chip *chip)if (!dw->debugfs)return ; -debugfs_create_u32 ("mf" ,0444 , dw->debugfs, &dw->mf); +debugfs_create_u32 ("mf" ,0444 , dw->debugfs, &dw->chip->mf);debugfs_create_u16 ("wr_ch_cnt" ,0444 , dw->debugfs, &dw->wr_ch_cnt);debugfs_create_u16 ("rd_ch_cnt" ,0444 , dw->debugfs, &dw->rd_ch_cnt);dw_edma_debugfs_regs (); } -void dw_edma_v0_debugfs_off (struct dw_edma_chip *chip) +void dw_edma_v0_debugfs_off (struct dw_edma *_dw) { - dw = chip->dw; + dw = _dw;if (!dw)return ;
drivers/dma/dw-edma/dw-edma-v0-debugfs.h +4 -4
@@ -12,14 +12,14 @@#include <linux/dma/edma.h> #ifdef CONFIG_DEBUG_FS -void dw_edma_v0_debugfs_on (struct dw_edma_chip *chip); -void dw_edma_v0_debugfs_off (struct dw_edma_chip *chip); +void dw_edma_v0_debugfs_on (struct dw_edma *dw); +void dw_edma_v0_debugfs_off (struct dw_edma *dw);#else -static inline void dw_edma_v0_debugfs_on (struct dw_edma_chip *chip) +static inline void dw_edma_v0_debugfs_on (struct dw_edma *dw) { } -static inline void dw_edma_v0_debugfs_off (struct dw_edma_chip *chip) +static inline void dw_edma_v0_debugfs_off (struct dw_edma *dw) { }#endif /* CONFIG_DEBUG_FS */
drivers/fpga/dfl-afu-main.c +3 -0
@@ -720,6 +720,9 @@ afu_ioctl_dma_map(struct dfl_feature_platform_data *pdata, void __user *arg)if (map.argsz < minsz || map.flags)return -EINVAL ; +if (map.length >>PAGE_SHIFT > (u64 )INT_MAX ) +return -EINVAL ; + ret =afu_dma_map_region (pdata, map.user_addr, map.length, &map.iova);if (ret)return ret;
drivers/gpio/gpio-mvebu.c +2 -2
@@ -348,7 +348,7 @@ static int mvebu_gpio_direction_input(struct gpio_chip *chip, unsigned int pin)* Check with the pinctrl driver whether this pin is usable as * an input GPIO */ - ret =pinctrl_gpio_direction_input (chip->base + pin); + ret =pinctrl_gpio_direction_input (chip, pin);if (ret)return ret;
@@ -368,7 +368,7 @@ static int mvebu_gpio_direction_output(struct gpio_chip *chip, unsigned int pin,* Check with the pinctrl driver whether this pin is usable as * an output GPIO */ - ret =pinctrl_gpio_direction_output (chip->base + pin); + ret =pinctrl_gpio_direction_output (chip, pin);if (ret)return ret;
drivers/gpio/gpio-pxa.c +2 -2
@@ -266,7 +266,7 @@ static int pxa_gpio_direction_input(struct gpio_chip *chip, unsigned offset)int ret;if (pxa_gpio_has_pinctrl ()) { - ret =pinctrl_gpio_direction_input (chip->base + offset); + ret =pinctrl_gpio_direction_input (chip, offset);if (ret)return ret; }
@@ -295,7 +295,7 @@ static int pxa_gpio_direction_output(struct gpio_chip *chip,writel_relaxed (mask, base + (value ?GPSR_OFFSET :GPCR_OFFSET ));if (pxa_gpio_has_pinctrl ()) { - ret =pinctrl_gpio_direction_output (chip->base + offset); + ret =pinctrl_gpio_direction_output (chip, offset);if (ret)return ret; }
drivers/gpio/gpio-rockchip.c +2 -2
@@ -158,9 +158,9 @@ static int rockchip_gpio_set_direction(struct gpio_chip *chip,if (input) -pinctrl_gpio_direction_input (bank->pin_base + offset); +pinctrl_gpio_direction_input (chip, offset);else -pinctrl_gpio_direction_output (bank->pin_base + offset); +pinctrl_gpio_direction_output (chip, offset);raw_spin_lock_irqsave (&bank->slock, flags);rockchip_gpio_writel_bit (bank, offset, data, bank->gpio_regs->port_ddr);
drivers/gpio/gpio-tegra.c +2 -16
@@ -174,18 +174,11 @@ static int tegra_gpio_direction_input(struct gpio_chip *chip, unsigned int offset) {struct tegra_gpio_info *tgi =gpiochip_get_data (chip); -int ret;tegra_gpio_mask_write (tgi,GPIO_MSK_OE (tgi, offset), offset,0 );tegra_gpio_enable (tgi, offset); - ret =pinctrl_gpio_direction_input (chip->base + offset); -if (ret <0 ) -dev_err (tgi->dev, -"Failed to set pinctrl input direction of GPIO %d: %d" , - chip->base + offset, ret); - -return ret; +return 0 ; } static int tegra_gpio_direction_output(struct gpio_chip *chip,
@@ -193,19 +186,12 @@ static int tegra_gpio_direction_output(struct gpio_chip *chip, int value) {struct tegra_gpio_info *tgi =gpiochip_get_data (chip); -int ret;tegra_gpio_set (chip, offset, value);tegra_gpio_mask_write (tgi,GPIO_MSK_OE (tgi, offset), offset,1 );tegra_gpio_enable (tgi, offset); - ret =pinctrl_gpio_direction_output (chip->base + offset); -if (ret <0 ) -dev_err (tgi->dev, -"Failed to set pinctrl output direction of GPIO %d: %d" , - chip->base + offset, ret); - -return ret; +return 0 ; } static int tegra_gpio_get_direction(struct gpio_chip *chip,
drivers/gpio/gpio-vf610.c +2 -2
@@ -117,7 +117,7 @@ static int vf610_gpio_direction_input(struct gpio_chip *chip, unsigned gpio)vf610_gpio_writel (val, port->gpio_base +GPIO_PDDR ); } -return pinctrl_gpio_direction_input (chip->base + gpio); +return pinctrl_gpio_direction_input (chip, gpio); } static int vf610_gpio_direction_output(struct gpio_chip *chip, unsigned gpio,
@@ -135,7 +135,7 @@ static int vf610_gpio_direction_output(struct gpio_chip *chip, unsigned gpio,vf610_gpio_writel (val, port->gpio_base +GPIO_PDDR ); } -return pinctrl_gpio_direction_output (chip->base + gpio); +return pinctrl_gpio_direction_output (chip, gpio); }static void vf610_gpio_irq_handler (struct irq_desc *desc)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +2 -2
@@ -1236,7 +1236,7 @@ static int init_kfd_vm(struct amdgpu_vm *vm, void **process_info, AMDGPU_FENCE_OWNER_KFD, false);if (ret) goto wait_pd_fail; - ret =dma_resv_reserve_shared (vm->root.bo->tbo.base.resv,1 ); + ret =dma_resv_reserve_fences (vm->root.bo->tbo.base.resv,1 );if (ret) goto reserve_shared_fail; amdgpu_bo_fence(vm->root.bo,
@@ -2461,7 +2461,7 @@ int amdgpu_amdkfd_add_gws_to_process(void *info, void *gws, struct kgd_mem **mem* Add process eviction fence to bo so they can * evict each other. */ - ret =dma_resv_reserve_shared (gws_bo->tbo.base.resv,1 ); + ret =dma_resv_reserve_fences (gws_bo->tbo.base.resv,1 );if (ret) goto reserve_shared_fail;amdgpu_bo_fence (gws_bo, &process_info->eviction_fence->base, true);
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +21 -0
@@ -278,6 +278,25 @@ static const struct drm_gem_object_funcs amdgpu_gem_object_funcs = { .vm_ops = &amdgpu_gem_vm_ops, }; +static bool amdgpu_gem_are_domains_valid (u32 domains) +{ +u32 normal =AMDGPU_GEM_DOMAIN_CPU | +AMDGPU_GEM_DOMAIN_GTT | +AMDGPU_GEM_DOMAIN_VRAM ; +/* Treat all non CPU/GTT/VRAM domains as special domains. */ +u32 special =AMDGPU_GEM_DOMAIN_MASK & ~normal; +u32 normal_mask = domains & normal; +u32 special_mask = domains & special; + +if (!special_mask) +return true; + +if (normal_mask) +return false; + +return !(special_mask & (special_mask -1 )); +} +/* * GEM ioctls. */
@@ -309,6 +328,8 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,/* reject invalid gem domains */ if (args->in.domains & ~AMDGPU_GEM_DOMAIN_MASK )return -EINVAL ; +if (!amdgpu_gem_are_domains_valid (args->in.domains)) +return -EINVAL ;if (!amdgpu_is_tmz (adev) && (flags &AMDGPU_GEM_CREATE_ENCRYPTED )) {DRM_NOTE_ONCE ("Cannot allocate secure buffer since TMZ is disabled\n" );
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +17 -0
@@ -472,6 +472,15 @@ static int amdgpu_bo_move(struct ttm_buffer_object *bo, bool evict,if (new_mem->mem_type ==TTM_PL_TT || new_mem->mem_type ==AMDGPU_PL_PREEMPT ) { +if (old_mem && (old_mem->mem_type ==TTM_PL_TT || + old_mem->mem_type ==AMDGPU_PL_PREEMPT )) { + r =ttm_bo_wait_ctx (bo, ctx); +if (r) +return r; + +amdgpu_ttm_backend_unbind (bo->bdev, bo->ttm); + } + r =amdgpu_ttm_backend_bind (bo->bdev, bo->ttm, new_mem);if (r)return r;
@@ -506,6 +515,14 @@ static int amdgpu_bo_move(struct ttm_buffer_object *bo, bool evict,ttm_bo_assign_mem (bo, new_mem); goto out; } +if ((old_mem->mem_type ==TTM_PL_TT || + old_mem->mem_type ==AMDGPU_PL_PREEMPT ) && + (new_mem->mem_type ==TTM_PL_TT || + new_mem->mem_type ==AMDGPU_PL_PREEMPT )) { +ttm_resource_free (bo, &bo->resource); +ttm_bo_assign_mem (bo, new_mem); + goto out; + } if (old_mem->mem_type == AMDGPU_PL_GDS || old_mem->mem_type == AMDGPU_PL_GWS ||
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c +7 -4
@@ -578,8 +578,8 @@ static int amdgpu_uvd_cs_msg_decode(struct amdgpu_device *adev, uint32_t *msg,unsigned image_size, tmp, min_dpb_size, num_dpb_buffer;unsigned min_ctx_size = ~0 ; -/* Reject invalid dimensions to prevent division by zero */ -if (width <16 || height <16 ) { +/* Reject invalid dimensions */ +if (width <16 || height <16 || width >4096 || height >4096 ) {dev_WARN_ONCE (adev->dev,1 ,"Invalid UVD decoding dimensions (%dx%d)!\n" , width, height);
@@ -726,6 +726,9 @@ static int amdgpu_uvd_cs_msg_decode(struct amdgpu_device *adev, uint32_t *msg, image_size =ALIGN (image_size,256 ); num_dpb_buffer = (le32_to_cpu (msg[59 ]) &0xff ) +2 ; +if (num_dpb_buffer >17 ) +return -EINVAL ; + min_dpb_size = image_size * num_dpb_buffer; min_ctx_size = ((width +255 ) /16 ) * ((height +255 ) /16 ) *16 * num_dpb_buffer +52 *1024 ;
@@ -736,7 +739,7 @@ static int amdgpu_uvd_cs_msg_decode(struct amdgpu_device *adev, uint32_t *msg,return -EINVAL ; } -if (width > pitch) { +if (width > pitch || pitch >4096 ) {DRM_ERROR ("Invalid UVD decoding target pitch!\n" );return -EINVAL ; }
@@ -748,7 +751,7 @@ static int amdgpu_uvd_cs_msg_decode(struct amdgpu_device *adev, uint32_t *msg, } buf_sizes[0x1 ] = dpb_size; - buf_sizes[0x2 ] = image_size; + buf_sizes[0x2 ] = (pitch * height) *3 /2 ; buf_sizes[0x4 ] = min_ctx_size;/* store image width to adjust nb memory pstate */ adev->uvd.decode_image_width = width;
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +2 -2
@@ -3008,7 +3008,7 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm)if (r) goto error_free_root; - r =dma_resv_reserve_shared (root_bo->tbo.base.resv,1 ); + r =dma_resv_reserve_fences (root_bo->tbo.base.resv,1 );if (r) goto error_unreserve;
@@ -3459,7 +3459,7 @@ bool amdgpu_vm_handle_fault(struct amdgpu_device *adev, u32 pasid, value =0 ; } - r =dma_resv_reserve_shared (root->tbo.base.resv,1 ); + r =dma_resv_reserve_fences (root->tbo.base.resv,1 );if (r) {pr_debug ("failed %d to reserve fence slot\n" , r); goto error_unlock;
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +22 -4
@@ -871,6 +871,23 @@ static void vce_v3_0_ring_emit_ib(struct amdgpu_ring *ring,amdgpu_ring_write (ring, ib->length_dw); } +static void vce_v3_0_ring_emit_fence (struct amdgpu_ring *ring,u64 addr, +u64 seq,unsigned flags) +{ +WARN_ON (flags &AMDGPU_FENCE_FLAG_64BIT ); + +amdgpu_ring_write (ring,VCE_CMD_FENCE ); +amdgpu_ring_write (ring, addr); +amdgpu_ring_write (ring,upper_32_bits (addr)); +amdgpu_ring_write (ring, seq); +amdgpu_ring_write (ring,VCE_CMD_TRAP ); +} + +static void vce_v3_0_ring_insert_end (struct amdgpu_ring *ring) +{ +amdgpu_ring_write (ring,VCE_CMD_END ); +} +static void vce_v3_0_emit_vm_flush (struct amdgpu_ring *ring,unsigned int vmid,uint64_t pd_addr) {
@@ -880,7 +897,6 @@ static void vce_v3_0_emit_vm_flush(struct amdgpu_ring *ring,amdgpu_ring_write (ring,VCE_CMD_FLUSH_TLB );amdgpu_ring_write (ring, vmid); -amdgpu_ring_write (ring,VCE_CMD_END ); }static void vce_v3_0_emit_pipeline_sync (struct amdgpu_ring *ring)
@@ -950,17 +966,19 @@ static const struct amdgpu_ring_funcs vce_v3_0_ring_vm_funcs = { .set_wptr = vce_v3_0_ring_set_wptr, .parse_cs = amdgpu_vce_ring_parse_cs_vm, .emit_frame_size = -6 +/* vce_v3_0_emit_vm_flush */ +5 +/* vce_v3_0_emit_vm_flush */ 4 +/* vce_v3_0_emit_pipeline_sync */ - 6 + 6, /* amdgpu_vce_ring_emit_fence x2 vm fence */ +5 +5 +/* vce_v3_0_ring_emit_fence x2 vm fence */ + 1, /* vce_v3_0_ring_insert_end */ .emit_ib_size = 5, /* vce_v3_0_ring_emit_ib */ .emit_ib = vce_v3_0_ring_emit_ib, .emit_vm_flush = vce_v3_0_emit_vm_flush, .emit_pipeline_sync = vce_v3_0_emit_pipeline_sync, - .emit_fence = amdgpu_vce_ring_emit_fence, + .emit_fence = vce_v3_0_ring_emit_fence, .test_ring = amdgpu_vce_ring_test_ring, .test_ib = amdgpu_vce_ring_test_ib, .insert_nop = amdgpu_ring_insert_nop, + .insert_end = vce_v3_0_ring_insert_end, .pad_ib = amdgpu_ring_generic_pad_ib, .begin_use = amdgpu_vce_ring_begin_use, .end_use = amdgpu_vce_ring_end_use,
drivers/gpu/drm/amd/amdkfd/kfd_svm.c +1 -1
@@ -512,7 +512,7 @@ svm_range_vram_node_new(struct amdgpu_device *adev, struct svm_range *prange, goto reserve_bo_failed; } - r =dma_resv_reserve_shared (bo->tbo.base.resv,1 ); + r =dma_resv_reserve_fences (bo->tbo.base.resv,1 );if (r) {pr_debug ("failed %d to reserve bo\n" , r);amdgpu_bo_unreserve (bo);
drivers/gpu/drm/amd/pm/amdgpu_pm.c +6 -8
@@ -1804,18 +1804,16 @@ static ssize_t amdgpu_get_gpu_metrics(struct device *dev,return ret; } +mutex_lock (&adev->pm.mutex);if (adev->powerplay.pp_funcs->get_gpu_metrics) size =amdgpu_dpm_get_gpu_metrics (adev, &gpu_metrics); -if (size <=0 ) - goto out; - -if (size >=PAGE_SIZE ) - size =PAGE_SIZE -1 ; - -memcpy (buf, gpu_metrics, size); +if (size >0 ) { + size =min_t (ssize_t, size,PAGE_SIZE -1 ); +memcpy (buf, gpu_metrics, size); + } +mutex_unlock (&adev->pm.mutex); -out:pm_runtime_mark_last_busy (ddev->dev);pm_runtime_put_autosuspend (ddev->dev);
drivers/gpu/drm/drm_connector.c +6 -6
@@ -2594,7 +2594,7 @@ EXPORT_SYMBOL(drm_mode_put_tile_group);/** * drm_mode_get_tile_group - get a reference to an existing tile group * @dev: DRM device -* @topology: 8-bytes unique per monitor. +* @topology_id: 9-byte unique ID per monitor. * * Use the unique bytes to get a reference to an existing tile group. *
@@ -2602,14 +2602,14 @@ EXPORT_SYMBOL(drm_mode_put_tile_group);* tile group or NULL if not found. */ struct drm_tile_group *drm_mode_get_tile_group (struct drm_device *dev, -const char topology[8 ]) +const char topology_id[9 ]) {struct drm_tile_group *tg;int id;mutex_lock (&dev->mode_config.idr_mutex);idr_for_each_entry (&dev->mode_config.tile_idr, tg, id) { -if (!memcmp (tg->group_data, topology,8 )) { +if (!memcmp (tg->group_data, topology_id,sizeof (tg->group_data))) {if (!kref_get_unless_zero (&tg->refcount)) tg =NULL ;mutex_unlock (&dev->mode_config.idr_mutex);
@@ -2624,7 +2624,7 @@ EXPORT_SYMBOL(drm_mode_get_tile_group);/** * drm_mode_create_tile_group - create a tile group from a displayid description * @dev: DRM device -* @topology: 8-bytes unique per monitor. +* @topology_id: 9-byte unique ID per monitor. * * Create a tile group for the unique monitor, and get a unique * identifier for the tile group.
@@ -2633,7 +2633,7 @@ EXPORT_SYMBOL(drm_mode_get_tile_group);* new tile group or NULL. */ struct drm_tile_group *drm_mode_create_tile_group (struct drm_device *dev, -const char topology[8 ]) +const char topology_id[9 ]) {struct drm_tile_group *tg;int ret;
@@ -2643,7 +2643,7 @@ struct drm_tile_group *drm_mode_create_tile_group(struct drm_device *dev,return NULL ;kref_init (&tg->refcount); -memcpy (tg->group_data, topology,8 ); +memcpy (tg->group_data, topology_id,sizeof (tg->group_data)); tg->dev = dev;mutex_lock (&dev->mode_config.idr_mutex);
drivers/gpu/drm/drm_dp_mst_topology.c +17 -15
@@ -779,6 +779,12 @@ static bool drm_dp_sideband_append_payload(struct drm_dp_sideband_msg_rx *msg, {u8 crc4; +/* curchunk_len must be >= 1 (min 1 CRC byte) and fit in chunk[] */ +if (!msg->curchunk_len || + msg->curchunk_len >ARRAY_SIZE (msg->chunk) || + msg->curchunk_idx + replybuflen >ARRAY_SIZE (msg->chunk)) +return false; +memcpy (&msg->chunk[msg->curchunk_idx], replybuf, replybuflen); msg->curchunk_idx += replybuflen;
@@ -789,6 +795,9 @@ static bool drm_dp_sideband_append_payload(struct drm_dp_sideband_msg_rx *msg,print_hex_dump (KERN_DEBUG ,"wrong crc" ,DUMP_PREFIX_NONE ,16 ,1 , msg->chunk, msg->curchunk_len, false); +/* Guard against accumulated msg[] overflow */ +if (msg->curlen + msg->curchunk_len -1 >ARRAY_SIZE (msg->msg)) +return false;/* copy chunk into bigger msg */ memcpy (&msg->msg[msg->curlen], msg->chunk, msg->curchunk_len -1 ); msg->curlen += msg->curchunk_len -1 ;
@@ -861,7 +870,7 @@ static bool drm_dp_sideband_parse_remote_dpcd_read(struct drm_dp_sideband_msg_rx goto fail_len; repmsg->u.remote_dpcd_read_ack.num_bytes = raw->msg[idx]; idx++; -if (idx > raw->curlen) +if (idx + repmsg->u.remote_dpcd_read_ack.num_bytes > raw->curlen) goto fail_len;memcpy (repmsg->u.remote_dpcd_read_ack.bytes, &raw->msg[idx], repmsg->u.remote_dpcd_read_ack.num_bytes);
@@ -897,7 +906,9 @@ static bool drm_dp_sideband_parse_remote_i2c_read_ack(struct drm_dp_sideband_msg goto fail_len; repmsg->u.remote_i2c_read_ack.num_bytes = raw->msg[idx]; idx++; -/* TODO check */ +if (idx + repmsg->u.remote_i2c_read_ack.num_bytes > raw->curlen) + goto fail_len; +memcpy (repmsg->u.remote_i2c_read_ack.bytes, &raw->msg[idx], repmsg->u.remote_i2c_read_ack.num_bytes);return true; fail_len:
@@ -913,16 +924,13 @@ static bool drm_dp_sideband_parse_enum_path_resources_ack(struct drm_dp_sideband repmsg->u.path_resources.port_number = (raw->msg[idx] >>4 ) &0xf ; repmsg->u.path_resources.fec_capable = raw->msg[idx] &0x1 ; idx++; -if (idx > raw->curlen) +if (idx +2 > raw->curlen) goto fail_len; repmsg->u.path_resources.full_payload_bw_number = (raw->msg[idx] <<8 ) | (raw->msg[idx+1 ]); idx +=2 ; -if (idx > raw->curlen) +if (idx +2 > raw->curlen) goto fail_len; repmsg->u.path_resources.avail_payload_bw_number = (raw->msg[idx] <<8 ) | (raw->msg[idx+1 ]); - idx +=2 ; -if (idx > raw->curlen) - goto fail_len;return true; fail_len:DRM_DEBUG_KMS ("enum resource parse length fail %d %d\n" , idx, raw->curlen);
@@ -940,12 +948,9 @@ static bool drm_dp_sideband_parse_allocate_payload_ack(struct drm_dp_sideband_ms goto fail_len; repmsg->u.allocate_payload.vcpi = raw->msg[idx]; idx++; -if (idx > raw->curlen) +if (idx +2 > raw->curlen) goto fail_len; repmsg->u.allocate_payload.allocated_pbn = (raw->msg[idx] <<8 ) | (raw->msg[idx+1 ]); - idx +=2 ; -if (idx > raw->curlen) - goto fail_len;return true; fail_len:DRM_DEBUG_KMS ("allocate payload parse length fail %d %d\n" , idx, raw->curlen);
@@ -959,12 +964,9 @@ static bool drm_dp_sideband_parse_query_payload_ack(struct drm_dp_sideband_msg_r repmsg->u.query_payload.port_number = (raw->msg[idx] >>4 ) &0xf ; idx++; -if (idx > raw->curlen) +if (idx +2 > raw->curlen) goto fail_len; repmsg->u.query_payload.allocated_pbn = (raw->msg[idx] <<8 ) | (raw->msg[idx +1 ]); - idx +=2 ; -if (idx > raw->curlen) - goto fail_len;return true; fail_len:DRM_DEBUG_KMS ("query payload parse length fail %d %d\n" , idx, raw->curlen);
drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c +1 -1
@@ -180,7 +180,7 @@ static int submit_fence_sync(struct etnaviv_gem_submit *submit)struct dma_resv *robj = bo->obj->base.resv;if (!(bo->flags &ETNA_SUBMIT_BO_WRITE )) { - ret =dma_resv_reserve_shared (robj,1 ); + ret =dma_resv_reserve_fences (robj,1 );if (ret)return ret; }
drivers/gpu/drm/i915/display/intel_hdcp.c +8 -4
@@ -89,6 +89,9 @@ intel_hdcp_required_content_stream(struct intel_digital_port *dig_port)if (!enforce_type0 && !intel_streams_type1_capable (connector)) enforce_type0 = true; +if (drm_WARN_ON (&i915->drm, data->k >=INTEL_NUM_PIPES (i915))) +return -EINVAL ; + data->streams[data->k].stream_id =intel_conn_to_vcpi (connector); data->k++;
@@ -98,7 +101,7 @@ intel_hdcp_required_content_stream(struct intel_digital_port *dig_port) }drm_connector_list_iter_end (&conn_iter); -if (drm_WARN_ON (&i915->drm, data->k >INTEL_NUM_PIPES (i915) || data->k ==0 )) +if (drm_WARN_ON (&i915->drm, !data->k))return -EINVAL ;/*
@@ -1642,9 +1645,10 @@ int hdcp2_authenticate_repeater_topology(struct intel_connector *connector)return -EINVAL ; } -if (seq_num_v < hdcp->seq_num_v) { -/* Roll over of the seq_num_v from repeater. Reauthenticate. */ -drm_dbg_kms (&dev_priv->drm,"Seq_num_v roll over.\n" ); +if (hdcp->hdcp2_encrypted && seq_num_v <= hdcp->seq_num_v) { +/* Reauthenticate on Seq_num_v repeat or rollover */ +drm_dbg_kms (&dev_priv->drm,"Seq_num_v %s\n" , + seq_num_v == hdcp->seq_num_v ?"repeat" :"rollover" );return -EINVAL ; }
drivers/gpu/drm/i915/display/intel_vrr.c +4 -0
@@ -26,6 +26,10 @@ bool intel_vrr_is_capable(struct drm_connector *connector)* EDID monitor range also should be atleast 10 for reasonable * Adaptive Sync or Variable Refresh Rate end user experience. */ +if (!info->monitor_range.min_vfreq || !info->monitor_range.max_vfreq || + info->monitor_range.min_vfreq > info->monitor_range.max_vfreq) +return false; +return HAS_VRR (i915) &&drm_dp_sink_can_do_video_without_timing_msa (intel_dp->dpcd) && info->monitor_range.max_vfreq - info->monitor_range.min_vfreq >10 ;
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +2 -2
@@ -958,7 +958,7 @@ static int eb_validate_vmas(struct i915_execbuffer *eb) }if (!(ev->flags &EXEC_OBJECT_WRITE )) { - err =dma_resv_reserve_shared (vma->resv,1 ); + err =dma_resv_reserve_fences (vma->resv,1 );if (err)return err; }
@@ -2160,7 +2160,7 @@ static int eb_parse(struct i915_execbuffer *eb) goto err_trampoline; } - err =dma_resv_reserve_shared (shadow->resv,1 ); + err =dma_resv_reserve_fences (shadow->resv,1 );if (err) goto err_trampoline;
drivers/gpu/drm/i915/i915_vma.c +1 -1
@@ -1278,7 +1278,7 @@ int i915_vma_move_to_active(struct i915_vma *vma, obj->read_domains =0 ; }else {if (!(flags & __EXEC_OBJECT_NO_RESERVE)) { - err =dma_resv_reserve_shared (vma->resv,1 ); + err =dma_resv_reserve_fences (vma->resv,1 );if (unlikely (err))return err; }
drivers/gpu/drm/lima/lima_gem.c +1 -1
@@ -263,7 +263,7 @@ static int lima_gem_sync_bo(struct lima_sched_task *task, struct lima_bo *bo,int err =0 ;if (!write) { - err =dma_resv_reserve_shared (lima_bo_resv (bo),1 ); + err =dma_resv_reserve_fences (lima_bo_resv (bo),1 );if (err)return err; }
drivers/gpu/drm/msm/msm_gem_submit.c +1 -1
@@ -349,7 +349,7 @@ static int submit_fence_sync(struct msm_gem_submit *submit, bool no_implicit)* strange place to call it. OTOH this is a * convenient can-fail point to hook it in. */ - ret =dma_resv_reserve_shared (obj->resv,1 ); + ret =dma_resv_reserve_fences (obj->resv,1 );if (ret)return ret; }
drivers/gpu/drm/nouveau/nouveau_fence.c +1 -1
@@ -349,7 +349,7 @@ nouveau_fence_sync(struct nouveau_bo *nvbo, struct nouveau_channel *chan, bool eint ret =0 , i;if (!exclusive) { - ret =dma_resv_reserve_shared (resv,1 ); + ret =dma_resv_reserve_fences (resv,1 );if (ret)return ret;
drivers/gpu/drm/qxl/qxl_release.c +1 -1
@@ -200,7 +200,7 @@ static int qxl_release_validate_bo(struct qxl_bo *bo)return ret; } - ret =dma_resv_reserve_shared (bo->tbo.base.resv,1 ); + ret =dma_resv_reserve_fences (bo->tbo.base.resv,1 );if (ret)return ret;
drivers/gpu/drm/radeon/radeon_kms.c +1 -0
@@ -72,6 +72,7 @@ void radeon_driver_unload_kms(struct drm_device *dev)if (radeon_is_px (dev)) {pm_runtime_get_sync (dev->dev);pm_runtime_forbid (dev->dev); +pm_runtime_dont_use_autosuspend (dev->dev); }radeon_acpi_fini (rdev);
drivers/gpu/drm/radeon/radeon_vm.c +1 -1
@@ -831,7 +831,7 @@ static int radeon_vm_update_ptes(struct radeon_device *rdev,int r;radeon_sync_resv (rdev, &ib->sync, pt->tbo.base.resv, true); - r =dma_resv_reserve_shared (pt->tbo.base.resv,1 ); + r =dma_resv_reserve_fences (pt->tbo.base.resv,1 );if (r)return r;
drivers/gpu/drm/tegra/fb.c +2 -6
@@ -221,7 +221,6 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper,struct drm_mode_fb_cmd2 cmd = {0 };unsigned int bytes_per_pixel;struct drm_framebuffer *fb; -unsigned long offset;struct fb_info *info;struct tegra_bo *bo;size_t size;
@@ -267,9 +266,6 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper,drm_fb_helper_fill_info (info, helper, sizes); - offset = info->var.xoffset * bytes_per_pixel + - info->var.yoffset * fb->pitches[0 ]; -if (bo->pages) { bo->vaddr =vmap (bo->pages, bo->num_pages,VM_MAP ,pgprot_writecombine (PAGE_KERNEL ));
@@ -281,9 +277,9 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper, } drm->mode_config.fb_base = (resource_size_t )bo->iova; - info->screen_base = (void __iomem *)bo->vaddr + offset; + info->screen_base = (void __iomem *)bo->vaddr; info->screen_size = size; - info->fix.smem_start = (unsigned long )(bo->iova + offset); + info->fix.smem_start = (unsigned long )(bo->iova); info->fix.smem_len = size;return 0 ;
drivers/gpu/drm/ttm/ttm_bo.c +2 -2
@@ -767,7 +767,7 @@ static int ttm_bo_add_move_fence(struct ttm_buffer_object *bo,dma_resv_add_shared_fence (bo->base.resv, fence); - ret =dma_resv_reserve_shared (bo->base.resv,1 ); + ret =dma_resv_reserve_fences (bo->base.resv,1 );if (unlikely (ret)) {dma_fence_put (fence);return ret;
@@ -826,7 +826,7 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo,bool type_found = false;int i, ret; - ret =dma_resv_reserve_shared (bo->base.resv,1 ); + ret =dma_resv_reserve_fences (bo->base.resv,1 );if (unlikely (ret))return ret;
drivers/gpu/drm/ttm/ttm_execbuf_util.c +2 -2
@@ -104,7 +104,7 @@ int ttm_eu_reserve_buffers(struct ww_acquire_ctx *ticket,if (!entry->num_shared)continue ; - ret =dma_resv_reserve_shared (bo->base.resv, + ret =dma_resv_reserve_fences (bo->base.resv, entry->num_shared);if (!ret)continue ;
@@ -121,7 +121,7 @@ int ttm_eu_reserve_buffers(struct ww_acquire_ctx *ticket, }if (!ret && entry->num_shared) - ret =dma_resv_reserve_shared (bo->base.resv, + ret =dma_resv_reserve_fences (bo->base.resv, entry->num_shared);if (unlikely (ret !=0 )) {
drivers/gpu/drm/vc4/vc4_gem.c +1 -1
@@ -644,7 +644,7 @@ vc4_lock_bo_reservations(struct drm_device *dev,for (i =0 ; i < exec->bo_count; i++) { bo = &exec->bo[i]->base; - ret =dma_resv_reserve_shared (bo->resv,1 ); + ret =dma_resv_reserve_fences (bo->resv,1 );if (ret) {vc4_unlock_bo_reservations (dev, exec, acquire_ctx);return ret;
drivers/gpu/drm/vgem/vgem_fence.c +1 -1
@@ -161,7 +161,7 @@ int vgem_fence_attach_ioctl(struct drm_device *dev,dma_resv_lock (resv,NULL );if (arg->flags &VGEM_FENCE_WRITE )dma_resv_add_excl_fence (resv, fence); -else if ((ret =dma_resv_reserve_shared (resv,1 )) ==0 ) +else if ((ret =dma_resv_reserve_fences (resv,1 )) ==0 )dma_resv_add_shared_fence (resv, fence);dma_resv_unlock (resv);
drivers/gpu/drm/virtio/virtgpu_drv.h +1 -0
@@ -288,6 +288,7 @@ virtio_gpu_array_from_handles(struct drm_file *drm_file, u32 *handles, u32 nentsvoid virtio_gpu_array_add_obj (struct virtio_gpu_object_array *objs,struct drm_gem_object *obj);int virtio_gpu_array_lock_resv (struct virtio_gpu_object_array *objs); +int virtio_gpu_lock_one_resv_uninterruptible (struct virtio_gpu_object_array *objs);void virtio_gpu_array_unlock_resv (struct virtio_gpu_object_array *objs);void virtio_gpu_array_add_fence (struct virtio_gpu_object_array *objs,struct dma_fence *fence);
drivers/gpu/drm/virtio/virtgpu_gem.c +28 -0
@@ -214,6 +214,7 @@ void virtio_gpu_array_add_obj(struct virtio_gpu_object_array *objs,int virtio_gpu_array_lock_resv (struct virtio_gpu_object_array *objs) { +unsigned int i;int ret;if (objs->nents ==1 ) {
@@ -222,9 +223,36 @@ int virtio_gpu_array_lock_resv(struct virtio_gpu_object_array *objs) ret =drm_gem_lock_reservations (objs->objs, objs->nents, &objs->ticket); } +if (ret) +return ret; + +for (i =0 ; i < objs->nents; ++i) { + ret =dma_resv_reserve_fences (objs->objs[i]->resv,1 ); +if (ret) { +virtio_gpu_array_unlock_resv (objs); +return ret; + } + }return ret; } +int virtio_gpu_lock_one_resv_uninterruptible (struct virtio_gpu_object_array *objs) +{ +int ret; + +if (objs->nents !=1 ) +return -EINVAL ; + +dma_resv_lock (objs->objs[0 ]->resv,NULL ); + + ret =dma_resv_reserve_fences (objs->objs[0 ]->resv,1 ); +if (ret) { +virtio_gpu_array_unlock_resv (objs); +return ret; + } +return 0 ; +} +void virtio_gpu_array_unlock_resv (struct virtio_gpu_object_array *objs) {if (objs->nents ==1 ) {
drivers/gpu/drm/virtio/virtgpu_plane.c +8 -2
@@ -147,7 +147,10 @@ static void virtio_gpu_resource_flush(struct drm_plane *plane,if (!objs)return ;virtio_gpu_array_add_obj (objs, vgfb->base.obj[0 ]); -virtio_gpu_array_lock_resv (objs); +if (virtio_gpu_lock_one_resv_uninterruptible (objs)) { +virtio_gpu_array_put_free (objs); +return ; + }virtio_gpu_cmd_resource_flush (vgdev, bo->hw_res_handle, x, y, width, height, objs, vgfb->fence);virtio_gpu_notify (vgdev);
@@ -314,7 +317,10 @@ static void virtio_gpu_cursor_plane_update(struct drm_plane *plane,if (!objs)return ;virtio_gpu_array_add_obj (objs, vgfb->base.obj[0 ]); -virtio_gpu_array_lock_resv (objs); +if (virtio_gpu_lock_one_resv_uninterruptible (objs)) { +virtio_gpu_array_put_free (objs); +return ; + } virtio_gpu_cmd_transfer_to_host_2d (vgdev, 0, plane->state->crtc_w,
drivers/gpu/drm/virtio/virtgpu_vq.c +5 -4
@@ -329,7 +329,7 @@ static int virtio_gpu_queue_ctrl_sgs(struct virtio_gpu_device *vgdev,if (fence && vbuf->objs)virtio_gpu_array_unlock_resv (vbuf->objs);free_vbuf (vgdev, vbuf); -return -1 ; +return -ENODEV ; }if (vgdev->has_indirect)
@@ -393,7 +393,7 @@ static int virtio_gpu_queue_fenced_ctrl_buffer(struct virtio_gpu_device *vgdev,if (!sgt) {if (fence && vbuf->objs)virtio_gpu_array_unlock_resv (vbuf->objs); -return -1 ; +return -ENOMEM ; } elemcnt += sg_ents;
@@ -727,8 +727,9 @@ static int virtio_get_edid_block(void *data, u8 *buf,struct virtio_gpu_resp_edid *resp = data;size_t start = block *EDID_LENGTH ; -if (start + len >le32_to_cpu (resp->size)) -return -1 ; +if (start + len >le32_to_cpu (resp->size) || + start + len >sizeof (resp->edid)) +return -EINVAL ;memcpy (buf, resp->edid + start, len);return 0 ; }
drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c +4 -0
@@ -482,6 +482,10 @@ static int vmw_cotable_resize(struct vmw_resource *res, size_t new_size)vmw_bo_unreference (&old_buf); res->id = vcotbl->type; + ret =dma_resv_reserve_fences (bo->base.resv,1 ); +if (unlikely (ret)) + goto out_wait; +/* Release the pin acquired in vmw_bo_init */ ttm_bo_unpin (bo);
drivers/i2c/busses/i2c-bcm-iproc.c +10 -1
@@ -821,7 +821,16 @@ static int bcm_iproc_i2c_xfer_wait(struct bcm_iproc_i2c_dev *iproc_i2c, }if (!time_left && !iproc_i2c->xfer_is_done) { -dev_err (iproc_i2c->device,"transaction timed out\n" ); +/* +* The controller may fail to clear START_BUSY after a timeout, +* reset the controller to recover in that case. +*/ +if (!!(iproc_i2c_rd_reg (iproc_i2c,M_CMD_OFFSET ) & +BIT (M_CMD_START_BUSY_SHIFT ))) { +bcm_iproc_i2c_enable_disable (iproc_i2c, false); +bcm_iproc_i2c_init (iproc_i2c); +bcm_iproc_i2c_enable_disable (iproc_i2c, true); + }/* flush both TX/RX FIFOs */ val =BIT (M_FIFO_RX_FLUSH_SHIFT ) |BIT (M_FIFO_TX_FLUSH_SHIFT );
drivers/i2c/busses/i2c-davinci.c +3 -1
@@ -874,13 +874,15 @@ static int davinci_i2c_probe(struct platform_device *pdev) adap->nr = pdev->id; r =i2c_add_numbered_adapter (adap);if (r) - goto err_unuse_clocks; + goto err_cpufreq;pm_runtime_mark_last_busy (dev->dev);pm_runtime_put_autosuspend (dev->dev);return 0 ; +err_cpufreq: +i2c_davinci_cpufreq_deregister (dev); err_unuse_clocks:pm_runtime_dont_use_autosuspend (dev->dev);pm_runtime_put_sync (dev->dev);
drivers/i2c/busses/i2c-imx.c +92 -43
210 lines not on this page · raw message
drivers/input/joystick/iforce/iforce-packets.c +10 -1
@@ -161,6 +161,9 @@ void iforce_process_packet(struct iforce *iforce,switch (packet_id) {case 0x01 :/* joystick position data */ +if (len <7 ) +break ; +input_report_abs (dev,ABS_X , (__s16 )get_unaligned_le16 (data)); input_report_abs(dev, ABS_Y,
@@ -176,6 +179,9 @@ void iforce_process_packet(struct iforce *iforce,break ;case 0x03 :/* wheel position data */ +if (len <7 ) +break ; +input_report_abs (dev,ABS_WHEEL , (__s16 )get_unaligned_le16 (data));input_report_abs (dev,ABS_GAS ,255 - data[2 ]);
@@ -187,6 +193,9 @@ void iforce_process_packet(struct iforce *iforce,break ;case 0x02 :/* status report */ +if (len <2 ) +break ; +input_report_key (dev,BTN_DEAD , data[0 ] &0x02 );input_sync (dev);
@@ -206,7 +215,7 @@ void iforce_process_packet(struct iforce *iforce, } } -for (j =3 ; j < len; j +=2 ) +for (j =3 ; j +sizeof (u16) <= len; j +=sizeof (u16))mark_core_as_ready (iforce,get_unaligned_le16 (data + j));break ;
drivers/input/joystick/iforce/iforce-usb.c +3 -0
@@ -159,6 +159,9 @@ static void iforce_usb_irq(struct urb *urb) goto exit; } +if (!urb->actual_length) + goto exit; +iforce_process_packet (iforce, iforce_usb->data_in[0 ], iforce_usb->data_in +1 , urb->actual_length -1 );
drivers/input/joystick/psxpad-spi.c +1 -0
@@ -366,6 +366,7 @@ static int psxpad_spi_probe(struct spi_device *spi)return err; } +spi_set_drvdata (spi, pad);pm_runtime_enable (&spi->dev);return 0 ;
drivers/input/keyboard/atkbd.c +8 -0
@@ -1954,6 +1954,14 @@ static const struct dmi_system_id atkbd_dmi_quirk_table[] __initconst = { }, .callback = atkbd_deactivate_fixup, }, + { + /* Xiaomi Book Pro 14 (TM2424) */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "XIAOMI"), + DMI_MATCH(DMI_PRODUCT_NAME, "Xiaomi Book Pro 14"), + }, + .callback = atkbd_deactivate_fixup, + }, { } };
drivers/input/misc/ims-pcu.c +2 -3
@@ -964,9 +964,10 @@ static int ims_pcu_handle_firmware_update(struct ims_pcu *pcu,return retval; } -static void ims_pcu_process_async_firmware (const struct firmware *fw, +static void ims_pcu_process_async_firmware (const struct firmware *_fw,void *context) { + const struct firmware *fw __free(firmware) = _fw;struct ims_pcu *pcu = context;int error;
@@ -987,8 +988,6 @@ static void ims_pcu_process_async_firmware(const struct firmware *fw,ims_pcu_handle_firmware_update (pcu, fw);mutex_unlock (&pcu->cmd_mutex); -release_firmware (fw); - out:complete (&pcu->async_firmware_done); }
drivers/input/mouse/focaltech.c +1 -1
@@ -197,7 +197,7 @@ static void focaltech_process_rel_packet(struct psmouse *psmouse, {struct focaltech_data *priv = psmouse->private;struct focaltech_hw_state *state = &priv->state; -int finger1, finger2; +unsigned int finger1, finger2; state->pressed = packet[0 ] >>7 ; finger1 = ((packet[0 ] >>4 ) &0x7 ) -1 ;
drivers/input/rmi4/rmi_f54.c +32 -11
104 lines not on this page · raw message
drivers/input/rmi4/rmi_f55.c +2 -2
@@ -54,10 +54,10 @@ static int rmi_f55_detect(struct rmi_function *fn) f55->num_tx_electrodes = f55->qry[F55_NUM_TX_OFFSET ]; f55->cfg_num_rx_electrodes = f55->num_rx_electrodes; - f55->cfg_num_tx_electrodes = f55->num_rx_electrodes; + f55->cfg_num_tx_electrodes = f55->num_tx_electrodes; drv_data->num_rx_electrodes = f55->cfg_num_rx_electrodes; - drv_data->num_tx_electrodes = f55->cfg_num_rx_electrodes; + drv_data->num_tx_electrodes = f55->cfg_num_tx_electrodes;if (f55->qry[F55_PHYS_CHAR_OFFSET ] &F55_CAP_SENSOR_ASSIGN ) {int i, total;
drivers/input/touchscreen/mms114.c +17 -4
@@ -196,7 +196,9 @@ static irqreturn_t mms114_interrupt(int irq, void *dev_id)struct mms114_data *data = dev_id;struct input_dev *input_dev = data->input_dev;struct mms114_touch touch[MMS114_MAX_TOUCH ]; +struct mms114_touch *t;int packet_size; +int event_size;int touch_size;int index;int error;
@@ -212,19 +214,30 @@ static irqreturn_t mms114_interrupt(int irq, void *dev_id)if (packet_size <=0 ) goto out; +if (packet_size >sizeof (touch)) { +dev_err (&data->client->dev,"Invalid packet size %d (max %zu)\n" , + packet_size,sizeof (touch)); + goto out; + } +/* MMS136 has slightly different event size */ if (data->type ==TYPE_MMS134S || data->type ==TYPE_MMS136 ) - touch_size = packet_size /MMS136_EVENT_SIZE ; + event_size =MMS136_EVENT_SIZE ;else - touch_size = packet_size /MMS114_EVENT_SIZE ; + event_size =MMS114_EVENT_SIZE ; + + touch_size = packet_size / event_size; error =__mms114_read_reg (data,MMS114_INFORMATION , packet_size, (u8 *)touch);if (error <0 ) goto out; -for (index =0 ; index < touch_size; index++) -mms114_process_mt (data, touch + index); +for (index =0 ; index < touch_size; index++) { + t = (struct mms114_touch *)((u8 *)touch + index * event_size); + +mms114_process_mt (data, t); + }input_mt_report_pointer_emulation (data->input_dev, true);input_sync (data->input_dev);
drivers/input/touchscreen/sur40.c +13 -10
@@ -725,21 +725,13 @@ static int sur40_probe(struct usb_interface *interface, goto err_free_input; } -/* register the polled input device */ - error =input_register_device (input); -if (error) { -dev_err (&interface->dev, -"Unable to register polled input device." ); - goto err_free_buffer; - } -/* register the video master device */ snprintf (sur40->v4l2.name,sizeof (sur40->v4l2.name),"%s" ,DRIVER_LONG ); error =v4l2_device_register (sur40->dev, &sur40->v4l2);if (error) {dev_err (&interface->dev,"Unable to register video master device." ); - goto err_unreg_v4l2; + goto err_free_buffer; }/* initialize the lock and subdevice */
@@ -795,6 +787,14 @@ static int sur40_probe(struct usb_interface *interface,if (error) {dev_err (&interface->dev,"Unable to register video subdevice." ); + goto err_free_ctrl; + } + +/* register the polled input device */ + error =input_register_device (input); +if (error) { +dev_err (&interface->dev, +"Unable to register polled input device." ); goto err_unreg_video; }
@@ -806,6 +806,8 @@ static int sur40_probe(struct usb_interface *interface, err_unreg_video:video_unregister_device (&sur40->vdev); +err_free_ctrl: +v4l2_ctrl_handler_free (&sur40->hdl); err_unreg_v4l2:v4l2_device_unregister (&sur40->v4l2); err_free_buffer:
@@ -823,11 +825,12 @@ static void sur40_disconnect(struct usb_interface *interface) {struct sur40_state *sur40 =usb_get_intfdata (interface); +input_unregister_device (sur40->input); +v4l2_ctrl_handler_free (&sur40->hdl);video_unregister_device (&sur40->vdev);v4l2_device_unregister (&sur40->v4l2); -input_unregister_device (sur40->input);kfree (sur40->bulk_in_buffer);kfree (sur40);
drivers/iommu/amd/iommu.c +2 -1
@@ -1284,7 +1284,8 @@ static void __domain_flush_pages(struct protection_domain *domain,static void domain_flush_pages (struct protection_domain *domain,u64 address,size_t size,int pde) { -if (likely (!amd_iommu_np_cache)) { +if (likely (!amd_iommu_np_cache) || + size >= (1ULL <<52 )) {__domain_flush_pages (domain, address, size, pde);return ; }
drivers/md/dm-integrity.c +0 -4
@@ -1474,10 +1474,6 @@ static int dm_integrity_rw_tag(struct dm_integrity_c *ic, unsigned char *tag, se *metadata_offset =0 ; } -if (unlikely (!is_power_of_2 (ic->tag_size))) { - hash_offset = (hash_offset + to_copy) % ic->tag_size; - } - total_size -= to_copy; }while (unlikely (total_size));
drivers/md/dm-verity-target.c +7 -5
@@ -217,14 +217,16 @@ static int verity_handle_err(struct dm_verity *v, enum verity_block_type type,char *envp[] = { verity_env,NULL };const char *type_str ="" ;struct mapped_device *md =dm_table_get_md (v->ti->table); +int ce;/* Corruption should be visible in device status in all modes */ v->hash_failed =1 ; -if (v->corrupted_errs >=DM_VERITY_MAX_CORRUPTED_ERRS ) - goto out; - - v->corrupted_errs++; + ce =atomic_read (&v->corrupted_errs); +do { +if (ce >=DM_VERITY_MAX_CORRUPTED_ERRS ) + goto out; + }while (!atomic_try_cmpxchg (&v->corrupted_errs, &ce, ce +1 ));switch (type) {case DM_VERITY_BLOCK_TYPE_DATA :
@@ -240,7 +242,7 @@ static int verity_handle_err(struct dm_verity *v, enum verity_block_type type,DMERR_LIMIT ("%s: %s block %llu is corrupted" , v->data_dev->name, type_str, block); -if (v->corrupted_errs ==DM_VERITY_MAX_CORRUPTED_ERRS ) +if (ce +1 ==DM_VERITY_MAX_CORRUPTED_ERRS )DMERR ("%s: reached maximum errors" , v->data_dev->name); snprintf(verity_env, DM_VERITY_ENV_LENGTH, "%s=%d,%llu",
drivers/md/dm-verity.h +1 -1
@@ -55,7 +55,7 @@ struct dm_verity {unsigned int ahash_reqsize;/* the size of temporary space for crypto */ int hash_failed;/* set to 1 if hash of any block failed */ enum verity_mode mode;/* mode for handling verification errors */ -unsigned corrupted_errs;/* Number of errors for corrupted blocks */ +atomic_t corrupted_errs;/* Number of errors for corrupted blocks */ struct workqueue_struct *verify_wq;
drivers/media/i2c/imx219.c +18 -29
115 lines not on this page · raw message
drivers/media/platform/aspeed-video.c +1 -0
@@ -1724,6 +1724,7 @@ static int aspeed_video_probe(struct platform_device *pdev) rc =aspeed_video_setup_video (video);if (rc) {aspeed_video_free_buf (video, &video->jpeg); +of_reserved_mem_device_release (&pdev->dev);clk_unprepare (video->vclk);clk_unprepare (video->eclk);return rc;
drivers/media/platform/marvell-ccic/cafe-driver.c +1 -0
@@ -610,6 +610,7 @@ static void cafe_pci_remove(struct pci_dev *pdev)return ; }cafe_shutdown (cam); +pci_disable_device (pdev);kfree (cam); }
drivers/media/platform/mtk-vcodec/mtk_vcodec_fw_scp.c +5 -0
@@ -65,6 +65,11 @@ struct mtk_vcodec_fw *mtk_vcodec_fw_scp_init(struct mtk_vcodec_dev *dev) } fw =devm_kzalloc (&dev->plat_dev->dev,sizeof (*fw),GFP_KERNEL ); +if (!fw) { +scp_put (scp); +return ERR_PTR (-ENOMEM ); + } + fw->type =SCP ; fw->ops = &mtk_vcodec_rproc_msg; fw->scp = scp;
drivers/media/v4l2-core/v4l2-async.c +6 -2
@@ -705,7 +705,7 @@ __v4l2_async_notifier_add_i2c_subdev(struct v4l2_async_notifier *notifier, }EXPORT_SYMBOL_GPL (__v4l2_async_notifier_add_i2c_subdev); -int v4l2_async_register_subdev (struct v4l2_subdev *sd) +int __v4l2_async_register_subdev (struct v4l2_subdev *sd,struct module *module) {struct v4l2_async_notifier *subdev_notifier;struct v4l2_async_notifier *notifier;
@@ -719,6 +719,8 @@ int v4l2_async_register_subdev(struct v4l2_subdev *sd)if (!sd->fwnode && sd->dev) sd->fwnode =dev_fwnode (sd->dev); + sd->owner = module; +mutex_lock (&list_lock);INIT_LIST_HEAD (&sd->async_list);
@@ -769,9 +771,11 @@ int v4l2_async_register_subdev(struct v4l2_subdev *sd)mutex_unlock (&list_lock); + sd->owner =NULL ; +return ret; } -EXPORT_SYMBOL (v4l2_async_register_subdev); +EXPORT_SYMBOL (__v4l2_async_register_subdev);void v4l2_async_unregister_subdev (struct v4l2_subdev *sd) {
drivers/media/v4l2-core/v4l2-fwnode.c +3 -3
@@ -1318,7 +1318,7 @@ v4l2_async_notifier_parse_fwnode_sensor(struct device *dev,return 0 ; } -int v4l2_async_register_subdev_sensor (struct v4l2_subdev *sd) +int __v4l2_async_register_subdev_sensor (struct v4l2_subdev *sd,struct module *module) {struct v4l2_async_notifier *notifier;int ret;
@@ -1340,7 +1340,7 @@ int v4l2_async_register_subdev_sensor(struct v4l2_subdev *sd)if (ret <0 ) goto out_cleanup; - ret =v4l2_async_register_subdev (sd); + ret =__v4l2_async_register_subdev (sd, module);if (ret <0 ) goto out_unregister;
@@ -1357,7 +1357,7 @@ int v4l2_async_register_subdev_sensor(struct v4l2_subdev *sd)return ret; } -EXPORT_SYMBOL_GPL (v4l2_async_register_subdev_sensor); +EXPORT_SYMBOL_GPL (__v4l2_async_register_subdev_sensor);MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Sakari Ailus <[email protected]>" );
drivers/mmc/host/omap_hsmmc.c +1 -1
@@ -1363,7 +1363,7 @@ omap_hsmmc_prepare_data(struct omap_hsmmc_host *host, struct mmc_request *req)if (req->data ==NULL ) {OMAP_HSMMC_WRITE (host->base,BLK ,0 );if (req->cmd->flags &MMC_RSP_BUSY ) { - timeout = req->cmd->busy_timeout *NSEC_PER_MSEC ; + timeout = (u64 )req->cmd->busy_timeout *NSEC_PER_MSEC ;/* * Set an arbitrary 100ms data timeout for commands with
drivers/mmc/host/sdhci.c +16 -0
@@ -4109,6 +4109,14 @@ void __sdhci_read_caps(struct sdhci_host *host, const u16 *ver, }EXPORT_SYMBOL_GPL (__sdhci_read_caps); +static void sdhci_unmap_bounce_buffer (void *data) +{ +struct sdhci_host *host = data; + +dma_unmap_single (mmc_dev (host->mmc), host->bounce_addr, + host->bounce_buffer_size,DMA_BIDIRECTIONAL ); +} +static void sdhci_allocate_bounce_buffer (struct sdhci_host *host) {struct mmc_host *mmc = host->mmc;
@@ -4163,6 +4171,14 @@ static void sdhci_allocate_bounce_buffer(struct sdhci_host *host) } host->bounce_buffer_size = bounce_size; + ret =devm_add_action_or_reset (mmc_dev (mmc), + sdhci_unmap_bounce_buffer, host); +if (ret) { +devm_kfree (mmc_dev (mmc), host->bounce_buffer); + host->bounce_buffer =NULL ; + host->bounce_buffer_size =0 ; +return ; + }/* Lie about this since we're bouncing */ mmc->max_segs = max_blocks;
drivers/mmc/host/sdhci.h +1 -1
@@ -597,7 +597,7 @@ struct sdhci_host {unsigned int tuning_count;/* Timer count for re-tuning */ unsigned int tuning_mode;/* Re-tuning mode supported by host */ -unsigned int tuning_err;/* Error code for re-tuning */ +int tuning_err;/* Error code for re-tuning */ #define SDHCI_TUNING_MODE_1 0#define SDHCI_TUNING_MODE_2 1#define SDHCI_TUNING_MODE_3 2
drivers/mmc/host/vub300.c +21 -15
@@ -2116,19 +2116,19 @@ static int vub300_probe(struct usb_interface *interface, command_out_urb =usb_alloc_urb (0 ,GFP_KERNEL );if (!command_out_urb) { retval = -ENOMEM ; - goto error0; + goto err_put_udev; } command_res_urb =usb_alloc_urb (0 ,GFP_KERNEL );if (!command_res_urb) { retval = -ENOMEM ; - goto error1; + goto err_free_out_urb; }/* this also allocates memory for our VUB300 mmc host device */ mmc =mmc_alloc_host (sizeof (struct vub300_mmc_host ), &udev->dev);if (!mmc) { retval = -ENOMEM ;dev_err (&udev->dev,"not enough memory for the mmc_host\n" ); - goto error4; + goto err_free_res_urb; }/* MMC core transfer sizes tunable parameters */ mmc->caps =0 ;
@@ -2281,7 +2281,7 @@ static int vub300_probe(struct usb_interface *interface,dev_err (&vub300->udev->dev,"Could not find two sets of bulk-in/out endpoint pairs\n" ); retval = -EINVAL ; - goto error5; + goto err_free_host; } retval = usb_control_msg(vub300->udev, usb_rcvctrlpipe(vub300->udev, 0),
@@ -2290,14 +2290,14 @@ static int vub300_probe(struct usb_interface *interface,0x0000 ,0x0000 , &vub300->hc_info, sizeof(vub300->hc_info), 1000);if (retval <0 ) - goto error5; + goto err_free_host; retval =usb_control_msg (vub300->udev,usb_sndctrlpipe (vub300->udev,0 ),SET_ROM_WAIT_STATES ,USB_DIR_OUT |USB_TYPE_VENDOR |USB_RECIP_DEVICE , firmware_rom_wait_states,0x0000 ,NULL ,0 ,1000 );if (retval <0 ) - goto error5; + goto err_free_host; dev_info(&vub300->udev->dev, "operating_mode = %s %s %d MHz %s %d byte USB packets\n", (mmc->caps & MMC_CAP_SDIO_IRQ) ? "IRQs" : "POLL",
@@ -2312,7 +2312,7 @@ static int vub300_probe(struct usb_interface *interface,0x0000 ,0x0000 , &vub300->system_port_status, sizeof(vub300->system_port_status), 1000);if (retval <0 ) { - goto error5; + goto err_free_host; }else if (sizeof (vub300->system_port_status) == retval) { vub300->card_present = (0x0001 & vub300->system_port_status.port_flags) ?1 :0 ;
@@ -2320,7 +2320,7 @@ static int vub300_probe(struct usb_interface *interface, (0x0010 & vub300->system_port_status.port_flags) ?1 :0 ; }else { retval = -EINVAL ; - goto error5; + goto err_free_host; }usb_set_intfdata (interface, vub300);INIT_DELAYED_WORK (&vub300->pollwork, vub300_pollwork_thread);
@@ -2345,23 +2345,29 @@ static int vub300_probe(struct usb_interface *interface, interface_to_InterfaceNumber(interface)); retval =mmc_add_host (mmc);if (retval) - goto error6; + goto err_stop_io;return 0 ; -error6: -del_timer_sync (&vub300->inactivity_timer); -error5: + +err_stop_io: + vub300->interface =NULL ; +kref_put (&vub300->kref, vub300_delete); + +return retval; + +err_free_host:mmc_free_host (mmc);/* * and hence also frees vub300 * which is contained at the end of struct mmc */ -error4: +err_free_res_urb:usb_free_urb (command_res_urb); -error1: +err_free_out_urb:usb_free_urb (command_out_urb); -error0: +err_put_udev:usb_put_dev (udev); +return retval; }
drivers/mtd/maps/vmu-flash.c +3 -5
@@ -610,7 +610,7 @@ static int vmu_connect(struct maple_device *mdev) basic_flash_data =be32_to_cpu (mdev->devinfo.function_data[c -1 ]); - card =kmalloc (sizeof (struct memcard ),GFP_KERNEL ); + card = kzalloc_obj(struct memcard);if (!card) { error = -ENOMEM ; goto fail_nomem;
@@ -628,15 +628,13 @@ static int vmu_connect(struct maple_device *mdev)* Not sure there are actually any multi-partition devices in the * real world, but the hardware supports them, so, so will we */ - card->parts =kmalloc_array (card->partitions,sizeof (struct vmupart ), -GFP_KERNEL ); + card->parts = kzalloc_objs(struct vmupart, card->partitions);if (!card->parts) { error = -ENOMEM ; goto fail_partitions; } - card->mtd =kmalloc_array (card->partitions,sizeof (struct mtd_info ), -GFP_KERNEL ); + card->mtd = kzalloc_objs(struct mtd_info, card->partitions);if (!card->mtd) { error = -ENOMEM ; goto fail_mtd_info;
drivers/mtd/spi-nor/swp.c +17 -13
@@ -52,7 +52,6 @@ static u64 spi_nor_get_min_prot_length_sr(struct spi_nor *nor)static void spi_nor_get_locked_range_sr (struct spi_nor *nor,u8 sr,loff_t *ofs,uint64_t *len) { -struct mtd_info *mtd = &nor->mtd;u64 min_prot_len;u8 mask =spi_nor_get_sr_bp_mask (nor);u8 tb_mask =spi_nor_get_sr_tb_mask (nor);
@@ -73,13 +72,13 @@ static void spi_nor_get_locked_range_sr(struct spi_nor *nor, u8 sr, loff_t *ofs, min_prot_len =spi_nor_get_min_prot_length_sr (nor); *len = min_prot_len << (bp -1 ); -if (*len > mtd->size) - *len = mtd->size; +if (*len > nor->params->size) + *len = nor->params->size;if (nor->flags &SNOR_F_HAS_SR_TB && sr & tb_mask) *ofs =0 ;else - *ofs = mtd->size - *len; + *ofs = nor->params->size - *len; }/*
@@ -155,7 +154,6 @@ static bool spi_nor_is_unlocked_sr(struct spi_nor *nor, loff_t ofs,*/ static int spi_nor_sr_lock (struct spi_nor *nor,loff_t ofs,uint64_t len) { -struct mtd_info *mtd = &nor->mtd;u64 min_prot_len;int ret, status_old, status_new;u8 mask =spi_nor_get_sr_bp_mask (nor);
@@ -180,7 +178,7 @@ static int spi_nor_sr_lock(struct spi_nor *nor, loff_t ofs, uint64_t len) can_be_bottom = false;/* If anything above us is unlocked, we can't use 'top' protection */ -if (!spi_nor_is_locked_sr (nor, ofs + len, mtd->size - (ofs + len), +if (!spi_nor_is_locked_sr (nor, ofs + len, nor->params->size - (ofs + len), status_old)) can_be_top = false;
@@ -192,11 +190,11 @@ static int spi_nor_sr_lock(struct spi_nor *nor, loff_t ofs, uint64_t len)/* lock_len: length of region that should end up locked */ if (use_top) - lock_len = mtd->size - ofs; + lock_len = nor->params->size - ofs;else lock_len = ofs + len; -if (lock_len == mtd->size) { +if (lock_len == nor->params->size) { val = mask; }else { min_prot_len =spi_nor_get_min_prot_length_sr (nor);
@@ -240,7 +238,6 @@ static int spi_nor_sr_lock(struct spi_nor *nor, loff_t ofs, uint64_t len)*/ static int spi_nor_sr_unlock (struct spi_nor *nor,loff_t ofs,uint64_t len) { -struct mtd_info *mtd = &nor->mtd;u64 min_prot_len;int ret, status_old, status_new;u8 mask =spi_nor_get_sr_bp_mask (nor);
@@ -265,7 +262,7 @@ static int spi_nor_sr_unlock(struct spi_nor *nor, loff_t ofs, uint64_t len) can_be_top = false;/* If anything above us is locked, we can't use 'bottom' protection */ -if (!spi_nor_is_unlocked_sr (nor, ofs + len, mtd->size - (ofs + len), +if (!spi_nor_is_unlocked_sr (nor, ofs + len, nor->params->size - (ofs + len), status_old)) can_be_bottom = false;
@@ -275,9 +272,16 @@ static int spi_nor_sr_unlock(struct spi_nor *nor, loff_t ofs, uint64_t len)/* Prefer top, if both are valid */ use_top = can_be_top; -/* lock_len: length of region that should remain locked */ -if (use_top) - lock_len = mtd->size - (ofs + len); +/* +* lock_len: length of region that should remain locked. +* +* When can_be_top and can_be_bottom booleans are true, both adjacent +* regions are unlocked, thus the entire flash can be unlocked. +*/ +if (can_be_top && can_be_bottom) + lock_len =0 ; +else if (use_top) + lock_len = nor->params->size - (ofs + len);else lock_len = ofs;
drivers/net/can/usb/Kconfig +11 -4
@@ -14,11 +14,18 @@ config CAN_EMS_USB This driver is for the one channel CPC-USB/ARM7 CAN/USB interface from EMS Dr. Thomas Wuensche (http://www.ems-wuensche.de). -config CAN_ESD_USB2 - tristate "ESD USB/2 CAN/USB interface" +config CAN_ESD_USB + tristate "esd electronics gmbh CAN/USB interfaces" help - This driver supports the CAN-USB/2 interface - from esd electronic system design gmbh (http://www.esd.eu). + This driver adds supports for several CAN/USB interfaces + from esd electronics gmbh (https://www.esd.eu). + + The drivers supports the following devices: + - esd CAN-USB/2 + - esd CAN-USB/Micro + + To compile this driver as a module, choose M here: the module + will be called esd_usb. config CAN_ETAS_ES58X tristate "ETAS ES58X CAN/USB interfaces"
drivers/net/can/usb/Makefile +1 -1
@@ -5,7 +5,7 @@ obj-$(CONFIG_CAN_8DEV_USB) += usb_8dev.o obj-$(CONFIG_CAN_EMS_USB) += ems_usb.o -obj-$(CONFIG_CAN_ESD_USB2) += esd_usb2.o +obj-$(CONFIG_CAN_ESD_USB) += esd_usb.o obj-$(CONFIG_CAN_ETAS_ES58X) += etas_es58x/ obj-$(CONFIG_CAN_GS_USB) += gs_usb.o obj-$(CONFIG_CAN_KVASER_USB) += kvaser_usb/
drivers/net/can/usb/esd_usb.c new file +1173 -0
260 lines not on this page · raw message
drivers/net/can/usb/esd_usb2.c deleted +0 -1170
1,170 lines not on this page · raw message
drivers/net/ethernet/aquantia/atlantic/aq_ring.c +25 -0
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/aquantia/atlantic/aq_ring.h +1 -0
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/aquantia/atlantic/aq_vec.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/intel/ice/ice_ethtool.c +5 -5
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/intel/ice/ice_main.c +10 -0
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c +48 -0
48 lines not on this page · raw message
drivers/net/ethernet/intel/igc/igc_main.c +0 -1
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/marvell/octeontx2/af/rvu.c +7 -7
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/marvell/octeontx2/af/rvu.h +1 -0
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c +15 -3
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +6 -8
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/mellanox/mlxsw/spectrum.c +91 -1
92 lines not on this page · raw message
drivers/net/ethernet/microsoft/mana/mana_en.c +13 -0
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/ti/am65-cpsw-nuss.c +2 -0
Lines of this file are not shown. View the raw message.
drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c +15 -1
Lines of this file are not shown. View the raw message.
drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h +6 -0
Lines of this file are not shown. View the raw message.
drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +42 -3
45 lines not on this page · raw message
drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +6 -0
Lines of this file are not shown. View the raw message.
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +7 -1
Lines of this file are not shown. View the raw message.
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h +1 -0
Lines of this file are not shown. View the raw message.
drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c +3 -0
Lines of this file are not shown. View the raw message.
drivers/net/wireless/marvell/libertas_tf/main.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/pinctrl/cirrus/pinctrl-lochnagar.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/pinctrl/intel/pinctrl-cherryview.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/pinctrl/intel/pinctrl-lynxpoint.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/pinctrl/mediatek/pinctrl-moore.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/pinctrl/mediatek/pinctrl-mtk-common.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/pinctrl/mediatek/pinctrl-paris.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/scsi/sd_zbc.c +86 -40
126 lines not on this page · raw message
drivers/thunderbolt/tb.c +29 -29
58 lines not on this page · raw message
drivers/thunderbolt/xdomain.c +65 -29
94 lines not on this page · raw message
drivers/tty/serial/sc16is7xx.c +165 -27
192 lines not on this page · raw message
drivers/usb/gadget/function/f_tcm.c +164 -28
192 lines not on this page · raw message
drivers/vdpa/vdpa_user/iova_domain.c +53 -38
91 lines not on this page · raw message
drivers/video/fbdev/core/bitblit.c +61 -61
122 lines not on this page · raw message
drivers/video/fbdev/core/fbcon.c +206 -207
413 lines not on this page · raw message
drivers/video/fbdev/core/fbcon_ccw.c +73 -73
146 lines not on this page · raw message
drivers/video/fbdev/core/fbcon_cw.c +73 -73
146 lines not on this page · raw message
drivers/video/fbdev/core/fbcon_rotate.c +22 -22
44 lines not on this page · raw message
drivers/video/fbdev/core/fbcon_rotate.h +3 -3
Lines of this file are not shown. View the raw message.
drivers/video/fbdev/core/fbcon_ud.c +81 -81
162 lines not on this page · raw message
fs/ceph/caps.c +33 -20
53 lines not on this page · raw message
fs/ceph/file.c +23 -19
42 lines not on this page · raw message
fs/ksmbd/smb2pdu.c +55 -47
102 lines not on this page · raw message
fs/ksmbd/smb_common.c +33 -10
43 lines not on this page · raw message
fs/namei.c +43 -0
43 lines not on this page · raw message
fs/ntfs3/index.c +34 -10
44 lines not on this page · raw message
include/linux/dma/edma.h +47 -3
50 lines not on this page · raw message
kernel/audit_watch.c +27 -15
42 lines not on this page · raw message
kernel/taskstats.c +35 -32
67 lines not on this page · raw message
lib/bootconfig.c +65 -0
65 lines not on this page · raw message
net/core/pktgen.c +24 -19
43 lines not on this page · raw message
net/ipv4/ipip.c +5 -36
41 lines not on this page · raw message
net/mptcp/protocol.c +51 -68
119 lines not on this page · raw message
net/netfilter/nft_set_pipapo.c +156 -98
254 lines not on this page · raw message
net/sched/act_ct.c +31 -10
41 lines not on this page · raw message
security/security.c +325 -205
530 lines not on this page · raw message
security/selinux/hooks.c +43 -48
91 lines not on this page · raw message
security/smack/smack_lsm.c +31 -35
66 lines not on this page · raw message
sound/soc/mediatek/mt8183/mt8183-afe-pcm.c +8 -4
Lines of this file are not shown. View the raw message.
sound/soc/mediatek/mt8192/mt8192-afe-pcm.c +44 -74
118 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.