From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45172) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z07R1-0006rL-1j for qemu-devel@nongnu.org; Wed, 03 Jun 2015 08:06:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z07Qx-0003lG-3R for qemu-devel@nongnu.org; Wed, 03 Jun 2015 08:06:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50929) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z07Qw-0003lB-Ut for qemu-devel@nongnu.org; Wed, 03 Jun 2015 08:06:11 -0400 From: Juan Quintela Date: Wed, 3 Jun 2015 14:05:42 +0200 Message-Id: <1433333157-9939-7-git-send-email-quintela@redhat.com> In-Reply-To: <1433333157-9939-1-git-send-email-quintela@redhat.com> References: <1433333157-9939-1-git-send-email-quintela@redhat.com> Subject: [Qemu-devel] [PULL 06/21] rdma: Fix qemu crash when IPv6 address is used for migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: amit.shah@redhat.com, Meghana Cheripady , Padmanabh Ratnakar From: Padmanabh Ratnakar 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 Signed-off-by: Padmanabh Ratnakar Signed-off-by: Juan Quintela --- migration/rdma.c | 7 +++++++ 1 file changed, 7 insertions(+) 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; + } else { + return -EINVAL; + } + } if (ibv_query_port(verbs, 1, &port_attr)) { ibv_close_device(verbs); -- 2.4.1