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 0F4D313B798; Tue, 27 Feb 2024 14:21:50 +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=1709043710; cv=none; b=sc4zGcnr+36mMGnS9u7qza5YuzayA1PxQDzVmF9VeonZViP/p6VyaMebi6XfAtaz14Qh6JkrbqHfQLVrxLZaHINx6+vsvTUv5PckMrybtOqM4Y3h9QL7rgnizzeti0dOfbZ/vHJMc4X/EvU7jUY/O9bL0/d2L1ynypjbRcPadT8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709043710; c=relaxed/simple; bh=eJmj4o4TN3GhGf9rCFgEAyMxshZCbfAZhmyYD9CJqOc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uDWJTXExyzrXrPaRUruVsI/ews0QJDT66cblOaU+Zki99LJoeW+3JmwP2v4NNXYf17iAiD5/LVRSGQSWXxvOB0LevMHwClk73hpLqkNV5BunQDm0GCNOuQ08mg/Y/GCqcnWoS+FSg7aS0PA459WBR4YNn2xTrMOEb072pqwqB8w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=j68BGm7V; 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="j68BGm7V" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C112C433C7; Tue, 27 Feb 2024 14:21:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709043709; bh=eJmj4o4TN3GhGf9rCFgEAyMxshZCbfAZhmyYD9CJqOc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j68BGm7V6uAlEyHHXbcc6oL+JQAQphKwegeYVjx+t0BE5NJMAHnY+24NRmhhIccte k8HFJjH5dVFy9GwBUiv+zWPDfo/881TPnobfCBjQi/OBUa2UxaJMFnvL4XhROkrjhU FyXZjbeuCoeYzJg3bkgubea8mKJmCXvPx+0qbzUQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Oliver Upton , Marc Zyngier Subject: [PATCH 5.4 01/84] KVM: arm64: vgic-its: Test for valid IRQ in its_sync_lpi_pending_table() Date: Tue, 27 Feb 2024 14:26:28 +0100 Message-ID: <20240227131552.915484885@linuxfoundation.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240227131552.864701583@linuxfoundation.org> References: <20240227131552.864701583@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 5.4-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 --- virt/kvm/arm/vgic/vgic-its.c | 3 +++ 1 file changed, 3 insertions(+) --- a/virt/kvm/arm/vgic/vgic-its.c +++ b/virt/kvm/arm/vgic/vgic-its.c @@ -459,6 +459,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);