From nobody Mon Nov 16 21:00:44 2026 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 4jT0d86XlLz70wlP for ; Mon, 16 Nov 2026 21:00:44 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jT0d84wlkz4Ck5 for ; Mon, 16 Nov 2026 21:00:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794862844; 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=tzlpakskbWtBjNNiWdPSRjy6IfyxUoNBdpZI/EJ/hxs=; b=etxnbfZN76zv+FTh0n/AtXs8dSbADKM1Nj8Ja5mmj7sSZaavrMngDwM9uD3pJLlO4UOU7a NE+vF4xfZMuz5YsXqsR8eMtQwE/WJTjxJx1cEneh4dlA+zYals7qnTa0pzOMDnxtssOH7n vqOKE40basrmLCSI/QSsEDRmAzpN3JoWLQZWm89ZTz3Ypq+cPvRn3JrdXpCyND8VZo1F+L PiQhSdzmPPhOs180hbxd5ddBF++SioGSONyWDMRRdxIqe5jAf24MkGB49NrWhGVI6BPwcv 1NLg0SC5JGHhcT2Q9by0MAsji3ATu8WWsDWlsJOi6FGrD0OY66bpYGJTHIZY4w== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794862844; b=xUh+DSErtl0ek4GHrbp6epB/t030Frkrx7GPKkqYA07LEA97fddKxW+aODHFOyCnbnv/r5 d+XVdviyYI3eHm+44nFmk/rALY0IpbLm08oXSNzSToFp0KYH/yQGeTJLlJQlWOWn+0CyVJ hPFE1UDU0r1EjzkzO3KP+AoxCX0fJpiIPFMiM6bG38KovjQVYOuE07ibNlQ7kIQTWWoBnM +4YKNDrKLSqxKFZl/RmDvGUX7iE+7jKOC3LSZzgNleW4FSYuYoNcq3UORSEotZ/ldK4VE3 nj/jXyUGlk+MpR1zoH3qrImQcxTzKbx57Ng83sy2yihmHmrblxkfZsvxLXhUmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794862844; 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=tzlpakskbWtBjNNiWdPSRjy6IfyxUoNBdpZI/EJ/hxs=; b=UbLooe4eMNU1omRa0fzSaJndns//12DhgN77nsb7b2INOC9Z6YdeeZ1e4iz6+bzp1oYeTa LEWEH+aubTof60gItut5YVPkFAcHuXvx3hAV4jx00zHHZS3uu1TvxocFMFReeXg4alGZPH sbs1Cc1ufnjldqrokIhNAWu9FnpFeZFvmU+ppCH7mAESv2zSQc5pxMjd2Pfdd+lp8PjmeJ PaakXdC4Se1Zxkn9rxEz5WnbbhjkeWawb9oNsHszQw+mUM0qq4vPyEd9fajXRJV1h1BvPG wWXdi/sTlQy5U5t+hFiJuhnfiKBPf7SjV6QyWvq84MSd9aRr38Ai6QwiA6ZNsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jT0d84SBxz191J for ; Mon, 16 Nov 2026 21:00:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 9783 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 16 Nov 2026 21:00:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kenneth D. Merry Subject: git: 8d14946edd56 - stable/15 - camcontrol: Require a reservation type for reserve, preempt and release List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ken X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 8d14946edd56ac57e6a2f0e82848dfef7d8d88ca Auto-Submitted: auto-generated Date: Mon, 16 Nov 2026 21:00:44 +0000 Message-Id: <6afb6efc.9783.368db4fa@gitrepo.freebsd.org> The branch stable/15 has been updated by ken: URL: https://cgit.FreeBSD.org/src/commit/?id=8d14946edd56ac57e6a2f0e82848dfef7d8d88ca commit 8d14946edd56ac57e6a2f0e82848dfef7d8d88ca Author: Kenneth D. Merry AuthorDate: 2026-11-09 18:47:00 +0000 Commit: Kenneth D. Merry CommitDate: 2026-11-16 16:12:44 +0000 camcontrol: Require a reservation type for reserve, preempt and release res_type was initialized to 0, but the checks that enforce the -T argument for the reserve, preempt and release reservation actions compare it against -1, so they could never fire and camcontrol silently sent a reservation type of 0, which is invalid. Initialize res_type to -1 so the checks work, and default the reservation type to 0 for the release action's clear variant, which does not take -T and ignores the field. Reported by: llm-postcr Fixes: ba75cf05727e MFC after: 1 week Sponsored by: Spectra Logic Co-authored-by: Claude Fable 5 (cherry picked from commit b95e2b2ce907cde89bc3e7be2ffeae03cfed55ab) --- sbin/camcontrol/nvres.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sbin/camcontrol/nvres.c b/sbin/camcontrol/nvres.c index ab6132d45fde..1145278356c3 100644 --- a/sbin/camcontrol/nvres.c +++ b/sbin/camcontrol/nvres.c @@ -450,7 +450,7 @@ nvmepersist(struct cam_device *device, int argc, char **argv, char *combinedopt, int eds = 0, cptpl = 0, iekey = 0; int error = 0; int in = 0, out = 0; - int opc = -1, op_action = -1, res_type = 0; + int opc = -1, op_action = -1, res_type = -1; int c; while ((c = getopt(argc, argv, combinedopt)) != -1) { @@ -659,6 +659,9 @@ nvmepersist(struct cam_device *device, int argc, char **argv, char *combinedopt, error = 1; goto bailout; } + /* The reservation type is ignored for a clear. */ + if (res_type == -1) + res_type = 0; break; }