mirror of
https://git.yoctoproject.org/poky
synced 2026-11-26 06:27:57 +00:00
Backport a fix to try AT_EMPTY_PATH which changes access_fd() to use faccessat(..., AT_EMPTY_PATH) instead of validating access through /proc/self/fd/<fd>. This fixes a reproducible race during service startup. On Linux 6.6 / systemd 255 (Scarthgap) based platform, affected services may fail to start when systemd-remount-fs.service runs concurrently and remounts procfs. In this window, access_fd() can fail with -ESRCH while resolving /proc/self/fd/<fd>, causing systemd to report that the executable cannot be located. The upstream implementation performs the access check directly on the file descriptor, avoiding dependence on procfs path resolution and eliminating the observed race. (From OE-Core rev: 14c332ddf39650bb089dca1ea19642c7449e8af4) Signed-off-by: Suresh H A <Suresh.HA@bmwtechworks.in> Signed-off-by: Yoann Congal <yoann.congal@smile.fr> [YC: More details available at: https://lore.kernel.org/all/MAXP287MB42404C1A7233A3D773FFA7DFEE802@MAXP287MB4240.INDP287.PROD.OUTLOOK.COM/ ] Signed-off-by: Paul Barker <paul@pbarker.dev>