[PATCH] Revert "irqbypass: do not start cons/prod when failed connect"

Jason Wang jasowang at redhat.com
Sun May 9 21:34:25 PDT 2021


在 2021/5/10 上午11:00, Zhu, Lingshan 写道:
>
>
> On 5/10/2021 10:43 AM, Jason Wang wrote:
>>
>> 在 2021/5/8 下午3:11, Zhu Lingshan 写道:
>>> This reverts commit a979a6aa009f3c99689432e0cdb5402a4463fb88.
>>>
>>> The reverted commit may cause VM freeze on arm64 platform.
>>> Because on arm64 platform, stop a consumer will suspend the VM,
>>> the VM will freeze without a start consumer
>>>
>>> Signed-off-by: Zhu Lingshan <lingshan.zhu at intel.com>
>>
>>
>> Acked-by: Jason Wang <jasowang at redhat.com>
>>
>> Please resubmit with the formal process of stable 
>> (stable-kernel-rules.rst).
> sure, I will re-submit it to stable kernel once it is merged into 
> Linus tree.
>
> Thanks


I think it's better to resubmit (option 1), see how 
stable-kernel-rules.rst said:

""

:ref:`option_1` is **strongly** preferred, is the easiest and most common.
:ref:`option_2` and :ref:`option_3` are more useful if the patch isn't 
deemed
worthy at the time it is applied to a public git tree (for instance, because
it deserves more regression testing first).

"""

Thanks


>>
>> Thanks
>>
>>
>>> ---
>>>   virt/lib/irqbypass.c | 16 ++++++----------
>>>   1 file changed, 6 insertions(+), 10 deletions(-)
>>>
>>> diff --git a/virt/lib/irqbypass.c b/virt/lib/irqbypass.c
>>> index c9bb3957f58a..28fda42e471b 100644
>>> --- a/virt/lib/irqbypass.c
>>> +++ b/virt/lib/irqbypass.c
>>> @@ -40,21 +40,17 @@ static int __connect(struct irq_bypass_producer 
>>> *prod,
>>>       if (prod->add_consumer)
>>>           ret = prod->add_consumer(prod, cons);
>>>   -    if (ret)
>>> -        goto err_add_consumer;
>>> -
>>> -    ret = cons->add_producer(cons, prod);
>>> -    if (ret)
>>> -        goto err_add_producer;
>>> +    if (!ret) {
>>> +        ret = cons->add_producer(cons, prod);
>>> +        if (ret && prod->del_consumer)
>>> +            prod->del_consumer(prod, cons);
>>> +    }
>>>         if (cons->start)
>>>           cons->start(cons);
>>>       if (prod->start)
>>>           prod->start(prod);
>>> -err_add_producer:
>>> -    if (prod->del_consumer)
>>> -        prod->del_consumer(prod, cons);
>>> -err_add_consumer:
>>> +
>>>       return ret;
>>>   }
>>
>




More information about the linux-arm-kernel mailing list