mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 09:52:39 +02:00
When running glibc tests under user mode NFS, tst-syslog was causing a hang. The hang was traced to unfsd exitting with a buffer overflow being detected. This was traced down to mksocket() where we'd see: socket path '/media/build/poky/build/build-st-2118464/tmp/work/x86-64-v3-poky-linux/glibc-testsuite/2.42+git/build-x86_64-poky-linux/testroot.root/dev/log' is too long at 141 vs 108 There is a length check in mknod_args() but obj may not be setup at this point by cat_name() since the functions can be executed out of order according to C. To avoid this, make the order explict. This means the length is checked and we avoid the buffer overflow. This will likely cause the glibc test to fail however it won't hang, which is a win. [YOCTO #16113] (From OE-Core rev: 34f34512e5eeefc24b36b102a36fc90f14e2f7d2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Hemanth Kumar M D <Hemanth.KumarMD@windriver.com> (cherry picked from commit e51d5e19cb1ba1d5ad7442064b64821d178bc9ca) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Paul Barker <paul@pbarker.dev>