[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] net/vhost-net: do not assert on null pointer return from tap
From: |
Ani Sinha |
Subject: |
Re: [PATCH] net/vhost-net: do not assert on null pointer return from tap_get_vhost_net() |
Date: |
Wed, 28 Jun 2023 20:22:35 +0530 |
> On 28-Jun-2023, at 5:20 PM, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> On 28/6/23 13:44, Ani Sinha wrote:
>>> On 28-Jun-2023, at 5:12 PM, Michael S. Tsirkin <mst@redhat.com> wrote:
>>>
>>> On Wed, Jun 28, 2023 at 04:58:04PM +0530, Ani Sinha wrote:
>>>> When 'vhost=off' or no vhost specific options at all are passed for the tap
>>>> net-device backend, tap_get_vhost_net() can return NULL. The function
>>>> net_init_tap_one() does not call vhost_net_init() on such cases and
>>>> therefore
>>>> vhost_net pointer within the tap device state structure remains NULL.
>>>> Hence,
>>>> assertion here on a NULL pointer return from tap_get_vhost_net() would not
>>>> be
>>>> correct. Remove it and fix the crash generated by qemu upon initialization
>>>> in
>>>> the following call chain :
>>>>
>>>> qdev_realize() -> pci_qdev_realize() -> virtio_device_realize() ->
>>>> virtio_bus_device_plugged() -> virtio_net_get_features() -> get_vhost_net()
>>>>
>>>> fixes: 0e994668d00c9c ("vhost_net: add an assertion for TAP client
>>>> backends")
>>>> Signed-off-by: Ani Sinha <anisinha@redhat.com>
>>>
>>> I added a bunch of tags and sent it upstream. Take a look
>>> at the pull request so you can do it yourself going
>>> forward, pls.
>> I thought only maintainers sends PR? Do you have any handy scripts?
>
> https://github.com/stefanha/git-publish/blob/master/git-publish.pod#sending-pull-requests
Cool! Thanks Phil! Will check this and talk to Stefan.