From nobody Fri Feb 6 15:31:11 2026 X-Original-To: dev-commits-src-main@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 4f6yjW5QBtz6RLXH for ; Fri, 06 Feb 2026 15:31:11 +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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4f6yjW4dj9z3t1X for ; Fri, 06 Feb 2026 15:31:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1770391871; 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=K7SPOsCeui45nMZJ/zJkWTh/cWYlOM3nAKRW/GK2HgU=; b=vqz1HYEcVOElo2BmqLHMC+oU4TeTF6UOGm6NQ401oLEeQ1Zfv5O+e0hoQfWb7mdJpaP68g njwuvq0qsfu1QFinprmIoN6zZL4mDQZ7usEHaHunRlXM8joLLW+04BEugzjNUiVd46R1L5 Wbn+FbMG80rZCB0Xw+VHPhJYCgRbmaGUmB3NfIPw+yuFMtTCMKb/i2Pa2U1M612+8VwzmZ BfCtR23G8NpRofwccHHOTiCMEviUuQYq7nuDwbeMchu1FeIvHCAjhAOYia+NIlrlfUFw4X i9BGBN8myFryDk9iEFaq7SlEgj0Foxz+hNamOQUKu6l2AKFZiWy7JKnK1ypNGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1770391871; a=rsa-sha256; cv=none; b=b7WwEyXlR4ySjsVL50h7sI4PmyBqv9jb1VFYYUAFvQkBq0EYwpMV/Z2wyxtw4ZLzKGEfPS z9pGb09DZdQo1CejoDOrYYSeOX6lS7Z86NkGPZcP8E/HQHzE+95PxeeVDwiZHm9mfNdd/w 5NCkWiITqVmWzL7ajJOPQqIUwRpCf7m7Xcu7KWhPK2itZmQ+rJ4aeXyfHRP5IuY0UwGKCy Cke//GiTx+oPNEovAwQYYcds0syegLt/neb267NuqLvHD4SpYjNNdWlYJVCibECv9WEsWB Gb4PSrr3CFv0KMtP/6g952BVUrNe4MY8EnwmLTCSAqZnI774lHaGyYNg6/+xRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1770391871; 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=K7SPOsCeui45nMZJ/zJkWTh/cWYlOM3nAKRW/GK2HgU=; b=lWiSBNuHp3oKf9WfHG86lp1cPOTsbw1Phxjhr43ld2A+g8kcvm2cBsKZWTeeE2wvuKvEaX VbbYPKH/RTOwRCqNWwPyuZdkuoszHrMsL22KyH/ZiLfApWyBMkXwTOYh3EycRAX5nt+yn7 sQKE2CQBRNOtsl8+h3gKmamgnFqw+VLtBSXFEaLgBlEnWFHopxJ/BLD8L6Z/6+d430iips Xo//PLi5jFzk3Kb+EaJ6Gpp1jj6RJO9B8sQCiog+q/FZA/9F+o3SbMh3MuiETVEstyWGGc D6msmCVuAFBY7lqG2VjEBQ0vIq0H+vGRFy3J8ff9+NWl8x0eDfMQTsvnQA9Z2g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4f6yjW4BvXz62H for ; Fri, 06 Feb 2026 15:31:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 18885 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 06 Feb 2026 15:31:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 06fd19b5349a - main - spibus: Don't leak KVA when freeing a mmap region List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 06fd19b5349a1ff27ef338619fdade596986fc2f Auto-Submitted: auto-generated Date: Fri, 06 Feb 2026 15:31:11 +0000 Message-Id: <6986093f.18885.5a7e56d@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=06fd19b5349a1ff27ef338619fdade596986fc2f commit 06fd19b5349a1ff27ef338619fdade596986fc2f Author: John Baldwin AuthorDate: 2026-02-06 15:30:26 +0000 Commit: John Baldwin CommitDate: 2026-02-06 15:30:26 +0000 spibus: Don't leak KVA when freeing a mmap region Effort: CHERI upstreaming Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D54837 --- sys/dev/spibus/spigen.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/spibus/spigen.c b/sys/dev/spibus/spigen.c index 66c93e927281..39b94c6123fc 100644 --- a/sys/dev/spibus/spigen.c +++ b/sys/dev/spibus/spigen.c @@ -283,8 +283,10 @@ spigen_mmap_cleanup(void *arg) { struct spigen_mmap *mmap = arg; - if (mmap->kvaddr != 0) + if (mmap->kvaddr != 0) { pmap_qremove(mmap->kvaddr, mmap->bufsize / PAGE_SIZE); + kva_free(mmap->kvaddr, mmap->bufsize); + } if (mmap->bufobj != NULL) vm_object_deallocate(mmap->bufobj); free(mmap, M_DEVBUF);