[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.8] libxl: init_acpi_config should return rc in exit path, and set to 0 on success
commit 443264ea123ca766a83a3cd37e25e23f171143f9 Author: Wei Liu <wei.liu2@xxxxxxxxxx> AuthorDate: Wed Dec 14 11:44:36 2016 +0000 Commit: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> CommitDate: Wed Jan 4 17:00:36 2017 +0000 libxl: init_acpi_config should return rc in exit path, and set to 0 on success init_acpi_config should return rc in exit path ... otherwise it returns 0 even if the function fails. Coverity-ID: 1397121 Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> (cherry picked from commit 1361db0ed3ad1217bd039a3cac5df49a622e12a9) AND: set rc to 0 in init_acpi_config in success path xc_doamin_getinfo returns >=0 in success path, and if there is no vnode configured, that rc will be returned to caller, which indicates error. Fix that by setting rc to 0 in success path. Reported-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> Tested-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> (cherry picked from commit 08ccb46924385c833bd0da9e087fb6b96fa76849) Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- tools/libxl/libxl_x86_acpi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/libxl/libxl_x86_acpi.c b/tools/libxl/libxl_x86_acpi.c index ff0e2df..b441adf 100644 --- a/tools/libxl/libxl_x86_acpi.c +++ b/tools/libxl/libxl_x86_acpi.c @@ -152,8 +152,9 @@ static int init_acpi_config(libxl__gc *gc, config->lapic_base_address = LAPIC_BASE_ADDRESS; config->lapic_id = acpi_lapic_id; + rc = 0; out: - return 0; + return rc; } int libxl__dom_load_acpi(libxl__gc *gc, -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.8 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |