In the Linux kernel, the following vulnerability has been resolved: nilfs2: fix use-after-free bug of nilfsroot in nilfsevictinode() During unmount process of nilfs2, nothing holds nilfsroot structure after nilfs2 detaches its writer in nilfsdetachlogwriter(). However, since nilfsevictinode() uses nilfsroot for some cleanup operations, it may cause use-after-free read if inodes are left in "garbagelist" and released by nilfsdisposelist() at the end of nilfsdetachlogwriter(). Fix this issue by modifying nilfsevictinode() to only clear inode without additional metadata changes that use nilfs_root if the file system is degraded to read-only or the writer is detached.