mirror of
https://github.com/SCST-project/scst.git
synced 2026-10-22 14:12:33 +00:00
The saved Cppcheck report identifies the lost directory-read result: scst/src/scst_dlm.c:784: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] scst_dlm_update_nodeids overwrites the result of iterate_dir or vfs_readdir with -ENOMEM. An empty or partial listing after a read error can therefore replace the existing membership and report success. Check the initial allocation and return directory errors before changing node IDs, participant count or the local node ID. Isolate directory access behind a task-scoped KUnit stub while retaining both kernel APIs. Cover EIO, EACCES and ENOMEM with an existing membership and verify its array ownership and contents survive. Include the private test header in generated kernel patches as well as out-of-tree builds.