forked from Minki/linux
ea6eb91c09
Race condition occurs when CS fence completes and multi CS did not completed yet, while waiting for multi CS ends and returns indication to user that the CS completed. Next wait for multi CS may be triggered by previous multi CS completion without any current CS completed, causing an error. Example scenario : 1. User do multi CS wait for CSs 1 and 2 on master QID 0 2. CS 1 and 2 reached the "cs release" code. The thread of CS 1 completed both the CS and multi CS handling but the completion thread of CS 2 completed the CS but still did not executed complete_multi_cs (note that in CS completion the sequence is to first do complete all for the CS and then another complete all to signal the multi_cs) 3. User received indication that CS 1 and 2 completed (since we check the CS fence and both indicated as completed) and immediately waits on CS 3 and 4, also on master QID 0. 4. Completion thread of CS2 executed complete_multi_cs before completion of CS 3 and 4 and so will trigger the multi CS wait of CSs 3 and 4 as they wait on master QID 0. This will trigger multi CS completion although none of its current CS has been completed. Fixed by adding multi CS complete handling indication for each CS. CS will be marked to the user as completed only if its fence completed and multi CS handling is done. Signed-off-by: Dani Liberman <dliberman@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org> |
||
---|---|---|
.. | ||
altera-stapl | ||
bcm-vk | ||
c2port | ||
cardreader | ||
cb710 | ||
cxl | ||
echo | ||
eeprom | ||
genwqe | ||
habanalabs | ||
ibmasm | ||
lis3lv02d | ||
lkdtm | ||
mei | ||
ocxl | ||
pvpanic | ||
sgi-gru | ||
sgi-xp | ||
ti-st | ||
uacce | ||
vmw_vmci | ||
ad525x_dpot-i2c.c | ||
ad525x_dpot-spi.c | ||
ad525x_dpot.c | ||
ad525x_dpot.h | ||
apds990x.c | ||
apds9802als.c | ||
atmel-ssc.c | ||
bh1770glc.c | ||
cs5535-mfgpt.c | ||
ds1682.c | ||
dummy-irq.c | ||
dw-xdata-pcie.c | ||
enclosure.c | ||
fastrpc.c | ||
gehc-achc.c | ||
hi6421v600-irq.c | ||
hisi_hikey_usb.c | ||
hmc6352.c | ||
hpilo.c | ||
hpilo.h | ||
ibmvmc.c | ||
ibmvmc.h | ||
ics932s401.c | ||
isl29003.c | ||
isl29020.c | ||
Kconfig | ||
kgdbts.c | ||
lattice-ecp3-config.c | ||
Makefile | ||
pch_phub.c | ||
pci_endpoint_test.c | ||
phantom.c | ||
qcom-coincell.c | ||
sram-exec.c | ||
sram.c | ||
sram.h | ||
tifm_7xx1.c | ||
tifm_core.c | ||
tsl2550.c | ||
vmw_balloon.c | ||
xilinx_sdfec.c |