|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 6/8] x86/vm-event: minor ASSERT fix, add 'unlikely'
>>> On 07.07.16 at 10:35, <czuzu@xxxxxxxxxxxxxxx> wrote:
> On 7/7/2016 11:27 AM, Jan Beulich wrote:
>>>>> On 06.07.16 at 17:54, <czuzu@xxxxxxxxxxxxxxx> wrote:
>>> --- a/xen/arch/x86/vm_event.c
>>> +++ b/xen/arch/x86/vm_event.c
>>> @@ -96,14 +96,16 @@ void vm_event_register_write_resume(struct vcpu *v,
>>> vm_event_response_t *rsp)
>>> {
>>> if ( rsp->flags & VM_EVENT_FLAG_DENY )
>>> {
>>> - struct monitor_write_data *w = &v->arch.vm_event->write_data;
>>> + struct monitor_write_data *w;
>>>
>>> - ASSERT(w);
>>> + ASSERT(v->arch.vm_event);
>>>
>>> /* deny flag requires the vCPU to be paused */
>>> if ( !atomic_read(&v->vm_event_pause_count) )
>>> return;
>>>
>>> + w = &v->arch.vm_event->write_data;
>>> +
>>> switch ( rsp->reason )
>>> {
>>> case VM_EVENT_REASON_MOV_TO_MSR:
>> I'd have preferred for you to leave alone the initializer, but we'll see
>> what the maintainers are going to say.
>
> It's 'cleaner' this way, doesn't it? Not assigning a pointer to a
> possibly invalid address...
It's a matter of taste, hence subject to the maintainers' opinions.
> Anyway, I'm preparing a v4, I'll probably drop this change if you won't
> *subdue* to ack it (kidding).
I can't ack it anyway.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |