|
@@ -299,13 +299,13 @@ int kfd_init_apertures(struct kfd_process *process)
|
|
struct kfd_dev *dev;
|
|
struct kfd_dev *dev;
|
|
struct kfd_process_device *pdd;
|
|
struct kfd_process_device *pdd;
|
|
|
|
|
|
- mutex_lock(&process->mutex);
|
|
|
|
-
|
|
|
|
/*Iterating over all devices*/
|
|
/*Iterating over all devices*/
|
|
while ((dev = kfd_topology_enum_kfd_devices(id)) != NULL &&
|
|
while ((dev = kfd_topology_enum_kfd_devices(id)) != NULL &&
|
|
id < NUM_OF_SUPPORTED_GPUS) {
|
|
id < NUM_OF_SUPPORTED_GPUS) {
|
|
|
|
|
|
pdd = kfd_get_process_device_data(dev, process, 1);
|
|
pdd = kfd_get_process_device_data(dev, process, 1);
|
|
|
|
+ if (!pdd)
|
|
|
|
+ return -1;
|
|
|
|
|
|
/*
|
|
/*
|
|
* For 64 bit process aperture will be statically reserved in
|
|
* For 64 bit process aperture will be statically reserved in
|
|
@@ -348,8 +348,6 @@ int kfd_init_apertures(struct kfd_process *process)
|
|
id++;
|
|
id++;
|
|
}
|
|
}
|
|
|
|
|
|
- mutex_unlock(&process->mutex);
|
|
|
|
-
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|