Skip to contentSkip to conversation

drm/amdkfd: fix null queue check on debug setting exceptions

PATCH In review Jonathan Kim 2 participants 2 messages Jun 12, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdkfd: fix null queue check on debug setting exceptions

Null check should be done on queue struct itself and not on the process queue list node.

---
 drivers/gpu/drm/amd/amdkfd/kfd_debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_debug.c +1 -1
index cd34e7aaead4..fff3ccc04fa9 100644
@@ -1097,7 +1097,7 @@ void kfd_dbg_set_enabled_debug_exception_mask(struct kfd_process *target,
 
 	pqm = &target->pqm;
 	list_for_each_entry(pqn, &pqm->queues, process_queue_list) {
-		if (!pqn)
+		if (!pqn->q)
 			continue;
 
 		found_mask |= pqn->q->properties.exception_status;
Signature · 1 line
2.25.1
maintainer Reviewed-by on v1 1/1
#1 lore raw

Am 2023-06-12 um 11:46 schrieb Jonathan Kim:

Quoted 4 lines

Null check should be done on queue struct itself and not on the process queue list node.

Quoted 17 lines
---
  drivers/gpu/drm/amd/amdkfd/kfd_debug.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_debug.c +1 -1
index cd34e7aaead4..fff3ccc04fa9 100644
@@ -1097,7 +1097,7 @@ void kfd_dbg_set_enabled_debug_exception_mask(struct kfd_process *target,
 
  	pqm = &target->pqm;
  	list_for_each_entry(pqn, &pqm->queues, process_queue_list) {
-		if (!pqn)
+		if (!pqn->q)
  			continue;
 
  		found_mask |= pqn->q->properties.exception_status;