From nobody Mon Nov 03 20:29:38 2025 X-Original-To: dev-commits-src-branches@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 4d0jql3Vbmz6FjHR; Mon, 03 Nov 2025 20:29:39 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d0jql073zz3KLC; Mon, 03 Nov 2025 20:29:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762201779; 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=xWmSRRJSIj8tM2JIwWNkr/uiMqrlzTDhPqVR65rufos=; b=NE7QPMiWg8dCoAOMbrZ2ZwtD/UkkMRv59E4F1DWVpR6NrU3eAOumqOAqBkKTAuNj3HNZXp 7u83H6UEAeiPwSbxMTwLVC7ZWLGl4YvjPhKfFt9WbiPP45Pp7PySSsk2crjp4ayyiYSo+4 DV/S6jzLlf2HZxDNeWpCCgUFhhDVHhXzDH7t/QlxKm9oB3PqGDhOa6ktk/r7dOb6YYlAec 3AnPRJCxo4JMVzuWJo+w/cI0j8V2i65yyONerD1LWzyzVzsohbPV2Y8lvY7fah51b3E8e9 MUJ73n3ZO2e5Ymf9yaayRmGvundwtRVFjHqYGkiU+b5NO1ZSNo2Eryy29i5GIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762201779; 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=xWmSRRJSIj8tM2JIwWNkr/uiMqrlzTDhPqVR65rufos=; b=A+NcJNklyRHjs29ngaVuwUPUebM77ybNDiw/cuYdAyIr2fEl210j0q3MrlrOW1WZ/vqL+q GzJ14x0hgMcwkHTY/iBjade0bJ2BOUAvqD12Wim+RW3DgRww/CF/fR+Dz02jj9uiY4CgOJ LUvK2fc2hp0lYhm+1GIsGeBIakeXUCh4SNrJehAAxBIOJI+ZSq6dQ3iZODQD+66i7wBMJX cuTgSuX0fq/o01o11g7Jrop4mIMIUAaSUn3KlEIX9m3jNSAwtHqrMfpVFSK+5ZVNkzH6ot iRL3xBVxP9S8H6ILep5VRN+3jsHEvsj7HRzPtE7KBgp3YUI/bk2WS3/1nDUjtg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762201779; a=rsa-sha256; cv=none; b=MUXfnGcRdS43GRayNaUFWm4l2HmwgJ/8dcMwW0516npDRKowlS39eGJfQJ/NvknfukxgYc IgO4qnDShBnbpSMMfMN3e/87YwyOa2aZbILCTc4xYkOMYeSPBs34oKCAWTJonK9ishZpAN kfMbfmCfXzDzzXyT1Uo7NTkIK6Prte62s79tCzJeu24S1XHvVmi/wR78K24BhTkDgcY5tk Vx5cWaxzq5GHT7SWvJSPk27wMJsPReokQA/FsB1D6HxhjMUwR6htoh9IrCK2KMt/XfDp5+ C+E6u/DWJwmVizmBsVYKiCQ+hgd6Zz2njTolSMNjXABvMUn1aZKWext7nrSRtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4d0jqk6mLqz9x0; Mon, 03 Nov 2025 20:29:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5A3KTcD1050881; Mon, 3 Nov 2025 20:29:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5A3KTclF050878; Mon, 3 Nov 2025 20:29:38 GMT (envelope-from git) Date: Mon, 3 Nov 2025 20:29:38 GMT Message-Id: <202511032029.5A3KTclF050878@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 10858b0162dc - releng/15.0 - snd_dummy: Round channel pointer after each write List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 10858b0162dc434d1b6430d7583a88a83c8012d5 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=10858b0162dc434d1b6430d7583a88a83c8012d5 commit 10858b0162dc434d1b6430d7583a88a83c8012d5 Author: Christos Margiolis AuthorDate: 2025-10-27 11:30:29 +0000 Commit: Colin Percival CommitDate: 2025-11-03 20:28:38 +0000 snd_dummy: Round channel pointer after each write Otherwise we go out of bounds and keep incrementing endlessly. Approved by: re (cperciva) Sponsored by: The FreeBSD Foundation MFC after: 4 days Differential Revision: https://reviews.freebsd.org/D53337 (cherry picked from commit 364864ea91abbd8a9a79578168fa5d34e05200a7) (cherry picked from commit 4eac02b29f56f35d17f3cb2104e5b952841e83b9) --- sys/dev/sound/dummy.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/sound/dummy.c b/sys/dev/sound/dummy.c index 4df5b112d3f4..54320aab8496 100644 --- a/sys/dev/sound/dummy.c +++ b/sys/dev/sound/dummy.c @@ -104,9 +104,10 @@ dummy_chan_io(void *arg) ch = &sc->chans[i]; if (!ch->run) continue; - if (ch->dir == PCMDIR_PLAY) + if (ch->dir == PCMDIR_PLAY) { ch->ptr += sndbuf_getblksz(ch->buf); - else + ch->ptr %= sndbuf_getsize(ch->buf); + } else sndbuf_fillsilence(ch->buf); snd_mtxunlock(sc->lock); chn_intr(ch->chan);