mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-20 16:14:30 +07:00
Merge tag 'drm-amdkfd-next-fixes-2018-01-15' of git://people.freedesktop.org/~gabbayo/linux into drm-next
- fix NULL pointer dereference - fix compiler warning on large define values - remove unnecessary call to execute_queues_cpsch * tag 'drm-amdkfd-next-fixes-2018-01-15' of git://people.freedesktop.org/~gabbayo/linux: drm/amdkfd: Fix potential NULL pointer dereferences drm/amdkfd: add ull suffix to 64bit defines drm/amdkfd: don't always call execute_queues_cpsch() drm/amdkfd: Fix return value 0 when execute_queues_cpsch fails
This commit is contained in:
commit
92eb5f0c00
@ -1013,13 +1013,13 @@ static int destroy_queue_cpsch(struct device_queue_manager *dqm,
|
||||
|
||||
list_del(&q->list);
|
||||
qpd->queue_count--;
|
||||
if (q->properties.is_active)
|
||||
if (q->properties.is_active) {
|
||||
dqm->queue_count--;
|
||||
|
||||
retval = execute_queues_cpsch(dqm,
|
||||
retval = execute_queues_cpsch(dqm,
|
||||
KFD_UNMAP_QUEUES_FILTER_DYNAMIC_QUEUES, 0);
|
||||
if (retval == -ETIME)
|
||||
qpd->reset_wavefronts = true;
|
||||
if (retval == -ETIME)
|
||||
qpd->reset_wavefronts = true;
|
||||
}
|
||||
|
||||
mqd->uninit_mqd(mqd, q->mqd, q->mqd_mem_obj);
|
||||
|
||||
@ -1033,7 +1033,7 @@ static int destroy_queue_cpsch(struct device_queue_manager *dqm,
|
||||
|
||||
mutex_unlock(&dqm->lock);
|
||||
|
||||
return 0;
|
||||
return retval;
|
||||
|
||||
failed:
|
||||
failed_try_destroy_debugged_queue:
|
||||
|
@ -41,9 +41,9 @@
|
||||
|
||||
#define KFD_SYSFS_FILE_MODE 0444
|
||||
|
||||
#define KFD_MMAP_DOORBELL_MASK 0x8000000000000
|
||||
#define KFD_MMAP_EVENTS_MASK 0x4000000000000
|
||||
#define KFD_MMAP_RESERVED_MEM_MASK 0x2000000000000
|
||||
#define KFD_MMAP_DOORBELL_MASK 0x8000000000000ull
|
||||
#define KFD_MMAP_EVENTS_MASK 0x4000000000000ull
|
||||
#define KFD_MMAP_RESERVED_MEM_MASK 0x2000000000000ull
|
||||
|
||||
/*
|
||||
* When working with cp scheduler we should assign the HIQ manually or via
|
||||
|
@ -461,7 +461,8 @@ int kfd_bind_processes_to_device(struct kfd_dev *dev)
|
||||
hash_for_each_rcu(kfd_processes_table, temp, p, kfd_processes) {
|
||||
mutex_lock(&p->mutex);
|
||||
pdd = kfd_get_process_device_data(dev, p);
|
||||
if (pdd->bound != PDD_BOUND_SUSPENDED) {
|
||||
|
||||
if (WARN_ON(!pdd) || pdd->bound != PDD_BOUND_SUSPENDED) {
|
||||
mutex_unlock(&p->mutex);
|
||||
continue;
|
||||
}
|
||||
@ -501,6 +502,11 @@ void kfd_unbind_processes_from_device(struct kfd_dev *dev)
|
||||
mutex_lock(&p->mutex);
|
||||
pdd = kfd_get_process_device_data(dev, p);
|
||||
|
||||
if (WARN_ON(!pdd)) {
|
||||
mutex_unlock(&p->mutex);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (pdd->bound == PDD_BOUND)
|
||||
pdd->bound = PDD_BOUND_SUSPENDED;
|
||||
mutex_unlock(&p->mutex);
|
||||
|
Loading…
Reference in New Issue
Block a user