Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
needs-restarting: "Regular files" are often on 00:xx devices
needs-restarting currently checks the major:minor device of each mmapped file and ignores files from devices with major version 0, considering them "not regular files". According to the kernel docs [1], a major version of 0 is for "unnamed devices, e.g. non-device mounts". But ignoring files on 00:xx devices seems to not be a valid strategy. From my testing, in containers and in virtual machines especially, "regular files" managed by DNF are often on these devices. For example: ``` docker run -it --rm fedora:40 stat /usr/bin/sleep File: /usr/bin/sleep Size: 36864 Blocks: 72 IO Block: 4096 regular file Device: 0,100 Inode: 2403790 Links: 1 ... ``` This patch removes this filter so that we just check that a file has a corresponding file path. There are files that have (something that looks like) a file path but are not "regular files", for example: 7283/maps:7f7f3f0d2000-7f7f3f0e0000 rw-s 00000000 00:01 7224 /memfd:mozilla-ipc (deleted) We should be able to ignore these since they would not be in the RPM database anyway. [1] https://www.kernel.org/doc/Documentation/admin-guide/devices.txt
- Loading branch information