mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
MALI: bifrost: prevent a rare null pointer exception in update_on_slot_queues_offsets()
The most recent situation is that the null pointer exception is only reported from repeated reboot test on rk3588_EDGE_SDK, not on rk3588_Linux_SDK or rk3588_Android_SDK. Change-Id: I1e5ce9eb9fd32c29294e115e6014a8114c896754 Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
This commit is contained in:
@@ -442,10 +442,18 @@ static void update_on_slot_queues_offsets(struct kbase_device *kbdev)
|
||||
struct kbase_queue *const queue = group->bound_queues[j];
|
||||
|
||||
if (queue) {
|
||||
u64 const *const output_addr =
|
||||
(u64 const *)(queue->user_io_addr + PAGE_SIZE);
|
||||
if (queue->user_io_addr) {
|
||||
u64 const *const output_addr =
|
||||
(u64 const *)(queue->user_io_addr + PAGE_SIZE);
|
||||
|
||||
queue->extract_ofs = output_addr[CS_EXTRACT_LO / sizeof(u64)];
|
||||
queue->extract_ofs =
|
||||
output_addr[CS_EXTRACT_LO / sizeof(u64)];
|
||||
} else {
|
||||
dev_warn(kbdev->dev,
|
||||
"%s(): queue->user_io_addr is NULL, queue: %p",
|
||||
__func__,
|
||||
queue);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user