linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/30] habanalabs: check the return value of hl_cs_poll_fences()
@ 2022-01-22 19:57 Oded Gabbay
  2022-01-22 19:57 ` [PATCH 02/30] habanalabs: fix race when waiting on encaps signal Oded Gabbay
                   ` (29 more replies)
  0 siblings, 30 replies; 31+ messages in thread
From: Oded Gabbay @ 2022-01-22 19:57 UTC (permalink / raw)
  To: linux-kernel; +Cc: Tomer Tayar

From: Tomer Tayar <ttayar@habana.ai>

As part of handling of the multi-CS wait ioctl, hl_cs_poll_fences() is
called in a "while (true)" loop. This function can fail, but the
checking of its return value was missed.
Add this check and exit the loop in case of a failure.

Signed-off-by: Tomer Tayar <ttayar@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
---
 drivers/misc/habanalabs/common/command_submission.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/habanalabs/common/command_submission.c b/drivers/misc/habanalabs/common/command_submission.c
index 0a4ef13d9ac4..2f40b937c59f 100644
--- a/drivers/misc/habanalabs/common/command_submission.c
+++ b/drivers/misc/habanalabs/common/command_submission.c
@@ -2739,7 +2739,7 @@ static int hl_multi_cs_wait_ioctl(struct hl_fpriv *hpriv, void *data)
 		mcs_data.update_ts = false;
 		rc = hl_cs_poll_fences(&mcs_data, mcs_compl);
 
-		if (mcs_data.completion_bitmap)
+		if (rc || mcs_data.completion_bitmap)
 			break;
 
 		/*
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2022-01-24 18:22 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-22 19:57 [PATCH 01/30] habanalabs: check the return value of hl_cs_poll_fences() Oded Gabbay
2022-01-22 19:57 ` [PATCH 02/30] habanalabs: fix race when waiting on encaps signal Oded Gabbay
2022-01-22 19:57 ` [PATCH 03/30] habanalabs: fix possible memory leak in MMU DR fini Oded Gabbay
2022-01-22 19:57 ` [PATCH 04/30] habanalabs/gaudi: disable CGM permanently Oded Gabbay
2022-01-22 19:57 ` [PATCH 05/30] habanalabs: remove ASIC functions of clock gating Oded Gabbay
2022-01-22 19:57 ` [PATCH 06/30] habanalabs: make some MMU functions common Oded Gabbay
2022-01-22 19:57 ` [PATCH 07/30] habanalabs: sysfs functions should be in sysfs.c Oded Gabbay
2022-01-22 19:57 ` [PATCH 08/30] habanalabs: get clk is common function Oded Gabbay
2022-01-22 19:57 ` [PATCH 09/30] habanalabs: remove hwmgr.c Oded Gabbay
2022-01-22 19:57 ` [PATCH 10/30] habanalabs: move more f/w functions to firmware_if.c Oded Gabbay
2022-01-22 19:57 ` [PATCH 11/30] habanalabs: remove asic callback set_pll_profile() Oded Gabbay
2022-01-22 19:57 ` [PATCH 12/30] habanalabs: rename dev_attr_grp to dev_clk_attr_grp Oded Gabbay
2022-01-22 19:57 ` [PATCH 13/30] habanalabs: add vrm version to sysfs Oded Gabbay
2022-01-22 19:57 ` [PATCH 14/30] habanalabs: remove power9 workaround for dma support Oded Gabbay
2022-01-22 19:57 ` [PATCH 15/30] habanalabs: use common wrapper for MMU cache invalidation Oded Gabbay
2022-01-22 19:57 ` [PATCH 16/30] habanalabs: sysfs support for fw os version Oded Gabbay
2022-01-22 19:57 ` [PATCH 17/30] habanalabs: there is no kernel TDR in future ASICs Oded Gabbay
2022-01-22 19:57 ` [PATCH 18/30] habanalabs: duplicate HOP table props to MMU props Oded Gabbay
2022-01-22 19:57 ` [PATCH 19/30] habanalabs: don't free phys_pg_pack inside lock Oded Gabbay
2022-01-22 19:57 ` [PATCH 20/30] habanalabs: avoid copying pll data if pll_info_get fails Oded Gabbay
2022-01-22 19:57 ` [PATCH 21/30] habanalabs: add missing error check in sysfs clk_freq_mhz_show Oded Gabbay
2022-01-22 19:57 ` [PATCH 22/30] habanalabs: fix soft reset flow in case of failure Oded Gabbay
2022-01-22 19:57 ` [PATCH 23/30] habanalabs: add missing error check in sysfs max_power_show Oded Gabbay
2022-01-22 19:57 ` [PATCH 24/30] habanalabs: update to latest f/w specs Oded Gabbay
2022-01-22 19:57 ` [PATCH 25/30] habanalabs: expose number of user interrupts Oded Gabbay
2022-01-22 19:57 ` [PATCH 26/30] habanalabs: reject host map with mmu disabled Oded Gabbay
2022-01-22 19:57 ` [PATCH 27/30] habanalabs: fix user interrupt wait when timeout is 0 Oded Gabbay
2022-01-22 19:57 ` [PATCH 28/30] habanalabs: fix race between wait and irq Oded Gabbay
2022-01-22 19:57 ` [PATCH 29/30] habanalabs: prevent false heartbeat failure during soft-reset Oded Gabbay
2022-01-22 19:57 ` [PATCH 30/30] habanalabs: remove duplicate print Oded Gabbay
     [not found] ` <20220123002722.3057-1-hdanton@sina.com>
2022-01-24 18:22   ` [PATCH 02/30] habanalabs: fix race when waiting on encaps signal Dani Liberman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).