Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp774271ybp; Wed, 9 Oct 2019 04:08:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqzfi3UQPeseKCAnMORAxufesny6UNierF1CLe5gtYLW+JAy0eqK7NZT15TRx1ZQHl2KCnax X-Received: by 2002:a17:906:6449:: with SMTP id l9mr2196946ejn.187.1570619337775; Wed, 09 Oct 2019 04:08:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570619337; cv=none; d=google.com; s=arc-20160816; b=jGB8s/5EkosGKxnpBS6NdgRoDxzj1PVfuW1h/2YCr817amRY6jTv/Hl+ohGeDR7R4m FLOkkwHAKAm6M02+/PwzfzDxlIqCLTboEk3/pN9sfiTGAo+Ca2p7Rg0QokcWTdhn06aR 2fnyveZ7RQRMUe55UkOqE0UB9WqBxIdFM7bPod6DYj1BZx2bdBJwNDvn3AUiQHjBkLnL ofN1vcCpBmM9fa40c0W3Vb+V+gih1TTGrPX/A3TZoPZ+f6I+LETlYZDH5pmf9DqCbDZv /e0rkwChJte+t8JYafJEgKaOlbnN2+jh0hxQ4HvLiEG/hdMd3rn2eqhbA7GkMWBMy7o7 TKlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:openpgp:from:references:cc:to:subject; bh=Xc7TlYkB5JpFS+Hl9whOmPahj3I7Ji/cg+bFNUd8gGA=; b=lI+yP1B7FBJMeNUI6/x3WbMo7v2MdFFUNGcFOKM1ziVifGCz/afZm5Rl27j6AWZulH wt8Gj5sMkmjxZwX7F4J4M4sPxepB6X1xb885upRuCWDVffvo/LZtA4PlHrTiOU9B4RQz IlH6SlbNYcMl04sYVyNWT05LBIDcdbWWD9orSaJItp6SrubX6UJZ6xhB5Uc/02g4q47Q 2XWSlVAaWM0jTC5fHkvIade5LC9ho8m4MvaAVjB/qs2BpatJcpig3tw1bKEhK0iautnZ myZo0+UU7b/zyzj8gb46g/NpEDO6XpbstgPOCIuT3AhcTivgCSYKhL54tFhuBwhiMSoO a7DA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u3si939124edy.48.2019.10.09.04.08.26; Wed, 09 Oct 2019 04:08:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728200AbfJILHU (ORCPT + 99 others); Wed, 9 Oct 2019 07:07:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34148 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725953AbfJILHU (ORCPT ); Wed, 9 Oct 2019 07:07:20 -0400 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BC6E3793FF for ; Wed, 9 Oct 2019 11:07:19 +0000 (UTC) Received: by mail-wr1-f71.google.com with SMTP id o10so931779wrm.22 for ; Wed, 09 Oct 2019 04:07:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Xc7TlYkB5JpFS+Hl9whOmPahj3I7Ji/cg+bFNUd8gGA=; b=hSz0MTk3NGmQjOfAsqOp79agQfjMEqrpGGQHJuvcpqmDyoEBCWGOgtnWus4A+Hfy12 OGEys60GgLFQw5/h45EHkX5SLoB1TXYpc49F1C46k7+cQ4m1Ali325LNldHGGdig6wQr dvqP4Xc7971dA9GQZkllg2T4nq49Wb0GhnI6IPEKx3WHbJGA5TWXur0KBXai0mNTrOar 33quZqbSBSI82oXv9hYbjtQmeFAoHyCJybZ6t6S5gUmTY++xyNakee6vZRE15b+VxKH4 liEtv0KQlcw6WqF1EzFXTam0mlOSs+iiIAAbGXYiJPux9ODm+lkYlwzE4c8yJT5Gyahb j89g== X-Gm-Message-State: APjAAAXnCOuerZAdwUjqhlhB6TbeSZ1bMHt3E8vfr6MpAIOJWH9jDLbk DAinDhx6yabvxkLFi8mo8ddYqHMJmrAu+PT9hcfv/kSdp2xxHRZx2VhDlOsbDAVaImWRQChGr5Y oXyUTuu4c2JByKEpT0OMv6D62 X-Received: by 2002:a05:6000:1202:: with SMTP id e2mr2305513wrx.162.1570619238383; Wed, 09 Oct 2019 04:07:18 -0700 (PDT) X-Received: by 2002:a05:6000:1202:: with SMTP id e2mr2305481wrx.162.1570619238075; Wed, 09 Oct 2019 04:07:18 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:f4b0:55d4:57da:3527? ([2001:b07:6468:f312:f4b0:55d4:57da:3527]) by smtp.gmail.com with ESMTPSA id m18sm2606565wrg.97.2019.10.09.04.07.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Oct 2019 04:07:17 -0700 (PDT) Subject: Re: [PATCH] KVM: x86: fix bugon.cocci warnings To: Julia Lawall , Sean Christopherson Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org, =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Thomas Gleixner , Ingo Molnar , Borislav Petkov References: From: Paolo Bonzini Openpgp: preference=signencrypt Message-ID: <0d6e152d-97f4-ddcc-15ad-18b7da60c3ca@redhat.com> Date: Wed, 9 Oct 2019 13:07:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/09/19 18:43, Julia Lawall wrote: > From: kbuild test robot > > Use BUG_ON instead of a if condition followed by BUG. > > Generated by: scripts/coccinelle/misc/bugon.cocci > > Fixes: 4b526de50e39 ("KVM: x86: Check kvm_rebooting in kvm_spurious_fault()") > CC: Sean Christopherson > Signed-off-by: kbuild test robot > Signed-off-by: Julia Lawall > --- > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > head: 02dc96ef6c25f990452c114c59d75c368a1f4c8f > commit: 4b526de50e39b38cd828396267379183c7c21354 KVM: x86: Check kvm_rebooting in kvm_spurious_fault() > :::::: branch date: 9 hours ago > :::::: commit date: 4 days ago > > Please take the patch only if it's a positive warning. Thanks! > > x86.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -360,8 +360,7 @@ EXPORT_SYMBOL_GPL(kvm_set_apic_base); > asmlinkage __visible void kvm_spurious_fault(void) > { > /* Fault while not rebooting. We want the trace. */ > - if (!kvm_rebooting) > - BUG(); > + BUG_ON(!kvm_rebooting); > } > EXPORT_SYMBOL_GPL(kvm_spurious_fault); > Queued, thanks! Paolo