A vulnerability in the Linux kernel has been resolved, related to the tracing system. When eventfs was introduced, special care was taken to coordinate the freeing of file meta data with files exposed to user space. However, a shortcut was made for the "format" file, which did not check the file's meta data flag `EVENT FILE FL FREED` before accessing the event. This caused a race condition that could be triggered via the user events test and running a loop to read user events format files, resulting in a use-after-free bug report. A new helper function `event file file()` was added to ensure the `event mutex` is held and return NULL if the `trace event file` has the `EVENT FILE FL FREED` flag set.