From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Juan Quintela <quintela@redhat.com>
Cc: amit.shah@redhat.com,
Meghana Cheripady <meghana.cheripady@avagotech.com>,
mrhines@us.ibm.com, qemu-devel@nongnu.org,
Padmanabh Ratnakar <padmanabh.ratnakar@avagotech.com>
Subject: Re: [Qemu-devel] [PATCH] rdma: Fix qemu crash when IPv6 address is used for migration
Date: Tue, 2 Jun 2015 14:10:57 +0100 [thread overview]
Message-ID: <20150602131054.GB2139@work-vm> (raw)
In-Reply-To: <87pp5e9sji.fsf@neno.neno>
* Juan Quintela (quintela@redhat.com) wrote:
> Padmanabh Ratnakar <padmanabh.ratnakar@avagotech.com> 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 <meghana.cheripady@avagotech.com>
> > Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@avagotech.com>
> > ---
> > 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.
Dave
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2015-06-02 13:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1433286850-12753-1-git-send-email-padmanabh.ratnakar@avagotech.com>
2015-06-02 12:57 ` [Qemu-devel] [PATCH] rdma: Fix qemu crash when IPv6 address is used for migration Juan Quintela
2015-06-02 13:10 ` Dr. David Alan Gilbert [this message]
2015-06-02 13:17 ` Juan Quintela
2015-06-02 13:20 ` Juan Quintela
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150602131054.GB2139@work-vm \
--to=dgilbert@redhat.com \
--cc=amit.shah@redhat.com \
--cc=meghana.cheripady@avagotech.com \
--cc=mrhines@us.ibm.com \
--cc=padmanabh.ratnakar@avagotech.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.