qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/2] pci-assign: Fix a bug when map MSI-X table


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH 1/2] pci-assign: Fix a bug when map MSI-X table memory failed
Date: Tue, 8 Apr 2014 18:32:39 +0300

On Thu, Apr 03, 2014 at 01:18:23PM +0800, address@hidden wrote:
> From: Gonglei <address@hidden>
> 
> when map MSI-X table memory failed, the dev->msix_table not be
> set to NULL, the assigned_dev_unregister_msix_mmio() will case
> a segfault when munmap the failed dev->msix_table.
> 
> Signed-off-by: Gonglei <address@hidden>

Reviewed-by: Michael S. Tsirkin <address@hidden>

> ---
>  hw/i386/kvm/pci-assign.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci-assign.c
> index a825871..570333f 100644
> --- a/hw/i386/kvm/pci-assign.c
> +++ b/hw/i386/kvm/pci-assign.c
> @@ -1608,6 +1608,7 @@ static int 
> assigned_dev_register_msix_mmio(AssignedDevice *dev)
>                             MAP_ANONYMOUS|MAP_PRIVATE, 0, 0);
>      if (dev->msix_table == MAP_FAILED) {
>          error_report("fail allocate msix_table! %s", strerror(errno));
> +        dev->msix_table = NULL;
>          return -EFAULT;
>      }
>  
> -- 
> 1.7.12.4
> 
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]