Linux 5.10.266
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.10.266 kernel.
All users of the 5.10 kernel series must upgrade.
The updated 5.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.10.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/arm64/kvm/arm.c | 2 arch/mips/kvm/mips.c | 2 arch/openrisc/include/asm/processor.h | 2 arch/openrisc/kernel/signal.c | 5 arch/powerpc/kvm/powerpc.c | 2 arch/powerpc/platforms/pseries/lparcfg.c | 2 arch/powerpc/platforms/pseries/pci.c | 2 arch/s390/kvm/kvm-s390.c | 2 arch/x86/include/asm/kvm_host.h | 3 arch/x86/kernel/cpu/resctrl/rdtgroup.c | 12 arch/x86/kvm/lapic.c | 41 - arch/x86/kvm/lapic.h | 3 arch/x86/kvm/svm/avic.c | 4 arch/x86/kvm/svm/svm.h | 2 arch/x86/kvm/vmx/vmx.c | 9 arch/x86/kvm/x86.c | 19 crypto/ccm.c | 2 drivers/base/property.c | 29 drivers/char/tpm/tpm_tis_core.c | 38 - drivers/crypto/qce/core.c | 2 drivers/dma-buf/dma-resv.c | 8 drivers/dma-buf/udmabuf.c | 21 drivers/dma/dw-edma/dw-edma-core.c | 77 +- drivers/dma/dw-edma/dw-edma-core.h | 20 drivers/dma/dw-edma/dw-edma-pcie.c | 180 +++- drivers/dma/dw-edma/dw-edma-v0-core.c | 76 +- drivers/fpga/dfl-afu-main.c | 3 drivers/gpio/gpio-tegra.c | 18 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_uvd.c | 11 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 26 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 | 7 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 | 17 drivers/gpu/drm/virtio/virtgpu_plane.c | 5 drivers/gpu/drm/virtio/virtgpu_vq.c | 9 drivers/hwmon/npcm750-pwm-fan.c | 11 drivers/i2c/busses/i2c-bcm-iproc.c | 11 drivers/i2c/busses/i2c-davinci.c | 4 drivers/i2c/busses/i2c-imx.c | 126 ++- drivers/i2c/i2c-core-base.c | 2 drivers/i2c/i2c-core-smbus.c | 15 drivers/i2c/i2c-smbus.c | 5 drivers/infiniband/ulp/rtrs/rtrs-srv.c | 5 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 | 7 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 | 6 drivers/input/touchscreen/sur40.c | 23 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 | 7 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/Makefile | 2 drivers/mtd/spi-nor/core.c | 406 ----------- drivers/mtd/spi-nor/core.h | 5 drivers/mtd/spi-nor/intel.c | 16 drivers/mtd/spi-nor/sst.c | 30 drivers/mtd/spi-nor/swp.c | 426 +++++++++++ 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_virtchnl_pf.c | 48 + drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 13 drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c | 8 drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 109 ++- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 4 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 31 drivers/net/ethernet/ti/am65-cpsw-nuss.c | 139 ++- drivers/net/ethernet/ti/am65-cpsw-nuss.h | 4 drivers/net/ipa/ipa_smp2p.c | 30 drivers/net/thunderbolt.c | 8 drivers/net/wireless/ath/ath6kl/txrx.c | 2 drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 13 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 | 6 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/pci/pci.c | 30 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 | 5 drivers/scsi/sd_zbc.c | 79 +- drivers/target/target_core_fabric_lib.c | 144 +++ drivers/target/target_core_internal.h | 5 drivers/target/target_core_pr.c | 54 - drivers/thunderbolt/domain.c | 30 drivers/thunderbolt/icm.c | 5 drivers/thunderbolt/switch.c | 14 drivers/thunderbolt/tb.c | 58 - drivers/thunderbolt/tb.h | 2 drivers/thunderbolt/xdomain.c | 71 + 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/usb/gadget/udc/bdc/bdc_core.c | 20 drivers/usb/gadget/udc/bdc/bdc_udc.c | 7 drivers/usb/serial/keyspan_pda.c | 463 ++++++------ fs/9p/vfs_inode.c | 9 fs/binfmt_elf.c | 4 fs/binfmt_elf_fdpic.c | 4 fs/binfmt_misc.c | 14 fs/ceph/addr.c | 24 fs/ceph/cache.c | 2 fs/ceph/caps.c | 53 - fs/ceph/dir.c | 20 fs/ceph/export.c | 10 fs/ceph/file.c | 33 fs/ceph/inode.c | 20 fs/ceph/ioctl.c | 8 fs/ceph/mds_client.c | 11 fs/ceph/mds_client.h | 2 fs/ceph/mdsmap.c | 2 fs/ceph/super.c | 22 fs/ceph/super.h | 8 fs/ceph/xattr.c | 8 fs/cifs/smb2ops.c | 4 fs/exec.c | 6 fs/f2fs/data.c | 2 fs/jbd2/journal.c | 10 fs/namei.c | 42 + fs/overlayfs/copy_up.c | 14 fs/super.c | 19 fs/xfs/libxfs/xfs_sb.c | 4 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 | 2 include/linux/firmware.h | 3 include/linux/fs.h | 28 include/linux/i2c-smbus.h | 6 include/linux/jbd2.h | 9 include/linux/kvm_host.h | 1 include/linux/lsm_hooks.h | 1 include/linux/namei.h | 1 include/linux/pci.h | 1 include/linux/property.h | 1 include/linux/skbuff.h | 2 include/linux/thunderbolt.h | 3 include/media/v4l2-async.h | 9 include/net/act_api.h | 20 include/net/ip_tunnels.h | 3 include/net/ip_vs.h | 7 include/trace/events/rxrpc.h | 2 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/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/memory_hotplug.c | 15 mm/pagewalk.c | 8 mm/ptdump.c | 7 net/9p/client.c | 2 net/bluetooth/hidp/core.c | 25 net/ceph/cls_lock_client.c | 21 net/ceph/osdmap.c | 9 net/core/pktgen.c | 43 - net/core/skbuff.c | 28 net/ipv4/ip_tunnel_core.c | 35 net/ipv4/ipip.c | 41 - net/ipv6/ip6_tunnel.c | 40 - net/ipv6/sit.c | 38 - net/mptcp/options.c | 21 net/mptcp/protocol.c | 4 net/mptcp/protocol.h | 14 net/mptcp/subflow.c | 12 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_tables_offload.c | 2 net/packet/af_packet.c | 7 net/rxrpc/call_accept.c | 28 net/rxrpc/call_object.c | 27 net/rxrpc/recvmsg.c | 23 net/sched/act_gact.c | 5 net/sched/act_police.c | 6 net/sched/sch_api.c | 24 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/xfrm/espintcp.c | 32 security/apparmor/include/net.h | 6 security/apparmor/lsm.c | 38 - security/bpf/hooks.c | 3 security/security.c | 506 ++++++++------ 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/soc/codecs/cs4265.c | 4 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 12 sound/soc/xilinx/xlnx_formatter_pcm.c | 10 sound/usb/usx2y/usX2Yhwdep.c | 10 sound/usb/usx2y/usbus428ctldefs.h | 2 sound/usb/usx2y/usbusx2y.c | 2 sound/usb/usx2y/usx2yhwdeppcm.c | 15 virt/kvm/kvm_main.c | 3 274 files changed, 4173 insertions(+), 2363 deletions(-)
Abdun Nihaal (1):
scsi: lpfc: Fix memory leak in lpfc_sli4_driver_resource_setup()
Akhil R (2):
device property: Add fwnode_irq_get_byname
i2c: smbus: Use device_*() functions instead of of_*()
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 (3):
serial: 8250_mid: Remove unneeded test for ->setup() presence
libceph: Amend checking to fix make W=1 build breakage
i2c: smbus: Check for parent device before dereference
Ashutosh Desai (3):
drm/dp/mst: fix buffer overflows in sideband chunk accumulation drm/dp/mst: fix OOB reads on 2-byte fields in sideband reply parsers drm/dp/mst: fix OOB reads in remote DPCD/I2C sideband reply parsers
Bart Van Assche (1):
scsi: sd: sd_zbc: Improve source code documentation
Baul Lee (1):
ALSA: usx2y: bound the hwdep mmap fault offset
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 (8):
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
scsi: target: Bound PR-OUT TransportID parsing to the received buffer 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
Chaitanya Kulkarni (1):
scsi: target: core: pr: Initialize arrays at declaration time
Chao Yu (1):
f2fs: fix UAF issue in f2fs_merge_page_bio()
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
Chunfeng Yun (1):
usb: gadget: bdc: fix checkpatch.pl spacing error
Cássio Gabriel (1):
ASoC: mediatek: mt8183: 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 (1):
media: aspeed: fix missing of_reserved_mem_device_release() on probe failure
David Howells (3):
rxrpc: Fix recv-recv race of completed call
rxrpc: Fix notification vs call-release vs recvmsg
rxrpc: Fix socket notification race
David Matlack (1):
KVM: Introduce vcpu->wants_to_run
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
Deepanshu Kartikey (1):
drm/virtio: use uninterruptible resv lock for plane updates
Dmitry Osipenko (1):
drm/virtio: Return proper error codes instead of -1
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: ims-pcu - fix race condition in reset_device sysfs callback
firmware_loader: introduce __free() cleanup hanler
Input: ims-pcu - fix firmware leak in async update
Eric Dumazet (1):
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
Fan Wu (2):
usb: gadget: udc: bdc: free IRQ and drain func_wake_notify before teardown
wifi: brcmfmac: drain bus_reset work on device removal
Florian Fuchs (1):
mtd: maps: vmu-flash: fix fault in unaligned fixup
Florian Westphal (2):
netfilter: nf_conntrack_sip: remove net variable shadowing
netfilter: ipset: fix list type element drift bug
Frank Li (2):
dmaengine: dw-edma: Remove unused irq field in struct dw_edma_chip
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
George Wilson (2):
powerpc/pseries: pci - logic bug powerpc/pseries: lparcfg - fix kbuf[] underflow
Greg Kroah-Hartman (1):
Linux 5.10.266
Gregory Price (1):
mm/vmstat: fold stranded per-cpu node stats when a node comes online
Grygorii Strashko (3):
net: ethernet: ti: am65-cpsw: move ale selection in pdata
net: ethernet: ti: am65-cpsw: move free desc queue mode selection in pdata
net: ethernet: ti: am65-cpsw: add multi port support in mac-only mode
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
Gustavo Pimentel (2):
PCI: Add pci_find_vsec_capability() to find a specific VSEC
dmaengine: dw-edma: Improve the linked list and data blocks definition
Haibo Chen (1):
mmc: sdhci: make tuning_err a signed int
Haoxiang Li (2):
i2c: davinci: Unregister cpufreq notifier on probe failure
net: ipa: fix SMEM state handle leaks in SMP2P init
Harshad Shirwadkar (1):
jbd2: add a helper to find out number of fast commit blocks
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
Hongyan Xu (1):
hwmon: (npcm750-pwm-fan): stop fan timer on device detach
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_gact, act_police: range check the fallback control action
Ibrahim Hashimov (1):
scsi: scsi_debug: Fix REPORT ZONES alloc_len underflow OOB write
Ido Schimmel (1):
mlxsw: spectrum: Apply RIF configuration when joining a LAG
Ilpo Järvinen (1):
serial: sc16is7xx: Fill in rs485_supported
Jai Luthra (1):
media: i2c: imx219: Rename VTS to FRM_LENGTH
Jani Nikula (2):
drm/displayid: fix Tiled Display Topology ID size drm/i915/hdcp: require monotonically increasing seq_num_v
Jarkko Sakkinen (1):
tpm: tpm_tis_spi: Use wait_woken() in wait_for_tmp_stat()
Jason Gunthorpe (1):
udmabuf: Do not create malformed scatterlists
Jeff Layton (1):
audit: widen ino fields to u64
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 (8):
mmc: vub300: fix use-after-free on disconnect
mmc: vub300: rename probe error labels
USB: serial: keyspan_pda: refactor write-room handling
USB: serial: keyspan_pda: fix write implementation
USB: serial: keyspan_pda: add write-fifo support
USB: serial: keyspan_pda: clean up comments and whitespace
USB: serial: keyspan_pda: fix data loss on receive throttling
USB: serial: keyspan_pda: fix information leak
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):
jbd2: fix integer underflow in jbd2_journal_initialize_fast_commit()
Jérémy Jean (1):
netfilter: flowtable: publish GC-visible tuple last
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
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
Lorenzo Stoakes (ARM) (1):
mm/ptdump: always stabilise against page table freeing using init_mm
Luiz Augusto von Dentz (1):
skbuff: introduce skb_pull_data
Maoyi Xie (4):
net: thunderbolt: Fix frags[] overflow by bounding frame_count
wifi: libertas_tf: fix use-after-free in lbtf_free_adapter()
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
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
Maurizio Lombardi (1):
scsi: target: core: Generate correct identifiers for PR OUT transport IDs
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):
thunderbolt: Prevent XDomain delayed work use-after-free on disconnect
mptcp: only set DATA_FIN when a mapping is present
Michael Walle (3):
mtd: spi-nor: sst: remove global protection flag
mtd: spi-nor: intel: remove global protection flag
mtd: spi-nor: Fix spi_nor_try_unlock_all()
Mika Westerberg (2):
thunderbolt: Keep XDomain reference during the lifetime of a service
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()
Myeonghun Pak (1):
mmc: sdhci: unmap the bounce buffer before device release
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 (1):
mptcp: fix subflow accounting on close
Pavitra Jha (2):
libceph: fix multiple unsafe decodes in decode_locker()
libceph: fix two unsafe bare decodes in decode_lockers()
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
Sangho Lee (1):
Bluetooth: HIDP: reject frames without a transaction header
Sean Christopherson (3):
KVM: x86: Drop @vcpu parameter from kvm_x86_ops.hwapic_isr_update()
KVM: x86: Check for in-kernel xAPIC when querying APICv for directed yield
KVM: x86: Move "apicv_active" into "struct kvm_lapic"
Sebastian Alba Vives (1):
fpga: dfl-afu: validate DMA mapping length in afu_dma_map_region()
Shiming Cheng (1):
net: gro: fix double aggregation of flush-marked skbs
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
Takashi Iwai (1):
ALSA: usx2y: Fix potential leaks of uninitialized memory
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 Zimmermann (1):
drm/tegra: fbdev: Remove offset into framebuffer memory
Thorsten Blum (1):
crypto: qce - fix error path in devm_qce_register_algs
Tomasz Moń (1):
sc16is7xx: Properly resume TX after stop
Tristan Madani (1):
selinux: avoid sk_socket dereference in selinux_sctp_bind_connect()
Tudor Ambarus (1):
mtd: spi-nor: Move Software Write Protection logic out of the core
Vasiliy Kovalev (1):
net/9p: fix infinite loop in p9_client_rpc on fatal signal
Venkatesh Srinivas (1):
KVM: x86: Only reset TSC Deadline Timer in apic_timer_expired on KVM_RUN
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
Wei Fang (1):
net: packet: fix wrong transport_header when sending VLAN-tagged frame
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
Xiubo Li (2):
libceph: add doutc and *_client debug macros support
ceph: rename _to_client() to _to_fs_client()
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
Zhan Xusheng (1):
mmc: omap_hsmmc: fix busy_timeout overflow in ns conversion on 32-bit
Zhang Changzhong (1):
net: ethernet: ti: am65-cpsw: fix error handling in am65_cpsw_nuss_probe()
Zhefu Zhang (1):
Input: atkbd - skip deactivate for Xiaomi Book Pro 14's internal keyboard
Zhenhao Wan (1):
RDMA/rtrs-srv: Bound RDMA-Write length to chunk size in rdma_write_sg
Zhiling Zou (1):
sctp: avoid auth_enable sysctl UAF during netns teardown
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 10 -SUBLEVEL = 265 +SUBLEVEL = 266 EXTRAVERSION = NAME = Dare mighty things
arch/arm64/boot/dts/nvidia/tegra194.dtsi +2 -0
@@ -2375,6 +2375,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/arm64/kvm/arm.c +1 -1
@@ -686,7 +686,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu)return ret; } -if (run->immediate_exit) +if (!vcpu->wants_to_run)return -EINTR ;vcpu_load (vcpu);
arch/mips/kvm/mips.c +1 -1
@@ -464,7 +464,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu) vcpu->mmio_needed =0 ; } -if (vcpu->run->immediate_exit) +if (!vcpu->wants_to_run) goto out;lose_fpu (1 );
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/kvm/powerpc.c +1 -1
@@ -1832,7 +1832,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu)kvm_sigset_activate (vcpu); -if (run->immediate_exit) +if (!vcpu->wants_to_run) r = -EINTR ;else r =kvmppc_vcpu_run (vcpu);
arch/powerpc/platforms/pseries/lparcfg.c +1 -1
@@ -639,7 +639,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
@@ -161,7 +161,7 @@ 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/s390/kvm/kvm-s390.c +1 -1
@@ -4373,7 +4373,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu)struct kvm_run *kvm_run = vcpu->run;int rc; -if (kvm_run->immediate_exit) +if (!vcpu->wants_to_run)return -EINTR ; if (kvm_run->kvm_valid_regs & ~KVM_SYNC_S390_VALID_FIELDS ||
arch/x86/include/asm/kvm_host.h +1 -2
@@ -544,7 +544,6 @@ struct kvm_vcpu_arch {u64 efer;u64 apic_base;struct kvm_lapic *apic;/* kernel irqchip context */ -bool apicv_active;bool load_eoi_exitmap_pending;DECLARE_BITMAP (ioapic_handled_vectors,256 );unsigned long apic_attention;
@@ -1179,7 +1178,7 @@ struct kvm_x86_ops {void (*pre_update_apicv_exec_ctrl)(struct kvm *kvm,bool activate);void (*refresh_apicv_exec_ctrl)(struct kvm_vcpu *vcpu);void (*hwapic_irr_update)(struct kvm_vcpu *vcpu,int max_irr); -void (*hwapic_isr_update)(struct kvm_vcpu *vcpu,int isr); +void (*hwapic_isr_update)(int isr);bool (*guest_apic_has_interrupt)(struct kvm_vcpu *vcpu);void (*load_eoi_exitmap)(struct kvm_vcpu *vcpu,u64 *eoi_exit_bitmap);void (*set_virtual_apic_mode)(struct kvm_vcpu *vcpu);
arch/x86/kernel/cpu/resctrl/rdtgroup.c +7 -5
@@ -2376,10 +2376,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
@@ -2388,7 +2384,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);
arch/x86/kvm/lapic.c +14 -27
119 lines not on this page · raw message
arch/x86/kvm/lapic.h +2 -1
@@ -47,6 +47,7 @@ struct kvm_lapic {struct kvm_timer lapic_timer;u32 divide_count;struct kvm_vcpu *vcpu; +bool apicv_active;bool sw_enabled;bool irr_pending;bool lvt0_in_nmi_mode;
@@ -216,7 +217,7 @@ static inline int apic_x2apic_mode(struct kvm_lapic *apic)static inline bool kvm_vcpu_apicv_active (struct kvm_vcpu *vcpu) { -return vcpu->arch.apic && vcpu->arch.apicv_active; +return vcpu->arch.apic && vcpu->arch.apic->apicv_active; }static inline bool kvm_apic_has_events (struct kvm_vcpu *vcpu)
arch/x86/kvm/svm/avic.c +2 -2
@@ -603,7 +603,7 @@ void svm_hwapic_irr_update(struct kvm_vcpu *vcpu, int max_irr) { } -void svm_hwapic_isr_update (struct kvm_vcpu *vcpu,int max_isr) +void svm_hwapic_isr_update (int max_isr) { }
@@ -673,7 +673,7 @@ void svm_load_eoi_exitmap(struct kvm_vcpu *vcpu, u64 *eoi_exit_bitmap)int svm_deliver_avic_intr (struct kvm_vcpu *vcpu,int vec) { -if (!vcpu->arch.apicv_active) +if (!kvm_vcpu_apicv_active (vcpu))return -1 ;kvm_lapic_set_irr (vec, vcpu->arch.apic);
arch/x86/kvm/svm/svm.h +1 -1
@@ -457,7 +457,7 @@ bool svm_check_apicv_inhibit_reasons(ulong bit);void svm_pre_update_apicv_exec_ctrl (struct kvm *kvm,bool activate);void svm_load_eoi_exitmap (struct kvm_vcpu *vcpu,u64 *eoi_exit_bitmap);void svm_hwapic_irr_update (struct kvm_vcpu *vcpu,int max_irr); -void svm_hwapic_isr_update (struct kvm_vcpu *vcpu,int max_isr); +void svm_hwapic_isr_update (int max_isr);int svm_deliver_avic_intr (struct kvm_vcpu *vcpu,int vec);bool svm_dy_apicv_has_pending_interrupt (struct kvm_vcpu *vcpu); int svm_update_pi_irte(struct kvm *kvm, unsigned int host_irq,
arch/x86/kvm/vmx/vmx.c +5 -4
@@ -4116,7 +4116,8 @@ static int vmx_deliver_posted_interrupt(struct kvm_vcpu *vcpu, int vector)if (!r)return 0 ; -if (!vcpu->arch.apicv_active) +/* Note, this is called iff the local APIC is in-kernel. */ +if (!vcpu->arch.apic->apicv_active)return -1 ;if (pi_test_and_set_pir (vector, &vmx->pi_desc))
@@ -6403,7 +6404,7 @@ static void vmx_set_apic_access_page_addr(struct kvm_vcpu *vcpu)put_page (page); } -static void vmx_hwapic_isr_update (struct kvm_vcpu *vcpu,int max_isr) +static void vmx_hwapic_isr_update (int max_isr) {u16 status;u8 old;
@@ -6457,7 +6458,7 @@ static int vmx_sync_pir_to_irr(struct kvm_vcpu *vcpu)int max_irr;bool max_irr_updated; -WARN_ON (!vcpu->arch.apicv_active); +WARN_ON (!kvm_vcpu_apicv_active (vcpu));if (pi_test_on (&vmx->pi_desc)) {pi_clear_on (&vmx->pi_desc);/*
@@ -6983,7 +6984,7 @@ static fastpath_t vmx_vcpu_run(struct kvm_vcpu *vcpu)* but it would incur the cost of a retpoline for now. * Revisit once static calls are available. */ -if (vcpu->arch.apicv_active) +if (kvm_vcpu_apicv_active (vcpu))vmx_sync_pir_to_irr (vcpu); goto reenter_guest; }
arch/x86/kvm/x86.c +10 -9
@@ -4182,7 +4182,7 @@ void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu)static int kvm_vcpu_ioctl_get_lapic (struct kvm_vcpu *vcpu,struct kvm_lapic_state *s) { -if (vcpu->arch.apicv_active) +if (kvm_vcpu_apicv_active (vcpu)) kvm_x86_ops.sync_pir_to_irr (vcpu);return kvm_apic_get_state (vcpu, s);
@@ -8504,7 +8504,7 @@ static void update_cr8_intercept(struct kvm_vcpu *vcpu)if (!lapic_in_kernel (vcpu))return ; -if (vcpu->arch.apicv_active) +if (vcpu->arch.apic->apicv_active)return ;if (!vcpu->arch.apic->vapic_addr)
@@ -8967,7 +8967,7 @@ void kvm_vcpu_update_apicv(struct kvm_vcpu *vcpu)if (!lapic_in_kernel (vcpu))return ; - vcpu->arch.apicv_active =kvm_apicv_activated (vcpu->kvm); + vcpu->arch.apic->apicv_active =kvm_apicv_activated (vcpu->kvm);kvm_apic_update_apicv (vcpu); kvm_x86_ops.refresh_apicv_exec_ctrl (vcpu); }
@@ -9031,7 +9031,7 @@ static void vcpu_scan_ioapic(struct kvm_vcpu *vcpu)if (irqchip_split (vcpu->kvm))kvm_scan_ioapic_routes (vcpu, vcpu->arch.ioapic_handled_vectors);else { -if (vcpu->arch.apicv_active) +if (kvm_vcpu_apicv_active (vcpu)) kvm_x86_ops.sync_pir_to_irr (vcpu);if (ioapic_in_kernel (vcpu->kvm))kvm_ioapic_scan_entry (vcpu, vcpu->arch.ioapic_handled_vectors);
@@ -9275,7 +9275,7 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)* This handles the case where a posted interrupt was * notified with kvm_vcpu_kick. */ -if (kvm_lapic_enabled (vcpu) && vcpu->arch.apicv_active) +if (kvm_lapic_enabled (vcpu) &&kvm_vcpu_apicv_active (vcpu)) kvm_x86_ops.sync_pir_to_irr (vcpu);if (kvm_vcpu_exit_request (vcpu)) {
@@ -9648,7 +9648,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu)kvm_load_guest_fpu (vcpu);if (unlikely (vcpu->arch.mp_state ==KVM_MP_STATE_UNINITIALIZED )) { -if (kvm_run->immediate_exit) { +if (!vcpu->wants_to_run) { r = -EINTR ; goto out; }
@@ -9692,7 +9692,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu) }else WARN_ON (vcpu->arch.pio.count || vcpu->mmio_needed); -if (kvm_run->immediate_exit) +if (!vcpu->wants_to_run) r = -EINTR ;else r =vcpu_run (vcpu);
@@ -10254,7 +10254,7 @@ int kvm_arch_vcpu_create(struct kvm_vcpu *vcpu)if (r <0 ) goto fail_mmu_destroy;if (kvm_apicv_activated (vcpu->kvm)) - vcpu->arch.apicv_active = true; + vcpu->arch.apic->apicv_active = true; }else static_key_slow_inc (&kvm_no_apic_vcpu);
@@ -11122,7 +11122,8 @@ bool kvm_arch_dy_runnable(struct kvm_vcpu *vcpu) kvm_test_request(KVM_REQ_EVENT, vcpu))return true; -if (vcpu->arch.apicv_active && kvm_x86_ops.dy_apicv_has_pending_interrupt (vcpu)) +if (kvm_vcpu_apicv_active (vcpu) && + kvm_x86_ops.dy_apicv_has_pending_interrupt (vcpu))return true;return false;
crypto/ccm.c +1 -1
@@ -752,7 +752,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/base/property.c +29 -0
@@ -1042,6 +1042,35 @@ int fwnode_irq_get(const struct fwnode_handle *fwnode, unsigned int index) }EXPORT_SYMBOL (fwnode_irq_get); +/** +* fwnode_irq_get_byname - Get IRQ from a fwnode using its name +* @fwnode: Pointer to the firmware node +* @name: IRQ name +* +* Description: +* Find a match to the string @name in the 'interrupt-names' string array +* in _DSD for ACPI, or of_node for Device Tree. Then get the Linux IRQ +* number of the IRQ resource corresponding to the index of the matched +* string. +* +* Return: +* Linux IRQ number on success, or negative errno otherwise. +*/ +int fwnode_irq_get_byname (const struct fwnode_handle *fwnode,const char *name) +{ +int index; + +if (!name) +return -EINVAL ; + + index =fwnode_property_match_string (fwnode,"interrupt-names" , name); +if (index <0 ) +return index; + +return fwnode_irq_get (fwnode, index); +} +EXPORT_SYMBOL (fwnode_irq_get_byname); +/** * fwnode_graph_get_next_endpoint - Get next endpoint firmware node * @fwnode: Pointer to the parent firmware node
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
@@ -52,7 +52,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 +4 -4
@@ -173,7 +173,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
@@ -184,7 +184,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;
@@ -250,7 +250,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);/** * dma_resv_add_shared_fence - Add a fence to a shared slot
@@ -258,7 +258,7 @@ EXPORT_SYMBOL(dma_resv_reserve_shared);* @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
@@ -66,14 +66,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); }
@@ -81,7 +83,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); }
@@ -119,21 +121,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 +38 -39
149 lines not on this page · raw message
drivers/dma/dw-edma/dw-edma-core.h +13 -7
@@ -15,6 +15,8 @@#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 ,
@@ -40,6 +42,7 @@ enum dw_edma_status {struct dw_edma_chan ;struct dw_edma_chunk ; +struct dw_edma ;struct dw_edma_burst {struct list_head list;
@@ -79,14 +82,12 @@ 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; -off_t ll_off;u32 ll_max; -off_t dt_off; -struct msi_msg msi;enum dw_edma_request request;
@@ -117,8 +118,10 @@ struct dw_edma {u16 rd_ch_cnt;struct dw_edma_region rg_region;/* Registers */ -struct dw_edma_region ll_region;/* Linked list */ -struct dw_edma_region dt_region;/* Data */ +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;
@@ -127,9 +130,12 @@ struct dw_edma {enum dw_edma_mode mode;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; + +const struct dw_edma_core_ops *core; };struct dw_edma_sg {
drivers/dma/dw-edma/dw-edma-pcie.c +131 -49
235 lines not on this page · raw message
drivers/dma/dw-edma/dw-edma-v0-core.c +41 -35
176 lines not on this page · raw message
drivers/fpga/dfl-afu-main.c +3 -0
@@ -707,6 +707,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-tegra.c +2 -16
@@ -168,18 +168,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,
@@ -187,19 +180,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/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +2 -2
@@ -950,7 +950,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.base.bo->tbo.base.resv,1 ); + ret =dma_resv_reserve_fences (vm->root.base.bo->tbo.base.resv,1 );if (ret) goto reserve_shared_fail; amdgpu_bo_fence(vm->root.base.bo,
@@ -2205,7 +2205,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
@@ -197,6 +197,25 @@ void amdgpu_gem_object_close(struct drm_gem_object *obj,ttm_eu_backoff_reservation (&ticket, &list); } +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. */
@@ -228,6 +247,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_uvd.c +7 -4
@@ -567,8 +567,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);
@@ -715,6 +715,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 ;
@@ -725,7 +728,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 ; }
@@ -737,7 +740,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 +1 -1
@@ -2904,7 +2904,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->tbo.base.resv,1 ); + r =dma_resv_reserve_fences (root->tbo.base.resv,1 );if (r) goto error_unreserve;
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +22 -4
@@ -846,6 +846,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) {
@@ -855,7 +872,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)
@@ -925,17 +941,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/pm/amdgpu_pm.c +6 -8
@@ -1994,20 +1994,18 @@ static ssize_t amdgpu_get_gpu_metrics(struct device *dev,return ret; } +mutex_lock (&adev->pm.mutex);if (is_support_sw_smu (adev)) size =smu_sys_get_gpu_metrics (&adev->smu, &gpu_metrics);else 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
@@ -2586,7 +2586,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. *
@@ -2594,14 +2594,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);
@@ -2616,7 +2616,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.
@@ -2625,7 +2625,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;
@@ -2635,7 +2635,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
@@ -778,6 +778,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;
@@ -788,6 +794,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 ;
@@ -859,7 +868,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);
@@ -895,7 +904,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:
@@ -911,16 +922,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);
@@ -938,12 +946,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);
@@ -957,12 +962,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 +4 -3
@@ -1534,9 +1534,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/i915_vma.c +1 -1
@@ -1241,7 +1241,7 @@ int i915_vma_move_to_active(struct i915_vma *vma, obj->write_domain =I915_GEM_DOMAIN_RENDER ; obj->read_domains =0 ; }else { - 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
@@ -230,7 +230,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 (msm_obj->base.resv, + ret =dma_resv_reserve_fences (msm_obj->base.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
@@ -239,7 +239,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
@@ -71,6 +71,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
@@ -211,7 +211,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;
@@ -257,9 +256,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 ));
@@ -271,9 +267,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
@@ -830,7 +830,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;
@@ -950,7 +950,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
@@ -106,7 +106,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 ;
@@ -123,7 +123,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
@@ -162,7 +162,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
@@ -259,6 +259,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 +17 -0
@@ -217,6 +217,23 @@ int virtio_gpu_array_lock_resv(struct virtio_gpu_object_array *objs)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 +4 -1
@@ -260,7 +260,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;
@@ -724,8 +724,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/hwmon/npcm750-pwm-fan.c +11 -0
@@ -360,6 +360,11 @@ static void npcm7xx_fan_polling(struct timer_list *t)add_timer (&data->fan_timer); } +static void npcm7xx_fan_cleanup (void *timer) +{ +timer_delete_sync (timer); +} +static inline void npcm7xx_fan_compute (struct npcm7xx_pwm_fan_data *data,u8 fan,u8 cmp,u8 fan_id,u8 flag_int,u8 flag_mode,u8 flag_clear)
@@ -1003,6 +1008,12 @@ static int npcm7xx_pwm_fan_probe(struct platform_device *pdev)msecs_to_jiffies (NPCM7XX_FAN_POLL_TIMER_200MS );timer_setup (&data->fan_timer, npcm7xx_fan_polling,0 ); + ret =devm_add_action_or_reset (dev, + npcm7xx_fan_cleanup, + &data->fan_timer); +if (ret) +return ret; +add_timer (&data->fan_timer);break ; }
drivers/i2c/busses/i2c-bcm-iproc.c +10 -1
@@ -789,7 +789,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
@@ -877,13 +877,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 +86 -40
184 lines not on this page · raw message
drivers/i2c/i2c-core-base.c +1 -1
@@ -1478,7 +1478,7 @@ static int i2c_register_adapter(struct i2c_adapter *adap) goto err_put_adap; } - res =of_i2c_setup_smbus_alert (adap); + res =i2c_setup_smbus_alert (adap);if (res) goto out_reg;
drivers/i2c/i2c-core-smbus.c +10 -5
@@ -14,6 +14,7 @@#include <linux/err.h> #include <linux/i2c.h> #include <linux/i2c-smbus.h> +#include <linux/property.h> #include <linux/slab.h> #include "i2c-core.h"
@@ -699,13 +700,17 @@ struct i2c_client *i2c_new_smbus_alert_device(struct i2c_adapter *adapter, }EXPORT_SYMBOL_GPL (i2c_new_smbus_alert_device); -#if IS_ENABLED (CONFIG_I2C_SMBUS ) &&IS_ENABLED (CONFIG_OF ) -int of_i2c_setup_smbus_alert (struct i2c_adapter *adapter) +#if IS_ENABLED (CONFIG_I2C_SMBUS ) +int i2c_setup_smbus_alert (struct i2c_adapter *adapter) { +struct device *parent = adapter->dev.parent;int irq; - irq =of_property_match_string (adapter->dev.of_node,"interrupt-names" , -"smbus_alert" ); +/* Adapter instantiated without parent, skip the SMBus alert setup */ +if (!parent) +return 0 ; + + irq =device_property_match_string (parent,"interrupt-names" ,"smbus_alert" );if (irq == -EINVAL || irq == -ENODATA )return 0 ;else if (irq <0 )
@@ -713,5 +718,5 @@ int of_i2c_setup_smbus_alert(struct i2c_adapter *adapter) return PTR_ERR_OR_ZERO(i2c_new_smbus_alert_device(adapter, NULL)); } -EXPORT_SYMBOL_GPL (of_i2c_setup_smbus_alert); +EXPORT_SYMBOL_GPL (i2c_setup_smbus_alert);#endif
drivers/i2c/i2c-smbus.c +3 -2
@@ -13,7 +13,7 @@#include <linux/interrupt.h> #include <linux/kernel.h> #include <linux/module.h> -#include <linux/of_irq.h> +#include <linux/property.h> #include <linux/slab.h> #include <linux/workqueue.h>
@@ -178,7 +178,8 @@ static int smbalert_probe(struct i2c_client *ara,if (setup) { irq = setup->irq; }else { - irq =of_irq_get_byname (adapter->dev.of_node,"smbus_alert" ); + irq =fwnode_irq_get_byname (dev_fwnode (adapter->dev.parent), +"smbus_alert" );if (irq <=0 )return irq; }
drivers/infiniband/ulp/rtrs/rtrs-srv.c +3 -2
@@ -258,8 +258,9 @@ static int rdma_write_sg(struct rtrs_srv_op *id)/* WR will fail with length error * if this is 0 */ -if (unlikely (plist->length ==0 )) { -rtrs_err (s,"Invalid RDMA-Write sg list length 0\n" ); +if (unlikely (plist->length ==0 || plist->length > max_chunk_size)) { +rtrs_err (s,"Invalid RDMA-Write sg list length %u\n" , + plist->length);return -EINVAL ; }
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 +4 -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); }
@@ -1193,6 +1192,8 @@ static ssize_t ims_pcu_reset_device(struct device *dev,dev_info (pcu->dev,"Attempting to reset device\n" ); +guard (mutex)(&pcu->cmd_mutex); + error =ims_pcu_execute_command (pcu,PCU_RESET , &reset_byte,1 );if (error) { dev_info(pcu->dev,
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 +6 -0
@@ -209,6 +209,12 @@ 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; + } + touch_size = packet_size /MMS114_PACKET_NUM ; error = __mms114_read_reg(data, MMS114_INFORMATION, packet_size,
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/md/dm-integrity.c +0 -4
@@ -1377,10 +1377,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
@@ -600,6 +600,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
@@ -747,7 +747,7 @@ v4l2_async_notifier_add_devname_subdev(struct v4l2_async_notifier *notifier, }EXPORT_SYMBOL_GPL (v4l2_async_notifier_add_devname_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;
@@ -761,6 +761,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);
@@ -811,9 +813,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 +4 -3
@@ -1337,7 +1337,8 @@ int v4l2_async_notifier_parse_fwnode_sensor_common(struct device *dev, }EXPORT_SYMBOL_GPL (v4l2_async_notifier_parse_fwnode_sensor_common); -int v4l2_async_register_subdev_sensor_common (struct v4l2_subdev *sd) +int __v4l2_async_register_subdev_sensor_common (struct v4l2_subdev *sd, +struct module *module) {struct v4l2_async_notifier *notifier;int ret;
@@ -1360,7 +1361,7 @@ int v4l2_async_register_subdev_sensor_common(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;
@@ -1377,7 +1378,7 @@ int v4l2_async_register_subdev_sensor_common(struct v4l2_subdev *sd)return ret; } -EXPORT_SYMBOL_GPL (v4l2_async_register_subdev_sensor_common); +EXPORT_SYMBOL_GPL (__v4l2_async_register_subdev_sensor_common);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
@@ -4103,6 +4103,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;
@@ -4153,6 +4161,14 @@ static void sdhci_allocate_bounce_buffer(struct sdhci_host *host)/* Again fall back to max_segs == 1 */ return ; 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
@@ -594,7 +594,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/Makefile +1 -1
@@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 -spi-nor-objs := core.o sfdp.o +spi-nor-objs := core.o sfdp.o swp.o spi-nor-objs += atmel.o spi-nor-objs += catalyst.o spi-nor-objs += eon.o
drivers/mtd/spi-nor/core.c +4 -402
222 lines not on this page · raw message
drivers/mtd/spi-nor/swp.c new file +426 -0
426 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_virtchnl_pf.c +48 -0
48 lines not on this page · raw message
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +6 -7
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 +106 -3
109 lines not on this page · raw message
drivers/net/ethernet/mellanox/mlxsw/spectrum.h +4 -0
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +26 -5
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/ti/am65-cpsw-nuss.c +89 -50
139 lines not on this page · raw message
drivers/net/ethernet/ti/am65-cpsw-nuss.h +4 -0
Lines of this file are not shown. View the raw message.
drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c +13 -0
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 +6 -0
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/scsi/sd_zbc.c +64 -15
79 lines not on this page · raw message
drivers/target/target_core_fabric_lib.c +113 -31
144 lines not on this page · raw message
drivers/target/target_core_pr.c +23 -31
54 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 +49 -22
71 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/usb/serial/keyspan_pda.c +231 -232
463 lines not on this page · raw message
fs/ceph/caps.c +33 -20
53 lines not on this page · raw message
fs/namei.c +42 -0
42 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
security/security.c +307 -199
506 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.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.