|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH V5 10/12] xen/vm_event: Relocate memop checks
>>> On 17.02.15 at 19:47, <tamas.lengyel@xxxxxxxxxxxx> wrote:
> On Tue, Feb 17, 2015 at 3:25 PM, Jan Beulich <JBeulich@xxxxxxxx> wrote:
>>>>> On 13.02.15 at 17:33, <tamas.lengyel@xxxxxxxxxxxx> wrote:
>>> -int mem_paging_memop(struct domain *d, xen_mem_paging_op_t *mpo)
>>> +int mem_paging_memop(unsigned long cmd,
>>> + XEN_GUEST_HANDLE_PARAM(xen_mem_paging_op_t) arg)
>>> {
>>> - int rc = -ENODEV;
>>> + int rc;
>>> + xen_mem_paging_op_t mpo;
>>> + struct domain *d;
>>> +
>>> + rc = -EFAULT;
>>> + if ( copy_from_guest(&mpo, arg, 1) )
>>> + return rc;
>>
>> Please don't make things more complicated than they need to be:
>> You only use the -EFAULT once here, so no reason to assign it to
>> rc up front.
>
> This return will be a "goto out;" where the rcu is getting unlocked as well.
How that? You didn't take the RCU lock yet (which is even visible
from the rest of the hunk above).
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |