From nobody Thu Sep 19 20:24:55 2024 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 4X8n7W3Rnmz5XLZF; Thu, 19 Sep 2024 20:24:55 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X8n7W2V1jz4csr; Thu, 19 Sep 2024 20:24:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726777495; 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=3IWqZeopkFMJRbRxfJ3NuT89FAXHuhvIZrQpGajOc3M=; b=nsIGKc/oKGtGjfXmMd8M6D9O2QQXbc3mHMje2FIioHru1I+XntazcXLPvi2Gev48dTDmEQ t18r2CxbfWGdqhmHiEX/rNFs5LC2YRMzCrJ5PXLjyjO/HXSLP1TV3l7E7wlm9m9YSneTfz QQ9eSb5EA4PG866hECaVwEpQCQPjUGToT42dF5l1HZbKLBhgkhQmu5YSqhR8k5Xo5q4DnM 6Id7aRFPn04QMiLxfeIbycctBbYsSwzZVNu/cRp3jiYvAcYrQhW4U1DDwvJTIvWxXiVt29 iEfsD/2KcYdi8fUP6DX8DqdzfsxlI+v4mg5/PifEGWnZqugxa1I+wbq8MJyHxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726777495; a=rsa-sha256; cv=none; b=MsbU5c4kvhasKJ0BMKiAUdw92xBJTnG2thm8UMFbxGgghQqyrZ1FpgV/rXcAFe3Z1ibuVI ETbU3iMavwLQVYhvuSwK9emmra808sJ7rEjaTFxY3KuVk0hLXlfO/zMZb+HEzd21R4QKBf zANbviTuY1f3JkYFAyECGrBKb6D6tPrE67oa4bvTAtrdBzjgwQoby6P8fodskVhDXYyZWH z3oztMUjc9dfF+B+38ocy0s4Thdsr+C2m/D13Ct1WCfp9lnVcLoxBb4I9cDsP9dlMcleCE 77GjyvkF35IV/NsLh7TlfQGQ0Cz0NPQQqW9IazF0f4M7YKJ8dbPwnmQ2CeAKZA== 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=1726777495; 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=3IWqZeopkFMJRbRxfJ3NuT89FAXHuhvIZrQpGajOc3M=; b=qZOWqJMv9pihNECDtjXKQU5Ip1jr67HHoQryPe0vCNnVuBRkwPPCzJ0OgePQ8zwNR4c6rq kdG8XeYLcW4jjHzga975QYcqraixEoaJUhdIKtF8OmlCU13MIswVphqgALA6ZMloLBXVNK xZZrwBNksxRnWsgsA+VRMs8wNtvPdScK/tv7BsE/IUEWzkyJc7UyNO26ozyMHLjjYaZ/2S m7ejo/F/e9yt+LS7je/zHKNQfLBOOo8q7uGnL76S5NfZ+BlcUcopnNH3hwpjz9rhoJHPuL d2ah5hTkgeze+rY6BmmYk1wi6ugi7wPSUyd8yyW5m0y66NCIjLBsLWDUkBAYWQ== 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 4X8n7W25lkzL8S; Thu, 19 Sep 2024 20:24:55 +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 48JKOt9S053010; Thu, 19 Sep 2024 20:24:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48JKOtKa053007; Thu, 19 Sep 2024 20:24:55 GMT (envelope-from git) Date: Thu, 19 Sep 2024 20:24:55 GMT Message-Id: <202409192024.48JKOtKa053007@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: c6d11ae455a9 - stable/14 - ctl: fix uninitialized data used by PREVENT ALLOW MEDIUM REMOVAL 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c6d11ae455a9c5b6e927ac0a5d63570081074208 Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=c6d11ae455a9c5b6e927ac0a5d63570081074208 commit c6d11ae455a9c5b6e927ac0a5d63570081074208 Author: Alan Somers AuthorDate: 2024-08-26 20:44:24 +0000 Commit: Alan Somers CommitDate: 2024-09-19 20:24:04 +0000 ctl: fix uninitialized data used by PREVENT ALLOW MEDIUM REMOVAL Zero-initialize the bitmap of preventers. Otherwise, the START STOP UNIT command may not have the intended effect. Sponsored by: Axcient Reviewed by: emaste, markj Pull Request: https://github.com/freebsd/freebsd-src/pull/1409 (cherry picked from commit 0f2b2276abc305905e7d88619a7abca26b0dd7eb) --- sys/cam/ctl/ctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index 0e0d79d15d8f..9a99823a5c1c 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -4771,7 +4771,7 @@ fail: ctl_tpc_lun_init(lun); if (lun->flags & CTL_LUN_REMOVABLE) { lun->prevent = malloc((CTL_MAX_INITIATORS + 31) / 32 * 4, - M_CTL, M_WAITOK); + M_CTL, M_WAITOK | M_ZERO); } /*