瀏覽代碼

util: make calling remove_from_list multiple times in a row safe

This commit fixes an infinite loop in foreach_s if remove_from_list is used
more than once on the same item with other list operations in between.

NOTE: This is a candidate for the 7.9 branch because the commit
"r300g: fixup long-lived BO maps being incorrectly unmapped when flushing"
depends on it.
tags/snb-magic
Marek Olšák 15 年之前
父節點
當前提交
68afbe89c7
共有 1 個檔案被更改,包括 2 行新增0 行删除
  1. 2
    0
      src/gallium/auxiliary/util/u_simple_list.h

+ 2
- 0
src/gallium/auxiliary/util/u_simple_list.h 查看文件

@@ -46,6 +46,8 @@
do { \
(elem)->next->prev = (elem)->prev; \
(elem)->prev->next = (elem)->next; \
(elem)->next = elem; \
(elem)->prev = elem; \
} while (0)

/**

Loading…
取消
儲存