[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V4 4/7] CAN bus Kvaser PCI CAN-S (single SJA1000
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH V4 4/7] CAN bus Kvaser PCI CAN-S (single SJA1000 channel) emulation added. |
Date: |
Wed, 7 Mar 2018 12:40:13 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
On 06/03/2018 21:52, Pavel Pisa wrote:
> Hello Thomas,
>
> thanks for report but I at this time I am and
> can be some time in condition which does not allow
> me to access e-mail and normal work
>
> On Tuesday 06 of March 2018 16:29:19 Thomas Huth wrote:
>> On 14.01.2018 21:14, address@hidden wrote:
>>> From: Pavel Pisa <address@hidden>
>>>
>>> Signed-off-by: Pavel Pisa <address@hidden>
>>> ---
>>> default-configs/pci.mak | 1 +
>>> hw/can/Makefile.objs | 1 +
>>> hw/can/can_kvaser_pci.c | 375
>>> ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 377
>>> insertions(+)
>>> create mode 100644 hw/can/can_kvaser_pci.c
>>
>> Hi,
>>
>> the kvaser_pci device introduced a new way to crash QEMU, e.g.:
>>
>> mips64el-softmmu/qemu-system-mips64el -M malta,accel=qtest \
>> -device kvaser_pci
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x0000555555a6e2ec in can_bus_insert_client (bus=0x0,
>> address@hidden) at
>> /home/thuth/devel/qemu/net/can/can_core.c:50
>> 50 QTAILQ_INSERT_TAIL(&bus->clients, client, next);
>
> The reason is that parameters canbus0 and canbus1 are required.
>
> -object can-bus,id=canbus0 \
> -device kvaser_pci,canbus0=canbus0
>
> This could be be fast fix but plead somebody else to send regular
> patch.
>
> --- a/net/can/can_host.c
> +++ b/net/can/can_host.c
> @@ -57,6 +57,10 @@ static void can_host_connect(CanHostState *ch, Error
> **errp)
> return;
> }
>
> + if (ch->bus_client == NULL) {
> + error_setg(errp, "bus is not specified for given device.");
> + return;
> + }
> can_bus_insert_client(ch->bus, &ch->bus_client);
> }
Ok, I'll check it out.
Thanks Thomas for the report!
Paolo