From: David Hildenbrand Subject: Re: [PATCH v1] KVM: kvm_io_bus_unregister_dev() should never fail Date: Thu, 23 Mar 2017 18:15:05 +0100 Message-ID: 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> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Paolo Bonzini , rkrcmar@redhat.com, Dmitry Vyukov , Marcelo Tosatti , stable@vger.kernel.org, LKML To: Cornelia Huck Return-path: In-Reply-To: <20170323174013.7509b714.cornelia.huck@de.ibm.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org > > 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