Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756409AbdCWRPL (ORCPT ); Thu, 23 Mar 2017 13:15:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40554 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753414AbdCWRPJ (ORCPT ); Thu, 23 Mar 2017 13:15:09 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com C02EC2E6046 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=david@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com C02EC2E6046 Subject: Re: [PATCH v1] KVM: kvm_io_bus_unregister_dev() should never fail To: Cornelia Huck References: <20170323143441.5749-1-david@redhat.com> <20170323170635.1fb91a2c.cornelia.huck@de.ibm.com> <48d409b3-d584-eaa3-24ca-e7330d6fc0e1@redhat.com> <20170323174013.7509b714.cornelia.huck@de.ibm.com> Cc: kvm@vger.kernel.org, Paolo Bonzini , rkrcmar@redhat.com, Dmitry Vyukov , Marcelo Tosatti , stable@vger.kernel.org, LKML From: David Hildenbrand Organization: Red Hat GmbH Message-ID: Date: Thu, 23 Mar 2017 18:15:05 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170323174013.7509b714.cornelia.huck@de.ibm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 23 Mar 2017 17:15:10 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 338 Lines: 15 > > Either that, or an early exit for bus == NULL in kvm_io_bus_destroy(). > (I think the second option is more straightforward.) I prefer to have the checks where kvm->buses[x] is actually accessed. So the chance of missing yet another check is easier to verify. Will send out v2 in a couple of minutes. Thanks! -- Thanks, David