Heidi Eckhart wrote:
I will have a look into it and try to find out where it segfault.
After some testing and debugging, I figured out that sfcb seems to have
a problem with a return result "no instance and status OK" for
getInstance(). This should not cause a segfault in sfcb, but the
behavior in general is correct, as this result is not valid for
getInstance. If the requested instances was not found, then the status
has to be set to something else than OK. I will send this issue to the
sblim-devel mailing list.
This patch fixes the getInstance() segfault with sfcb.
diff -r 84b0269e9994 src/Virt_AllocationCapabilities.c
--- a/src/Virt_AllocationCapabilities.c Tue Dec 18 12:20:13 2007 +0100
+++ b/src/Virt_AllocationCapabilities.c Tue Dec 18 12:21:53 2007 +0100
@@ -118,8 +118,10 @@ static CMPIStatus alloc_cap_instances(co
"Error fetching device pool
InstanceID");
goto out;
}
- if (id && (!STREQ(inst_id, id)))
+ if (id && (!STREQ(inst_id, id))) {
+ inst_id = NULL;
continue;
+ }
s = ac_from_pool(broker, ref,
device_pool_list.list[i],
@@ -131,6 +133,13 @@ static CMPIStatus alloc_cap_instances(co
if (id && (STREQ(inst_id, id)))
break;
+ }
+
+ if (id && !inst_id) {
+ cu_statusf(broker, &s,
+ CMPI_RC_ERR_NOT_FOUND,
+ "Requested Object could not be found.");
+ goto out;
}
if (names_only)
--
Regards
Heidi Eckhart
Software Engineer
Linux Technology Center - Open Hypervisor
heidieck(a)linux.vnet.ibm.com
**************************************************
IBM Deutschland Entwicklung GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschaeftsfuehrung: Herbert Kircher
Sitz der Gesellschaft: Boeblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294