On Wed, Nov 19, 2008 at 09:55:10AM -0600, Anthony Liguori wrote:
Oh yeah, it does get freed.
The delete path ends up in a kvm_free_physmem_slot, which will effectively
vfree() the rmap structure. In fact, my userspace use case worked totally
properly when I deleted the slot prior to re-registering it.
The problem here is when there is an already existant slot, and we are
trying to change some information about it. The problem you are concerned
basically does not exist, because it would raise only if we are changing
the slot size. The code says:
/* Disallow changing a memory slot's size. */
r = -EINVAL;
if (npages && old.npages && npages != old.npages)
goto out_free;
And this seem pretty much as the expected behaviour to me. (At least, it
is a reasonable behaviour, although one could argue that it could easily
be different)
--