diff options
author | Vasily Khoruzhick <[email protected]> | 2020-03-10 01:53:57 -0700 |
---|---|---|
committer | Vasily Khoruzhick <[email protected]> | 2020-03-16 16:28:33 -0700 |
commit | ac1dbd5ef81fe9bd389e38f22da32d940c1d9e02 (patch) | |
tree | b03533ea0d505493436deb205abaae50e032c5c4 /src/gallium | |
parent | 2756b629171f61ca8e162be7b332e91a62c5c978 (diff) |
lima/gpir: fix crash in schedule_insert_ready_list()
Fix crash if node is already at position we want. Otherwise we remove
it from list (and list->prev becomes NULL) and then we dereference list->prev
in list_addtail()
Reviewed-by: Andreas Baierl <[email protected]>
Signed-off-by: Vasily Khoruzhick <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4126>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4126>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/lima/ir/gp/reduce_scheduler.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/lima/ir/gp/reduce_scheduler.c b/src/gallium/drivers/lima/ir/gp/reduce_scheduler.c index 8b4f559330d..47cc6109e01 100644 --- a/src/gallium/drivers/lima/ir/gp/reduce_scheduler.c +++ b/src/gallium/drivers/lima/ir/gp/reduce_scheduler.c @@ -118,6 +118,8 @@ static void schedule_insert_ready_list(struct list_head *ready_list, (insert_node->rsched.reg_pressure == node->rsched.reg_pressure && (insert_node->rsched.est >= node->rsched.est))))) { insert_pos = &node->list; + if (node == insert_node) + return; break; } } |