queues.c: Enforce CUMaskCount being a multiple of 32

The thunk spec requires that CUMaskCount be divisible by 32. Check this
and return INVALID_PARAMETER if it is not.

Change-Id: I4e0c8502d996d3da31224b817a5d4ff2c6054e13


[ROCm/ROCR-Runtime commit: 70b1b5b17e]
Bu işleme şunda yer alıyor:
Kent Russell
2016-08-16 11:17:19 -04:00
ebeveyn f3e009e431
işleme 2d604a8498
+1 -1
Dosyayı Görüntüle
@@ -598,7 +598,7 @@ hsaKmtSetQueueCUMask(
CHECK_KFD_OPEN();
if (CUMaskCount == 0 || QueueCUMask == NULL)
if (CUMaskCount == 0 || QueueCUMask == NULL || ((CUMaskCount % 32) != 0))
return HSAKMT_STATUS_INVALID_PARAMETER;
memset(&args, 0, sizeof(args));