mirror of
https://git.freebsd.org/src.git
synced 2026-01-12 06:54:03 +00:00
unix/stream: fix instant panic w/o INVARIANTS
Some checks are pending
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / amd64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 macos-latest (clang-18) (push) Waiting to run
Some checks are pending
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / amd64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 macos-latest (clang-18) (push) Waiting to run
A stupid microoptimization I made leaving empty STAILQ inconsistent
is a brainfart that is related to much earlier version of this code,
where it was safe to do so.
Pointy hat to: glebius
Fixes: 69f61cee2e
This commit is contained in:
parent
b0c1ead2b9
commit
82d8a5029a
1 changed files with 2 additions and 3 deletions
|
|
@ -1492,11 +1492,10 @@ restart:
|
|||
}
|
||||
|
||||
if (!peek) {
|
||||
STAILQ_FIRST(&sb->uxst_mbq) = next;
|
||||
#ifdef INVARIANTS
|
||||
if (next == NULL)
|
||||
STAILQ_INIT(&sb->uxst_mbq);
|
||||
#endif
|
||||
else
|
||||
STAILQ_FIRST(&sb->uxst_mbq) = next;
|
||||
MPASS(sb->sb_acc >= datalen);
|
||||
sb->sb_acc -= datalen;
|
||||
sb->sb_ccc -= datalen;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue