From nobody Sat Apr 09 01:31:48 2022 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 A15351A8B72D; Sat, 9 Apr 2022 01:31:49 +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 4KZyJj0S4Rz4jtC; Sat, 9 Apr 2022 01:31:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649467909; 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=ohL7XK83TTsgONEWNtPPPtASR1wVnPhZO4Jhn8m07Ck=; b=x6ApFvr5g5GvQMl6XK5vr8PN0iznIdtw1UuzLROe9rEiDzApbD7zKw00DHjEGP3aXDBKjG QXyDAcS1jddcdQWBAdGN98zcNY+FA4hePhbehYt9T5titm5Z7jORM+T23M+YQ0gzhA8kB9 +/ZYQKjCNkVBshcFTkQvV6wAg08FdjWEoOvV9PSHCIlSR0s+p67sb2BQNffZ/6fUpv5ptF TSw8lHdlVuzOEJABqaoFtmuAJCqZqVwa3IoRurFRC3WsCDwBLvPFqkAIlf+AnvWTjtMxMD Y4fPjSRzM3O2Xt9It4yGriRDIHXva7ae1Yhs00P0wKH6eUSN6/MqS6StIPpacw== 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 D77BE108D1; Sat, 9 Apr 2022 01:31:48 +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 2391Vmm7049416; Sat, 9 Apr 2022 01:31:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2391VmwL049415; Sat, 9 Apr 2022 01:31:48 GMT (envelope-from git) Date: Sat, 9 Apr 2022 01:31:48 GMT Message-Id: <202204090131.2391VmwL049415@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 4f6be8c788ca - main - bcm2835_audio_callback: Don't process garbage if there is no message. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 4f6be8c788ca0339a84e935515d290b59dbec31b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649467909; 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=ohL7XK83TTsgONEWNtPPPtASR1wVnPhZO4Jhn8m07Ck=; b=g4JuITi6B68jEjEHykYkpjZgW8JM61p5M513HYRzOAmZqtMV3E/nflTUTB97ha5gFU05J5 sFT9VDGP1UFYn6XXN2xgeVabQ5DXQS0NA2sdi420f5bBR3TKAqRDS6eY5n9JoVkgpd5LV0 kzNIx2/WXhtcZ51JzrqGvyEySMDirCeKBvfObrYPVbGOiEl/hcD2FEhPZizWL6AbegmtNM HIDI0+Ty6kFqK9gDQ5xmQH0YEUR/efF7Bnme+ajsD0A5HTsGN3DYd02YpGJKf4KXcTsOA1 FJw1mxDDmfXE871+8BVAxWZXVnBdN7xfpVUY/gjS1E3OgN91HLzHFdk4eiaMAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649467909; a=rsa-sha256; cv=none; b=LDqRUoiIOeE8TsjxbS7ck1zV/ip0yIT+PeeuXpUidtISq24mNgE42ZFBfpYZZaoRcJ4n0T pD0YbfgVtunErZhd76jU2TCMvtU01hU5okJ1jRXR4O4fP+K72SAXbwzFfiCM5qXEYQczPy gBSyOwtQBGjupecAu1XNPkNSabu1YtcG5q6zmr483JxeKB965VlmtKLiRCREnmu6W8g6pL 6gAhyce8/xa+MHGrrgK6gcfb3kAV6benPg9XKliiwa09xB0NcA5oYBLdFCMs+5+Z17AWgp I+XJBbtdBbWGiaOTQZI8Y9q4dfc1b79Cn6m614KuJ/UEpjaMG9TOLxlmQEpEyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4f6be8c788ca0339a84e935515d290b59dbec31b commit 4f6be8c788ca0339a84e935515d290b59dbec31b Author: John Baldwin AuthorDate: 2022-04-09 01:31:29 +0000 Commit: John Baldwin CommitDate: 2022-04-09 01:31:29 +0000 bcm2835_audio_callback: Don't process garbage if there is no message. If vchi_msg_dequeue failed due to an empty queue, return rather than treating stack garbage as a valid message. --- sys/arm/broadcom/bcm2835/bcm2835_audio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/arm/broadcom/bcm2835/bcm2835_audio.c b/sys/arm/broadcom/bcm2835/bcm2835_audio.c index ae2c9a14fc62..da5939ec33cb 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_audio.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_audio.c @@ -207,6 +207,8 @@ bcm2835_audio_callback(void *param, const VCHI_CALLBACK_REASON_T reason, void *m status = vchi_msg_dequeue(sc->vchi_handle, &m, sizeof m, &msg_len, VCHI_FLAGS_NONE); + if (status != 0) + return; if (m.type == VC_AUDIO_MSG_TYPE_RESULT) { if (m.u.result.success) { device_printf(sc->dev,