Re: [PATCH 3/3] drm/amdkfd: Handle case of invalid queue type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 01/22/2015 12:28 PM, Zhou, Jammy wrote:
Patches are Reviewed-by: Jammy Zhou <Jammy.Zhou@xxxxxxx>

Regards,
Jammy

Thanks!
	Oded
-----Original Message-----
From: dri-devel [mailto:dri-devel-bounces@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of Gabbay, Oded
Sent: Thursday, January 22, 2015 5:42 PM
To: dri-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: [PATCH 3/3] drm/amdkfd: Handle case of invalid queue type

This patch handles a case where amdkfd tries to destroy a queue but the queue type is invalid.
This case occurs in non-HWS path.

Signed-off-by: Oded Gabbay <oded.gabbay@xxxxxxx>
---
  drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 5 +++++
  1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
index 85387c8..99e2dbb 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
@@ -301,6 +301,11 @@ static int destroy_queue_nocpsch(struct device_queue_manager *dqm,
  		}
  		dqm->sdma_queue_count--;
  		deallocate_sdma_queue(dqm, q->sdma_id);
+	} else {
+		pr_debug("q->properties.type is invalid (%d)\n",
+				q->properties.type);
+		retval = -EINVAL;
+		goto out;
  	}

  	retval = mqd->destroy_mqd(mqd, q->mqd,
--
1.9.1

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux