SWDEV-351031 - Any bit other than the rightmost 4 bits shouldn't be set

Change-Id: I6c834f491ce393eb37259eabc603220c5b5f164e


[ROCm/clr commit: 35051e778d]
Dieser Commit ist enthalten in:
Jaydeep Patel verfasst und Jaydeepkumar Patel committed 2022-08-10 23:30:22 -04:00
1 Ursprung 7e7576a849
Commit 29d27cdee0
1 Datei geändert
+1 -1
+1 -1
Datei anzeigen
@@ -1089,7 +1089,7 @@ hipError_t hipHostGetFlags(unsigned int* flagsPtr, void* hostPtr) {
}
hipError_t ihipHostRegister(void* hostPtr, size_t sizeBytes, unsigned int flags) {
if (hostPtr == nullptr || sizeBytes == 0) {
if (hostPtr == nullptr || sizeBytes == 0 || flags > 15) {
return hipErrorInvalidValue;
} else {
amd::Memory* mem = new (*hip::host_device->asContext()) amd::Buffer(*hip::host_device->asContext(),