Files
scst/scripts/kernel
Gleb Chesnokov f0547f16e6 scst_dlm: Preserve membership when directory enumeration fails
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.
2026-10-21 13:20:12 +03:00
..