use-after-free in amdgpu/amdgpu_cs.c
../util_double_list.h:119:39: error: pointer 'sem' used after 'free' [-Werror=use-after-free]
119 | pos = container_of(pos->member.next, pos, member))
| ^
../util_double_list.h:112:23: note: in definition of macro 'container_of'
112 | (void *)((char *)(ptr) \
| ^~~
../amdgpu/amdgpu_cs.c:144:33: note: in expansion of macro 'LIST_FOR_EACH_ENTRY'
144 | LIST_FOR_EACH_ENTRY(sem, &context->sem_list[i][j][k], list) {
| ^~~~~~~~~~~~~~~~~~~
In function 'amdgpu_cs_unreference_sem',
inlined from 'amdgpu_cs_ctx_free' at ../subprojects/libdrm/amdgpu/amdgpu_cs.c:147:6:
../amdgpu/amdgpu_cs.c:663:17: note: call to 'free' here
663 | free(sem);
| ^~~~~~~~~