Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755529AbbHFMIJ (ORCPT ); Thu, 6 Aug 2015 08:08:09 -0400 Received: from mail-la0-f41.google.com ([209.85.215.41]:33925 "EHLO mail-la0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751401AbbHFMIH (ORCPT ); Thu, 6 Aug 2015 08:08:07 -0400 Date: Thu, 6 Aug 2015 14:08:50 +0200 From: Christoffer Dall To: Paolo Bonzini Cc: Marc Zyngier , nick , "gleb@kernel.org" , "linux-arm-kernel@lists.infradead.org" , "kvmarm@lists.cs.columbia.edu" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] kvm:arm:Fix error handling in the function vgic_v3_probe Message-ID: <20150806120850.GD4657@cbox> References: <1438793303-30228-1-git-send-email-xerofoify@gmail.com> <55C240D9.5060900@redhat.com> <55C242C6.6060200@gmail.com> <55C31582.4000809@arm.com> <55C34C77.7090303@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55C34C77.7090303@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1452 Lines: 30 On Thu, Aug 06, 2015 at 02:00:55PM +0200, Paolo Bonzini wrote: > > > On 06/08/2015 10:06, Marc Zyngier wrote: > > > If this structure of function pointers can handle function pointers with a return type of > > > void I will be glad to do what you request otherwise this would require a major rewrite > > > of kvm arm subsystem for a very simple bug fix. > > > > Just like Paolo said, the error you report should never happen, and > > would be caught by a WARN_ON() the first time anyone boots the kernel. > > Also, failing to register the device ops results in not being able to > > instantiate a VGIC. No harm done. I really don't understand why you want > > to rewrite the probe functions. > > I think he just misunderstood my suggestion. I didn't suggest making > the probe functions return void. I suggested that > kvm_register_device_ops return void. > s390 seems to actually deal with the return value of this function and fail to init KVM at all if it fails, but on the other hand, this function only fails if you're doing something truly stupid and internal-to-kvm incoherent, so I think it's fair to just do a WARN_ON() or even BUG_ON() and make the register function a void. -Christoffer -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/