[PATCHES][RFC][CFT] close_fd() misuses in amdgpu
Al Viro
viro at zeniv.linux.org.uk
Tue Jun 4 02:12:55 UTC 2024
Use of close_fd() in cleanup on failure exits is
wrong; descriptor table is a shared data structure, and
as soon as you've inserted a file reference there it is
entirely possible for another thread to have move it
around, replace it or remove it.
Fortunately, not many places are using it that
way; two of such are in amdgpu and AFAICS they are not
hard to get rid of.
Patches are in followups; review and testing would
be very welcome - as it is, I've verified that they build,
but that's about it.
More information about the amd-gfx
mailing list