From nobody Wed Sep 21 14:00:58 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 4MXg6y6gdgz4cXyR; Wed, 21 Sep 2022 14:00:58 +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 4MXg6y5rsWz478f; Wed, 21 Sep 2022 14:00:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663768858; 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=R3TCgi7kMOqLaanQ/8VKhySb7lRkY8RYWHifwm/7bZ0=; b=XFxly+pN1lEn7mDsvgvNrDSOBSTzWhLFzZyMlW6TPoAfZO1ltN1H/mlsfUuUnn70jrDFbi L+HE5WUkiAg9IYWwPxGDE/NmfDMr9YXr1uSPVfIvljiZm5XN7gDCBUsC/XCOHc/npNpFUX Bmf1zJwmbjvGIGynnx4ELW/IFtF7vhggzaZdYs94qS/IoPeQAcVymNayB6G98kiqnP5uVN InqSjwYAzjQTebgAYIBjxjCh1ZZlTHQYETP7obd99MI7JSEhzxtpvLQJWNGdg3VOCj+Oau pGlIsBeLX3w6Dh9lI1BMqc+nYDAnhpk7Uk/TcBuKTRG4px2kfZUhDcRkKokIiA== 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 4MXg6y4wJJz14st; Wed, 21 Sep 2022 14:00:58 +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 28LE0wbV098138; Wed, 21 Sep 2022 14:00:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28LE0w9e098137; Wed, 21 Sep 2022 14:00:58 GMT (envelope-from git) Date: Wed, 21 Sep 2022 14:00:58 GMT Message-Id: <202209211400.28LE0w9e098137@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: b6e6b7bc5d63 - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: b6e6b7bc5d6302a8b69c47590e647be6bd629fd7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663768858; 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=R3TCgi7kMOqLaanQ/8VKhySb7lRkY8RYWHifwm/7bZ0=; b=UkXojYjnMuTijWJqT+oqBroeVyMhORQr+1/KDIhKvzhIiQR0vg/GCFav6Z/yCY9YD6MLBP 0mBACmQHqd0iHNjgNfa4qhgwG4AEZ0VGfh0W26EC+6JjcVccf6PSD0Pkq32gkQEsfv5g9i U5HoKPGBN2n1h+nOqQw+BDyt0vAyWxz+SAG/Ji9OVfaeYnn0T69U9iYcngIPriZaEO6AYA TeqHNY7gi2nYuZX0xkJbjSaO4DZrJZkXbtgTIh4yAazCHKczOHDYO7nMWABQcHcPb4FDml M8GL98QDQD90WlK81Yn9XiOtUPoY8tLR7g6owsHi49zJkCcrK9DIJB1Oc/BOPQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1663768858; a=rsa-sha256; cv=none; b=l0+3GU5k3AYZ0tRcEZwFVtlrSvAV1JrV3hnqjwxishUJUN1Mj2krBNvpQAo2EHOKyciV5B 2yBfIJtUw57QzGpaufAW/mOSaIXkqDm409kf8gIQj1xoNAkh3CvnKthLdNT08/1yHCwOCE q2lJB2IIub/XThWW5EJwd3a1M7BvfHU6MVyhj/7e5bhUbts4Yn/eeqsCzsDm2NYTbbxBCW ZEOsFGKEUVyQn/vpfR80JOl4bHqSie28v4pu/9WaPB05ZccL/Vrn1PdYbYnAb4Adm2i3oF S2qiRjxb80nBQ671DWo00wUEbKA+QwHN0LOzYrxcVoBWxDJMxhfdYsAIEUBuhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=b6e6b7bc5d6302a8b69c47590e647be6bd629fd7 commit b6e6b7bc5d6302a8b69c47590e647be6bd629fd7 Author: Bjoern A. Zeeb AuthorDate: 2022-08-22 11:51:37 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-09-21 11:38:41 +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 Differential Revision: https://reviews.freebsd.org/D36291 (cherry picked from commit 11d08e7e8d6ca4de0852b2998593a295b04cb567) --- 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 8fcf511fda08..0a6329edb472 100644 --- a/sys/arm/arm/gic.c +++ b/sys/arm/arm/gic.c @@ -279,7 +279,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++) {