Re: [PATCH] always assign userspace_addr

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Glauber Costa
Date: Wednesday, November 19, 2008 - 11:43 am

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)

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] always assign userspace_addr, Glauber Costa, (Mon Nov 17, 8:04 pm)
Re: [PATCH] always assign userspace_addr, Anthony Liguori, (Wed Nov 19, 8:55 am)
Re: [PATCH] always assign userspace_addr, Glauber Costa, (Wed Nov 19, 11:43 am)
Re: [PATCH] always assign userspace_addr, Anthony Liguori, (Wed Nov 19, 11:51 am)
Re: [PATCH] always assign userspace_addr, Glauber Costa, (Wed Nov 19, 1:53 pm)
Re: [PATCH] always assign userspace_addr, Anthony Liguori, (Wed Nov 19, 1:59 pm)
Re: [PATCH] always assign userspace_addr, Avi Kivity, (Thu Nov 20, 4:01 am)
Re: [PATCH] always assign userspace_addr, Avi Kivity, (Thu Nov 20, 4:02 am)
Re: [PATCH] always assign userspace_addr, Glauber Costa, (Fri Nov 21, 11:11 am)
Re: [PATCH] always assign userspace_addr, Glauber Costa, (Mon Nov 24, 6:08 am)
Re: [PATCH] always assign userspace_addr, Avi Kivity, (Tue Nov 25, 7:04 am)