From nobody Fri Jan 17 12:27:27 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 4YZJsC6SPLz5kvZy; Fri, 17 Jan 2025 12:27:27 +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 4YZJsC4B31z3VCl; Fri, 17 Jan 2025 12:27:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737116847; 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=EhxAtA4hDA0IBniqny4Q23SmlAvo3urMmmCiRVKjOk4=; b=a1OtIKk75jxVxD+M9Zfx/qGWECY1wtJsO6lT0JZQodX+Na92GgiJ5eUVN7H0d+DVzKO9gB BPRyMR8089e4z5QxFDs9Km7EQB2PWu86nWsknlhhU8gc9R7pPovcqXHNy/DTXcbvdnFvvg T6jrJTtfdABeAiA+TRSEFa09ZXWO52T6Qqo8KvohVe/e4iSFJD1DhLwYBsNEg6S31E4aGs zc9M7chxoz6draP/Pf8bAWoSM2WRdBf8e6+yGLzVdTb7P+JiAn516Y+eVd1Vh/EOTzMU0y dmau+X2q2SwYW81aORwjLi7Ys7GHORfB1LnmGPJEWretKlVPb7S11cAsnuYI+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737116847; 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=EhxAtA4hDA0IBniqny4Q23SmlAvo3urMmmCiRVKjOk4=; b=oWb1eD0CGgRIprHOz+PYMh7aN4OmOkEdlrClfrCkiM62msOnC5HjSHv2vhumQg+n2H3EIC qfTsOCKAR11OIuYoecwG6SQiRc9dmlXUOisPZi5OwSk2fygnI043F49EmewYmjX6UzhVvj A6bL2dNEXSjicnDFdvVWKY7vJhpQuZbHRZLatd5YWOUVWJjHAPQV6bWxqEBNlovsPZaI1Y DIDdLDHB6CqAtUnFn67aZ8MDSdWZ21bqeTjJxA0ZjKywLLzRKWgKSo7dOJAfxrovJUnqck JVLvSeIa+OUtoE+Z3o9fbtKKP4Fndp1vaEY2luUtieoglmQpS4PW5pfnfN4Ejg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737116847; a=rsa-sha256; cv=none; b=v/8yqqzojxVLCd6xGXFNpcnULVn9HgatmPIDsPSahjZ4Gm+kypv4wpUGv67DvFB9vQgQwb 62RVp39O9KlhiJTXkIcZPfAHI0aEdxfdyo3c6iZ5rrqlEGKIC+Dvr3mESvsQqbJwpiUI9L WTpocttpSgNb1q17C4FpFjYvBv0sw4hGtydhQktRU1v5FjQ+qtuBLahwynd3EWprapFG6d vEY0BKHKIEi6/FCncMorUncoVwqhIa6ZYlCz1rtHTfZVVt5/dFIrWvqMimvcsOLtTomZ+f 9tAmt22FJXjf+aHNdGIKi+wx8QOOmgTwq78uj/avP5y0sFrRAJB1VX13jURQxg== 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 4YZJsC3cfGz35k; Fri, 17 Jan 2025 12:27:27 +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 50HCRR6V053057; Fri, 17 Jan 2025 12:27:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50HCRRK6053054; Fri, 17 Jan 2025 12:27:27 GMT (envelope-from git) Date: Fri, 17 Jan 2025 12:27:27 GMT Message-Id: <202501171227.50HCRRK6053054@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: 5cf27105df1e - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: 5cf27105df1ec5e7e5c7627de978fbcb8e0671dd Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=5cf27105df1ec5e7e5c7627de978fbcb8e0671dd commit 5cf27105df1ec5e7e5c7627de978fbcb8e0671dd Author: Mark Johnston AuthorDate: 2024-12-17 00:12:11 +0000 Commit: Olivier Certner CommitDate: 2025-01-17 12:24:54 +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 4e0ba068c520..0b1e1f9fba55 100644 --- a/sys/sys/queue.h +++ b/sys/sys/queue.h @@ -474,9 +474,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)