On Wed, Mar 2, 2011 at 3:03 PM, Ryan Harper <ry...@us.ibm.com> wrote: > +void bdrv_remove(BlockDriverState *bs) > +{ > + if (bs->device_name[0] != '\0') { > + QTAILQ_REMOVE(&bdrv_states, bs, list); > + } > +}
It's not safe to invoke QTAILQ_REMOVE() twice. Since both do_drive_del() and bdrv_delete() call bdrv_remove(), could it be invoked twice? A quick fix is to set bs->device_name[0] = '\0' to prevent the second removal. Stefan