Commit fa3c94d5 authored by Laurent Dufour's avatar Laurent Dufour Committed by Pavel Emelyanov

aio: Don't consider aio_nr_req as a fd

When freeing the vma entries, don't call close on vm_file_fd when dealing
with a VMA AIO entry since the vm_file_fd is then filled with aio_nr_req as
part of the union.

I hit this issue when running the test aio00 on ppc64. Here the value of
the VMA aio aio_nr_req field was matching the value of the service file
descriptor IMG_FD_OFF. This leads to an obscure checkpoint error.
Signed-off-by: 's avatarLaurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 6fc15485
...@@ -92,6 +92,8 @@ static void close_vma_file(struct vma_area *vma) ...@@ -92,6 +92,8 @@ static void close_vma_file(struct vma_area *vma)
return; return;
if (vma->file_borrowed) if (vma->file_borrowed)
return; return;
if (vma_area_is(vma, VMA_AREA_AIORING))
return;
close(vma->vm_file_fd); close(vma->vm_file_fd);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment