From nobody Tue Dec 17 00:14:29 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 4YBy3n4f1Rz5glM6; Tue, 17 Dec 2024 00:14:29 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YBy3n46KDz4L03; Tue, 17 Dec 2024 00:14:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734394469; 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=+YQBU0a6Mv4lyvEptdK3qMqD5s2s2bkgnvhoC+WWjso=; b=eymOzYrHF+otJU7c37p55SOuYhBqkKNe5Ie9/AOfKkts4enJz8AZ+c7xe5RXmjOh9wprtX 1PCqtGluQWVuxQm4vZGnRdfF00nfSUBPEqoo6rFnA+7GktHABI/9VIzsjYYW0vfwlf9Zb3 iPw7A3TbPlHqsSfFW63CWSnKkJ+Ghf6mXglcPPf8liHuWPpZA4QfXD9tOU6IMmQIQ6bhMo 3Ow7s69E3v295Dxwl3htaLTHBksT7k7Hpu6cZh5vde0ShqWiPJ4sS6a4ETYbMJ0K2rTcBM b+mL+vsXD0LIboZQ01DPSOIFpcKLGJ9+OMj+20a6JLhCIx0BqaxlNFIRPDIpSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734394469; 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=+YQBU0a6Mv4lyvEptdK3qMqD5s2s2bkgnvhoC+WWjso=; b=UfJ0uGI8vzu5ee1xsa/K9Ok53F/C24e0yYNOwncJKFr4CllLKxwPTR29WRmHDpOKbVQd+8 gNclRj/+sf1gORw3Gzwq/Y2H71PCo3JgkE6ZDnztOfxk3YDxRBEoGAqUet4kHVzx0ISeJu i/I+m3Zk4eM0VvgtXWdjWTLAJ8XzM3NKBMFvKrzpKuFoBBjYJziJ5GGVYnb5ylz8UZjDBg Df3wi/3TXE1JcIJmiHUC83e5K5p6Wa55md3C7SosMpiA50JFGSbBzX7mIafOHDVSiJeuTU xOHp3ZLZ6UczG0PJHbTE8ORmIIcA20lZqpQnpVibO7BAeyI1w/fZv/dIPPsfzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1734394469; a=rsa-sha256; cv=none; b=H2StV9DSyRUZnE1f3M/x0Zk+Z+ZdTBuwtOUWw9mgNKdap4Ai8jCNMAPqyoPHug/940sfv+ fRh1oTHsZEZkJZJ6+/QQWNHRbZQfdNiyR3aF1oM7+AAindtJnGahcpmC1TgjcoTyFTdjAQ H7aPcFLWKf9fcUPvu3Fb/OawbU8lpLueYwpcaLLbXhnurExLU5Jqhuxe5OvU1IAiw3P1Sb IxICvWmbV3t5hmFMLuCMNZYpn/c0jukNPFNfzGg/hYbNc+8BHK9dXOLHCcrW30Dx1p889g v3Usihhqq/6Xf53ZgRrdyMqcXGA7xbSI3eTyXf0NRWPLWOLKy+txYOkvsO8vGg== 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 4YBy3n3jW3z1FKw; Tue, 17 Dec 2024 00:14:29 +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 4BH0ETNE018615; Tue, 17 Dec 2024 00:14:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BH0ETgU018612; Tue, 17 Dec 2024 00:14:29 GMT (envelope-from git) Date: Tue, 17 Dec 2024 00:14:29 GMT Message-Id: <202412170014.4BH0ETgU018612@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: da2c88dfcf4f - main - queue: Fix STAILQ_SWAP 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: da2c88dfcf4f425e6e0a58d6df3a7c8e88d8df92 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=da2c88dfcf4f425e6e0a58d6df3a7c8e88d8df92 commit da2c88dfcf4f425e6e0a58d6df3a7c8e88d8df92 Author: Mark Johnston AuthorDate: 2024-12-17 00:12:11 +0000 Commit: Mark Johnston CommitDate: 2024-12-17 00:14:16 +0000 queue: Fix STAILQ_SWAP The debug assertions added in commit 34740937f7a4 do not hold for a window in STAILQ_SWAP, so check whether the queues are empty directly. Reported by: ler Fixes: 34740937f7a4 ("queue: New debug macros for STAILQ") --- sys/sys/queue.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/sys/queue.h b/sys/sys/queue.h index 8a1c6cd7afbb..c1fa8cd812cf 100644 --- a/sys/sys/queue.h +++ b/sys/sys/queue.h @@ -473,9 +473,9 @@ struct { \ (head1)->stqh_last = (head2)->stqh_last; \ STAILQ_FIRST(head2) = swap_first; \ (head2)->stqh_last = swap_last; \ - if (STAILQ_EMPTY(head1)) \ + if (STAILQ_FIRST(head1) == NULL) \ (head1)->stqh_last = &STAILQ_FIRST(head1); \ - if (STAILQ_EMPTY(head2)) \ + if (STAILQ_FIRST(head2) == NULL) \ (head2)->stqh_last = &STAILQ_FIRST(head2); \ } while (0)