From nobody Thu Jan 16 18:08:37 2025 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 4YYrTM3mz8z5kl0n; Thu, 16 Jan 2025 18:08:39 +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 4YYrTK706hz3Rx6; Thu, 16 Jan 2025 18:08:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737050918; 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=/tyQV6jbimT7KVqtegxKOGqnqNz4cLqQu7U+Q9PDgEU=; b=Ti/Qjxv5ub/ixJj1MtKHvzQb3sje/uOZAgovtKpMIB3O2mnz8s6IDTlf5pXacpkT0eTqQ1 75bfJy0INEIR0SHh3FTR2DbYUNicP+ZdBoE8A8RJui+eAyV4tuOOWIZtJPN8FsynjAeiUE GjO+QVN26G3zp3oXRXiHOgxWK3NfeLiRDhcJcL9130Yv2w67BNFr+r1Q3LR93x79D3nn78 Ta2yibQ8Pu4uJhMZ+dEpTg2DvreiwgKUMphXsbWJMYBpYvilC2h7rDDZX0KzvnikPjqINA yYdrjp9gSW7aBJypTvZeoo/8GtBXL9iVhhKFzFpBKfiXDMwvGTEgJfTUDFj9TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737050918; 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=/tyQV6jbimT7KVqtegxKOGqnqNz4cLqQu7U+Q9PDgEU=; b=NF+FgUMQzrN9f7A65i02bMor/5hmf/IlKXi6Gy9CipVnvcjGn+YzuNJ5LnMHx/9delOll0 I73Wj0ufAfDNVgAbq7iuYtxbCLiHDwRX0EwGff8fGbWHAxLniNxPq+mPja+geeUgIqydyT iRYpfck8/fkNGdzLmm52S2mkd28A3LTW9eJSINeALRJ5GT0cJrr8ubBKOs3uekH37qB4u6 NRt/w0JunRKAYUkVYTjn2dfKrOHqgpPZj+1FUAiIvcuCGjI92oUCmnASi+QpAaPtBwv5jC UBwwCa/AzPh/zciBPlbQlC1NF3q8YB56U4WhbchIRVEHF1LmF7oRIm3zBJ+VqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737050918; a=rsa-sha256; cv=none; b=pvJolSTWLXG5NMMfpW8RHSPc25qvYwo4mFM+P9HnjLUDZGJtvMT0TExcdSGIP5jul/NN9Q 29/wKhKZVr93Fpi9yAuMXru0OoM/HQ92ekaWwyryJWrqFE6E3UdQ8CH3pa4mMZg/VMAKI3 fnjwZaSukmCREsEoXb16NXtmN3OMD2aNDCf45Hp1hxkX1UTxvaPBbmz5JKviwMTDhmscG0 IgBXzKvH0Th2EyjHH1xmoVen0zlVAkUryKwAEu12UsoFNrHWSnT1PUav4J6rL4/iyAFMjC VjwvEQ6pP0J7B5ol6LESwv6JR+HDJkvu4bQUUvwtrKXxggMDY7ieLR/NZJufhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4YYrTK6DKjzkJT; Thu, 16 Jan 2025 18:08:37 +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 50GI8bIV092806; Thu, 16 Jan 2025 18:08:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50GI8bwu092803; Thu, 16 Jan 2025 18:08:37 GMT (envelope-from git) Date: Thu, 16 Jan 2025 18:08:37 GMT Message-Id: <202501161808.50GI8bwu092803@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: b14c0e102e78 - stable/14 - 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: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b14c0e102e783c24795578df33b60319c6239481 Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=b14c0e102e783c24795578df33b60319c6239481 commit b14c0e102e783c24795578df33b60319c6239481 Author: Mark Johnston AuthorDate: 2024-12-17 00:12:11 +0000 Commit: Olivier Certner CommitDate: 2025-01-16 18:07:01 +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") (cherry picked from commit da2c88dfcf4f425e6e0a58d6df3a7c8e88d8df92) --- 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 fee6618ee88c..be862c7ce814 100644 --- a/sys/sys/queue.h +++ b/sys/sys/queue.h @@ -475,9 +475,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)