From patchwork Tue May 26 13:46:09 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Borntraeger X-Patchwork-Id: 26024 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4QDpksq020328 for ; Tue, 26 May 2009 13:51:46 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752863AbZEZNvm (ORCPT ); Tue, 26 May 2009 09:51:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752507AbZEZNvl (ORCPT ); Tue, 26 May 2009 09:51:41 -0400 Received: from mtagate8.de.ibm.com ([195.212.29.157]:49264 "EHLO mtagate8.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752051AbZEZNvl (ORCPT ); Tue, 26 May 2009 09:51:41 -0400 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate8.de.ibm.com (8.14.3/8.13.8) with ESMTP id n4QDpgON298560 for ; Tue, 26 May 2009 13:51:42 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n4QDpfwC3154144 for ; Tue, 26 May 2009 15:51:42 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n4QDpfR5026927 for ; Tue, 26 May 2009 15:51:41 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id n4QDpffM026924; Tue, 26 May 2009 15:51:41 +0200 Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 25651) id 3B9FA122422D; Tue, 26 May 2009 15:51:41 +0200 (CEST) Message-Id: <20090526135140.796154000@de.ibm.com> User-Agent: quilt/0.47-1 Date: Tue, 26 May 2009 15:46:09 +0200 From: Christian Borntraeger To: Rusty Russell Cc: virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, Christian Borntraeger Subject: [patch 1/2] virtio: fix id_matching for virtio drivers References: <20090526134608.545964000@de.ibm.com> Content-Disposition: inline; filename=virtio_id_fix.patch Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: Christian Borntraeger 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 --- drivers/virtio/virtio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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