misc fixes and cleanup
Vishal Verma
maintainercover misc fixes and cleanup
Patch 1 is a README update in the Unit tests section to include CONFIG_ENCRYPTED_KEYS in the list of config items required for unit tests.
Patch 2 fixes a potential resource leak found during static analysis
Vishal Verma (2):
ndctl/README: Add CONFIG_ENCRYPTED_KEYS to the config items list ndctl/namespace: fix a resource leak in file_write_infoblock()
README.md | 1 + ndctl/namespace.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
Signature · 4 lines
2.26.2 _______________________________________________ Linux-nvdimm mailing list -- [email protected] To unsubscribe send an email to [email protected]
Vishal Verma
maintainerPATCH 1/2 ndctl/README: Add CONFIG_ENCRYPTED_KEYS to the config items list
CONFIG_ENCRYPTED_KEYS is required for test/security.sh (and generally for security operations). It defaults to 'N', so call it out in the list of config items for nfit_test.
--- README.md | 1 + 1 file changed, 1 insertion(+)
README.md +1 -0
@@ -65,6 +65,7 @@ loaded. To build and install nfit_test.ko: CONFIG_NVDIMM_PFN=y CONFIG_NVDIMM_DAX=y CONFIG_DEV_DAX_PMEM=m + CONFIG_ENCRYPTED_KEYS=y ``` 1. Build and install the unit test enabled libnvdimm modules in the
Signature · 4 lines
2.26.2 _______________________________________________ Linux-nvdimm mailing list -- [email protected] To unsubscribe send an email to [email protected]
Vishal Verma
maintainerPATCH 2/2 ndctl/namespace: fix a resource leak in file_write_infoblock()
In reply to Vishal VermaStatic analysis showed that we might leak 'fd' in the given function. Fix the error path to close(fd) if 'fd >= 0' rather than just 'fd > 0'.
--- ndctl/namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
ndctl/namespace.c +1 -1
@@ -1969,7 +1969,7 @@ static int file_write_infoblock(const char *path)free (buf); out: -if (fd >0 && fd !=STDOUT_FILENO ) +if (fd >=0 && fd !=STDOUT_FILENO )close (fd);return rc; }
Signature · 4 lines
2.26.2 _______________________________________________ Linux-nvdimm mailing list -- [email protected] To unsubscribe send an email to [email protected]