From nobody Thu Sep 05 15:12:15 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 4X02sD1McKz5WD3s; Thu, 05 Sep 2024 15:12:16 +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 4X02sC4kTWz4g3Y; Thu, 5 Sep 2024 15:12:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725549135; 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=g19peTucLeZgXPLIytfRqlyUG0X2DSOnXBvbLGSALG4=; b=XK3izgEVfwSTCLhlqZcl3O9wO5ADqM7lW7aNwVQ4nYjRHWS4ZbDPiPjrKvrPKPdeKeBgiE RFFB7p8DMuuw4SFp4q+wVAYmz9ZtOjcdFwIVAWHUGuz/Zuv5+EaWxQVu37qLViS9qBUStM 6vx5JjkW9g2LtKdoLo69tmiQ64GvcLqvmGKh3+c6i+66tHy1iEZZfDqXrLIqaPjnz+p3ZV IRpXWqpxODMmNvdnCdOSgAE4w7UUgxnUfewP4fFpqWKuWilPyGBTJ9uvAkbScmImDAYqfl evH0Qazr97oI3UIh9H66p2cD0yCKJfkKosH9mUEv34VnxbuRWSGBwDv1McQgmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725549135; a=rsa-sha256; cv=none; b=M8w2b49suafs606oYRoOLrNxfMqKZvoDZyfQJgcpA2FWjFkQxV9aJ1pYHtBADd6j2KCtQe 5Ku6pY2yXOsuEabOPhgk4Ed7uxGnTu6j5UjqEwf9sObGgw42FxF4J9mNaYq6Vl20xw3AFC 6QN+UTJaal7vwmRPEW0nRDTTAzK2JyOwZSgZPFDaWhxzLdbHwT+3d5PolbXJkxb90hWHHI XgGwTFacs1QFCjPLXmpyNdpPNx4oaTZL3vzflpO31YZzNJc2OYycHItUdrN8pS8PnaHNxF PnScETy3ZN5ZX/MFnAwVfo71FqWqNyL/X+lmtPBGdzaZaVtLdmDP+Bg1I8zBVQ== 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=1725549135; 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=g19peTucLeZgXPLIytfRqlyUG0X2DSOnXBvbLGSALG4=; b=Vn0xp5nb+93yncLvT83H07EPi44/rpqEK0Vk7LYR1J1kGAWr6lJA0rtUl4eAajeSdzBNFy 8716cTo5POCUAXzPOzOSkBVDW4Cue78mzHelgbk9iH67wQLqbcB2aldYx+g3H0fGL+acTT VdnHXNFtLrjGeepjDoDK0Mrw91YwhZRQbYVpUrSOr+ehZ8yd9jSP6xstDhzw3iLCf/wfNL pG6IWXPerkrLFYjmHyCp8ajtsLpriXknbnDCh7BBBODhfDfrN6XNfhDO/aDfX2SoP9lkZe O/lBKKpQ1x9NSkTwrvAYNZxKU9uvcyaG78HgazWFGi/Hoiu5ktBag/TeNxuXQQ== 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 4X02sC3qCQz1C7q; Thu, 5 Sep 2024 15:12:15 +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 485FCFHK016985; Thu, 5 Sep 2024 15:12:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 485FCF7k016982; Thu, 5 Sep 2024 15:12:15 GMT (envelope-from git) Date: Thu, 5 Sep 2024 15:12:15 GMT Message-Id: <202409051512.485FCF7k016982@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 0f2b2276abc3 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 0f2b2276abc305905e7d88619a7abca26b0dd7eb Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=0f2b2276abc305905e7d88619a7abca26b0dd7eb commit 0f2b2276abc305905e7d88619a7abca26b0dd7eb Author: Alan Somers AuthorDate: 2024-08-26 20:44:24 +0000 Commit: Alan Somers CommitDate: 2024-09-05 15:10:14 +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. MFC after: 2 weeks Sponsored by: Axcient Reviewed by: emaste, markj Pull Request: https://github.com/freebsd/freebsd-src/pull/1409 --- 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 53858edc2a1d..1505e0886f57 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -4630,7 +4630,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); } /*