|
@@ -139,10 +139,12 @@ static void interrupt_wq(struct work_struct *work)
|
|
|
{
|
|
|
struct kfd_dev *dev = container_of(work, struct kfd_dev,
|
|
|
interrupt_work);
|
|
|
+ uint32_t ih_ring_entry[KFD_MAX_RING_ENTRY_SIZE];
|
|
|
|
|
|
- uint32_t ih_ring_entry[DIV_ROUND_UP(
|
|
|
- dev->device_info->ih_ring_entry_size,
|
|
|
- sizeof(uint32_t))];
|
|
|
+ if (dev->device_info->ih_ring_entry_size > sizeof(ih_ring_entry)) {
|
|
|
+ dev_err_once(kfd_chardev(), "Ring entry too small\n");
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
while (dequeue_ih_ring_entry(dev, ih_ring_entry))
|
|
|
dev->device_info->event_interrupt_class->interrupt_wq(dev,
|