[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-virtualization
Subject: [patch 1/2] virtio: fix id_matching for virtio drivers
From: Christian Borntraeger <borntraeger () de ! ibm ! com>
Date: 2009-05-26 13:46:09
Message-ID: 20090526135140.796154000 () de ! ibm ! com
[Download RAW message or body]
From: Christian Borntraeger <borntraeger@de.ibm.com>
This bug never appeared, since all current virtio drivers use
VIRTIO_DEV_ANY_ID for the vendor field. If a real vendor would be used,
the check in virtio_id_match is wrong - it returns 0 if
id->vendor == dev->id.vendor.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
drivers/virtio/virtio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-next/drivers/virtio/virtio.c
===================================================================
--- linux-next.orig/drivers/virtio/virtio.c
+++ linux-next/drivers/virtio/virtio.c
@@ -61,7 +61,7 @@ static inline int virtio_id_match(const
if (id->device != dev->id.device)
return 0;
- return id->vendor == VIRTIO_DEV_ANY_ID || id->vendor != dev->id.vendor;
+ return id->vendor == VIRTIO_DEV_ANY_ID || id->vendor == dev->id.vendor;
}
/* This looks through all the IDs a driver claims to support. If any of them
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/virtualization
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic