From owner-dev-commits-src-all@freebsd.org Wed Jul 7 00:43:58 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4E9F464AE76; Wed, 7 Jul 2021 00:43: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 4GKLJt1pHnz4RCj; Wed, 7 Jul 2021 00:43:58 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 254AF23C8D; Wed, 7 Jul 2021 00:43: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 1670hwUi000982; Wed, 7 Jul 2021 00:43:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1670hwDn000981; Wed, 7 Jul 2021 00:43:58 GMT (envelope-from git) Date: Wed, 7 Jul 2021 00:43:58 GMT Message-Id: <202107070043.1670hwDn000981@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: da2f833f7a0b - main - MMCCAM: fix a panic after cam_sim_alloc_dev() removal in sdhci.c 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: da2f833f7a0bef3cde7d5fc2a05e4646e873567f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jul 2021 00:43:58 -0000 The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=da2f833f7a0bef3cde7d5fc2a05e4646e873567f commit da2f833f7a0bef3cde7d5fc2a05e4646e873567f Author: Bjoern A. Zeeb AuthorDate: 2021-07-07 00:37:45 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-07-07 00:37:45 +0000 MMCCAM: fix a panic after cam_sim_alloc_dev() removal in sdhci.c During the removal of cam_sim_alloc_dev() in aeb04e88f51a706ef4b6a380bf5e82d15203fb6a for sdhci.c and the follow-up build-fix in a72af82e3169fcacfedf9047120679300a4296f8 slot->dev and slot->bus got mixed up for MMCCAM; slot->dev is only used in the !MMCCAM case so is uninitialised here leading to a panic; switch back to slot->bus to return to the status quo. Reviewed by: imp (ack on arm@) X-Differential Revision: https://reviews.freebsd.org/D30857 --- sys/dev/sdhci/sdhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/sdhci/sdhci.c b/sys/dev/sdhci/sdhci.c index bd30175e9f86..d075c2e05000 100644 --- a/sys/dev/sdhci/sdhci.c +++ b/sys/dev/sdhci/sdhci.c @@ -2484,7 +2484,7 @@ sdhci_start_slot(struct sdhci_slot *slot) mtx_init(&slot->sim_mtx, "sdhcisim", NULL, MTX_DEF); slot->sim = cam_sim_alloc(sdhci_cam_action, sdhci_cam_poll, - "sdhci_slot", slot, device_get_unit(slot->dev), + "sdhci_slot", slot, device_get_unit(slot->bus), &slot->sim_mtx, 1, 1, slot->devq); if (slot->sim == NULL) {