Re: [PATCH] virtio-pci: read the right virtio_pci_notify_cap field

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

 



On Mon, Feb 01, 2016 at 07:36:31PM +0100, Ladi Prosek wrote:
> Looks like a copy-paste bug. The value is used only for one sanity
> check and it probably isn't causing any damage. Found when porting
> this code to Windows.
> 
> Signed-off-by: Ladi Prosek <lprosek@xxxxxxxxxx>

I tweaked this to say:
	The value is used as an optimization and a
	wrong value probably isn't causing any serious damage.

And applied.

Thanks!

> ---
>  drivers/virtio/virtio_pci_modern.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c
> index c0c11fa..7760fc1 100644
> --- a/drivers/virtio/virtio_pci_modern.c
> +++ b/drivers/virtio/virtio_pci_modern.c
> @@ -679,7 +679,7 @@ int virtio_pci_modern_probe(struct virtio_pci_device *vp_dev)
>  
>  	pci_read_config_dword(pci_dev,
>  			      notify + offsetof(struct virtio_pci_notify_cap,
> -						cap.length),
> +						cap.offset),
>  			      &notify_offset);
>  
>  	/* We don't know how many VQs we'll map, ahead of the time.
> -- 
> 2.5.0
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux