On 09/30/2014 11:35 PM, John Ferlan wrote:
https://bugzilla.redhat.com/show_bug.cgi?id=1146837
Resolve a crash in libvirtd resulting from commit id 'a4bd62ad' (1.0.6)
which added parentaddr and unique_id to allow unique identification of
a scsi_host, but assumed that all the pool entries and the incoming
definition would be similarly defined. If the existing pool uses the
'name' attribute and an incoming pool is using the parentaddr/unique_id,
then the code will attempt to compare the existing name string against
the incoming name string which doesn't exist (is NULL) and results in
a core (STREQ).
Fixing this crash would be nicer in a separate patch.
Conversely, if the existing pool used the parentaddr/unique_id and
the
to be defined pool used the name, then the comparison would be against
the parentaddr, but since the incoming pool doesn't have one - that would
leave the comparison against a parentaddr of all 0's and a unique_id of 0,
which will always comparison to fail. This means someone could define the
same source adapter for two pools
When defining a storage pool, we don't check if the adapter name or
parentaddr/unique_id is valid, so I don't think we should require it to be
valid to detect duplicates.
If there was a pool with invalid parentaddr, no other SCSI pools could be
defined because of that.
Maybe we could check it on pool startup?
Jan