linux/drivers
Tvrtko Ursulin cd378c371b drm/i915: Use internal class when counting engine resets
[ Upstream commit 1f721a93a5 ]

Commit 503579448d ("drm/i915/gsc: Mark internal GSC engine with reserved uabi class")
made the GSC0 engine not have a valid uabi class and so broke the engine
reset counting, which in turn was made class based in cb823ed991 ("drm/i915/gt: Use intel_gt as the primary object for handling resets").

Despite the title and commit text of the latter is not mentioning it (and
has left the storage array incorrectly sized), tracking by class, despite
it adding aliasing in hypthotetical multi-tile systems, is handy for
virtual engines which for instance do not have a valid engine->id.

Therefore we keep that but just change it to use the internal class which
is always valid. We also add a helper to increment the count, which
aligns with the existing getter.

What was broken without this fix were out of bounds reads every time a
reset would happen on the GSC0 engine, or during selftests when storing
and cross-checking the counts in igt_live_test_begin and
igt_live_test_end.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Fixes: 503579448d ("drm/i915/gsc: Mark internal GSC engine with reserved uabi class")
[tursulin: fixed Fixes tag]
Reported-by: Alan Previn Teres Alexis <alan.previn.teres.alexis@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231201122109.729006-2-tvrtko.ursulin@linux.intel.com
(cherry picked from commit cf9cb028ac)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2023-12-20 17:01:54 +01:00
..
accel accel/ivpu/37xx: Fix interrupt_clear_with_0 WA initialization 2023-12-20 17:01:54 +01:00
accessibility tty: use u8 for flags 2023-08-11 21:12:45 +02:00
acpi iommu: Avoid more races around device probe 2023-12-08 08:52:19 +01:00
amba amba: bus: fix refcount leak 2023-08-22 15:50:57 +02:00
android binder: fix memory leaks of spam and pending work 2023-10-05 12:48:08 +02:00
ata scsi: sd: Fix system start for ATA devices 2023-12-08 08:52:17 +01:00
atm atm: solos-pci: Fix potential deadlock on &tx_queue_lock 2023-12-20 17:01:46 +01:00
auxdisplay drm for 6.6-rc1 2023-08-30 13:34:34 -07:00
base devcoredump: Send uevent once devcd is ready 2023-12-13 18:45:33 +01:00
bcma bcma: Add explicit of_device.h include 2023-04-14 15:32:56 +03:00
block virtio-blk: fix implicit overflow on virtio_max_dma_size 2023-11-28 17:19:46 +00:00
bluetooth Bluetooth: btusb: Add 0bda:b85b for Fn-Link RTL8852BE 2023-11-28 17:20:07 +00:00
bus bus: ti-sysc: Fix SYSC_QUIRK_SWSUP_SIDLE_ACT handling for uart wake-up 2023-09-13 10:24:53 +03:00
cache riscv: RISCV_NONSTANDARD_CACHE_OPS shouldn't depend on RISCV_DMA_NONCOHERENT 2023-10-26 09:42:37 +02:00
cdrom cdrom/gdrom: Fix build error 2023-06-29 08:09:31 -06:00
cdx cdx: Explicitly include correct DT includes 2023-08-04 16:21:20 +02:00
char parisc/agp: Use 64-bit LE values in SBA IOMMU PDIR table 2023-11-28 17:20:00 +00:00
clk clk: qcom: ipq6018: drop the CLK_SET_RATE_PARENT flag from PLL clocks 2023-11-28 17:20:01 +00:00
clocksource clocksource/drivers/timer-atmel-tcb: Fix initialization on SAM9 hardware 2023-11-28 17:19:36 +00:00
comedi Revert "comedi: add HAS_IOPORT dependencies" 2023-09-12 15:49:20 +02:00
connector Fix NULL pointer dereference in cn_filter() 2023-10-24 10:53:45 +02:00
counter First set of Counter fixes for 6.6 2023-10-02 13:13:15 +02:00
cpufreq cpufreq/amd-pstate: Only print supported EPP values for performance governor 2023-12-08 08:52:25 +01:00
cpuidle powerpc updates for 6.6 2023-08-31 12:43:10 -07:00
crypto crypto: hisilicon/qm - prevent soft lockup in receive loop 2023-11-28 17:19:44 +00:00
cxl cxl/port: Fix delete_endpoint() vs parent unregistration race 2023-11-28 17:20:07 +00:00
dax mm: remove enum page_entry_size 2023-08-24 16:20:30 -07:00
dca Mainly singleton patches all over the place. Series of note are: 2023-04-27 19:57:00 -07:00
devfreq PM / devfreq: rockchip-dfi: Make pmu regmap mandatory 2023-11-20 11:59:00 +01:00
dio drivers: dio: fix possible memory leak in dio_init() 2022-11-09 15:12:37 +01:00
dma dmaengine: stm32-mdma: correct desc prep when channel running 2023-11-28 17:20:05 +00:00
dma-buf dma-buf: fix check in dma_resv_add_fence 2023-12-08 08:52:19 +01:00
edac Intel EDAC fixes: 2023-08-30 19:23:00 -07:00
eisa EISA: Replace all non-returning strlcpy with strscpy 2023-07-27 10:04:42 -07:00
extcon extcon: cht_wc: add POWER_SUPPLY dependency 2023-08-05 15:42:15 +09:00
firewire scsi: Change SCSI device boolean fields to single bit flags 2023-12-08 08:52:17 +01:00
firmware efi/x86: Avoid physical KASLR on older Dell systems 2023-12-20 17:01:43 +01:00
fpga fpga: Fix memory leak for fpga_region_test_class_find() 2023-10-24 19:32:39 +02:00
fsi fsi: i2cr: Switch to use struct i2c_driver's .probe() 2023-08-22 15:51:33 +02:00
gnss driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
gpio gpiolib: sysfs: Fix error handling on failed export 2023-12-13 18:45:30 +01:00
gpu drm/i915: Use internal class when counting engine resets 2023-12-20 17:01:54 +01:00
greybus greybus: Use alloc_ordered_workqueue() to create ordered workqueues 2023-05-08 13:52:27 -10:00
hid HID: Add quirk for Labtec/ODDOR/aikeec handbrake 2023-12-20 17:01:51 +01:00
hsi hsi: omap_ssi: Explicitly include correct DT includes 2023-07-31 23:17:57 +02:00
hte hte: tegra: Fix missing error code in tegra_hte_test_probe() 2023-11-20 11:59:08 +01:00
hv hyperv-next for v6.6 2023-09-04 11:26:29 -07:00
hwmon hwmon: (nzxt-kraken2) Fix error handling path in kraken2_probe() 2023-12-13 18:45:15 +01:00
hwspinlock hwspinlock: qcom: add missing regmap config for SFPB MMIO implementation 2023-07-17 11:49:18 -07:00
hwtracing coresight: ultrasoc-smb: Fix uninitialized before use buf_hw_base 2023-12-13 18:45:29 +01:00
i2c i2c: ocores: Move system PM hooks to the NOIRQ phase 2023-12-13 18:44:57 +01:00
i3c i3c: master: svc: fix random hot join failure since timeout error 2023-11-28 17:20:06 +00:00
idle Perf events changes for v6.6: 2023-08-28 16:35:01 -07:00
iio iio: adc: stm32-adc: harden against NULL pointer deref in stm32_adc_probe() 2023-11-28 17:19:45 +00:00
infiniband RDMA/mlx5: Send events from IB driver about device affiliation state 2023-12-20 17:01:44 +01:00
input Input: synaptics-rmi4 - fix use after free in rmi_unregister_function() 2023-11-20 11:59:34 +01:00
interconnect interconnect: fix error handling in qnoc_probe() 2023-11-20 11:59:27 +01:00
iommu iommu: Fix printk arg in of_iommu_get_resv_regions() 2023-12-08 08:52:25 +01:00
ipack tty: make tty_operations::write()'s count size_t 2023-08-11 21:12:46 +02:00
irqchip irqchip/gic-v3-its: Flush ITS tables correctly in non-coherent GIC designs 2023-12-03 07:33:02 +01:00
isdn isdn: mISDN: hfcsusb: Spelling fix in comment 2023-10-23 09:39:46 +01:00
leds leds: trigger: netdev: fix RTNL handling to prevent potential deadlock 2023-12-13 18:45:23 +01:00
macintosh powerpc updates for 6.6 2023-08-31 12:43:10 -07:00
mailbox mailbox: qcom-ipcc: fix incorrect num_chans counting 2023-09-05 10:11:01 -05:00
mcb mcb: fix error handling for different scenarios when parsing 2023-11-28 17:20:05 +00:00
md md/raid6: use valid sector values to determine if an I/O should wait on the reshape 2023-12-13 18:45:25 +01:00
media media: qcom: camss: Fix csid-gen2 for test pattern generator 2023-11-28 17:20:15 +00:00
memory memory: tegra: Set BPMP msg flags to reset IPC channels 2023-11-20 11:59:17 +01:00
memstick memstick r592: make memstick_debug_get_tpc_name() static 2023-06-12 15:16:19 +02:00
message scsi: message: fusion: Add HAS_IOPORT dependencies 2023-05-31 19:59:26 -04:00
mfd mfd: qcom-spmi-pmic: Fix revid implementation 2023-11-28 17:20:03 +00:00
misc misc: mei: client.c: fix problem of return '-EOVERFLOW' in mei_cl_write 2023-12-13 18:45:29 +01:00
mmc mmc: block: Be sure to wait while busy in CQE error recovery 2023-12-08 08:52:16 +01:00
most staging: most: Replace all non-returning strlcpy with strscpy 2023-06-01 07:07:37 -07:00
mtd mtd: cfi_cmdset_0001: Byte swap OTP info 2023-11-28 17:20:06 +00:00
mux mux: Explicitly include correct DT includes 2023-08-28 13:36:24 -05:00
net net: atlantic: fix double free in ring reinit logic 2023-12-20 17:01:50 +01:00
nfc NFC: nxp: add NXP1002 2023-08-30 18:32:24 -07:00
ntb ntb: Check tx descriptors outstanding instead of head/tail for tx queue 2023-08-22 12:38:19 -04:00
nubus nubus: Don't list slot resources by default 2023-05-22 13:51:56 +02:00
nvdimm nd_btt: Make BTT lanes preemptible 2023-11-20 11:59:19 +01:00
nvme nvme-pci: Add sleep quirk for Kingston drives 2023-12-13 18:45:20 +01:00
nvmem nvmem: Do not expect fixed layouts to grab a layout driver 2023-12-13 18:45:31 +01:00
of of: dynamic: Fix of_reconfig_get_state_change() return value documentation 2023-12-13 18:45:03 +01:00
opp OPP: Fix argument name in doc comment 2023-08-18 10:55:49 +05:30
parisc parisc/power: Fix power soft-off when running on qemu 2023-11-28 17:20:08 +00:00
parport parport: Add support for Brainboxes IX/UC/PX parallel cards 2023-12-13 18:45:32 +01:00
pci PCI: vmd: Fix potential deadlock when enabling ASPM 2023-12-20 17:01:54 +01:00
pcmcia pcmcia: ds: fix possible name leak in error path in pcmcia_device_add() 2023-11-20 11:59:31 +01:00
peci Update peci-next for v6.6-rc1 2023-08-08 10:53:30 +02:00
perf drivers: perf: Check find_first_bit() return value 2023-11-28 17:19:54 +00:00
phy Revert "phy: realtek: usb: Add driver for the Realtek SoC USB 2.0 PHY" 2023-12-03 07:33:08 +01:00
pinctrl pinctrl: stm32: fix array read out of bound 2023-12-08 08:52:21 +01:00
platform platform/surface: aggregator: fix recv_buf() return value 2023-12-13 18:45:24 +01:00
pmdomain pmdomain: imx: Make imx pgc power domain also set the fwnode 2023-11-28 17:20:00 +00:00
pnp PNP: ACPI: Fix string truncation warning 2023-08-17 19:38:35 +02:00
power power: supply: core: Use blocking_notifier_call_chain to avoid RCU complaint 2023-11-08 11:56:20 +01:00
powercap powercap: DTPM: Fix missing cpufreq_cpu_put() calls 2023-12-13 18:45:25 +01:00
pps driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
ps3 driver/ps3: Include <video/cmdline.h> for mode parsing 2023-02-20 14:56:51 +01:00
ptp ptp: annotate data-race around q->head and q->tail 2023-11-28 17:19:51 +00:00
pwm pwm: brcmstb: Utilize appropriate clock APIs in suspend/resume 2023-11-20 11:59:34 +01:00
rapidio Mainly singleton patches all over the place. Series of note are: 2023-04-27 19:57:00 -07:00
ras ras/debugfs: Fix error checking for debugfs_create_dir() 2023-05-16 21:12:23 +02:00
regulator regulator: qcom-rpmh: Fix smps4 regulator for pm8550ve 2023-11-20 11:59:07 +01:00
remoteproc remoteproc updates for v6.6 2023-09-04 15:12:26 -07:00
reset This pull request is full of clk driver changes. In fact, there aren't any 2023-08-30 19:53:39 -07:00
rpmsg rpmsg updates for v6.6 2023-09-04 15:08:52 -07:00
rtc rtc: pcf85363: fix wrong mask/val parameters in regmap_update_bits call 2023-11-20 11:59:30 +01:00
s390 s390/dasd: protect device queue against concurrent access 2023-12-03 07:33:07 +01:00
sbus sbus: Explicitly include correct DT includes 2023-08-28 13:36:24 -05:00
scsi scsi: be2iscsi: Fix a memleak in beiscsi_init_wrb_handle() 2023-12-13 18:45:17 +01:00
sh sh: intc: move to use bus_get_dev_root() 2023-03-17 15:29:55 +01:00
siox siox: fix possible memory leak in siox_device_add() 2022-11-09 15:40:14 +01:00
slimbus driver core: make struct bus_type.uevent() take a const * 2023-01-27 13:45:52 +01:00
soc soc: qcom: pmic: Fix resource leaks in a device_for_each_child_node() loop 2023-11-28 17:19:41 +00:00
soundwire soundwire: dmi-quirks: update HP Omen match 2023-11-28 17:19:45 +00:00
spi spi: Fix null dereference on suspend 2023-11-28 17:19:55 +00:00
spmi spmi: Add a check for remove callback when removing a SPMI driver 2023-04-20 14:16:39 +02:00
ssb driver core: make struct bus_type.uevent() take a const * 2023-01-27 13:45:52 +01:00
staging media: cedrus: Fix clock/reset sequence 2023-11-20 11:59:32 +01:00
target scsi: target: core: Fix deadlock due to recursive locking 2023-09-27 10:55:29 -04:00
tc The main MIPS changes for 5.6: 2020-01-31 11:28:31 -08:00
tee tee: optee: Fix supplicant based device enumeration 2023-12-13 18:45:11 +01:00
thermal thermal: intel: powerclamp: fix mismatch in get function for max_idle 2023-11-28 17:20:02 +00:00
thunderbolt thunderbolt: Set lane bonding bit only for downstream port 2023-12-03 07:33:06 +01:00
tty serial: 8250_omap: Add earlycon support for the AM654 UART controller 2023-12-13 18:45:33 +01:00
ufs scsi: ufs: core: Clear cmd if abort succeeds in MCQ mode 2023-12-08 08:52:17 +01:00
uio uio: pruss: fix missing iounmap() in pruss_probe() 2023-08-22 13:41:55 +02:00
usb USB: gadget: core: adjust uevent timing on gadget unbind 2023-12-13 18:45:33 +01:00
vdpa vdpa/mlx5: preserve CVQ vringh index 2023-12-13 18:44:55 +01:00
vfio vfio/pds: Fix possible sleep while in atomic context 2023-12-08 08:52:25 +01:00
vhost vhost-vdpa: fix use after free in vhost_vdpa_probe() 2023-11-28 17:19:49 +00:00
video fbdev: fsl-diu-fb: mark wr_reg_wa() static 2023-11-20 11:59:38 +01:00
virt virt: sevguest: Fix passing a stack buffer as a scatterlist target 2023-11-20 11:59:30 +01:00
virtio virtio_pci: fix the common cfg map size 2023-10-18 11:30:12 -04:00
vlynq bus: Make remove callback return void 2021-07-21 11:53:42 +02:00
w1 w1: ds2482: Switch back to use struct i2c_driver's .probe() 2023-09-13 10:48:42 +02:00
watchdog sbsa_gwdt: Calculate timeout with 64-bit math 2023-11-28 17:20:11 +00:00
xen swiotlb-xen: provide the "max_mapping_size" method 2023-12-03 07:33:07 +01:00
zorro zorro: Include zorro.h in names.c 2023-08-21 13:27:44 +02:00
Kconfig Merge patch series "Add non-coherent DMA support for AX45MP" 2023-09-08 11:24:34 -07:00
Makefile pmdomain: Rename the genpd subsystem to pmdomain 2023-09-13 11:09:21 +02:00