linux/include
Rob Clark 440d52b370 drm/sched: Fix dynamic job-flow control race
Fixes a race condition reported here: https://github.com/AsahiLinux/linux/issues/309#issuecomment-2238968609

The whole premise of lockless access to a single-producer-single-
consumer queue is that there is just a single producer and single
consumer.  That means we can't call drm_sched_can_queue() (which is
about queueing more work to the hw, not to the spsc queue) from
anywhere other than the consumer (wq).

This call in the producer is just an optimization to avoid scheduling
the consuming worker if it cannot yet queue more work to the hw.  It
is safe to drop this optimization to avoid the race condition.

Suggested-by: Asahi Lina <lina@asahilina.net>
Fixes: a78422e9df ("drm/sched: implement dynamic job-flow control")
Closes: https://github.com/AsahiLinux/linux/issues/309
Cc: stable@vger.kernel.org
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Danilo Krummrich <dakr@kernel.org>
Tested-by: Janne Grunau <j@jannau.net>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240913202301.16772-1-robdclark@gmail.com
2024-09-24 01:14:16 +02:00
..
acpi Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
asm-generic Kbuild updates for v6.11 2024-07-23 14:32:21 -07:00
clocksource
crypto
drm drm/sched: Fix dynamic job-flow control race 2024-09-24 01:14:16 +02:00
dt-bindings I3C for 6.11 2024-07-27 10:53:06 -07:00
keys
kunit kunit: Introduce KUNIT_ASSERT_MEMEQ and KUNIT_ASSERT_MEMNEQ macros 2024-07-12 10:12:11 -06:00
kvm
linux video/aperture: optionally match the device in sysfb_disable() 2024-08-26 19:14:48 -04:00
math-emu
media
memory
misc
net sysctl: treewide: constify the ctl_table argument of proc_handlers 2024-07-24 20:59:29 +02:00
pcmcia
ras mm/memory-failure: remove obsolete MF_MSG_DIFFERENT_COMPOUND 2024-07-12 15:52:22 -07:00
rdma RDMA/core: Introduce "name_assign_type" for an IB device 2024-07-04 07:59:53 +03:00
rv
scsi Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
soc sound updates for 6.11-rc1 2024-07-19 12:39:34 -07:00
sound sound fixes for 6.11-rc1 2024-07-26 11:01:31 -07:00
target
trace Fixes and minor updates for the timer migration code: 2024-07-27 10:19:55 -07:00
uapi drm/panthor: Restrict high priorities on group_create 2024-09-05 09:33:33 +02:00
ufs Merge patch series "Basic inline encryption support for ufs-exynos" 2024-07-10 22:33:34 -04:00
vdso Random number generator updates for Linux 6.11-rc1. 2024-07-24 10:29:50 -07:00
video
xen Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00