If we destroyed the next point, hlist_for_each_entry_safe() is unsafe.
List hlist_for_each_entry_safe()'s code:
|#define hlist_for_each_entry_safe(tpos, pos, n, head, member) \
| for (pos = (head)->first; \
| pos && ({ n = pos->next; 1; }) && \
| ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \
| pos = n)
if n is destroyed:
'pos = n, n = pos->next'
then it access n again, it's unsafe/illegal for us.
Xiao
--