From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C675D13EFE9; Tue, 27 Feb 2024 13:54:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709042068; cv=none; b=G6r16tY8fVwDJ9dPTlx+dFTnNsbBCFKzDhRFuqEWBpoqQ9meRSc5Swd48B5PszYGxiYpIFPxYHCq2s36OvSCKXJWhtPYb4OwtEAay7/8TP1UjtsV/uNlQDEfpbIOY0wWD5XOX2rShAQhsBJEimgozKnLLRV4yIvcyRFKgaWb/YU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709042068; c=relaxed/simple; bh=IczSpMrQAuXycmiLz/mVygy8boBfPU43NqT2y7p8wVo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UOJJUF1c3qKhfNLGXCeV1d1O/ROQaXL8jPalJGuEZnsw3I2RwYQVpoUyAVH0lEYRY+RqWeJiiM3Cp3kC8hOFj5EHwjeNkOiZ0e0B7eQACq592EAh5YJ3W1mrXqrXdhS4kvGLoKEbs7Ux0nfQqRoUjo/bdcwUP9COW5iNqRAarnE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=B0uFc/+9; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="B0uFc/+9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 52B11C433C7; Tue, 27 Feb 2024 13:54:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709042068; bh=IczSpMrQAuXycmiLz/mVygy8boBfPU43NqT2y7p8wVo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B0uFc/+9sa2GDpQUPNKeeNVIYtXVv42MIAAfaWCFFN+6pCqGCE0xo0gGWqdpSVY4K j2mjh4eDTsxKFGA2VMZw3o6O9ZA/+LX8hKRqq0nA8dz/uEAYWU+NK1p7zA1wGwn3pn oVUfYgwvzgq7AuwbrfMXFTPNLXgl1wtJd+KwSHSA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Oliver Upton , Marc Zyngier Subject: [PATCH 6.6 168/299] KVM: arm64: vgic-its: Test for valid IRQ in its_sync_lpi_pending_table() Date: Tue, 27 Feb 2024 14:24:39 +0100 Message-ID: <20240227131631.250930034@linuxfoundation.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240227131625.847743063@linuxfoundation.org> References: <20240227131625.847743063@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Oliver Upton commit 8d3a7dfb801d157ac423261d7cd62c33e95375f8 upstream. vgic_get_irq() may not return a valid descriptor if there is no ITS that holds a valid translation for the specified INTID. If that is the case, it is safe to silently ignore it and continue processing the LPI pending table. Cc: stable@vger.kernel.org Fixes: 33d3bc9556a7 ("KVM: arm64: vgic-its: Read initial LPI pending table") Signed-off-by: Oliver Upton Link: https://lore.kernel.org/r/20240221092732.4126848-2-oliver.upton@linux.dev Signed-off-by: Marc Zyngier Signed-off-by: Greg Kroah-Hartman --- arch/arm64/kvm/vgic/vgic-its.c | 3 +++ 1 file changed, 3 insertions(+) --- a/arch/arm64/kvm/vgic/vgic-its.c +++ b/arch/arm64/kvm/vgic/vgic-its.c @@ -462,6 +462,9 @@ static int its_sync_lpi_pending_table(st } irq = vgic_get_irq(vcpu->kvm, NULL, intids[i]); + if (!irq) + continue; + raw_spin_lock_irqsave(&irq->irq_lock, flags); irq->pending_latch = pendmask & (1U << bit_nr); vgic_queue_irq_unlock(vcpu->kvm, irq, flags);