[libvirt] [PATCH] util: Fix crash when removing entries during hash iteration

Eric Blake eblake at redhat.com
Tue Apr 12 17:06:17 UTC 2011


On 04/12/2011 10:54 AM, Jiri Denemark wrote:
> Commit 9677cd33eea4c65d78ba463b46b8b45ed2da1709 made it possible to
> remove current entry when iterating through all hash entries. However,
> it didn't properly handle a special case of removing first entry
> assigned to a given key which contains several entries in its collision
> list.
> ---
> This is an alternate less invasive fix to "util: Simplify hash implementation".
> I prefer the more invasive fix for upstream but I'm sending this alternative
> here for completeness.

For backporting purposes, would it make sense to apply this patch first,
then apply the other one which undoes this patch as part of its
simplifications?  Then, anyone trying to pick and choose patches to
backport can feel justified going with the smaller patch in isolation.

As for this patch itself, ACK, but whether to apply it depends on the
answer to the bigger question above.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110412/d322a511/attachment-0001.sig>


More information about the libvir-list mailing list