diff --git a/kernel/brick_checking.h b/kernel/brick_checking.h index e951673c..7760bcce 100644 --- a/kernel/brick_checking.h +++ b/kernel/brick_checking.h @@ -50,7 +50,11 @@ do { \ #define CHECK_HEAD_EMPTY(head) \ do { \ - if (BRICK_CHECKING && unlikely(!list_empty(head) && (head)->next)) { \ + if (BRICK_CHECKING && \ + unlikely(!list_empty(head) && \ + (head)->next && \ + (head)->next != LIST_POISON1 && \ + (head)->prev != LIST_POISON2)) { \ list_del_init(head); \ BRICK_ERR("%d: list_head " #head " (%p) not empty\n", __LINE__, head); \ } \