From nobody Mon Aug 22 12:01:14 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MB9tf6ngzz4ZSHP; Mon, 22 Aug 2022 12:01:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MB9tf6Hsxz3vGD; Mon, 22 Aug 2022 12:01:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661169674; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bKj/JPl4Ja5Ieeapr4OTMVLwpSacrKrVB/8UF7cIqYw=; b=ZUObqYfBPck3HHgZ2cUYupsKZQsijwwymBMBcTQRf1R3Tv/W+9KhgNN5YSK6N4XYVtlsiN lW4J8t54YBzUohpSj4mqEQ1RfKgKGJXewlrRYmPjUPSgxr5xbUeWjwEKkY2a1JZTHMz38I FJA2zTXPBOm2/hj9slqCoEbEx2FuuxFhfEUe99ppKw31zbV4qKCzzflQ4YOLukzHMPuCuP IFfgC09tqA8er6UEv4ggWbv59DaDIoPEKjZNgjteep2uzH8jd0+9mfIhw7X6j9O14tFtAY iPO78zWP+/wzj7cRG4m++rd46+WEYJA1YE0hjlqap+tcX2iXxWb97xI7+GTX1A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MB9tf5L6LzpNt; Mon, 22 Aug 2022 12:01:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27MC1E6p084137; Mon, 22 Aug 2022 12:01:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27MC1ECu084136; Mon, 22 Aug 2022 12:01:14 GMT (envelope-from git) Date: Mon, 22 Aug 2022 12:01:14 GMT Message-Id: <202208221201.27MC1ECu084136@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 11d08e7e8d6c - main - arm/gic: fix a KASSERT in arm_gic_reserve_msi_range() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 11d08e7e8d6ca4de0852b2998593a295b04cb567 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661169674; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bKj/JPl4Ja5Ieeapr4OTMVLwpSacrKrVB/8UF7cIqYw=; b=V79DFrrcaUYPW0BWuYVHRYx+3FSAfdXT9sc7mi2IDXH5/UENpqJbk3hQRNPXQLQkWVvT/S SuGAU7WsPU8vrrXHUzR/of6Ki3GpQ0yFhqoaW00Nn1A1pB1j3Omzk/7t5EGaKp7nFmcZ3M TIM3dfLDpYo9Zioib1FomVe5GHmGXy3+s1eYpdglTHKh5JyprvKbwfWhUcY7BGGB2b8gxK UrOHuILzofkj/9aXkfnKx5XpWAzCca+uLtd1qeJORhBaLG+L+uMaepH6fKAZvmh5/LKHpn WNAOtR9AfM3ISFsEy6NbG6Ihkf9pxYKH3Elq91R/6h/zVVRFSVBeUzX2dnapkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661169674; a=rsa-sha256; cv=none; b=vZKkuUduUs7bIVJ6DiDa53xxouVeLRvJ24iIjiCI11plFR1NZL/kCW21z8/5u3rioQp1qx 5lqc0EuE2vJnJO5/DRma901rGt50hvUH5+euqavdNgnbrQs9cE0t2JhO2Ny0/MV9JAZ+R9 y9fc7rnomVKyxAmeuAH2cyUzhAUrff4YMqorKwjU5FEg9aU8wEdZOopwazZG1Qpd0Xf1+e 9evhtnu3idZ8OdVhPDyraq4vxQfkJIwxGT2RdUhI+EnCzJyFc1sdnQ5TFXux5jjTZcKrG/ mig17z43PNRSuf3U89prkvCi3rGWoMdtWFLmpOBlJHKjMDagZzCzriOSsCPb7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=11d08e7e8d6ca4de0852b2998593a295b04cb567 commit 11d08e7e8d6ca4de0852b2998593a295b04cb567 Author: Bjoern A. Zeeb AuthorDate: 2022-08-22 11:51:37 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-08-22 11:59:02 +0000 arm/gic: fix a KASSERT in arm_gic_reserve_msi_range() Fix the off-by-one in the KASSERT in arm_gic_reserve_msi_range() allowing the MSIs being allocated at the end of the IRQ range. Reported by: bz Submitted by: andrew Reviewed by: andrew MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D36291 --- sys/arm/arm/gic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm/arm/gic.c b/sys/arm/arm/gic.c index 93bfdc29d930..d2d88237935e 100644 --- a/sys/arm/arm/gic.c +++ b/sys/arm/arm/gic.c @@ -288,7 +288,7 @@ arm_gic_reserve_msi_range(device_t dev, u_int start, u_int count) sc = device_get_softc(dev); - KASSERT((start + count) < sc->nirqs, + KASSERT((start + count) <= sc->nirqs, ("%s: Trying to allocate too many MSI IRQs: %d + %d > %d", __func__, start, count, sc->nirqs)); for (i = 0; i < count; i++) {