diff --git a/scripts/rules.mk b/scripts/rules.mk index 151ef65..006e03c 100644 --- a/scripts/rules.mk +++ b/scripts/rules.mk @@ -7,7 +7,7 @@ all: # Macros related to the version of the agent -VERSION = 1.48.4 +VERSION = 1.48.5 SDK_VERSION = 1.0.0 # Default value for configuration macros diff --git a/src/libevp-agent/module_impl_obj.c b/src/libevp-agent/module_impl_obj.c index ad10165..bf8a9d4 100644 --- a/src/libevp-agent/module_impl_obj.c +++ b/src/libevp-agent/module_impl_obj.c @@ -114,6 +114,9 @@ module_impl_obj_load(struct module *m, const struct Module *modspec) return EINVAL; } } else if (ret != ENOENT) { + /* Clean up the module if some IO error occurs. */ + plat_mod_fs_file_unlink(m); + /* some IO error in check_hash */ return ret; } diff --git a/src/libevp-agent/platform.c b/src/libevp-agent/platform.c index 47b3ffc..d4a5f99 100644 --- a/src/libevp-agent/platform.c +++ b/src/libevp-agent/platform.c @@ -135,7 +135,8 @@ plat_mod_fs_file_mmap(struct module *module, const void **data, size_t *size, struct stat sb; if (fstat(fd, &sb) == -1) { *error = errno; - xlog_error("%s: error on stat: %d", __func__, *error); + xlog_error("%s: error on stat %s(%d): errno=%d", __func__, + filename, fd, *error); goto failure; } @@ -145,7 +146,8 @@ plat_mod_fs_file_mmap(struct module *module, const void **data, size_t *size, if (addr == MAP_FAILED) { *error = errno; - xlog_error("%s: error on mmap: %d", __func__, errno); + xlog_error("%s: error on mmap %s(%d): errno=%d, st_size=%zu", + __func__, filename, fd, errno, sb.st_size); goto failure; } diff --git a/version.mk b/version.mk index 5fb97eb..c9a56d7 100644 --- a/version.mk +++ b/version.mk @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: Apache-2.0 -VERSION = 1.48.4 +VERSION = 1.48.5 COMMIT_HASH = $(shell git describe --always --abbrev=0 --dirty --match "NOT A TAG") define VERSION_BODY