[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCHv3 2/6] evtchn: defer freeing struct evtchn's until evtchn_destroy_final()



On 18/06/15 11:36, Jan Beulich wrote:
>>>> On 17.06.15 at 14:02, <david.vrabel@xxxxxxxxxx> wrote:
>> --- a/xen/common/event_channel.c
>> +++ b/xen/common/event_channel.c
>> @@ -1175,22 +1175,6 @@ int alloc_unbound_xen_event_channel(
>>  
>>  void free_xen_event_channel(struct domain *d, int port)
>>  {
>> -    struct evtchn *chn;
>> -
>> -    spin_lock(&d->event_lock);
>> -
>> -    if ( unlikely(d->is_dying) )
>> -    {
>> -        spin_unlock(&d->event_lock);
>> -        return;
>> -    }
>> -
>> -    BUG_ON(!port_is_valid(d, port));

I can keep this one.

>> -    chn = evtchn_from_port(d, port);
>> -    BUG_ON(!consumer_is_xen(chn));
> 
> At least in debug builds I think these would better be retained.

But this one has to go because it will always trip when
free_xen_event_channel() is called after evtchn_destroy() (which will
have cleared xen_consumer).

David

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.