Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[linux] fix: memory-mapped file, stat: No such file or directory
In old linux kernel (e.g. linux-2.6) which does not have this feature: Commit 6b4e306aa3dc ("ns: proc files for namespace naming policy."), means this path "/proc/self/ns" is not existed. Since lsof-4.96.0 with Commit dbad150 (" [linux] obtain correct information of memory-mapped file."), compare_mntns() would misunderstand it is in a different mount namespace if "/proc/self/ns" is not existed, returns -1, go through map_files lookup, and finally lead to lsof gets failed with error message "stat: No such file or directory". If "/proc/self/ns" or its underlying path is not existed, compare_mntns() returns 0 instead of -1, in order to go through stat_directly as old days. Signed-off-by: Jones Syue <[email protected]>
- Loading branch information