[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] rdma: Fix qemu crash when IPv6 address is used
From: |
Juan Quintela |
Subject: |
Re: [Qemu-devel] [PATCH] rdma: Fix qemu crash when IPv6 address is used for migration |
Date: |
Tue, 02 Jun 2015 15:17:00 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
"Dr. David Alan Gilbert" <address@hidden> wrote:
> * Juan Quintela (address@hidden) wrote:
>> Padmanabh Ratnakar <address@hidden> wrote:
>> > Qemu crashes when IPv6 address is specified for migration and access
>> > to any RDMA uverbs device available on the system is blocked using cgroups.
>> > Fix the crash by checking the return value of ibv_open_device routine.
>> >
>> > Signed-off-by: Meghana Cheripady <address@hidden>
>> > Signed-off-by: Padmanabh Ratnakar <address@hidden>
>> > ---
>> > migration/rdma.c | 7 +++++++
>> > 1 files changed, 7 insertions(+), 0 deletions(-)
>> >
>> > diff --git a/migration/rdma.c b/migration/rdma.c
>> > index 77e3444..3671903 100644
>> > --- a/migration/rdma.c
>> > +++ b/migration/rdma.c
>> > @@ -790,6 +790,13 @@ static int qemu_rdma_broken_ipv6_kernel(Error **errp,
>> > struct ibv_context *verbs)
>> >
>> > for (x = 0; x < num_devices; x++) {
>> > verbs = ibv_open_device(dev_list[x]);
>> > + if (!verbs) {
>> > + if (errno == EPERM) {
>> > + continue;
>>
>> Why do we want to continue here?
>
> I think the idea is to loop through the set of devices and find if any of them
> are 'roce'; if one of the devices iwe don't have permission to use
> then it's probably
> ok to skip and move onto the next one?
>
>> > + } else {
>> > + return -EINVAL;
>> > + }
>> > + }
>> >
>> > if (ibv_query_port(verbs, 1, &port_attr)) {
>>
>>
>> Reading the documentation, my understandig is that if verbs is NULL, we
>> don't have a context to do anything useful here, no?
>
> But that's OK because of the if (!verbs) above?
>
>> > ibv_close_device(verbs);
>>
>>
>> Thanks, Juan.
I got a brown paper bag over my head. Just got patch contexct wrong.
>
> Dave
>
>>
> --
> Dr. David Alan Gilbert / address@hidden / Manchester, UK