From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27262C43460 for ; Tue, 13 Apr 2021 14:05:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D94BE611CE for ; Tue, 13 Apr 2021 14:05:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346248AbhDMOGJ (ORCPT ); Tue, 13 Apr 2021 10:06:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:39528 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237811AbhDMOGH (ORCPT ); Tue, 13 Apr 2021 10:06:07 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CA1C261242; Tue, 13 Apr 2021 14:05:47 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=hot-poop.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lWJfl-007FMf-M4; Tue, 13 Apr 2021 15:05:45 +0100 From: Marc Zyngier To: james.morse@arm.com, eric.auger.pro@gmail.com, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, alexandru.elisei@arm.com, kvm@vger.kernel.org, Eric Auger , suzuki.poulose@arm.com Cc: gshan@redhat.com, drjones@redhat.com Subject: Re: [PATCH] KVM: arm/arm64: Fix KVM_VGIC_V3_ADDR_TYPE_REDIST read Date: Tue, 13 Apr 2021 15:05:41 +0100 Message-Id: <161832273337.3709196.17485368965759835272.b4-ty@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210412150034.29185-1-eric.auger@redhat.com> References: <20210412150034.29185-1-eric.auger@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: james.morse@arm.com, eric.auger.pro@gmail.com, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, alexandru.elisei@arm.com, kvm@vger.kernel.org, eric.auger@redhat.com, suzuki.poulose@arm.com, gshan@redhat.com, drjones@redhat.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 12 Apr 2021 17:00:34 +0200, Eric Auger wrote: > When reading the base address of the a REDIST region > through KVM_VGIC_V3_ADDR_TYPE_REDIST we expect the > redistributor region list to be populated with a single > element. > > However list_first_entry() expects the list to be non empty. > Instead we should use list_first_entry_or_null which effectively > returns NULL if the list is empty. Applied to kvm-arm64/vgic-5.13, thanks! [1/1] KVM: arm/arm64: Fix KVM_VGIC_V3_ADDR_TYPE_REDIST read commit: 94ac0835391efc1a30feda6fc908913ec012951e Cheers, M. -- Without deviation from the norm, progress is not possible.